Changeset 157301 in webkit


Ignore:
Timestamp:
Oct 11, 2013 8:26:11 AM (11 years ago)
Author:
akling@apple.com
Message:

Pass VM instead of ExecState to JSGenericTypedArrayViewPrototype.
<https://webkit.org/b/122632>

Reviewed by Sam Weinig.

This code was only using the ExecState to find the VM.

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r157295 r157301  
     12013-10-11  Andreas Kling  <akling@apple.com>
     2
     3        Pass VM instead of ExecState to JSGenericTypedArrayViewPrototype.
     4        <https://webkit.org/b/122632>
     5
     6        Reviewed by Sam Weinig.
     7
     8        This code was only using the ExecState to find the VM.
     9
    1102013-10-11  Julien Brianceau  <jbriance@cisco.com>
    211
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h

    r154127 r157301  
    3838protected:
    3939    JSGenericTypedArrayViewPrototype(VM&, Structure*);
    40     void finishCreation(ExecState*, JSGlobalObject*);
     40    void finishCreation(VM&, JSGlobalObject*);
    4141
    4242public:
    4343    static JSGenericTypedArrayViewPrototype* create(
    44         ExecState*, JSGlobalObject*, Structure*);
     44        VM&, JSGlobalObject*, Structure*);
    4545   
    4646    DECLARE_INFO;
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeInlines.h

    r156240 r157301  
    133133template<typename ViewClass>
    134134void JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation(
    135     ExecState* exec, JSGlobalObject* globalObject)
     135    VM& vm, JSGlobalObject* globalObject)
    136136{
    137     VM& vm = exec->vm();
    138    
    139137    Base::finishCreation(vm);
    140138   
     
    149147JSGenericTypedArrayViewPrototype<ViewClass>*
    150148JSGenericTypedArrayViewPrototype<ViewClass>::create(
    151     ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
     149    VM& vm, JSGlobalObject* globalObject, Structure* structure)
    152150{
    153151    JSGenericTypedArrayViewPrototype* prototype =
    154         new (NotNull, allocateCell<JSGenericTypedArrayViewPrototype>(exec->vm().heap))
    155         JSGenericTypedArrayViewPrototype(exec->vm(), structure);
    156     prototype->finishCreation(exec, globalObject);
     152        new (NotNull, allocateCell<JSGenericTypedArrayViewPrototype>(vm.heap))
     153        JSGenericTypedArrayViewPrototype(vm, structure);
     154    prototype->finishCreation(vm, globalObject);
    157155    return prototype;
    158156}
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r156910 r157301  
    249249    m_functionPrototype->structure()->setPrototypeWithoutTransition(vm, m_objectPrototype.get());
    250250   
    251     m_typedArrays[toIndex(TypeInt8)].prototype.set(vm, this, JSInt8ArrayPrototype::create(exec, this, JSInt8ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    252     m_typedArrays[toIndex(TypeInt16)].prototype.set(vm, this, JSInt16ArrayPrototype::create(exec, this, JSInt16ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    253     m_typedArrays[toIndex(TypeInt32)].prototype.set(vm, this, JSInt32ArrayPrototype::create(exec, this, JSInt32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    254     m_typedArrays[toIndex(TypeUint8)].prototype.set(vm, this, JSUint8ArrayPrototype::create(exec, this, JSUint8ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    255     m_typedArrays[toIndex(TypeUint8Clamped)].prototype.set(vm, this, JSUint8ClampedArrayPrototype::create(exec, this, JSUint8ClampedArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    256     m_typedArrays[toIndex(TypeUint16)].prototype.set(vm, this, JSUint16ArrayPrototype::create(exec, this, JSUint16ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    257     m_typedArrays[toIndex(TypeUint32)].prototype.set(vm, this, JSUint32ArrayPrototype::create(exec, this, JSUint32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    258     m_typedArrays[toIndex(TypeFloat32)].prototype.set(vm, this, JSFloat32ArrayPrototype::create(exec, this, JSFloat32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    259     m_typedArrays[toIndex(TypeFloat64)].prototype.set(vm, this, JSFloat64ArrayPrototype::create(exec, this, JSFloat64ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     251    m_typedArrays[toIndex(TypeInt8)].prototype.set(vm, this, JSInt8ArrayPrototype::create(vm, this, JSInt8ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     252    m_typedArrays[toIndex(TypeInt16)].prototype.set(vm, this, JSInt16ArrayPrototype::create(vm, this, JSInt16ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     253    m_typedArrays[toIndex(TypeInt32)].prototype.set(vm, this, JSInt32ArrayPrototype::create(vm, this, JSInt32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     254    m_typedArrays[toIndex(TypeUint8)].prototype.set(vm, this, JSUint8ArrayPrototype::create(vm, this, JSUint8ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     255    m_typedArrays[toIndex(TypeUint8Clamped)].prototype.set(vm, this, JSUint8ClampedArrayPrototype::create(vm, this, JSUint8ClampedArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     256    m_typedArrays[toIndex(TypeUint16)].prototype.set(vm, this, JSUint16ArrayPrototype::create(vm, this, JSUint16ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     257    m_typedArrays[toIndex(TypeUint32)].prototype.set(vm, this, JSUint32ArrayPrototype::create(vm, this, JSUint32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     258    m_typedArrays[toIndex(TypeFloat32)].prototype.set(vm, this, JSFloat32ArrayPrototype::create(vm, this, JSFloat32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
     259    m_typedArrays[toIndex(TypeFloat64)].prototype.set(vm, this, JSFloat64ArrayPrototype::create(vm, this, JSFloat64ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
    260260    m_typedArrays[toIndex(TypeDataView)].prototype.set(vm, this, JSDataViewPrototype::create(vm, JSDataViewPrototype::createStructure(vm, this, m_objectPrototype.get())));
    261261   
Note: See TracChangeset for help on using the changeset viewer.