Changeset 53391 in webkit for trunk/JavaScriptCore/bytecode
- Timestamp:
- Jan 17, 2010, 11:28:53 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/bytecode/CodeBlock.h
r50537 r53391 111 111 CodeLocationDataLabelPtr hotPathBegin; 112 112 CodeLocationNearCall hotPathOther; 113 PtrAndFlags<CodeBlock, HasSeenShouldRepatch>ownerCodeBlock;113 CodeBlock* ownerCodeBlock; 114 114 CodeBlock* callee; 115 unsigned position; 115 unsigned position : 31; 116 unsigned hasSeenShouldRepatch : 1; 116 117 117 118 void setUnlinked() { callee = 0; } … … 120 121 bool seenOnce() 121 122 { 122 return ownerCodeBlock.isFlagSet(hasSeenShouldRepatch);123 return hasSeenShouldRepatch; 123 124 } 124 125 125 126 void setSeen() 126 127 { 127 ownerCodeBlock.setFlag(hasSeenShouldRepatch); 128 } 129 }; 128 hasSeenShouldRepatch = true; 129 } 130 }; 131 132 #define MethodCallLinkInfo_seenFlag ((Structure*)1) 130 133 131 134 struct MethodCallLinkInfo { 132 135 MethodCallLinkInfo() 133 136 : cachedStructure(0) 137 , cachedPrototypeStructure(0) 134 138 { 135 139 } … … 137 141 bool seenOnce() 138 142 { 139 return cachedPrototypeStructure.isFlagSet(hasSeenShouldRepatch); 143 ASSERT(!cachedStructure); 144 return cachedPrototypeStructure; 140 145 } 141 146 142 147 void setSeen() 143 148 { 144 cachedPrototypeStructure.setFlag(hasSeenShouldRepatch); 149 ASSERT(!cachedStructure && !cachedPrototypeStructure); 150 // We use the values of cachedStructure & cachedPrototypeStructure to indicate the 151 // current state. 152 // - In the initial state, both are null. 153 // - Once this transition has been taken once, cachedStructure is 154 // null and cachedPrototypeStructure is set to a nun-null value. 155 // - Once the call is linked both structures are set to non-null values. 156 cachedPrototypeStructure = MethodCallLinkInfo_seenFlag; 145 157 } 146 158 … … 148 160 CodeLocationDataLabelPtr structureLabel; 149 161 Structure* cachedStructure; 150 PtrAndFlags<Structure, HasSeenShouldRepatch>cachedPrototypeStructure;162 Structure* cachedPrototypeStructure; 151 163 }; 152 164
Note:
See TracChangeset
for help on using the changeset viewer.