Changeset 92148 in webkit
- Timestamp:
- Aug 1, 2011 3:32:07 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r92146 r92148 1 2011-08-01 Filip Pizlo <fpizlo@apple.com> 2 3 DFG JIT sometimes creates speculation check data structures that have 4 invalid information about the format of a register 5 https://bugs.webkit.org/show_bug.cgi?id=65490 6 7 Reviewed by Gavin Barraclough. 8 9 The code now makes sure to (1) always have correct and up-to-date 10 information about register format at the time that a speculation 11 check is emitted, (2) assert that speculation data is correct 12 inside the speculation check implementation, and (3) avoid creating 13 speculation data altogether if compilation has already failed, since 14 at that point the format data is almost guaranteed to be bogus. 15 16 * dfg/DFGNonSpeculativeJIT.cpp: 17 (JSC::DFG::EntryLocation::EntryLocation): 18 * dfg/DFGSpeculativeJIT.cpp: 19 (JSC::DFG::SpeculationCheck::SpeculationCheck): 20 (JSC::DFG::SpeculativeJIT::fillSpeculateCell): 21 (JSC::DFG::SpeculativeJIT::compile): 22 * dfg/DFGSpeculativeJIT.h: 23 (JSC::DFG::SpeculativeJIT::speculationCheck): 24 1 25 2011-08-01 Filip Pizlo <fpizlo@apple.com> 2 26 -
trunk/Source/JavaScriptCore/dfg/DFGNonSpeculativeJIT.cpp
r92085 r92148 44 44 m_gprInfo[iter.index()].nodeIndex = info.nodeIndex(); 45 45 m_gprInfo[iter.index()].format = info.registerFormat(); 46 ASSERT(m_gprInfo[iter.index()].format != DataFormatNone); 46 47 m_gprInfo[iter.index()].isSpilled = info.spillFormat() != DataFormatNone; 47 48 } else -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r92010 r92148 151 151 m_gprInfo[iter.index()].nodeIndex = info.nodeIndex(); 152 152 m_gprInfo[iter.index()].format = info.registerFormat(); 153 ASSERT(m_gprInfo[iter.index()].format != DataFormatNone); 153 154 m_gprInfo[iter.index()].isSpilled = info.spillFormat() != DataFormatNone; 154 155 } else … … 316 317 m_jit.loadPtr(JITCompiler::addressFor(virtualRegister), gpr); 317 318 319 info.fillJSValue(gpr, DataFormatJS); 318 320 if (info.spillFormat() != DataFormatJSCell) 319 321 speculationCheck(m_jit.branchTestPtr(MacroAssembler::NonZero, gpr, GPRInfo::tagMaskRegister)); … … 685 687 int32_t imm2 = valueOfInt32Constant(node.child2()); 686 688 GPRTemporary result(this); 687 689 688 690 speculationCheck(m_jit.branchAdd32(MacroAssembler::Overflow, op1.gpr(), Imm32(imm2), result.gpr())); 689 691 … … 904 906 GPRReg propertyReg = property.gpr(); 905 907 GPRReg storageReg = storage.gpr(); 908 909 if (!m_compileOkay) 910 return; 906 911 907 912 // Get the array storage. We haven't yet checked this is a JSArray, so this is only safe if … … 941 946 if (!m_compileOkay) 942 947 return; 943 948 944 949 writeBarrier(m_jit, baseReg, scratchReg); 945 950 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r91894 r92148 187 187 void speculationCheck(MacroAssembler::Jump jumpToFail) 188 188 { 189 if (!m_compileOkay) 190 return; 189 191 m_speculationChecks.append(SpeculationCheck(jumpToFail, this)); 190 192 } … … 192 194 void speculationCheck(MacroAssembler::Jump jumpToFail, const SpeculationRecovery& recovery) 193 195 { 196 if (!m_compileOkay) 197 return; 194 198 m_speculationRecoveryList.append(recovery); 195 199 m_speculationChecks.append(SpeculationCheck(jumpToFail, this, m_speculationRecoveryList.size()));
Note: See TracChangeset
for help on using the changeset viewer.