Changeset 54747 in webkit
- Timestamp:
- Feb 12, 2010 7:09:11 PM (14 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r54743 r54747 1 2010-02-12 Gavin Barraclough <barraclough@apple.com> 2 3 Reviewed by Oliver Hunt. 4 5 https://bugs.webkit.org/show_bug.cgi?id=33731 6 Remove uses of PtrAndFlags from JIT data stuctures. 7 8 These break the OS X Leaks tool. Free up a bit in CallLinkInfo, and invalid 9 permutation of pointer states in MethodCallLinkInfo to represent the removed bits. 10 11 * bytecode/CodeBlock.h: 12 (JSC::CallLinkInfo::seenOnce): 13 (JSC::CallLinkInfo::setSeen): 14 (JSC::MethodCallLinkInfo::MethodCallLinkInfo): 15 (JSC::MethodCallLinkInfo::seenOnce): 16 (JSC::MethodCallLinkInfo::setSeen): 17 * jit/JIT.cpp: 18 (JSC::JIT::unlinkCall): 19 * jit/JITPropertyAccess.cpp: 20 (JSC::JIT::patchMethodCallProto): 21 * runtime/UString.h: 22 1 23 2010-02-12 Gavin Barraclough <barraclough@apple.com> 2 24 -
trunk/JavaScriptCore/bytecode/CodeBlock.h
r53400 r54747 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 hasSeenShouldRepatch = true; 128 129 } 129 130 }; … … 132 133 MethodCallLinkInfo() 133 134 : cachedStructure(0) 135 , cachedPrototypeStructure(0) 134 136 { 135 137 } … … 137 139 bool seenOnce() 138 140 { 139 return cachedPrototypeStructure.isFlagSet(hasSeenShouldRepatch); 141 ASSERT(!cachedStructure); 142 return cachedPrototypeStructure; 140 143 } 141 144 142 145 void setSeen() 143 146 { 144 cachedPrototypeStructure.setFlag(hasSeenShouldRepatch); 147 ASSERT(!cachedStructure && !cachedPrototypeStructure); 148 // We use the values of cachedStructure & cachedPrototypeStructure to indicate the 149 // current state. 150 // - In the initial state, both are null. 151 // - Once this transition has been taken once, cachedStructure is 152 // null and cachedPrototypeStructure is set to a nun-null value. 153 // - Once the call is linked both structures are set to non-null values. 154 cachedPrototypeStructure = (Structure*)1; 145 155 } 146 156 … … 148 158 CodeLocationDataLabelPtr structureLabel; 149 159 Structure* cachedStructure; 150 PtrAndFlags<Structure, HasSeenShouldRepatch>cachedPrototypeStructure;160 Structure* cachedPrototypeStructure; 151 161 }; 152 162 -
trunk/JavaScriptCore/jit/JIT.cpp
r53400 r54747 583 583 // (and, if a new JSFunction happened to be constructed at the same location, we could get a false positive 584 584 // match). Reset the check so it no longer matches. 585 RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock .get());585 RepatchBuffer repatchBuffer(callLinkInfo->ownerCodeBlock); 586 586 #if USE(JSVALUE32_64) 587 587 repatchBuffer.repatch(callLinkInfo->hotPathBegin, 0); -
trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
r53400 r54747 645 645 646 646 Structure* prototypeStructure = proto->structure(); 647 ASSERT(!methodCallLinkInfo.cachedPrototypeStructure);648 647 methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure; 649 648 prototypeStructure->ref(); … … 1595 1594 1596 1595 Structure* prototypeStructure = proto->structure(); 1597 ASSERT(!methodCallLinkInfo.cachedPrototypeStructure);1598 1596 methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure; 1599 1597 prototypeStructure->ref(); -
trunk/JavaScriptCore/runtime/UString.h
r54545 r54747 32 32 #include <wtf/OwnFastMallocPtr.h> 33 33 #include <wtf/PassRefPtr.h> 34 #include <wtf/PtrAndFlags.h>35 34 #include <wtf/RefPtr.h> 36 35 #include <wtf/Vector.h>
Note: See TracChangeset
for help on using the changeset viewer.