Changeset 156498 in webkit


Ignore:
Timestamp:
Sep 26, 2013 2:43:49 PM (11 years ago)
Author:
akling@apple.com
Message:

Pass VM instead of ExecState to many finishCreation() functions.
<https://webkit.org/b/121975>

Reviewed by Sam Weinig.

Reduce unnecessary loads by passing the VM to object creation
functions that don't need the ExecState.

There are tons of opportunities in this area, I'm just scratching
the surface.

Location:
trunk/Source/JavaScriptCore
Files:
56 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r156497 r156498  
     12013-09-26  Andreas Kling  <akling@apple.com>
     2
     3        Pass VM instead of ExecState to many finishCreation() functions.
     4        <https://webkit.org/b/121975>
     5
     6        Reviewed by Sam Weinig.
     7
     8        Reduce unnecessary loads by passing the VM to object creation
     9        functions that don't need the ExecState.
     10
     11        There are tons of opportunities in this area, I'm just scratching
     12        the surface.
     13
    1142013-09-26  Commit Queue  <commit-queue@webkit.org>
    215
  • trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp

    r155711 r156498  
    6060}
    6161
    62 void ArrayConstructor::finishCreation(ExecState* exec, ArrayPrototype* arrayPrototype)
     62void ArrayConstructor::finishCreation(VM& vm, ArrayPrototype* arrayPrototype)
    6363{
    64     Base::finishCreation(exec->vm(), arrayPrototype->classInfo()->className);
    65     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
    66     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     64    Base::finishCreation(vm, arrayPrototype->classInfo()->className);
     65    putDirectWithoutTransition(vm, vm.propertyNames->prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
     66    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    6767}
    6868
  • trunk/Source/JavaScriptCore/runtime/ArrayConstructor.h

    r154373 r156498  
    3636    static ArrayConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrayPrototype)
    3737    {
    38         ArrayConstructor* constructor = new (NotNull, allocateCell<ArrayConstructor>(*exec->heap())) ArrayConstructor(globalObject, structure);
    39         constructor->finishCreation(exec, arrayPrototype);
     38        VM& vm = exec->vm();
     39        ArrayConstructor* constructor = new (NotNull, allocateCell<ArrayConstructor>(vm.heap)) ArrayConstructor(globalObject, structure);
     40        constructor->finishCreation(vm, arrayPrototype);
    4041        return constructor;
    4142    }
     
    4950
    5051protected:
    51     void finishCreation(ExecState*, ArrayPrototype*);
     52    void finishCreation(VM&, ArrayPrototype*);
    5253    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
    5354
  • trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp

    r155143 r156498  
    3737}
    3838
    39 void BooleanConstructor::finishCreation(ExecState* exec, BooleanPrototype* booleanPrototype)
     39void BooleanConstructor::finishCreation(VM& vm, BooleanPrototype* booleanPrototype)
    4040{
    41     Base::finishCreation(exec->vm(), booleanPrototype->classInfo()->className);
    42     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
     41    Base::finishCreation(vm, booleanPrototype->classInfo()->className);
     42    putDirectWithoutTransition(vm, vm.propertyNames->prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
    4343
    4444    // no. of arguments for constructor
    45     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
     45    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
    4646}
    4747
  • trunk/Source/JavaScriptCore/runtime/BooleanConstructor.h

    r154038 r156498  
    3434    static BooleanConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, BooleanPrototype* booleanPrototype)
    3535    {
    36         BooleanConstructor* constructor = new (NotNull, allocateCell<BooleanConstructor>(*exec->heap())) BooleanConstructor(globalObject, structure);
    37         constructor->finishCreation(exec, booleanPrototype);
     36        VM& vm = exec->vm();
     37        BooleanConstructor* constructor = new (NotNull, allocateCell<BooleanConstructor>(vm.heap)) BooleanConstructor(globalObject, structure);
     38        constructor->finishCreation(vm, booleanPrototype);
    3839        return constructor;
    3940    }
     
    4748
    4849protected:
    49     void finishCreation(ExecState*, BooleanPrototype*);
     50    void finishCreation(VM&, BooleanPrototype*);
    5051
    5152private:
  • trunk/Source/JavaScriptCore/runtime/BooleanPrototype.cpp

    r155143 r156498  
    5656}
    5757
    58 void BooleanPrototype::finishCreation(ExecState* exec, JSGlobalObject*)
     58void BooleanPrototype::finishCreation(VM& vm, JSGlobalObject*)
    5959{
    60     Base::finishCreation(exec->vm());
    61     setInternalValue(exec->vm(), jsBoolean(false));
     60    Base::finishCreation(vm);
     61    setInternalValue(vm, jsBoolean(false));
    6262
    6363    ASSERT(inherits(info()));
  • trunk/Source/JavaScriptCore/runtime/BooleanPrototype.h

    r154373 r156498  
    3232    static BooleanPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
    3333    {
    34         BooleanPrototype* prototype = new (NotNull, allocateCell<BooleanPrototype>(*exec->heap())) BooleanPrototype(exec, structure);
    35         prototype->finishCreation(exec, globalObject);
     34        VM& vm = exec->vm();
     35        BooleanPrototype* prototype = new (NotNull, allocateCell<BooleanPrototype>(vm.heap)) BooleanPrototype(exec, structure);
     36        prototype->finishCreation(vm, globalObject);
    3637        return prototype;
    3738    }
     
    4546
    4647protected:
    47     void finishCreation(ExecState*, JSGlobalObject*);
     48    void finishCreation(VM&, JSGlobalObject*);
    4849    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | BooleanObject::StructureFlags;
    4950
  • trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp

    r155143 r156498  
    8080}
    8181
    82 void DateConstructor::finishCreation(ExecState* exec, DatePrototype* datePrototype)
    83 {
    84     Base::finishCreation(exec->vm(), datePrototype->classInfo()->className);
    85     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
    86     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
     82void DateConstructor::finishCreation(VM& vm, DatePrototype* datePrototype)
     83{
     84    Base::finishCreation(vm, datePrototype->classInfo()->className);
     85    putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
     86    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
    8787}
    8888
  • trunk/Source/JavaScriptCore/runtime/DateConstructor.h

    r154373 r156498  
    3535        {
    3636            DateConstructor* constructor = new (NotNull, allocateCell<DateConstructor>(*exec->heap())) DateConstructor(globalObject, structure);
    37             constructor->finishCreation(exec, datePrototype);
     37            constructor->finishCreation(exec->vm(), datePrototype);
    3838            return constructor;
    3939        }
     
    4747
    4848    protected:
    49         void finishCreation(ExecState*, DatePrototype*);
     49        void finishCreation(VM&, DatePrototype*);
    5050        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
    5151
  • trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp

    r156240 r156498  
    507507}
    508508
    509 void DatePrototype::finishCreation(ExecState* exec, JSGlobalObject*)
    510 {
    511     Base::finishCreation(exec->vm());
     509void DatePrototype::finishCreation(VM& vm, JSGlobalObject*)
     510{
     511    Base::finishCreation(vm);
    512512    ASSERT(inherits(info()));
    513513
  • trunk/Source/JavaScriptCore/runtime/DatePrototype.h

    r154373 r156498  
    3737        static DatePrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
    3838        {
    39             DatePrototype* prototype = new (NotNull, allocateCell<DatePrototype>(*exec->heap())) DatePrototype(exec, structure);
    40             prototype->finishCreation(exec, globalObject);
     39            VM& vm = exec->vm();
     40            DatePrototype* prototype = new (NotNull, allocateCell<DatePrototype>(vm.heap)) DatePrototype(exec, structure);
     41            prototype->finishCreation(vm, globalObject);
    4142            return prototype;
    4243        }
     
    5152
    5253    protected:
    53         void finishCreation(ExecState*, JSGlobalObject*);
     54        void finishCreation(VM&, JSGlobalObject*);
    5455        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | DateInstance::StructureFlags;
    5556    };
  • trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp

    r155143 r156498  
    3939}
    4040
    41 void ErrorConstructor::finishCreation(ExecState* exec, ErrorPrototype* errorPrototype)
     41void ErrorConstructor::finishCreation(VM& vm, ErrorPrototype* errorPrototype)
    4242{
    43     Base::finishCreation(exec->vm(), errorPrototype->classInfo()->className);
     43    Base::finishCreation(vm, errorPrototype->classInfo()->className);
    4444    // ECMA 15.11.3.1 Error.prototype
    45     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
    46     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
     45    putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
     46    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
    4747}
    4848
  • trunk/Source/JavaScriptCore/runtime/ErrorConstructor.h

    r154038 r156498  
    3535        static ErrorConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ErrorPrototype* errorPrototype)
    3636        {
    37             ErrorConstructor* constructor = new (NotNull, allocateCell<ErrorConstructor>(*exec->heap())) ErrorConstructor(globalObject, structure);
    38             constructor->finishCreation(exec, errorPrototype);
     37            VM& vm = exec->vm();
     38            ErrorConstructor* constructor = new (NotNull, allocateCell<ErrorConstructor>(vm.heap)) ErrorConstructor(globalObject, structure);
     39            constructor->finishCreation(vm, errorPrototype);
    3940            return constructor;
    4041        }
     
    4849
    4950    protected:
    50         void finishCreation(ExecState*, ErrorPrototype*);
     51        void finishCreation(VM&, ErrorPrototype*);
    5152       
    5253    private:
  • trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp

    r155143 r156498  
    5555}
    5656
    57 void ErrorPrototype::finishCreation(ExecState* exec, JSGlobalObject*)
     57void ErrorPrototype::finishCreation(VM& vm, JSGlobalObject*)
    5858{
    59     Base::finishCreation(exec->vm(), "");
     59    Base::finishCreation(vm, "");
    6060    ASSERT(inherits(info()));
    61     putDirect(exec->vm(), exec->propertyNames().name, jsNontrivialString(exec, String(ASCIILiteral("Error"))), DontEnum);
     61    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Error"))), DontEnum);
    6262}
    6363
  • trunk/Source/JavaScriptCore/runtime/ErrorPrototype.h

    r154373 r156498  
    3434        static ErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
    3535        {
    36             ErrorPrototype* prototype = new (NotNull, allocateCell<ErrorPrototype>(*exec->heap())) ErrorPrototype(exec, structure);
    37             prototype->finishCreation(exec, globalObject);
     36            VM& vm = exec->vm();
     37            ErrorPrototype* prototype = new (NotNull, allocateCell<ErrorPrototype>(vm.heap)) ErrorPrototype(exec, structure);
     38            prototype->finishCreation(vm, globalObject);
    3839            return prototype;
    3940        }
     
    4849    protected:
    4950        ErrorPrototype(ExecState*, Structure*);
    50         void finishCreation(ExecState*, JSGlobalObject*);
     51        void finishCreation(VM&, JSGlobalObject*);
    5152
    5253        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ErrorInstance::StructureFlags;
  • trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp

    r155143 r156498  
    4545}
    4646
    47 void FunctionConstructor::finishCreation(ExecState* exec, FunctionPrototype* functionPrototype)
     47void FunctionConstructor::finishCreation(VM& vm, FunctionPrototype* functionPrototype)
    4848{
    49     Base::finishCreation(exec->vm(), functionPrototype->classInfo()->className);
    50     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
     49    Base::finishCreation(vm, functionPrototype->classInfo()->className);
     50    putDirectWithoutTransition(vm, vm.propertyNames->prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
    5151
    5252    // Number of arguments for constructor
    53     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
     53    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
    5454}
    5555
  • trunk/Source/JavaScriptCore/runtime/FunctionConstructor.h

    r154038 r156498  
    3838        static FunctionConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, FunctionPrototype* functionPrototype)
    3939        {
    40             FunctionConstructor* constructor = new (NotNull, allocateCell<FunctionConstructor>(*exec->heap())) FunctionConstructor(globalObject, structure);
    41             constructor->finishCreation(exec, functionPrototype);
     40            VM& vm = exec->vm();
     41            FunctionConstructor* constructor = new (NotNull, allocateCell<FunctionConstructor>(vm.heap)) FunctionConstructor(globalObject, structure);
     42            constructor->finishCreation(vm, functionPrototype);
    4243            return constructor;
    4344        }
     
    5253    private:
    5354        FunctionConstructor(JSGlobalObject*, Structure*);
    54         void finishCreation(ExecState*, FunctionPrototype*);
     55        void finishCreation(VM&, FunctionPrototype*);
    5556        static ConstructType getConstructData(JSCell*, ConstructData&);
    5657        static CallType getCallData(JSCell*, CallData&);
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp

    r155143 r156498  
    4848}
    4949
    50 void FunctionPrototype::finishCreation(ExecState* exec, const String& name)
    51 {
    52     Base::finishCreation(exec->vm(), name);
    53     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
     50void FunctionPrototype::finishCreation(VM& vm, const String& name)
     51{
     52    Base::finishCreation(vm, name);
     53    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
    5454}
    5555
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.h

    r154038 r156498  
    3232        static FunctionPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
    3333        {
    34             FunctionPrototype* prototype = new (NotNull, allocateCell<FunctionPrototype>(*exec->heap())) FunctionPrototype(globalObject, structure);
    35             prototype->finishCreation(exec, String());
     34            VM& vm = exec->vm();
     35            FunctionPrototype* prototype = new (NotNull, allocateCell<FunctionPrototype>(vm.heap)) FunctionPrototype(globalObject, structure);
     36            prototype->finishCreation(vm, String());
    3637            return prototype;
    3738        }
     
    4748
    4849    protected:
    49         void finishCreation(ExecState*, const String& name);
     50        void finishCreation(VM&, const String& name);
    5051
    5152    private:
  • trunk/Source/JavaScriptCore/runtime/JSAPIValueWrapper.h

    r154038 r156498  
    4747        static JSAPIValueWrapper* create(ExecState* exec, JSValue value)
    4848        {
    49             JSAPIValueWrapper* wrapper = new (NotNull, allocateCell<JSAPIValueWrapper>(*exec->heap())) JSAPIValueWrapper(exec);
    50             wrapper->finishCreation(exec, value);
     49            VM& vm = exec->vm();
     50            JSAPIValueWrapper* wrapper = new (NotNull, allocateCell<JSAPIValueWrapper>(vm.heap)) JSAPIValueWrapper(exec);
     51            wrapper->finishCreation(vm, value);
    5152            return wrapper;
    5253        }
    5354
    5455    protected:
    55         void finishCreation(ExecState* exec, JSValue value)
     56        void finishCreation(VM& vm, JSValue value)
    5657        {
    57             Base::finishCreation(exec->vm());
    58             m_value.set(exec->vm(), this, value);
     58            Base::finishCreation(vm);
     59            m_value.set(vm, this, value);
    5960            ASSERT(!value.isCell());
    6061        }
  • trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp

    r156240 r156498  
    7777JSBoundFunction* JSBoundFunction::create(ExecState* exec, JSGlobalObject* globalObject, JSObject* targetFunction, JSValue boundThis, JSValue boundArgs, int length, const String& name)
    7878{
     79    VM& vm = exec->vm();
    7980    ConstructData constructData;
    8081    ConstructType constructType = JSC::getConstructData(targetFunction, constructData);
    8182    bool canConstruct = constructType != ConstructTypeNone;
    82     NativeExecutable* executable = exec->vm().getHostFunction(boundFunctionCall, canConstruct ? boundFunctionConstruct : callHostFunctionAsConstructor);
    83     JSBoundFunction* function = new (NotNull, allocateCell<JSBoundFunction>(*exec->heap())) JSBoundFunction(exec, globalObject, globalObject->boundFunctionStructure(), targetFunction, boundThis, boundArgs);
     83    NativeExecutable* executable = vm.getHostFunction(boundFunctionCall, canConstruct ? boundFunctionConstruct : callHostFunctionAsConstructor);
     84    JSBoundFunction* function = new (NotNull, allocateCell<JSBoundFunction>(vm.heap)) JSBoundFunction(exec, globalObject, globalObject->boundFunctionStructure(), targetFunction, boundThis, boundArgs);
    8485
    8586    function->finishCreation(exec, executable, length, name);
     
    107108void JSBoundFunction::finishCreation(ExecState* exec, NativeExecutable* executable, int length, const String& name)
    108109{
    109     Base::finishCreation(exec, executable, length, name);
     110    VM& vm = exec->vm();
     111    Base::finishCreation(vm, executable, length, name);
    110112    ASSERT(inherits(info()));
    111113
    112     putDirectAccessor(exec, exec->propertyNames().arguments, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
    113     putDirectAccessor(exec, exec->propertyNames().caller, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
     114    putDirectAccessor(exec, vm.propertyNames->arguments, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
     115    putDirectAccessor(exec, vm.propertyNames->caller, globalObject()->throwTypeErrorGetterSetter(exec), DontDelete | DontEnum | Accessor);
    114116}
    115117
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r155081 r156498  
    6464JSFunction* JSFunction::create(ExecState* exec, JSGlobalObject* globalObject, int length, const String& name, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor)
    6565{
     66    VM& vm = exec->vm();
     67
    6668    NativeExecutable* executable;
    6769#if !ENABLE(JIT)
     
    7072    if (intrinsic != NoIntrinsic && exec->vm().canUseJIT()) {
    7173        ASSERT(nativeConstructor == callHostFunctionAsConstructor);
    72         executable = exec->vm().getHostFunction(nativeFunction, intrinsic);
     74        executable = vm.getHostFunction(nativeFunction, intrinsic);
    7375    } else
    7476#endif
    75         executable = exec->vm().getHostFunction(nativeFunction, nativeConstructor);
    76 
    77     JSFunction* function = new (NotNull, allocateCell<JSFunction>(*exec->heap())) JSFunction(exec, globalObject, globalObject->functionStructure());
     77        executable = vm.getHostFunction(nativeFunction, nativeConstructor);
     78
     79    JSFunction* function = new (NotNull, allocateCell<JSFunction>(vm.heap)) JSFunction(exec, globalObject, globalObject->functionStructure());
    7880    // Can't do this during initialization because getHostFunction might do a GC allocation.
    79     function->finishCreation(exec, executable, length, name);
     81    function->finishCreation(vm, executable, length, name);
    8082    return function;
    8183}
     
    103105}
    104106
    105 void JSFunction::finishCreation(ExecState* exec, NativeExecutable* executable, int length, const String& name)
    106 {
    107     Base::finishCreation(exec->vm());
     107void JSFunction::finishCreation(VM& vm, NativeExecutable* executable, int length, const String& name)
     108{
     109    Base::finishCreation(vm);
    108110    ASSERT(inherits(info()));
    109     m_executable.set(exec->vm(), this, executable);
    110     putDirect(exec->vm(), exec->vm().propertyNames->name, jsString(exec, name), DontDelete | ReadOnly | DontEnum);
    111     putDirect(exec->vm(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
     111    m_executable.set(vm, this, executable);
     112    putDirect(vm, vm.propertyNames->name, jsString(&vm, name), DontDelete | ReadOnly | DontEnum);
     113    putDirect(vm, vm.propertyNames->length, jsNumber(length), DontDelete | ReadOnly | DontEnum);
    112114}
    113115
  • trunk/Source/JavaScriptCore/runtime/JSFunction.h

    r154422 r156498  
    166166        JSFunction(VM&, FunctionExecutable*, JSScope*);
    167167       
    168         void finishCreation(ExecState*, NativeExecutable*, int length, const String& name);
     168        void finishCreation(VM&, NativeExecutable*, int length, const String& name);
    169169        using Base::finishCreation;
    170170
  • trunk/Source/JavaScriptCore/runtime/JSNameScope.h

    r154038 r156498  
    3939    static JSNameScope* create(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes)
    4040    {
    41         JSNameScope* scopeObject = new (NotNull, allocateCell<JSNameScope>(*exec->heap())) JSNameScope(exec, exec->scope());
    42         scopeObject->finishCreation(exec, identifier, value, attributes);
     41        VM& vm = exec->vm();
     42        JSNameScope* scopeObject = new (NotNull, allocateCell<JSNameScope>(vm.heap)) JSNameScope(exec, exec->scope());
     43        scopeObject->finishCreation(vm, identifier, value, attributes);
    4344        return scopeObject;
    4445    }
     
    4647    static JSNameScope* create(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes, JSScope* next)
    4748    {
    48         JSNameScope* scopeObject = new (NotNull, allocateCell<JSNameScope>(*exec->heap())) JSNameScope(exec, next);
    49         scopeObject->finishCreation(exec, identifier, value, attributes);
     49        VM& vm = exec->vm();
     50        JSNameScope* scopeObject = new (NotNull, allocateCell<JSNameScope>(vm.heap)) JSNameScope(exec, next);
     51        scopeObject->finishCreation(vm, identifier, value, attributes);
    5052        return scopeObject;
    5153    }
     
    6163
    6264protected:
    63     void finishCreation(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes)
     65    void finishCreation(VM& vm, const Identifier& identifier, JSValue value, unsigned attributes)
    6466    {
    65         Base::finishCreation(exec->vm());
    66         m_registerStore.set(exec->vm(), this, value);
     67        Base::finishCreation(vm);
     68        m_registerStore.set(vm, this, value);
    6769        symbolTable()->add(identifier.impl(), SymbolTableEntry(-1, attributes));
    6870    }
  • trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp

    r156240 r156498  
    6868JSPromiseConstructor* JSPromiseConstructor::create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSPromisePrototype* promisePrototype)
    6969{
    70     JSPromiseConstructor* constructor = new (NotNull, allocateCell<JSPromiseConstructor>(*exec->heap())) JSPromiseConstructor(globalObject, structure);
    71     constructor->finishCreation(exec, promisePrototype);
     70    VM& vm = exec->vm();
     71    JSPromiseConstructor* constructor = new (NotNull, allocateCell<JSPromiseConstructor>(vm.heap)) JSPromiseConstructor(globalObject, structure);
     72    constructor->finishCreation(vm, promisePrototype);
    7273    return constructor;
    7374}
     
    8384}
    8485
    85 void JSPromiseConstructor::finishCreation(ExecState* exec, JSPromisePrototype* promisePrototype)
     86void JSPromiseConstructor::finishCreation(VM& vm, JSPromisePrototype* promisePrototype)
    8687{
    87     Base::finishCreation(exec->vm(), "Promise");
    88     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, promisePrototype, DontEnum | DontDelete | ReadOnly);
    89     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     88    Base::finishCreation(vm, "Promise");
     89    putDirectWithoutTransition(vm, vm.propertyNames->prototype, promisePrototype, DontEnum | DontDelete | ReadOnly);
     90    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    9091}
    9192
  • trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.h

    r154847 r156498  
    4545
    4646protected:
    47     void finishCreation(ExecState*, JSPromisePrototype*);
     47    void finishCreation(VM&, JSPromisePrototype*);
    4848    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
    4949
  • trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.cpp

    r155143 r156498  
    6464JSPromisePrototype* JSPromisePrototype::create(ExecState* exec, JSGlobalObject*, Structure* structure)
    6565{
    66     JSPromisePrototype* object = new (NotNull, allocateCell<JSPromisePrototype>(*exec->heap())) JSPromisePrototype(exec, structure);
    67     object->finishCreation(exec, structure);
     66    VM& vm = exec->vm();
     67    JSPromisePrototype* object = new (NotNull, allocateCell<JSPromisePrototype>(vm.heap)) JSPromisePrototype(exec, structure);
     68    object->finishCreation(vm, structure);
    6869    return object;
    6970}
     
    7980}
    8081
    81 void JSPromisePrototype::finishCreation(ExecState* exec, Structure*)
     82void JSPromisePrototype::finishCreation(VM& vm, Structure*)
    8283{
    83     Base::finishCreation(exec->vm());
     84    Base::finishCreation(vm);
    8485}
    8586
  • trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.h

    r154847 r156498  
    4343
    4444protected:
    45     void finishCreation(ExecState*, Structure*);
     45    void finishCreation(VM&, Structure*);
    4646    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags;
    4747
  • trunk/Source/JavaScriptCore/runtime/JSPromiseResolverConstructor.cpp

    r155143 r156498  
    4343JSPromiseResolverConstructor* JSPromiseResolverConstructor::create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSPromiseResolverPrototype* promisePrototype)
    4444{
    45     JSPromiseResolverConstructor* constructor = new (NotNull, allocateCell<JSPromiseResolverConstructor>(*exec->heap())) JSPromiseResolverConstructor(globalObject, structure);
    46     constructor->finishCreation(exec, promisePrototype);
     45    VM& vm = exec->vm();
     46    JSPromiseResolverConstructor* constructor = new (NotNull, allocateCell<JSPromiseResolverConstructor>(vm.heap)) JSPromiseResolverConstructor(globalObject, structure);
     47    constructor->finishCreation(vm, promisePrototype);
    4748    return constructor;
    4849}
     
    5859}
    5960
    60 void JSPromiseResolverConstructor::finishCreation(ExecState* exec, JSPromiseResolverPrototype* promiseResolverPrototype)
     61void JSPromiseResolverConstructor::finishCreation(VM& vm, JSPromiseResolverPrototype* promiseResolverPrototype)
    6162{
    62     Base::finishCreation(exec->vm(), "PromiseResolver");
    63     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, promiseResolverPrototype, DontEnum | DontDelete | ReadOnly);
     63    Base::finishCreation(vm, "PromiseResolver");
     64    putDirectWithoutTransition(vm, vm.propertyNames->prototype, promiseResolverPrototype, DontEnum | DontDelete | ReadOnly);
    6465}
    6566
  • trunk/Source/JavaScriptCore/runtime/JSPromiseResolverConstructor.h

    r154847 r156498  
    4545
    4646protected:
    47     void finishCreation(ExecState*, JSPromiseResolverPrototype*);
     47    void finishCreation(VM&, JSPromiseResolverPrototype*);
    4848    static const unsigned StructureFlags = InternalFunction::StructureFlags;
    4949
  • trunk/Source/JavaScriptCore/runtime/JSPromiseResolverPrototype.cpp

    r155143 r156498  
    6464JSPromiseResolverPrototype* JSPromiseResolverPrototype::create(ExecState* exec, JSGlobalObject*, Structure* structure)
    6565{
    66     JSPromiseResolverPrototype* object = new (NotNull, allocateCell<JSPromiseResolverPrototype>(*exec->heap())) JSPromiseResolverPrototype(exec, structure);
    67     object->finishCreation(exec, structure);
     66    VM& vm = exec->vm();
     67    JSPromiseResolverPrototype* object = new (NotNull, allocateCell<JSPromiseResolverPrototype>(vm.heap)) JSPromiseResolverPrototype(exec, structure);
     68    object->finishCreation(vm, structure);
    6869    return object;
    6970}
     
    7980}
    8081
    81 void JSPromiseResolverPrototype::finishCreation(ExecState* exec, Structure*)
     82void JSPromiseResolverPrototype::finishCreation(VM& vm, Structure*)
    8283{
    83     Base::finishCreation(exec->vm());
     84    Base::finishCreation(vm);
    8485}
    8586
  • trunk/Source/JavaScriptCore/runtime/JSPromiseResolverPrototype.h

    r154847 r156498  
    4343
    4444protected:
    45     void finishCreation(ExecState*, Structure*);
     45    void finishCreation(VM&, Structure*);
    4646    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | JSObject::StructureFlags;
    4747
  • trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.cpp

    r156079 r156498  
    5151            o->structure()->enumerationCache()->cachedPrototypeChain() != o->structure()->prototypeChain(exec));
    5252
     53    VM& vm = exec->vm();
     54
    5355    PropertyNameArray propertyNames(exec);
    5456    o->methodTable()->getPropertyNames(o, exec, propertyNames, ExcludeDontEnumProperties);
     
    5860        numCacheableSlots = propertyNames.numCacheableSlots();
    5961   
    60     JSPropertyNameIterator* jsPropertyNameIterator = new (NotNull, allocateCell<JSPropertyNameIterator>(*exec->heap())) JSPropertyNameIterator(exec, propertyNames.data(), numCacheableSlots);
    61     jsPropertyNameIterator->finishCreation(exec, propertyNames.data(), o);
     62    JSPropertyNameIterator* jsPropertyNameIterator = new (NotNull, allocateCell<JSPropertyNameIterator>(vm.heap)) JSPropertyNameIterator(exec, propertyNames.data(), numCacheableSlots);
     63    jsPropertyNameIterator->finishCreation(vm, propertyNames.data(), o);
    6264
    6365    if (o->structure()->isDictionary())
     
    7880    }
    7981
    80     jsPropertyNameIterator->setCachedPrototypeChain(exec->vm(), structureChain);
    81     jsPropertyNameIterator->setCachedStructure(exec->vm(), o->structure());
    82     o->structure()->setEnumerationCache(exec->vm(), jsPropertyNameIterator);
     82    jsPropertyNameIterator->setCachedPrototypeChain(vm, structureChain);
     83    jsPropertyNameIterator->setCachedStructure(vm, o->structure());
     84    o->structure()->setEnumerationCache(vm, jsPropertyNameIterator);
    8385    return jsPropertyNameIterator;
    8486}
  • trunk/Source/JavaScriptCore/runtime/JSPropertyNameIterator.h

    r156079 r156498  
    7878
    7979    protected:
    80         void finishCreation(ExecState* exec, PropertyNameArrayData* propertyNameArrayData, JSObject* object)
     80        void finishCreation(VM& vm, PropertyNameArrayData* propertyNameArrayData, JSObject* object)
    8181        {
    82             Base::finishCreation(exec->vm());
     82            Base::finishCreation(vm);
    8383            PropertyNameArrayData::PropertyNameVector& propertyNameVector = propertyNameArrayData->propertyNameVector();
    8484            for (size_t i = 0; i < m_jsStringsSize; ++i)
    85                 m_jsStrings[i].set(exec->vm(), this, jsOwnedString(exec, propertyNameVector[i].string()));
     85                m_jsStrings[i].set(vm, this, jsOwnedString(&vm, propertyNameVector[i].string()));
    8686            m_cachedStructureInlineCapacity = object->structure()->inlineCapacity();
    8787        }
  • trunk/Source/JavaScriptCore/runtime/MapConstructor.cpp

    r154861 r156498  
    3838const ClassInfo MapConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(MapConstructor) };
    3939
    40 void MapConstructor::finishCreation(ExecState* exec, MapPrototype* mapPrototype)
     40void MapConstructor::finishCreation(VM& vm, MapPrototype* mapPrototype)
    4141{
    42     Base::finishCreation(exec->vm(), mapPrototype->classInfo()->className);
    43     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, mapPrototype, DontEnum | DontDelete | ReadOnly);
    44     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     42    Base::finishCreation(vm, mapPrototype->classInfo()->className);
     43    putDirectWithoutTransition(vm, vm.propertyNames->prototype, mapPrototype, DontEnum | DontDelete | ReadOnly);
     44    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
    4545}
    4646
  • trunk/Source/JavaScriptCore/runtime/MapConstructor.h

    r154861 r156498  
    3939    static MapConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, MapPrototype* mapPrototype)
    4040    {
    41         MapConstructor* constructor = new (NotNull, allocateCell<MapConstructor>(*exec->heap())) MapConstructor(globalObject, structure);
    42         constructor->finishCreation(exec, mapPrototype);
     41        VM& vm = exec->vm();
     42        MapConstructor* constructor = new (NotNull, allocateCell<MapConstructor>(vm.heap)) MapConstructor(globalObject, structure);
     43        constructor->finishCreation(vm, mapPrototype);
    4344        return constructor;
    4445    }
     
    5657    {
    5758    }
    58     void finishCreation(ExecState*, MapPrototype*);
     59    void finishCreation(VM&, MapPrototype*);
    5960    static ConstructType getConstructData(JSCell*, ConstructData&);
    6061    static CallType getCallData(JSCell*, CallData&);
  • trunk/Source/JavaScriptCore/runtime/NameConstructor.cpp

    r156240 r156498  
    4242}
    4343
    44 void NameConstructor::finishCreation(ExecState* exec, NamePrototype* prototype)
     44void NameConstructor::finishCreation(VM& vm, NamePrototype* prototype)
    4545{
    46     Base::finishCreation(exec->vm(), prototype->classInfo()->className);
    47     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, prototype, DontEnum | DontDelete | ReadOnly);
    48     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
     46    Base::finishCreation(vm, prototype->classInfo()->className);
     47    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
     48    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
    4949}
    5050
  • trunk/Source/JavaScriptCore/runtime/NameConstructor.h

    r154038 r156498  
    4040    static NameConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NamePrototype* prototype)
    4141    {
    42         NameConstructor* constructor = new (NotNull, allocateCell<NameConstructor>(*exec->heap())) NameConstructor(globalObject, structure);
    43         constructor->finishCreation(exec, prototype);
     42        VM& vm = exec->vm();
     43        NameConstructor* constructor = new (NotNull, allocateCell<NameConstructor>(vm.heap)) NameConstructor(globalObject, structure);
     44        constructor->finishCreation(vm, prototype);
    4445        return constructor;
    4546    }
     
    5354
    5455protected:
    55     void finishCreation(ExecState*, NamePrototype*);
     56    void finishCreation(VM&, NamePrototype*);
    5657   
    5758private:
  • trunk/Source/JavaScriptCore/runtime/NamePrototype.cpp

    r154373 r156498  
    5353}
    5454
    55 void NamePrototype::finishCreation(ExecState* exec)
     55void NamePrototype::finishCreation(VM& vm)
    5656{
    57     Base::finishCreation(exec->vm());
     57    Base::finishCreation(vm);
    5858    ASSERT(inherits(info()));
    5959}
  • trunk/Source/JavaScriptCore/runtime/NamePrototype.h

    r154373 r156498  
    3737    static NamePrototype* create(ExecState* exec, Structure* structure)
    3838    {
    39         NamePrototype* prototype = new (NotNull, allocateCell<NamePrototype>(*exec->heap())) NamePrototype(exec, structure);
    40         prototype->finishCreation(exec);
     39        VM& vm = exec->vm();
     40        NamePrototype* prototype = new (NotNull, allocateCell<NamePrototype>(vm.heap)) NamePrototype(exec, structure);
     41        prototype->finishCreation(vm);
    4142        return prototype;
    4243    }
     
    5152protected:
    5253    NamePrototype(ExecState*, Structure*);
    53     void finishCreation(ExecState*);
     54    void finishCreation(VM&);
    5455
    5556    static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NameInstance::StructureFlags;
  • trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp

    r148696 r156498  
    3434}
    3535
    36 void NativeErrorPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject, const WTF::String& nameAndMessage, NativeErrorConstructor* constructor)
     36void NativeErrorPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, const WTF::String& nameAndMessage, NativeErrorConstructor* constructor)
    3737{
    38     Base::finishCreation(exec, globalObject);
    39     putDirect(exec->vm(), exec->propertyNames().name, jsString(exec, nameAndMessage), DontEnum);
    40     putDirect(exec->vm(), exec->propertyNames().message, jsEmptyString(exec), DontEnum);
    41     putDirect(exec->vm(), exec->propertyNames().constructor, constructor, DontEnum);
     38    Base::finishCreation(vm, globalObject);
     39    putDirect(vm, vm.propertyNames->name, jsString(&vm, nameAndMessage), DontEnum);
     40    putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), DontEnum);
     41    putDirect(vm, vm.propertyNames->constructor, constructor, DontEnum);
    4242}
    4343
  • trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.h

    r127191 r156498  
    3636        static NativeErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const String& name, NativeErrorConstructor* constructor)
    3737        {
    38             NativeErrorPrototype* prototype = new (NotNull, allocateCell<NativeErrorPrototype>(*exec->heap())) NativeErrorPrototype(exec, structure);
    39             prototype->finishCreation(exec, globalObject, name, constructor);
     38            VM& vm = exec->vm();
     39            NativeErrorPrototype* prototype = new (NotNull, allocateCell<NativeErrorPrototype>(vm.heap)) NativeErrorPrototype(exec, structure);
     40            prototype->finishCreation(vm, globalObject, name, constructor);
    4041            return prototype;
    4142        }
    4243
    4344    protected:
    44         void finishCreation(ExecState*, JSGlobalObject*, const String& nameAndMessage, NativeErrorConstructor*);
     45        void finishCreation(VM&, JSGlobalObject*, const String& nameAndMessage, NativeErrorConstructor*);
    4546    };
    4647
  • trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp

    r156240 r156498  
    6161}
    6262
    63 void NumberConstructor::finishCreation(ExecState* exec, NumberPrototype* numberPrototype)
     63void NumberConstructor::finishCreation(VM& vm, NumberPrototype* numberPrototype)
    6464{
    65     Base::finishCreation(exec->vm(), NumberPrototype::info()->className);
     65    Base::finishCreation(vm, NumberPrototype::info()->className);
    6666    ASSERT(inherits(info()));
    6767
    6868    // Number.Prototype
    69     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
     69    putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
    7070
    7171    // no. of arguments for constructor
    72     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     72    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    7373}
    7474
  • trunk/Source/JavaScriptCore/runtime/NumberConstructor.h

    r154373 r156498  
    3434        static NumberConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NumberPrototype* numberPrototype)
    3535        {
    36             NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(*exec->heap())) NumberConstructor(globalObject, structure);
    37             constructor->finishCreation(exec, numberPrototype);
     36            VM& vm = exec->vm();
     37            NumberConstructor* constructor = new (NotNull, allocateCell<NumberConstructor>(vm.heap)) NumberConstructor(globalObject, structure);
     38            constructor->finishCreation(vm, numberPrototype);
    3839            return constructor;
    3940        }
     
    5455
    5556    protected:
    56         void finishCreation(ExecState*, NumberPrototype*);
     57        void finishCreation(VM&, NumberPrototype*);
    5758        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags;
    5859
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp

    r155143 r156498  
    7676}
    7777
    78 void NumberPrototype::finishCreation(ExecState* exec, JSGlobalObject*)
    79 {
    80     Base::finishCreation(exec->vm());
    81     setInternalValue(exec->vm(), jsNumber(0));
     78void NumberPrototype::finishCreation(VM& vm, JSGlobalObject*)
     79{
     80    Base::finishCreation(vm);
     81    setInternalValue(vm, jsNumber(0));
    8282
    8383    ASSERT(inherits(info()));
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.h

    r154373 r156498  
    3232        static NumberPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
    3333        {
    34             NumberPrototype* prototype = new (NotNull, allocateCell<NumberPrototype>(*exec->heap())) NumberPrototype(exec, structure);
    35             prototype->finishCreation(exec, globalObject);
     34            VM& vm = exec->vm();
     35            NumberPrototype* prototype = new (NotNull, allocateCell<NumberPrototype>(vm.heap)) NumberPrototype(exec, structure);
     36            prototype->finishCreation(vm, globalObject);
    3637            return prototype;
    3738        }
     
    4546
    4647    protected:
    47         void finishCreation(ExecState*, JSGlobalObject*);
     48        void finishCreation(VM&, JSGlobalObject*);
    4849        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NumberObject::StructureFlags;
    4950
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp

    r156240 r156498  
    8686}
    8787
    88 void ObjectConstructor::finishCreation(ExecState* exec, ObjectPrototype* objectPrototype)
    89 {
    90     Base::finishCreation(exec->vm(), Identifier(exec, "Object").string());
     88void ObjectConstructor::finishCreation(VM& vm, ObjectPrototype* objectPrototype)
     89{
     90    Base::finishCreation(vm, Identifier(&vm, "Object").string());
    9191    // ECMA 15.2.3.1
    92     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
     92    putDirectWithoutTransition(vm, vm.propertyNames->prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
    9393    // no. of arguments for constructor
    94     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     94    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    9595}
    9696
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.h

    r154373 r156498  
    3636        static ObjectConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ObjectPrototype* objectPrototype)
    3737        {
    38             ObjectConstructor* constructor = new (NotNull, allocateCell<ObjectConstructor>(*exec->heap())) ObjectConstructor(globalObject, structure);
    39             constructor->finishCreation(exec, objectPrototype);
     38            VM& vm = exec->vm();
     39            ObjectConstructor* constructor = new (NotNull, allocateCell<ObjectConstructor>(vm.heap)) ObjectConstructor(globalObject, structure);
     40            constructor->finishCreation(vm, objectPrototype);
    4041            return constructor;
    4142        }
     
    5152
    5253    protected:
    53         void finishCreation(ExecState*, ObjectPrototype*);
     54        void finishCreation(VM& vm, ObjectPrototype*);
    5455        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
    5556
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp

    r154797 r156498  
    9090}
    9191
    92 void RegExpConstructor::finishCreation(ExecState* exec, RegExpPrototype* regExpPrototype)
    93 {
    94     Base::finishCreation(exec->vm(), Identifier(exec, "RegExp").string());
     92void RegExpConstructor::finishCreation(VM& vm, RegExpPrototype* regExpPrototype)
     93{
     94    Base::finishCreation(vm, Identifier(&vm, "RegExp").string());
    9595    ASSERT(inherits(info()));
    9696
    9797    // ECMA 15.10.5.1 RegExp.prototype
    98     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
     98    putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
    9999
    100100    // no. of arguments for constructor
    101     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
     101    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
    102102}
    103103
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.h

    r154373 r156498  
    3939        static RegExpConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExpPrototype* regExpPrototype)
    4040        {
    41             RegExpConstructor* constructor = new (NotNull, allocateCell<RegExpConstructor>(*exec->heap())) RegExpConstructor(globalObject, structure, regExpPrototype);
    42             constructor->finishCreation(exec, regExpPrototype);
     41            VM& vm = exec->vm();
     42            RegExpConstructor* constructor = new (NotNull, allocateCell<RegExpConstructor>(vm.heap)) RegExpConstructor(globalObject, structure, regExpPrototype);
     43            constructor->finishCreation(vm, regExpPrototype);
    4344            return constructor;
    4445        }
     
    7273
    7374    protected:
    74         void finishCreation(ExecState*, RegExpPrototype*);
     75        void finishCreation(VM&, RegExpPrototype*);
    7576        static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesVisitChildren | Base::StructureFlags;
    7677
  • trunk/Source/JavaScriptCore/runtime/SetConstructor.cpp

    r156240 r156498  
    3939const ClassInfo SetConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(SetConstructor) };
    4040
    41 void SetConstructor::finishCreation(ExecState* exec, SetPrototype* setPrototype)
     41void SetConstructor::finishCreation(VM& vm, SetPrototype* setPrototype)
    4242{
    43     Base::finishCreation(exec->vm(), setPrototype->classInfo()->className);
    44     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, setPrototype, DontEnum | DontDelete | ReadOnly);
    45     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     43    Base::finishCreation(vm, setPrototype->classInfo()->className);
     44    putDirectWithoutTransition(vm, vm.propertyNames->prototype, setPrototype, DontEnum | DontDelete | ReadOnly);
     45    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
    4646}
    4747
  • trunk/Source/JavaScriptCore/runtime/SetConstructor.h

    r154916 r156498  
    3939    static SetConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, SetPrototype* setPrototype)
    4040    {
    41         SetConstructor* constructor = new (NotNull, allocateCell<SetConstructor>(*exec->heap())) SetConstructor(globalObject, structure);
    42         constructor->finishCreation(exec, setPrototype);
     41        VM& vm = exec->vm();
     42        SetConstructor* constructor = new (NotNull, allocateCell<SetConstructor>(vm.heap)) SetConstructor(globalObject, structure);
     43        constructor->finishCreation(vm, setPrototype);
    4344        return constructor;
    4445    }
     
    5657    {
    5758    }
    58     void finishCreation(ExecState*, SetPrototype*);
     59    void finishCreation(VM&, SetPrototype*);
    5960    static ConstructType getConstructData(JSCell*, ConstructData&);
    6061    static CallType getCallData(JSCell*, CallData&);
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp

    r156240 r156498  
    5454}
    5555
    56 void StringConstructor::finishCreation(ExecState* exec, StringPrototype* stringPrototype)
     56void StringConstructor::finishCreation(VM& vm, StringPrototype* stringPrototype)
    5757{
    58     Base::finishCreation(exec->vm(), stringPrototype->classInfo()->className);
    59     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
    60     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     58    Base::finishCreation(vm, stringPrototype->classInfo()->className);
     59    putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
     60    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
    6161}
    6262
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.h

    r154373 r156498  
    3434        static StringConstructor* create(ExecState* exec, JSGlobalObject* globalObject , Structure* structure, StringPrototype* stringPrototype)
    3535        {
    36             StringConstructor* constructor = new (NotNull, allocateCell<StringConstructor>(*exec->heap())) StringConstructor(globalObject, structure);
    37             constructor->finishCreation(exec, stringPrototype);
     36            VM& vm = exec->vm();
     37            StringConstructor* constructor = new (NotNull, allocateCell<StringConstructor>(vm.heap)) StringConstructor(globalObject, structure);
     38            constructor->finishCreation(vm, stringPrototype);
    3839            return constructor;
    3940        }
     
    5152    private:
    5253        StringConstructor(JSGlobalObject*, Structure*);
    53         void finishCreation(ExecState*, StringPrototype*);
     54        void finishCreation(VM&, StringPrototype*);
    5455        static ConstructType getConstructData(JSCell*, ConstructData&);
    5556        static CallType getCallData(JSCell*, CallData&);
  • trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp

    r155473 r156498  
    3737const ClassInfo WeakMapConstructor::s_info = { "Function", &Base::s_info, 0, 0, CREATE_METHOD_TABLE(WeakMapConstructor) };
    3838
    39 void WeakMapConstructor::finishCreation(ExecState* exec, WeakMapPrototype* prototype)
     39void WeakMapConstructor::finishCreation(VM& vm, WeakMapPrototype* prototype)
    4040{
    41     Base::finishCreation(exec->vm(), prototype->classInfo()->className);
    42     putDirectWithoutTransition(exec->vm(), exec->propertyNames().prototype, prototype, DontEnum | DontDelete | ReadOnly);
    43     putDirectWithoutTransition(exec->vm(), exec->propertyNames().length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     41    Base::finishCreation(vm, prototype->classInfo()->className);
     42    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
     43    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
    4444}
    4545
  • trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.h

    r155473 r156498  
    3939    static WeakMapConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, WeakMapPrototype* prototype)
    4040    {
    41         WeakMapConstructor* constructor = new (NotNull, allocateCell<WeakMapConstructor>(*exec->heap())) WeakMapConstructor(globalObject, structure);
    42         constructor->finishCreation(exec, prototype);
     41        VM& vm = exec->vm();
     42        WeakMapConstructor* constructor = new (NotNull, allocateCell<WeakMapConstructor>(vm.heap)) WeakMapConstructor(globalObject, structure);
     43        constructor->finishCreation(vm, prototype);
    4344        return constructor;
    4445    }
     
    5657    {
    5758    }
    58     void finishCreation(ExecState*, WeakMapPrototype*);
     59    void finishCreation(VM&, WeakMapPrototype*);
    5960    static ConstructType getConstructData(JSCell*, ConstructData&);
    6061    static CallType getCallData(JSCell*, CallData&);
Note: See TracChangeset for help on using the changeset viewer.