Changeset 148899 in webkit for trunk/Source/JavaScriptCore/jit
- Timestamp:
- Apr 22, 2013, 11:40:58 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r148893 r148899 482 482 } 483 483 484 void JIT::emit_op_loop_hint(Instruction*)485 {486 // Emit the watchdog timer check:487 if (m_vm->watchdog.isEnabled())488 addSlowCase(branchTest8(NonZero, AbsoluteAddress(m_vm->watchdog.timerDidFireAddress())));489 490 // Emit the JIT optimization check:491 if (canBeOptimized())492 addSlowCase(branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()),493 AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())));494 }495 496 void JIT::emitSlow_op_loop_hint(Instruction*, Vector<SlowCaseEntry>::iterator& iter)497 {498 // Emit the slow path of the watchdog timer check:499 if (m_vm->watchdog.isEnabled()) {500 linkSlowCase(iter);501 502 JITStubCall stubCall(this, cti_handle_watchdog_timer);503 stubCall.call();504 505 #if ENABLE(DFG_JIT)506 if (canBeOptimized()) {507 Jump doOptimize = branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()),508 AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter()));509 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));510 doOptimize.link(this);511 } else512 #endif513 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));514 }515 516 #if ENABLE(DFG_JIT)517 // Emit the slow path for the JIT optimization check:518 if (canBeOptimized()) {519 linkSlowCase(iter);520 521 JITStubCall stubCall(this, cti_optimize);522 stubCall.addArgument(TrustedImm32(m_bytecodeOffset));523 stubCall.call();524 525 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint));526 }527 #endif528 }529 530 484 void JIT::emit_op_neq(Instruction* currentInstruction) 531 485 { … … 1323 1277 1324 1278 #endif // USE(JSVALUE64) 1279 1280 void JIT::emit_op_loop_hint(Instruction*) 1281 { 1282 // Emit the watchdog timer check: 1283 if (m_vm->watchdog.isEnabled()) 1284 addSlowCase(branchTest8(NonZero, AbsoluteAddress(m_vm->watchdog.timerDidFireAddress()))); 1285 1286 // Emit the JIT optimization check: 1287 if (canBeOptimized()) 1288 addSlowCase(branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()), 1289 AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter()))); 1290 } 1291 1292 void JIT::emitSlow_op_loop_hint(Instruction*, Vector<SlowCaseEntry>::iterator& iter) 1293 { 1294 // Emit the slow path of the watchdog timer check: 1295 if (m_vm->watchdog.isEnabled()) { 1296 linkSlowCase(iter); 1297 1298 JITStubCall stubCall(this, cti_handle_watchdog_timer); 1299 stubCall.call(); 1300 1301 #if ENABLE(DFG_JIT) 1302 if (canBeOptimized()) { 1303 Jump doOptimize = branchAdd32(PositiveOrZero, TrustedImm32(Options::executionCounterIncrementForLoop()), 1304 AbsoluteAddress(m_codeBlock->addressOfJITExecuteCounter())); 1305 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint)); 1306 doOptimize.link(this); 1307 } else 1308 #endif 1309 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint)); 1310 } 1311 1312 #if ENABLE(DFG_JIT) 1313 // Emit the slow path for the JIT optimization check: 1314 if (canBeOptimized()) { 1315 linkSlowCase(iter); 1316 1317 JITStubCall stubCall(this, cti_optimize); 1318 stubCall.addArgument(TrustedImm32(m_bytecodeOffset)); 1319 stubCall.call(); 1320 1321 emitJumpSlowToHot(jump(), OPCODE_LENGTH(op_loop_hint)); 1322 } 1323 #endif 1324 } 1325 1325 1326 1326 void JIT::emit_resolve_operations(ResolveOperations* resolveOperations, const int* baseVR, const int* valueVR)
Note:
See TracChangeset
for help on using the changeset viewer.