Commit bcb2e852 authored by akling@apple.com's avatar akling@apple.com

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.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157301 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d8db0877
2013-10-11 Andreas Kling <akling@apple.com>
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.
2013-10-11 Julien Brianceau <jbriance@cisco.com>
[sh4] Fix build after r157209.
......@@ -37,11 +37,11 @@ public:
protected:
JSGenericTypedArrayViewPrototype(VM&, Structure*);
void finishCreation(ExecState*, JSGlobalObject*);
void finishCreation(VM&, JSGlobalObject*);
public:
static JSGenericTypedArrayViewPrototype* create(
ExecState*, JSGlobalObject*, Structure*);
VM&, JSGlobalObject*, Structure*);
DECLARE_INFO;
......
......@@ -132,10 +132,8 @@ JSGenericTypedArrayViewPrototype<ViewClass>::JSGenericTypedArrayViewPrototype(VM
template<typename ViewClass>
void JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation(
ExecState* exec, JSGlobalObject* globalObject)
VM& vm, JSGlobalObject* globalObject)
{
VM& vm = exec->vm();
Base::finishCreation(vm);
ASSERT(inherits(info()));
......@@ -148,12 +146,12 @@ void JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation(
template<typename ViewClass>
JSGenericTypedArrayViewPrototype<ViewClass>*
JSGenericTypedArrayViewPrototype<ViewClass>::create(
ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
VM& vm, JSGlobalObject* globalObject, Structure* structure)
{
JSGenericTypedArrayViewPrototype* prototype =
new (NotNull, allocateCell<JSGenericTypedArrayViewPrototype>(exec->vm().heap))
JSGenericTypedArrayViewPrototype(exec->vm(), structure);
prototype->finishCreation(exec, globalObject);
new (NotNull, allocateCell<JSGenericTypedArrayViewPrototype>(vm.heap))
JSGenericTypedArrayViewPrototype(vm, structure);
prototype->finishCreation(vm, globalObject);
return prototype;
}
......
......@@ -248,15 +248,15 @@ void JSGlobalObject::reset(JSValue prototype)
m_objectPrototype->putDirectNonIndexAccessor(vm, vm.propertyNames->underscoreProto, protoAccessor, Accessor | DontEnum);
m_functionPrototype->structure()->setPrototypeWithoutTransition(vm, m_objectPrototype.get());
m_typedArrays[toIndex(TypeInt8)].prototype.set(vm, this, JSInt8ArrayPrototype::create(exec, this, JSInt8ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeInt16)].prototype.set(vm, this, JSInt16ArrayPrototype::create(exec, this, JSInt16ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeInt32)].prototype.set(vm, this, JSInt32ArrayPrototype::create(exec, this, JSInt32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeUint8)].prototype.set(vm, this, JSUint8ArrayPrototype::create(exec, this, JSUint8ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeUint8Clamped)].prototype.set(vm, this, JSUint8ClampedArrayPrototype::create(exec, this, JSUint8ClampedArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeUint16)].prototype.set(vm, this, JSUint16ArrayPrototype::create(exec, this, JSUint16ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeUint32)].prototype.set(vm, this, JSUint32ArrayPrototype::create(exec, this, JSUint32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeFloat32)].prototype.set(vm, this, JSFloat32ArrayPrototype::create(exec, this, JSFloat32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeFloat64)].prototype.set(vm, this, JSFloat64ArrayPrototype::create(exec, this, JSFloat64ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeInt8)].prototype.set(vm, this, JSInt8ArrayPrototype::create(vm, this, JSInt8ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeInt16)].prototype.set(vm, this, JSInt16ArrayPrototype::create(vm, this, JSInt16ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeInt32)].prototype.set(vm, this, JSInt32ArrayPrototype::create(vm, this, JSInt32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeUint8)].prototype.set(vm, this, JSUint8ArrayPrototype::create(vm, this, JSUint8ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeUint8Clamped)].prototype.set(vm, this, JSUint8ClampedArrayPrototype::create(vm, this, JSUint8ClampedArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeUint16)].prototype.set(vm, this, JSUint16ArrayPrototype::create(vm, this, JSUint16ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeUint32)].prototype.set(vm, this, JSUint32ArrayPrototype::create(vm, this, JSUint32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeFloat32)].prototype.set(vm, this, JSFloat32ArrayPrototype::create(vm, this, JSFloat32ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeFloat64)].prototype.set(vm, this, JSFloat64ArrayPrototype::create(vm, this, JSFloat64ArrayPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeDataView)].prototype.set(vm, this, JSDataViewPrototype::create(vm, JSDataViewPrototype::createStructure(vm, this, m_objectPrototype.get())));
m_typedArrays[toIndex(TypeInt8)].structure.set(vm, this, JSInt8Array::createStructure(vm, this, m_typedArrays[toIndex(TypeInt8)].prototype.get()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment