Changeset 38763 in webkit for trunk/JavaScriptCore/bytecode/Instruction.h
- Timestamp:
- Nov 25, 2008, 3:07:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/Instruction.h
r38688 r38763 45 45 struct PolymorphicAccessStructureList { 46 46 struct PolymorphicStubInfo { 47 unsigned cachedOffset : 31; 48 unsigned isChain : 1; 49 void* stubRoutine; 47 50 Structure* base; 48 Structure* proto; 49 int cachedOffset; 50 void* stubRoutine; 51 52 void set(Structure* _base, Structure* _proto, int _cachedOffset, void* _stubRoutine) 51 union { 52 Structure* proto; 53 StructureChain* chain; 54 } u; 55 56 void set(int _cachedOffset, void* _stubRoutine, Structure* _base) 53 57 { 54 base = _base;55 proto = _proto;56 58 cachedOffset = _cachedOffset; 57 59 stubRoutine = _stubRoutine; 60 base = _base; 61 u.proto = 0; 62 isChain = false; 63 } 64 65 void set(int _cachedOffset, void* _stubRoutine, Structure* _base, Structure* _proto) 66 { 67 cachedOffset = _cachedOffset; 68 stubRoutine = _stubRoutine; 69 base = _base; 70 u.proto = _proto; 71 isChain = false; 72 } 73 74 void set(int _cachedOffset, void* _stubRoutine, Structure* _base, StructureChain* _chain) 75 { 76 cachedOffset = _cachedOffset; 77 stubRoutine = _stubRoutine; 78 base = _base; 79 u.chain = _chain; 80 isChain = true; 58 81 } 59 82 } list[POLYMORPHIC_LIST_CACHE_SIZE]; 60 83 61 PolymorphicAccessStructureList( Structure* firstBase, Structure* firstProto, int cachedOffset, void* stubRoutine)84 PolymorphicAccessStructureList(int cachedOffset, void* stubRoutine, Structure* firstBase) 62 85 { 63 list[0].set(firstBase, firstProto, cachedOffset, stubRoutine); 86 list[0].set(cachedOffset, stubRoutine, firstBase); 87 } 88 89 PolymorphicAccessStructureList(int cachedOffset, void* stubRoutine, Structure* firstBase, Structure* firstProto) 90 { 91 list[0].set(cachedOffset, stubRoutine, firstBase, firstProto); 92 } 93 94 PolymorphicAccessStructureList(int cachedOffset, void* stubRoutine, Structure* firstBase, StructureChain* firstChain) 95 { 96 list[0].set(cachedOffset, stubRoutine, firstBase, firstChain); 64 97 } 65 98 … … 72 105 info.base->deref(); 73 106 74 if (info.proto) 75 info.proto->deref(); 107 if (info.u.proto) { 108 if (info.isChain) 109 info.u.chain->deref(); 110 else 111 info.u.proto->deref(); 112 } 76 113 77 114 if (info.stubRoutine)
Note:
See TracChangeset
for help on using the changeset viewer.