Changeset 196868 in webkit for trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
- Timestamp:
- Feb 20, 2016, 3:51:33 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r194863 r196868 222 222 { 223 223 BEGIN(); 224 JSFunction* constructor = jsCast<JSFunction*>(OP(2).jsValue().asCell()); 225 226 auto& cacheWriteBarrier = pc[4].u.jsCell; 227 if (!cacheWriteBarrier) 228 cacheWriteBarrier.set(exec->vm(), exec->codeBlock(), constructor); 229 else if (cacheWriteBarrier.unvalidatedGet() != JSCell::seenMultipleCalleeObjects() && cacheWriteBarrier.get() != constructor) 230 cacheWriteBarrier.setWithoutWriteBarrier(JSCell::seenMultipleCalleeObjects()); 231 232 size_t inlineCapacity = pc[3].u.operand; 233 Structure* structure = constructor->rareData(exec, inlineCapacity)->objectAllocationProfile()->structure(); 234 RETURN(constructEmptyObject(exec, structure)); 224 JSObject* result; 225 JSCell* constructorAsCell = OP(2).jsValue().asCell(); 226 if (constructorAsCell->type() == JSFunctionType) { 227 JSFunction* constructor = jsCast<JSFunction*>(constructorAsCell); 228 auto& cacheWriteBarrier = pc[4].u.jsCell; 229 if (!cacheWriteBarrier) 230 cacheWriteBarrier.set(exec->vm(), exec->codeBlock(), constructor); 231 else if (cacheWriteBarrier.unvalidatedGet() != JSCell::seenMultipleCalleeObjects() && cacheWriteBarrier.get() != constructor) 232 cacheWriteBarrier.setWithoutWriteBarrier(JSCell::seenMultipleCalleeObjects()); 233 234 size_t inlineCapacity = pc[3].u.operand; 235 Structure* structure = constructor->rareData(exec, inlineCapacity)->objectAllocationProfile()->structure(); 236 result = constructEmptyObject(exec, structure); 237 } else 238 result = constructEmptyObject(exec); 239 RETURN(result); 235 240 } 236 241
Note:
See TracChangeset
for help on using the changeset viewer.