Changeset 34842 in webkit for trunk/JavaScriptCore/VM/CodeGenerator.cpp
- Timestamp:
- Jun 27, 2008, 9:02:03 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeGenerator.cpp
r34838 r34842 438 438 PassRefPtr<LabelID> CodeGenerator::emitJump(LabelID* target) 439 439 { 440 emitOpcode( op_jmp);440 emitOpcode(target->isForwardLabel() ? op_jmp : op_loop); 441 441 instructions().append(target->offsetFrom(instructions().size())); 442 442 return target; … … 454 454 if (cond->index() == dstIndex && !cond->refCount()) { 455 455 rewindBinaryOp(); 456 emitOpcode( op_jless);456 emitOpcode(target->isForwardLabel() ? op_jless : op_loop_if_less); 457 457 instructions().append(src1Index); 458 458 instructions().append(src2Index); … … 462 462 } 463 463 464 emitOpcode( op_jtrue);464 emitOpcode(target->isForwardLabel() ? op_jtrue : op_loop_if_true); 465 465 instructions().append(cond->index()); 466 466 instructions().append(target->offsetFrom(instructions().size())); … … 470 470 PassRefPtr<LabelID> CodeGenerator::emitJumpIfFalse(RegisterID* cond, LabelID* target) 471 471 { 472 ASSERT(target->isForwardLabel()); 472 473 emitOpcode(op_jfalse); 473 474 instructions().append(cond->index()); … … 1044 1045 { 1045 1046 ASSERT(scopeDepth() - targetScopeDepth >= 0); 1047 ASSERT(target->isForwardLabel()); 1046 1048 1047 1049 size_t scopeDelta = scopeDepth() - targetScopeDepth;
Note:
See TracChangeset
for help on using the changeset viewer.