diff options
Diffstat (limited to 'Source/JavaScriptCore/jit/JITStubs.cpp')
-rw-r--r-- | Source/JavaScriptCore/jit/JITStubs.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/JavaScriptCore/jit/JITStubs.cpp b/Source/JavaScriptCore/jit/JITStubs.cpp index d81e68aae..73f4892ac 100644 --- a/Source/JavaScriptCore/jit/JITStubs.cpp +++ b/Source/JavaScriptCore/jit/JITStubs.cpp @@ -1286,12 +1286,7 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_create_this) ASSERT(constructor->methodTable()->getConstructData(constructor, constructData) == ConstructTypeJS); #endif - Structure* structure; - JSValue proto = stackFrame.args[0].jsValue(); - if (proto.isObject()) - structure = asObject(proto)->inheritorID(*stackFrame.globalData); - else - structure = constructor->scope()->globalObject->emptyObjectStructure(); + Structure* structure = constructor->cachedInheritorID(callFrame); JSValue result = constructEmptyObject(callFrame, structure); return JSValue::encode(result); @@ -1497,9 +1492,7 @@ DEFINE_STUB_FUNCTION(JSObject*, op_put_by_id_transition_realloc) ASSERT(baseValue.isObject()); JSObject* base = asObject(baseValue); - JSGlobalData& globalData = *stackFrame.globalData; - PropertyStorage newStorage = base->growPropertyStorage(globalData, oldSize, newSize); - base->setPropertyStorage(globalData, newStorage, newStructure); + base->allocatePropertyStorage(*stackFrame.globalData, oldSize, newSize); return base; } |