Changeset 38652 in webkit for trunk/JavaScriptCore/bytecode
- Timestamp:
- Nov 20, 2008, 9:04:19 PM (17 years ago)
- Location:
- trunk/JavaScriptCore/bytecode
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r38531 r38652 647 647 break; 648 648 } 649 case op_get_by_id_proto_list: { 650 printGetByIdOp(location, it, identifiers, "op_get_by_id_proto_list"); 651 break; 652 } 649 653 case op_get_by_id_chain: { 650 654 printGetByIdOp(location, it, identifiers, "get_by_id_chain"); … … 1020 1024 return; 1021 1025 } 1022 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 } 1038 return; 1039 } 1040 1023 1041 // These instructions don't ref their Structures. 1024 1042 ASSERT(vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id) || vPC[0].u.opcode == interpreter->getOpcode(op_get_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_put_by_id_generic) || vPC[0].u.opcode == interpreter->getOpcode(op_get_array_length) || vPC[0].u.opcode == interpreter->getOpcode(op_get_string_length)); -
trunk/JavaScriptCore/bytecode/Instruction.h
r38498 r38652 34 34 #include <wtf/VectorTraits.h> 35 35 36 #define PROTOTYPE_LIST_CACHE_SIZE 4 37 36 38 namespace JSC { 37 39 … … 39 41 class Structure; 40 42 class StructureChain; 43 44 // Structure used by op_get_by_id_proto_list instruction to hold data off the main opcode stream. 45 struct PrototypeStructureList { 46 struct ProtoStubInfo { 47 Structure* base; 48 Structure* proto; 49 int cachedOffset; 50 void* stubRoutine; 51 52 void set(Structure* _base, Structure* _proto, int _cachedOffset, void* _stubRoutine) 53 { 54 base = _base; 55 proto = _proto; 56 cachedOffset = _cachedOffset; 57 stubRoutine = _stubRoutine; 58 } 59 } list[PROTOTYPE_LIST_CACHE_SIZE]; 60 61 PrototypeStructureList(Structure* firstBase, Structure* firstProto, int cachedOffset, void* stubRoutine) 62 { 63 list[0].set(firstBase, firstProto, cachedOffset, stubRoutine); 64 } 65 }; 41 66 42 67 struct Instruction { … … 53 78 Instruction(StructureChain* structureChain) { u.structureChain = structureChain; } 54 79 Instruction(JSCell* jsCell) { u.jsCell = jsCell; } 80 Instruction(PrototypeStructureList* prototypeStructure) { u.prototypeStructure = prototypeStructure; } 55 81 56 82 union { … … 61 87 JSCell* jsCell; 62 88 ResultType::Type resultType; 89 PrototypeStructureList* prototypeStructure; 63 90 } u; 64 91 }; -
trunk/JavaScriptCore/bytecode/Opcode.h
r38498 r38652 103 103 macro(op_get_by_id_self) \ 104 104 macro(op_get_by_id_proto) \ 105 macro(op_get_by_id_proto_list) \ 105 106 macro(op_get_by_id_chain) \ 106 107 macro(op_get_by_id_generic) \
Note:
See TracChangeset
for help on using the changeset viewer.