Ignore:
Timestamp:
Jul 24, 2013, 9:02:47 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: The Math object should not be polymorphic
https://bugs.webkit.org/show_bug.cgi?id=117576

Reviewed by Oliver Hunt.

Fill in the Math object eagerly, to avoid its structure changing during
execution. There are lots of ways to skin this cat; this one seemed
easiest, and justified given the relative hotness of math operations.

20% speedup on DSP-filtrr tests, small speedups on a few Kraken tests.

  • DerivedSources.make:
  • JavaScriptCore.order:
  • create_hash_table:
  • interpreter/CallFrame.h:

(JSC::ExecState::jsonTable): Removed the Math object's static table.

  • runtime/JSObject.cpp:

(JSC::JSObject::putDirectNativeFunctionWithoutTransition):

  • runtime/JSObject.h:
  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):

  • runtime/MathObject.h:

(JSC::MathObject::create): Set up the Math object at construction time.

  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):

  • runtime/VM.h: Removed the Math object's static table.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r153189 r153223  
    22002200    ASSERT(name);
    22012201   
    2202     JSFunction* function =
    2203         JSFunction::create(exec, globalObject, functionLength, name, nativeFunction, intrinsic);
     2202    JSFunction* function = JSFunction::create(exec, globalObject, functionLength, name, nativeFunction, intrinsic);
    22042203    putDirect(exec->vm(), propertyName, function, attributes);
     2204}
     2205
     2206void JSObject::putDirectNativeFunctionWithoutTransition(ExecState* exec, JSGlobalObject* globalObject, const PropertyName& propertyName, unsigned functionLength, NativeFunction nativeFunction, Intrinsic intrinsic, unsigned attributes)
     2207{
     2208    StringImpl* name = propertyName.publicName();
     2209    ASSERT(name);
     2210   
     2211    JSFunction* function = JSFunction::create(exec, globalObject, functionLength, name, nativeFunction, intrinsic);
     2212    putDirectWithoutTransition(exec->vm(), propertyName, function, attributes);
    22052213}
    22062214
Note: See TracChangeset for help on using the changeset viewer.