<rdar://problem/9331651> REGRESSION: RPRVT grows by 1MB / sec @ dvd2blu.com
authorGeoffrey Garen <ggaren@apple.com>
Wed, 11 May 2011 20:55:30 +0000 (20:55 +0000)
committerAdemar de Souza Reis Jr <ademar.reis@openbossa.org>
Thu, 12 May 2011 14:42:28 +0000 (11:42 -0300)
commitbc995207bb359c4c127bf3a767fc7960a26315f8
tree8f1cfaffd0bc4afbbe1ebff9202271983060bc7a
parent9c272bf9dc7ed5c288c18ec12311ec82c34199b6
<rdar://problem/9331651> REGRESSION: RPRVT grows by 1MB / sec @ dvd2blu.com

Reviewed by Oliver Hunt.

SunSpider reports no change.

This bug was caused by changing Structure and Executable to being GC
objects, and by a long-standing bug that would thrash the global object
between dictionary and non-dictionary states.

* runtime/BatchedTransitionOptimizer.h:
(JSC::BatchedTransitionOptimizer::BatchedTransitionOptimizer): Don't
eagerly transition to dictionary -- this can cause pathological dictionary
churn, and it's not necessary, since objects know how to automatically
transition to dictionary when necessary.

* runtime/Executable.cpp:
(JSC::EvalExecutable::compileInternal):
(JSC::ProgramExecutable::compileInternal):
(JSC::FunctionExecutable::compileForCallInternal):
(JSC::FunctionExecutable::compileForConstructInternal): Be sure to report
extra cost from compilation, because it can be quite high. This is especially
important for program code, since DOM timers can repeatedly allocate
program code without allocating any other objects.

* runtime/JSObject.cpp:
(JSC::JSObject::removeDirect): Don't transition to the uncacheable state
if the thing we're trying to remove doesn't exist. This can happen during
compilation, since the compiler needs to ensure that no pre-existing
conflicting definitions exist for certain declarations.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@86263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/BatchedTransitionOptimizer.h
Source/JavaScriptCore/runtime/Executable.cpp
Source/JavaScriptCore/runtime/JSObject.cpp