Changeset 38688 in webkit for trunk/JavaScriptCore/bytecode
- Timestamp:
- Nov 21, 2008, 7:34:43 PM (17 years ago)
- Location:
- trunk/JavaScriptCore/bytecode
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r38652 r38688 643 643 break; 644 644 } 645 case op_get_by_id_self_list: { 646 printGetByIdOp(location, it, identifiers, "get_by_id_self_list"); 647 break; 648 } 645 649 case op_get_by_id_proto: { 646 650 printGetByIdOp(location, it, identifiers, "get_by_id_proto"); … … 1024 1028 return; 1025 1029 } 1026 if (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto_list)) { 1027 PrototypeStructureList* prototypeStructures = vPC[4].u.prototypeStructure; 1028 int count = vPC[5].u.operand; 1029 for (int i = 0; i < count; ++i) { 1030 PrototypeStructureList::ProtoStubInfo& info = prototypeStructures->list[i]; 1031 ASSERT(info.base); 1032 ASSERT(info.proto); 1033 ASSERT(info.stubRoutine); 1034 info.base->deref(); 1035 info.proto->deref(); 1036 WTF::fastFreeExecutable(info.stubRoutine); 1037 } 1030 if ((vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_proto_list)) 1031 || (vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_self_list))) { 1032 PolymorphicAccessStructureList* polymorphicStructures = vPC[4].u.polymorphicStructures; 1033 polymorphicStructures->derefStructures(vPC[5].u.operand); 1034 delete polymorphicStructures; 1038 1035 return; 1039 1036 } -
trunk/JavaScriptCore/bytecode/Instruction.h
r38652 r38688 34 34 #include <wtf/VectorTraits.h> 35 35 36 #define P ROTOTYPE_LIST_CACHE_SIZE 436 #define POLYMORPHIC_LIST_CACHE_SIZE 4 37 37 38 38 namespace JSC { … … 43 43 44 44 // Structure used by op_get_by_id_proto_list instruction to hold data off the main opcode stream. 45 struct P rototypeStructureList {46 struct P rotoStubInfo {45 struct PolymorphicAccessStructureList { 46 struct PolymorphicStubInfo { 47 47 Structure* base; 48 48 Structure* proto; … … 57 57 stubRoutine = _stubRoutine; 58 58 } 59 } list[P ROTOTYPE_LIST_CACHE_SIZE];59 } list[POLYMORPHIC_LIST_CACHE_SIZE]; 60 60 61 P rototypeStructureList(Structure* firstBase, Structure* firstProto, int cachedOffset, void* stubRoutine)61 PolymorphicAccessStructureList(Structure* firstBase, Structure* firstProto, int cachedOffset, void* stubRoutine) 62 62 { 63 63 list[0].set(firstBase, firstProto, cachedOffset, stubRoutine); 64 } 65 66 void derefStructures(int count) 67 { 68 for (int i = 0; i < count; ++i) { 69 PolymorphicStubInfo& info = list[i]; 70 71 ASSERT(info.base); 72 info.base->deref(); 73 74 if (info.proto) 75 info.proto->deref(); 76 77 if (info.stubRoutine) 78 WTF::fastFreeExecutable(info.stubRoutine); 79 } 64 80 } 65 81 }; … … 78 94 Instruction(StructureChain* structureChain) { u.structureChain = structureChain; } 79 95 Instruction(JSCell* jsCell) { u.jsCell = jsCell; } 80 Instruction(P rototypeStructureList* prototypeStructure) { u.prototypeStructure = prototypeStructure; }96 Instruction(PolymorphicAccessStructureList* polymorphicStructures) { u.polymorphicStructures = polymorphicStructures; } 81 97 82 98 union { … … 87 103 JSCell* jsCell; 88 104 ResultType::Type resultType; 89 P rototypeStructureList* prototypeStructure;105 PolymorphicAccessStructureList* polymorphicStructures; 90 106 } u; 91 107 }; -
trunk/JavaScriptCore/bytecode/Opcode.h
r38652 r38688 102 102 macro(op_get_by_id) \ 103 103 macro(op_get_by_id_self) \ 104 macro(op_get_by_id_self_list) \ 104 105 macro(op_get_by_id_proto) \ 105 106 macro(op_get_by_id_proto_list) \
Note:
See TracChangeset
for help on using the changeset viewer.