Changeset 94914 in webkit for trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
- Timestamp:
- Sep 10, 2011, 2:23:45 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r94801 r94914 40 40 switch (info.registerFormat()) { 41 41 case DataFormatNone: { 42 GPRReg gpr = allocate(); 43 44 if (node.isConstant()) { 45 m_gprs.retain(gpr, virtualRegister, SpillOrderConstant); 46 if (isInt32Constant(nodeIndex)) { 47 m_jit.move(MacroAssembler::Imm32(valueOfInt32Constant(nodeIndex)), gpr); 48 info.fillInteger(gpr); 49 returnFormat = DataFormatInteger; 50 return gpr; 51 } 42 if (node.isConstant() && !isInt32Constant(nodeIndex)) { 52 43 terminateSpeculativeExecution(); 53 44 returnFormat = DataFormatInteger; 54 45 return allocate(); 46 } 47 48 GPRReg gpr = allocate(); 49 50 if (node.isConstant()) { 51 m_gprs.retain(gpr, virtualRegister, SpillOrderConstant); 52 ASSERT(isInt32Constant(nodeIndex)); 53 m_jit.move(MacroAssembler::Imm32(valueOfInt32Constant(nodeIndex)), gpr); 54 info.fillInteger(gpr); 55 returnFormat = DataFormatInteger; 56 return gpr; 55 57 } else { 56 58 DataFormat spillFormat = info.spillFormat(); … … 1375 1377 void SpeculativeJIT::compile(BasicBlock& block) 1376 1378 { 1379 ASSERT(m_compileOkay); 1377 1380 ASSERT(m_compileIndex == block.begin); 1378 1381 m_blockHeads[m_block] = m_jit.label(); … … 1385 1388 if (!node.shouldGenerate()) 1386 1389 continue; 1387 1390 1388 1391 #if DFG_DEBUG_VERBOSE 1389 1392 fprintf(stderr, "SpeculativeJIT generating Node @%d at JIT offset 0x%x ", (int)m_compileIndex, m_jit.debugOffset()); … … 1394 1397 checkConsistency(); 1395 1398 compile(node); 1396 if (!m_compileOkay) 1399 if (!m_compileOkay) { 1400 #if ENABLE(DYNAMIC_TERMINATE_SPECULATION) 1401 m_compileOkay = true; 1402 m_compileIndex = block.end; 1403 clearGenerationInfo(); 1404 #endif 1397 1405 return; 1406 } 1398 1407 #if DFG_DEBUG_VERBOSE 1399 1408 if (node.hasResult()) … … 1446 1455 for (m_block = 0; m_block < m_jit.graph().m_blocks.size(); ++m_block) { 1447 1456 compile(*m_jit.graph().m_blocks[m_block]); 1457 #if !ENABLE(DYNAMIC_OPTIMIZATION) 1448 1458 if (!m_compileOkay) 1449 1459 return false; 1460 #endif 1450 1461 } 1451 1462 linkBranches();
Note:
See TracChangeset
for help on using the changeset viewer.