Changeset 96458 in webkit
- Timestamp:
- Oct 1, 2011 12:21:44 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r96455 r96458 1 2011-10-01 Yuqiang Xian <yuqiang.xian@intel.com> 2 3 JSVALUE32_64 DFG JIT - unboxed integers and cells in register file must be reboxed before exiting from DFG JIT 4 https://bugs.webkit.org/show_bug.cgi?id=69205 5 6 Reviewed by Gavin Barraclough. 7 8 If there are unboxed integers and cells in register file (e.g. by SetLocal), 9 they must be reboxed before exiting from the speculative DFG JIT execution. 10 This patch also adds a new ValueSourceKind (CellInRegisterFile) and a new 11 ValueRecoveryTechnique (AlreadyInRegisterFileAsCell). 12 13 * dfg/DFGJITCompiler32_64.cpp: 14 (JSC::DFG::JITCompiler::exitSpeculativeWithOSR): 15 * dfg/DFGSpeculativeJIT.cpp: 16 (JSC::DFG::ValueSource::dump): 17 (JSC::DFG::ValueRecovery::dump): 18 (JSC::DFG::SpeculativeJIT::computeValueRecoveryFor): 19 * dfg/DFGSpeculativeJIT.h: 20 (JSC::DFG::ValueSource::forPrediction): 21 (JSC::DFG::ValueRecovery::alreadyInRegisterFileAsUnboxedCell): 22 1 23 2011-10-01 Sheriff Bot <webkit.review.bot@gmail.com> 2 24 -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler32_64.cpp
r96178 r96458 147 147 // expect most of them to be jsUndefined(); if that's true then we handle that 148 148 // specially to minimize code size and execution time. 149 bool haveUnboxedInt32s = false; 149 bool haveUnboxedInt32InRegisterFile = false; 150 bool haveUnboxedCellInRegisterFile = false; 150 151 bool haveFPRs = false; 151 152 bool haveConstants = false; … … 183 184 break; 184 185 185 case UnboxedInt32InGPR: 186 haveUnboxedInt32s = true; 186 case AlreadyInRegisterFileAsUnboxedInt32: 187 haveUnboxedInt32InRegisterFile = true; 188 break; 189 190 case AlreadyInRegisterFileAsUnboxedCell: 191 haveUnboxedCellInRegisterFile = true; 187 192 break; 188 193 … … 207 212 // between when something is computed and when it is stored. 208 213 209 // 4) Perform all reboxing of integers. 210 // Currently we don't rebox for JSValue32_64. 211 214 // 4) Perform all reboxing of integers and cells, except for those in registers. 215 216 if (haveUnboxedInt32InRegisterFile || haveUnboxedCellInRegisterFile) { 217 for (int index = 0; index < exit.numberOfRecoveries(); ++index) { 218 const ValueRecovery& recovery = exit.valueRecovery(index); 219 switch (recovery.technique()) { 220 case AlreadyInRegisterFileAsUnboxedInt32: 221 store32(TrustedImm32(JSValue::Int32Tag), tagFor(static_cast<VirtualRegister>(exit.operandForIndex(index)))); 222 break; 223 224 case AlreadyInRegisterFileAsUnboxedCell: 225 store32(TrustedImm32(JSValue::CellTag), tagFor(static_cast<VirtualRegister>(exit.operandForIndex(index)))); 226 break; 227 228 default: 229 break; 230 } 231 } 232 } 233 212 234 // 5) Dump all non-poisoned GPRs. For poisoned GPRs, save them into the scratch storage. 213 235 // Note that GPRs do not have a fast change (like haveFPRs) because we expect that -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r96415 r96458 45 45 fprintf(out, "Int32"); 46 46 break; 47 case CellInRegisterFile: 48 fprintf(out, "Cell"); 49 break; 47 50 case HaveNode: 48 51 fprintf(out, "Node(%d)", m_nodeIndex); … … 59 62 case AlreadyInRegisterFileAsUnboxedInt32: 60 63 fprintf(out, "(int32)"); 64 break; 65 case AlreadyInRegisterFileAsUnboxedCell: 66 fprintf(out, "(cell)"); 61 67 break; 62 68 case InGPR: … … 399 405 case Int32InRegisterFile: 400 406 return ValueRecovery::alreadyInRegisterFileAsUnboxedInt32(); 407 408 case CellInRegisterFile: 409 return ValueRecovery::alreadyInRegisterFileAsUnboxedCell(); 401 410 402 411 case HaveNode: { -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r96415 r96458 71 71 ValueInRegisterFile, 72 72 Int32InRegisterFile, 73 CellInRegisterFile, 73 74 HaveNode 74 75 }; … … 98 99 if (isInt32Prediction(prediction)) 99 100 return ValueSource(Int32InRegisterFile); 101 if (isCellPrediction(prediction)) 102 return ValueSource(CellInRegisterFile); 100 103 return ValueSource(ValueInRegisterFile); 101 104 } … … 146 149 // It's already in the register file but unboxed. 147 150 AlreadyInRegisterFileAsUnboxedInt32, 151 AlreadyInRegisterFileAsUnboxedCell, 148 152 // It's in a register. 149 153 InGPR, … … 179 183 ValueRecovery result; 180 184 result.m_technique = AlreadyInRegisterFileAsUnboxedInt32; 185 return result; 186 } 187 188 static ValueRecovery alreadyInRegisterFileAsUnboxedCell() 189 { 190 ValueRecovery result; 191 result.m_technique = AlreadyInRegisterFileAsUnboxedCell; 181 192 return result; 182 193 }
Note: See TracChangeset
for help on using the changeset viewer.