Ignore:
Timestamp:
May 11, 2011, 1:55:30 PM (14 years ago)
Author:
[email protected]
Message:

<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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/BatchedTransitionOptimizer.h

    r84052 r86263  
    3939            , m_object(object)
    4040        {
    41             if (!m_object->structure()->isDictionary())
    42                 m_object->setStructure(globalData, Structure::toCacheableDictionaryTransition(globalData, m_object->structure()));
    4341        }
    4442
    4543        ~BatchedTransitionOptimizer()
    4644        {
    47             m_object->flattenDictionaryObject(*m_globalData);
     45            if (m_object->structure()->isDictionary())
     46                m_object->flattenDictionaryObject(*m_globalData);
    4847        }
    4948
Note: See TracChangeset for help on using the changeset viewer.