Changeset 38688 in webkit for trunk/JavaScriptCore/bytecode/Instruction.h
- Timestamp:
- Nov 21, 2008, 7:34:43 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 };
Note:
See TracChangeset
for help on using the changeset viewer.