Changeset 38688 in webkit for trunk/JavaScriptCore/interpreter
- Timestamp:
- Nov 21, 2008, 7:34:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/interpreter/Interpreter.cpp
r38652 r38688 2587 2587 NEXT_INSTRUCTION(); 2588 2588 } 2589 DEFINE_OPCODE(op_get_by_id_self_list) { 2590 // Polymorphic self access caching currently only supported when JITting. 2591 ASSERT_NOT_REACHED(); 2592 // This case of the switch must not be empty, else (op_get_by_id_self_list == op_get_by_id_chain)! 2593 vPC += 8; 2594 NEXT_INSTRUCTION(); 2595 } 2589 2596 DEFINE_OPCODE(op_get_by_id_proto_list) { 2590 2597 // Polymorphic prototype access caching currently only supported when JITting. … … 4594 4601 JSValue* result = baseValue->get(callFrame, ident, slot); 4595 4602 4596 CHECK_FOR_EXCEPTION_AT_END(); 4603 CHECK_FOR_EXCEPTION(); 4604 4605 if (baseValue->isObject() 4606 && slot.isCacheable() 4607 && !asCell(baseValue)->structure()->isDictionary() 4608 && slot.slotBase() == baseValue) { 4609 4610 CodeBlock* codeBlock = callFrame->codeBlock(); 4611 unsigned vPCIndex = codeBlock->ctiReturnAddressVPCMap.get(CTI_RETURN_ADDRESS); 4612 Instruction* vPC = codeBlock->instructions.begin() + vPCIndex; 4613 4614 ASSERT(slot.slotBase()->isObject()); 4615 4616 StructureStubInfo* stubInfo = &codeBlock->getStubInfo(CTI_RETURN_ADDRESS); 4617 4618 PolymorphicAccessStructureList* polymorphicStructureList; 4619 int listIndex = 1; 4620 4621 if (vPC[0].u.opcode == ARG_globalData->interpreter->getOpcode(op_get_by_id_self)) { 4622 ASSERT(!stubInfo->stubRoutine); 4623 polymorphicStructureList = new PolymorphicAccessStructureList(vPC[4].u.structure, 0, vPC[5].u.operand, 0); 4624 4625 vPC[0] = ARG_globalData->interpreter->getOpcode(op_get_by_id_self_list); 4626 vPC[4] = polymorphicStructureList; 4627 vPC[5] = 2; 4628 } else { 4629 polymorphicStructureList = vPC[4].u.polymorphicStructures; 4630 listIndex = vPC[5].u.operand; 4631 4632 vPC[5] = listIndex + 1; 4633 } 4634 4635 JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), slot.cachedOffset()); 4636 4637 if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1)) 4638 ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_generic)); 4639 } else { 4640 ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_generic)); 4641 } 4597 4642 return result; 4598 4643 } … … 4635 4680 StructureStubInfo* stubInfo = &codeBlock->getStubInfo(CTI_RETURN_ADDRESS); 4636 4681 4637 P rototypeStructureList* prototypeStructureList;4682 PolymorphicAccessStructureList* prototypeStructureList; 4638 4683 int listIndex = 1; 4639 4684 4640 4685 if (vPC[0].u.opcode == ARG_globalData->interpreter->getOpcode(op_get_by_id_proto)) { 4641 prototypeStructureList = new P rototypeStructureList(vPC[4].u.structure, vPC[5].u.structure, vPC[6].u.operand, stubInfo->stubRoutine);4686 prototypeStructureList = new PolymorphicAccessStructureList(vPC[4].u.structure, vPC[5].u.structure, vPC[6].u.operand, stubInfo->stubRoutine); 4642 4687 stubInfo->stubRoutine = 0; 4643 4688 … … 4646 4691 vPC[5] = 2; 4647 4692 } else { 4648 prototypeStructureList = vPC[4].u.p rototypeStructure;4693 prototypeStructureList = vPC[4].u.polymorphicStructures; 4649 4694 listIndex = vPC[5].u.operand; 4650 4695 … … 4654 4699 JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), slot.cachedOffset()); 4655 4700 4656 if (listIndex == (P ROTOTYPE_LIST_CACHE_SIZE - 1))4701 if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1)) 4657 4702 ctiRepatchCallByReturnAddress(CTI_RETURN_ADDRESS, reinterpret_cast<void*>(cti_op_get_by_id_proto_list_full)); 4658 4703 } else {
Note:
See TracChangeset
for help on using the changeset viewer.