Changeset 46210 in webkit
- Timestamp:
- Jul 21, 2009, 9:03:32 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r46209 r46210 1 2009-07-21 Zoltan Herczeg <[email protected]> 2 3 Reviewed by Gavin Barraclough. 4 5 Cache not only the structure of the method, but the 6 structure of its prototype as well. 7 https://bugs.webkit.org/show_bug.cgi?id=27077 8 9 * bytecode/CodeBlock.cpp: 10 (JSC::CodeBlock::~CodeBlock): 11 * bytecode/CodeBlock.h: 12 (JSC::MethodCallLinkInfo::MethodCallLinkInfo): 13 * jit/JITPropertyAccess.cpp: 14 (JSC::JIT::patchMethodCallProto): 15 1 16 2009-07-21 Gavin Barraclough <[email protected]> 2 17 -
trunk/JavaScriptCore/bytecode/CodeBlock.cpp
r46004 r46210 1320 1320 1321 1321 for (size_t size = m_methodCallLinkInfos.size(), i = 0; i < size; ++i) { 1322 if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) 1322 if (Structure* structure = m_methodCallLinkInfos[i].cachedStructure) { 1323 1323 structure->deref(); 1324 // Both members must be filled at the same time 1325 ASSERT(m_methodCallLinkInfos[i].cachedPrototypeStructure); 1326 m_methodCallLinkInfos[i].cachedPrototypeStructure->deref(); 1327 } 1324 1328 } 1325 1329 -
trunk/JavaScriptCore/bytecode/CodeBlock.h
r45995 r46210 116 116 MethodCallLinkInfo() 117 117 : cachedStructure(0) 118 , cachedPrototypeStructure(0) 118 119 { 119 120 } … … 122 123 CodeLocationDataLabelPtr structureLabel; 123 124 Structure* cachedStructure; 125 Structure* cachedPrototypeStructure; 124 126 }; 125 127 -
trunk/JavaScriptCore/jit/JITPropertyAccess.cpp
r46202 r46210 536 536 structure->ref(); 537 537 538 Structure* prototypeStructure = proto->structure(); 539 ASSERT(!methodCallLinkInfo.cachedPrototypeStructure); 540 methodCallLinkInfo.cachedPrototypeStructure = prototypeStructure; 541 prototypeStructure->ref(); 542 538 543 repatchBuffer.repatch(methodCallLinkInfo.structureLabel, structure); 539 544 repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoObj), proto); 540 repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoStruct), proto ->structure());545 repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckProtoStruct), prototypeStructure); 541 546 repatchBuffer.repatch(methodCallLinkInfo.structureLabel.dataLabelPtrAtOffset(patchOffsetMethodCheckPutFunction), callee); 542 547 } -
trunk/LayoutTests/ChangeLog
r46208 r46210 1 2009-07-21 Zoltan Herczeg <[email protected]> 2 3 Reviewed by Gavin Barraclough, RS olliej fix to make the test pass. 4 5 Check whether a crash happens after the string 6 prototype is overwritten twice. The JIT'ed code 7 may crash if one of its already cached method 8 called again. Note: This test is not necessary 9 crash on all systems, because they use different 10 memory allocators! 11 https://bugs.webkit.org/show_bug.cgi?id=27077 12 13 * fast/js/method-check-expected.txt: Added. 14 * fast/js/method-check.html: Added. 15 * fast/js/resources/method-check.js: Added. 16 (func2): 17 (func.String.prototype.a): 18 (func.String.prototype.b): 19 (func): 20 1 21 2009-07-21 Dan Bernstein <[email protected]> 2 22
Note:
See TracChangeset
for help on using the changeset viewer.