diff options
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSFunction.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSFunction.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/runtime/JSFunction.cpp b/Source/JavaScriptCore/runtime/JSFunction.cpp index dbfc606..a18e973 100644 --- a/Source/JavaScriptCore/runtime/JSFunction.cpp +++ b/Source/JavaScriptCore/runtime/JSFunction.cpp @@ -56,14 +56,12 @@ bool JSFunction::isHostFunctionNonInline() const return isHostFunction(); } -JSFunction::JSFunction(NonNullPassRefPtr<Structure> structure, VPtrHackExecutable* executable) - : Base(structure) +JSFunction::JSFunction(VPtrStealingHackType) + : Base(VPtrStealingHack) { - ASSERT(inherits(&s_info)); - m_executable.setWithoutWriteBarrier(executable); } -JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, NativeExecutable* thunk) +JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, int length, const Identifier& name, NativeExecutable* thunk) : Base(globalObject, structure) , m_executable(exec->globalData(), this, thunk) , m_scopeChain(exec->globalData(), this, globalObject->globalScopeChain()) @@ -73,7 +71,7 @@ JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPas putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(length), DontDelete | ReadOnly | DontEnum); } -JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, NonNullPassRefPtr<Structure> structure, int length, const Identifier& name, NativeFunction func) +JSFunction::JSFunction(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, int length, const Identifier& name, NativeFunction func) : Base(globalObject, structure) , m_scopeChain(exec->globalData(), this, globalObject->globalScopeChain()) { @@ -112,12 +110,12 @@ static void createDescriptorForThrowingProperty(ExecState* exec, PropertyDescrip const UString& JSFunction::name(ExecState* exec) { - return asString(getDirect(exec->globalData().propertyNames->name))->tryGetValue(); + return asString(getDirect(exec->globalData(), exec->globalData().propertyNames->name))->tryGetValue(); } const UString JSFunction::displayName(ExecState* exec) { - JSValue displayName = getDirect(exec->globalData().propertyNames->displayName); + JSValue displayName = getDirect(exec->globalData(), exec->globalData().propertyNames->displayName); if (displayName && isJSString(&exec->globalData(), displayName)) return asString(displayName)->tryGetValue(); @@ -186,13 +184,13 @@ bool JSFunction::getOwnPropertySlot(ExecState* exec, const Identifier& propertyN return Base::getOwnPropertySlot(exec, propertyName, slot); if (propertyName == exec->propertyNames().prototype) { - WriteBarrierBase<Unknown>* location = getDirectLocation(propertyName); + WriteBarrierBase<Unknown>* location = getDirectLocation(exec->globalData(), propertyName); if (!location) { JSObject* prototype = constructEmptyObject(exec, scope()->globalObject->emptyObjectStructure()); prototype->putDirect(exec->globalData(), exec->propertyNames().constructor, this, DontEnum); putDirect(exec->globalData(), exec->propertyNames().prototype, prototype, DontDelete | DontEnum); - location = getDirectLocation(propertyName); + location = getDirectLocation(exec->globalData(), propertyName); } slot.setValue(this, location->get(), offsetForLocation(location)); |