Changeset 208588 in webkit
- Timestamp:
- Nov 11, 2016 8:50:57 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 deleted
- 29 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r208584 r208588 1 2016-11-11 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, rolling out r208117 and r208160. 4 5 Regressed Speedometer by >1.5% 6 7 Reverted changesets: 8 9 "We should have a way of profiling when a get_by_id is pure 10 and to emit a PureGetById in the DFG/FTL" 11 https://bugs.webkit.org/show_bug.cgi?id=163305 12 http://trac.webkit.org/changeset/208117 13 14 "Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing 15 out" 16 https://bugs.webkit.org/show_bug.cgi?id=164227 17 http://trac.webkit.org/changeset/208160 18 1 19 2016-11-11 Saam Barati <sbarati@apple.com> 2 20 -
trunk/Source/JavaScriptCore/ChangeLog
r208584 r208588 1 2016-11-11 Chris Dumez <cdumez@apple.com> 2 3 Unreviewed, rolling out r208117 and r208160. 4 5 Regressed Speedometer by >1.5% 6 7 Reverted changesets: 8 9 "We should have a way of profiling when a get_by_id is pure 10 and to emit a PureGetById in the DFG/FTL" 11 https://bugs.webkit.org/show_bug.cgi?id=163305 12 http://trac.webkit.org/changeset/208117 13 14 "Debug JSC test microbenchmarks/pure-get-by-id-cse-2.js timing 15 out" 16 https://bugs.webkit.org/show_bug.cgi?id=164227 17 http://trac.webkit.org/changeset/208160 18 1 19 2016-11-11 Saam Barati <sbarati@apple.com> 2 20 -
trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.cpp
r208117 r208588 49 49 , tookSlowPath(false) 50 50 , everConsidered(false) 51 , didSideEffects(false)52 51 { 53 52 } … … 218 217 219 218 switch (accessType) { 220 case AccessType::TryGet: 221 resetGetByID(codeBlock, *this, GetByIDKind::Try); 222 break; 223 case AccessType::PureGet: 219 case AccessType::GetPure: 224 220 resetGetByID(codeBlock, *this, GetByIDKind::Pure); 225 221 break; -
trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h
r208117 r208588 47 47 enum class AccessType : int8_t { 48 48 Get, 49 TryGet, 50 PureGet, 49 GetPure, 51 50 Put, 52 51 In … … 207 206 bool tookSlowPath : 1; 208 207 bool everConsidered : 1; 209 bool didSideEffects : 1;210 208 }; 211 209 -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r208584 r208588 2152 2152 break; 2153 2153 2154 case PureGetById:2155 2154 case GetById: 2156 2155 case GetByIdFlush: { … … 2184 2183 } 2185 2184 2186 if (node->op() == PureGetById) 2187 clobberStructures(clobberLimit); 2188 else 2189 clobberWorld(node->origin.semantic, clobberLimit); 2185 clobberWorld(node->origin.semantic, clobberLimit); 2190 2186 forNode(node).makeHeapTop(); 2191 2187 break; -
trunk/Source/JavaScriptCore/dfg/DFGArrayMode.cpp
r208377 r208588 153 153 static bool canBecomeGetArrayLength(Graph& graph, Node* node) 154 154 { 155 if (node->op() == GetById || node->op() == PureGetById) { 156 auto uid = graph.identifiers()[node->identifierNumber()]; 157 return uid == graph.m_vm.propertyNames->length.impl(); 158 } 159 return false; 155 if (node->op() != GetById) 156 return false; 157 auto uid = graph.identifiers()[node->identifierNumber()]; 158 return uid == graph.m_vm.propertyNames->length.impl(); 160 159 } 161 160 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r208584 r208588 3346 3346 3347 3347 NodeType getById; 3348 switch (type) { 3349 case AccessType::Get: 3348 if (type == AccessType::Get) 3350 3349 getById = getByIdStatus.makesCalls() ? GetByIdFlush : GetById; 3351 break; 3352 case AccessType::TryGet: 3350 else 3353 3351 getById = TryGetById; 3354 break;3355 case AccessType::PureGet:3356 getById = PureGetById;3357 break;3358 default:3359 RELEASE_ASSERT_NOT_REACHED();3360 }3361 3352 3362 3353 // Special path for custom accessors since custom's offset does not have any meanings. … … 4267 4258 Node* base = get(VirtualRegister(currentInstruction[2].u.operand)); 4268 4259 Node* property = get(VirtualRegister(currentInstruction[3].u.operand)); 4269 bool compileAsGetById = false; 4270 bool compileAsPureGetById = false; 4260 bool compiledAsGetById = false; 4271 4261 GetByIdStatus getByIdStatus; 4272 4262 unsigned identifierNumber = 0; … … 4277 4267 // At that time, there is no information. 4278 4268 if (byValInfo && byValInfo->stubInfo && !byValInfo->tookSlowPath && !m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadIdent) && !m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, BadCell)) { 4279 compileAsGetById = true; 4280 compileAsPureGetById = !byValInfo->stubInfo->didSideEffects; 4269 compiledAsGetById = true; 4281 4270 identifierNumber = m_graph.identifiers().ensure(byValInfo->cachedId.impl()); 4282 4271 UniquedStringImpl* uid = m_graph.identifiers()[identifierNumber]; … … 4296 4285 } 4297 4286 4298 if (compileAsGetById) { 4299 AccessType type = compileAsPureGetById ? AccessType::PureGet : AccessType::Get; 4300 handleGetById(currentInstruction[1].u.operand, prediction, base, identifierNumber, getByIdStatus, type, OPCODE_LENGTH(op_get_by_val)); 4301 } else { 4287 if (compiledAsGetById) 4288 handleGetById(currentInstruction[1].u.operand, prediction, base, identifierNumber, getByIdStatus, AccessType::Get, OPCODE_LENGTH(op_get_by_val)); 4289 else { 4302 4290 ArrayMode arrayMode = getArrayMode(currentInstruction[4].u.arrayProfile, Array::Read); 4303 4291 Node* getByVal = addToGraph(GetByVal, OpInfo(arrayMode.asWord()), OpInfo(prediction), base, property); … … 4435 4423 m_inlineStackTop->m_stubInfos, m_dfgStubInfos, 4436 4424 currentCodeOrigin(), uid); 4437 AccessType type; 4438 if (opcodeID == op_try_get_by_id) 4439 type = AccessType::TryGet; 4440 else { 4441 ConcurrentJITLocker locker(m_inlineStackTop->m_profiledBlock->m_lock); 4442 unsigned bytecodeIndex = currentCodeOrigin().bytecodeIndex; 4443 StructureStubInfo* info = m_inlineStackTop->m_stubInfos.get(CodeOrigin(bytecodeIndex)); 4444 if (info && info->everConsidered && !info->didSideEffects) 4445 type = AccessType::PureGet; 4446 else 4447 type = AccessType::Get; 4448 } 4425 AccessType type = op_try_get_by_id == opcodeID ? AccessType::GetPure : AccessType::Get; 4449 4426 4450 4427 unsigned opcodeLength = opcodeID == op_try_get_by_id ? OPCODE_LENGTH(op_try_get_by_id) : OPCODE_LENGTH(op_get_by_id); -
trunk/Source/JavaScriptCore/dfg/DFGClobberize.h
r208584 r208588 503 503 return; 504 504 505 case PureGetById: {506 // We model what is allowed inside a getOwnPropertySlot(VMInquiry) here.507 // Some getOwnPropertySlot implementations will lazily inject properties, which508 // may change the object's structure.509 510 read(JSCell_structureID);511 read(JSCell_typeInfoFlags);512 read(JSCell_typeInfoType);513 read(JSCell_indexingType);514 read(JSObject_butterfly);515 read(MiscFields);516 517 AbstractHeap propertyNameHeap(NamedProperties, node->identifierNumber());518 read(propertyNameHeap);519 520 write(JSCell_structureID);521 write(JSCell_typeInfoFlags);522 523 write(Watchpoint_fire);524 write(MiscFields);525 526 // This can happen if lazily adding fields to an object happens in getOwnPropertySlot527 // and we need to allocate out of line storage.528 write(JSObject_butterfly);529 530 def(HeapLocation(NamedPropertyLoc, propertyNameHeap, node->child1()), LazyNode(node));531 return;532 }533 534 505 case GetById: 535 506 case GetByIdFlush: -
trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
r208235 r208588 450 450 } 451 451 452 case PureGetById:453 452 case GetById: 454 453 case GetByIdFlush: { … … 461 460 m_interpreter.execute(indexInBlock); // Push CFA over this node after we get the state before. 462 461 alreadyHandled = true; // Don't allow the default constant folder to do things to this. 463 464 if (!Options::useAccessInlining())465 break;466 462 467 463 if (baseValue.m_structure.isTop() || baseValue.m_structure.isClobbered() … … 519 515 m_interpreter.execute(indexInBlock); // Push CFA over this node after we get the state before. 520 516 alreadyHandled = true; // Don't allow the default constant folder to do things to this. 521 522 if (!Options::useAccessInlining())523 break;524 517 525 518 if (baseValue.m_structure.isTop() || baseValue.m_structure.isClobbered()) -
trunk/Source/JavaScriptCore/dfg/DFGDoesGC.cpp
r208584 r208588 267 267 return false; 268 268 269 case PureGetById: // We are modeling getOwnPropertySlot here, which may GC because it is allowed to allocate things.270 269 case CreateActivation: 271 270 case CreateDirectArguments: -
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r208584 r208588 1207 1207 } 1208 1208 1209 case PureGetById:1210 1209 case GetById: 1211 1210 case GetByIdFlush: { -
trunk/Source/JavaScriptCore/dfg/DFGNode.h
r208584 r208588 535 535 void convertToGetByOffset(StorageAccessData& data, Edge storage, Edge base) 536 536 { 537 ASSERT(m_op == GetById || m_op == GetByIdFlush || m_op == PureGetById || m_op ==MultiGetByOffset);537 ASSERT(m_op == GetById || m_op == GetByIdFlush || m_op == MultiGetByOffset); 538 538 m_opInfo = &data; 539 539 children.setChild1(storage); … … 545 545 void convertToMultiGetByOffset(MultiGetByOffsetData* data) 546 546 { 547 ASSERT(m_op == GetById || m_op == GetByIdFlush || m_op == PureGetById);547 ASSERT(m_op == GetById || m_op == GetByIdFlush); 548 548 m_opInfo = data; 549 549 child1().setUseKind(CellUse); … … 923 923 case TryGetById: 924 924 case GetById: 925 case PureGetById:926 925 case GetByIdFlush: 927 926 case GetByIdWithThis: … … 1440 1439 case ArithTrunc: 1441 1440 case GetDirectPname: 1442 case PureGetById:1443 1441 case GetById: 1444 1442 case GetByIdFlush: -
trunk/Source/JavaScriptCore/dfg/DFGNodeType.h
r208584 r208588 186 186 macro(PutByValAlias, NodeMustGenerate | NodeHasVarArgs) \ 187 187 macro(TryGetById, NodeResultJS) \ 188 macro(PureGetById, NodeResultJS | NodeMustGenerate) \189 188 macro(GetById, NodeResultJS | NodeMustGenerate) \ 190 189 macro(GetByIdFlush, NodeResultJS | NodeMustGenerate) \ -
trunk/Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
r208584 r208588 683 683 case StringReplace: 684 684 case StringReplaceRegExp: 685 case PureGetById:686 685 case GetById: 687 686 case GetByIdFlush: -
trunk/Source/JavaScriptCore/dfg/DFGSafeToExecute.h
r208584 r208588 200 200 case DeleteById: 201 201 case DeleteByVal: 202 case PureGetById:203 202 case GetById: 204 203 case GetByIdWithThis: -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r208584 r208588 1001 1001 base.use(); 1002 1002 1003 cachedGetById(node->origin.semantic, baseRegs, resultRegs, node->identifierNumber(), JITCompiler::Jump(), NeedToSpill, AccessType:: TryGet);1003 cachedGetById(node->origin.semantic, baseRegs, resultRegs, node->identifierNumber(), JITCompiler::Jump(), NeedToSpill, AccessType::GetPure); 1004 1004 1005 1005 jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly); … … 1018 1018 JITCompiler::Jump notCell = m_jit.branchIfNotCell(baseRegs); 1019 1019 1020 cachedGetById(node->origin.semantic, baseRegs, resultRegs, node->identifierNumber(), notCell, NeedToSpill, AccessType:: TryGet);1020 cachedGetById(node->origin.semantic, baseRegs, resultRegs, node->identifierNumber(), notCell, NeedToSpill, AccessType::GetPure); 1021 1021 1022 1022 jsValueResult(resultRegs, node, DataFormatJS, UseChildrenCalledExplicitly); … … 1028 1028 break; 1029 1029 } 1030 }1031 1032 void SpeculativeJIT::compilePureGetById(Node* node)1033 {1034 ASSERT(node->op() == PureGetById);1035 1036 switch (node->child1().useKind()) {1037 case CellUse: {1038 SpeculateCellOperand base(this, node->child1());1039 JSValueRegsTemporary result(this, Reuse, base);1040 1041 JSValueRegs baseRegs = JSValueRegs::payloadOnly(base.gpr());1042 JSValueRegs resultRegs = result.regs();1043 1044 cachedGetById(node->origin.semantic, baseRegs, resultRegs, node->identifierNumber(), JITCompiler::Jump(), NeedToSpill, AccessType::PureGet);1045 1046 jsValueResult(resultRegs, node);1047 break;1048 }1049 case UntypedUse: {1050 JSValueOperand base(this, node->child1());1051 JSValueRegsTemporary result(this, Reuse, base);1052 1053 JSValueRegs baseRegs = base.jsValueRegs();1054 JSValueRegs resultRegs = result.regs();1055 1056 JITCompiler::Jump notCell = m_jit.branchIfNotCell(baseRegs);1057 1058 cachedGetById(node->origin.semantic, baseRegs, resultRegs, node->identifierNumber(), notCell, NeedToSpill, AccessType::PureGet);1059 1060 jsValueResult(resultRegs, node);1061 break;1062 }1063 default:1064 RELEASE_ASSERT_NOT_REACHED();1065 }1066 1030 } 1067 1031 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r208584 r208588 722 722 void compileDeleteByVal(Node*); 723 723 void compileTryGetById(Node*); 724 void compilePureGetById(Node*);725 724 void compileIn(Node*); 726 725 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r208584 r208588 211 211 if (type == AccessType::Get) 212 212 getByIdFunction = operationGetByIdOptimize; 213 else if (type == AccessType::PureGet)214 getByIdFunction = operationPureGetByIdOptimize;215 213 else 216 214 getByIdFunction = operationTryGetByIdOptimize; … … 4282 4280 } 4283 4281 4284 case PureGetById: {4285 compilePureGetById(node);4286 break;4287 }4288 4289 4282 case GetByIdWithThis: { 4290 4283 JSValueOperand base(this, node->child1()); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r208584 r208588 180 180 slowCases.append(gen.slowPathJump()); 181 181 182 auto slowPathFunction = type == AccessType::Get ? operationGetByIdOptimize :183 type == AccessType::PureGet ? operationPureGetByIdOptimize : operationTryGetByIdOptimize;184 185 182 auto slowPath = slowPathCall( 186 slowCases, this, slowPathFunction,183 slowCases, this, type == AccessType::Get ? operationGetByIdOptimize : operationTryGetByIdOptimize, 187 184 spillMode, ExceptionCheckRequirement::CheckNeeded, 188 185 resultGPR, gen.stubInfo(), baseGPR, identifierUID(identifierNumber)); … … 4249 4246 } 4250 4247 4251 case PureGetById: {4252 compilePureGetById(node);4253 break;4254 }4255 4256 4248 case GetByIdFlush: { 4257 4249 if (!node->prediction()) { -
trunk/Source/JavaScriptCore/ftl/FTLCapabilities.cpp
r208584 r208588 180 180 case TryGetById: 181 181 case GetById: 182 case PureGetById:183 182 case GetByIdFlush: 184 183 case GetByIdWithThis: -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r208584 r208588 624 624 break; 625 625 case TryGetById: 626 compileGetById(AccessType::TryGet); 627 break; 628 case PureGetById: 629 compileGetById(AccessType::PureGet); 626 compileGetById(AccessType::GetPure); 630 627 break; 631 628 case GetById: … … 2805 2802 void compileGetById(AccessType type) 2806 2803 { 2807 ASSERT(type == AccessType::Get || type == AccessType:: TryGet || type == AccessType::PureGet);2804 ASSERT(type == AccessType::Get || type == AccessType::GetPure); 2808 2805 switch (m_node->child1().useKind()) { 2809 2806 case CellUse: { … … 2832 2829 if (type == AccessType::Get) 2833 2830 getByIdFunction = operationGetByIdGeneric; 2834 else if (type == AccessType::PureGet)2835 getByIdFunction = operationPureGetByIdGeneric;2836 2831 else 2837 2832 getByIdFunction = operationTryGetByIdGeneric; … … 9095 9090 if (type == AccessType::Get) 9096 9091 optimizationFunction = operationGetByIdOptimize; 9097 else if (type == AccessType::PureGet)9098 optimizationFunction = operationPureGetByIdOptimize;9099 9092 else 9100 9093 optimizationFunction = operationTryGetByIdOptimize; -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r208309 r208588 76 76 namespace JSC { 77 77 78 ALWAYS_INLINE static EncodedJSValue pureGetByIdCommon(VM& vm, ExecState* exec, EncodedJSValue base, UniquedStringImpl* uid, const std::function<void (const PropertySlot&, const Identifier&)>& function = [] (const PropertySlot&, const Identifier&) { })79 {80 Identifier ident = Identifier::fromUid(&vm, uid);81 JSValue baseValue = JSValue::decode(base);82 83 ASSERT(JITCode::isOptimizingJIT(exec->codeBlock()->jitType()));84 85 PropertySlot slot(baseValue, PropertySlot::InternalMethodType::VMInquiry);86 return JSValue::encode(baseValue.getPropertySlot(exec, ident, slot, [&] (bool, PropertySlot&) -> JSValue {87 bool willDoSideEffects = !(slot.isValue() || slot.isUnset()) || slot.isTaintedByOpaqueObject();88 if (UNLIKELY(willDoSideEffects)) {89 {90 CodeOrigin codeOrigin = exec->codeOrigin();91 CodeBlock* currentBaseline = baselineCodeBlockForOriginAndBaselineCodeBlock(codeOrigin, exec->codeBlock()->alternative());92 CodeOrigin originBytecodeIndex = CodeOrigin(codeOrigin.bytecodeIndex); // Since we're searching in the baseline, we just care about bytecode index.93 ConcurrentJITLocker locker(currentBaseline->m_lock);94 if (StructureStubInfo* stub = currentBaseline->findStubInfo(originBytecodeIndex))95 stub->didSideEffects = true;96 }97 98 exec->codeBlock()->jettison(Profiler::JettisonDueToPureGetByIdEffects);99 return baseValue.get(exec, uid);100 }101 102 function(slot, ident);103 return slot.isValue() ? slot.getValue(exec, ident) : jsUndefined();104 }));105 }106 107 78 extern "C" { 108 79 … … 200 171 } 201 172 202 EncodedJSValue JIT_OPERATION operationPureGetByIdGeneric(ExecState* exec, EncodedJSValue base, UniquedStringImpl* uid)203 {204 VM* vm = &exec->vm();205 NativeCallFrameTracer tracer(vm, exec);206 207 return pureGetByIdCommon(*vm, exec, base, uid);208 }209 210 EncodedJSValue JIT_OPERATION operationPureGetById(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue base, UniquedStringImpl* uid)211 {212 VM* vm = &exec->vm();213 NativeCallFrameTracer tracer(vm, exec);214 215 stubInfo->tookSlowPath = true;216 217 return pureGetByIdCommon(*vm, exec, base, uid);218 }219 220 EncodedJSValue JIT_OPERATION operationPureGetByIdOptimize(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue base, UniquedStringImpl* uid)221 {222 VM* vm = &exec->vm();223 NativeCallFrameTracer tracer(vm, exec);224 225 return pureGetByIdCommon(*vm, exec, base, uid,226 [&] (const PropertySlot& slot, const Identifier& ident) {227 ASSERT((slot.isValue() || slot.isUnset()) && !slot.isTaintedByOpaqueObject());228 JSValue baseValue = JSValue::decode(base);229 if (stubInfo->considerCaching(baseValue.structureOrNull()))230 repatchGetByID(exec, baseValue, ident, slot, *stubInfo, GetByIDKind::Pure);231 });232 }233 234 173 EncodedJSValue JIT_OPERATION operationTryGetById(ExecState* exec, StructureStubInfo* stubInfo, EncodedJSValue base, UniquedStringImpl* uid) 235 174 { … … 246 185 } 247 186 187 248 188 EncodedJSValue JIT_OPERATION operationTryGetByIdGeneric(ExecState* exec, EncodedJSValue base, UniquedStringImpl* uid) 249 189 { … … 273 213 274 214 if (stubInfo->considerCaching(baseValue.structureOrNull()) && !slot.isTaintedByOpaqueObject() && (slot.isCacheableValue() || slot.isCacheableGetter() || slot.isUnset())) 275 repatchGetByID(exec, baseValue, ident, slot, *stubInfo, GetByIDKind:: Try);215 repatchGetByID(exec, baseValue, ident, slot, *stubInfo, GetByIDKind::Pure); 276 216 277 217 return JSValue::encode(slot.getPureResult()); … … 292 232 293 233 LOG_IC((ICEvent::OperationGetById, baseValue.classInfoOrNull(), ident)); 294 JSValue result = baseValue.get(exec, ident, slot); 295 bool willDoSideEffects = !(slot.isValue() || slot.isUnset()) || slot.isTaintedByOpaqueObject(); 296 stubInfo->didSideEffects |= willDoSideEffects; 297 return JSValue::encode(result); 234 return JSValue::encode(baseValue.get(exec, ident, slot)); 298 235 } 299 236 … … 324 261 325 262 return JSValue::encode(baseValue.getPropertySlot(exec, ident, [&] (bool found, PropertySlot& slot) -> JSValue { 326 bool willDoSideEffects = !(slot.isValue() || slot.isUnset()) || slot.isTaintedByOpaqueObject();327 stubInfo->didSideEffects |= willDoSideEffects;328 329 263 if (stubInfo->considerCaching(baseValue.structureOrNull())) 330 264 repatchGetByID(exec, baseValue, ident, slot, *stubInfo, GetByIDKind::Normal); -
trunk/Source/JavaScriptCore/jit/JITOperations.h
r208584 r208588 333 333 EncodedJSValue JIT_OPERATION operationTryGetByIdGeneric(ExecState*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL; 334 334 EncodedJSValue JIT_OPERATION operationTryGetByIdOptimize(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL; 335 EncodedJSValue JIT_OPERATION operationPureGetById(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;336 EncodedJSValue JIT_OPERATION operationPureGetByIdGeneric(ExecState*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;337 EncodedJSValue JIT_OPERATION operationPureGetByIdOptimize(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL;338 335 EncodedJSValue JIT_OPERATION operationGetById(ExecState*, StructureStubInfo*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL; 339 336 EncodedJSValue JIT_OPERATION operationGetByIdGeneric(ExecState*, EncodedJSValue, UniquedStringImpl*) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r208117 r208588 580 580 JITGetByIdGenerator gen( 581 581 m_codeBlock, CodeOrigin(m_bytecodeOffset), CallSiteIndex(m_bytecodeOffset), RegisterSet::stubUnavailableRegisters(), 582 ident->impl(), JSValueRegs(regT0), JSValueRegs(regT0), AccessType:: TryGet);582 ident->impl(), JSValueRegs(regT0), JSValueRegs(regT0), AccessType::GetPure); 583 583 gen.generateFastPath(*this); 584 584 addSlowCase(gen.slowPathJump()); -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
r208117 r208588 595 595 JITGetByIdGenerator gen( 596 596 m_codeBlock, CodeOrigin(m_bytecodeOffset), CallSiteIndex(currentInstruction), RegisterSet::stubUnavailableRegisters(), 597 ident->impl(), JSValueRegs::payloadOnly(regT0), JSValueRegs(regT1, regT0), AccessType:: TryGet);597 ident->impl(), JSValueRegs::payloadOnly(regT0), JSValueRegs(regT1, regT0), AccessType::GetPure); 598 598 gen.generateFastPath(*this); 599 599 addSlowCase(gen.slowPathJump()); -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r208309 r208588 137 137 inline J_JITOperation_ESsiJI appropriateOptimizingGetByIdFunction(GetByIDKind kind) 138 138 { 139 switch (kind) { 140 case GetByIDKind::Normal: 139 if (kind == GetByIDKind::Normal) 141 140 return operationGetByIdOptimize; 142 case GetByIDKind::Try: 143 return operationTryGetByIdOptimize; 144 case GetByIDKind::Pure: 145 return operationPureGetByIdOptimize; 146 default: 147 break; 148 } 149 ASSERT_NOT_REACHED(); 150 return operationGetByIdOptimize; 141 return operationTryGetByIdOptimize; 151 142 } 152 143 153 144 inline J_JITOperation_ESsiJI appropriateGenericGetByIdFunction(GetByIDKind kind) 154 145 { 155 switch (kind) { 156 case GetByIDKind::Normal: 146 if (kind == GetByIDKind::Normal) 157 147 return operationGetById; 158 case GetByIDKind::Try: 159 return operationTryGetById; 160 case GetByIDKind::Pure: 161 return operationPureGetById; 162 default: 163 break; 164 } 165 ASSERT_NOT_REACHED(); 166 return operationGetById; 148 return operationTryGetById; 167 149 } 168 150 … … 287 269 288 270 if (kind == GetByIDKind::Pure) { 289 AccessCase::AccessType type;290 if (slot.isCacheableValue())291 type = AccessCase::Load;292 else if (slot.isUnset())293 type = AccessCase::Miss;294 else295 RELEASE_ASSERT_NOT_REACHED();296 297 newCase = AccessCase::tryGet(vm, codeBlock, type, offset, structure, conditionSet, loadTargetFromProxy, slot.watchpointSet());298 } else if (kind == GetByIDKind::Try) {299 271 AccessCase::AccessType type; 300 272 if (slot.isCacheableValue()) -
trunk/Source/JavaScriptCore/jit/Repatch.h
r208117 r208588 37 37 enum class GetByIDKind { 38 38 Normal, 39 Try,40 39 Pure 41 40 }; -
trunk/Source/JavaScriptCore/profiler/ProfilerJettisonReason.cpp
r208117 r208588 57 57 out.print("OSRExit"); 58 58 return; 59 case JettisonDueToPureGetByIdEffects:60 out.print("PureGetByIdEffects");61 return;62 59 case JettisonDueToProfiledWatchpoint: 63 60 out.print("ProfiledWatchpoint"); -
trunk/Source/JavaScriptCore/profiler/ProfilerJettisonReason.h
r208117 r208588 36 36 JettisonDueToBaselineLoopReoptimizationTriggerOnOSREntryFail, 37 37 JettisonDueToOSRExit, 38 JettisonDueToPureGetByIdEffects,39 38 JettisonDueToProfiledWatchpoint, 40 39 JettisonDueToUnprofiledWatchpoint,
Note: See TracChangeset
for help on using the changeset viewer.