Changeset 35703 in webkit for trunk/JavaScriptCore/VM/CodeGenerator.cpp
- Timestamp:
- Aug 12, 2008, 8:17:19 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/VM/CodeGenerator.cpp
r35651 r35703 434 434 } 435 435 436 void CodeGenerator::retrieveLastUnaryOp(int& dstIndex, int& srcIndex) 437 { 438 ASSERT(instructions().size() >= 3); 439 size_t size = instructions().size(); 440 dstIndex = instructions().at(size - 2).u.operand; 441 srcIndex = instructions().at(size - 1).u.operand; 442 } 443 436 444 void ALWAYS_INLINE CodeGenerator::rewindBinaryOp() 437 445 { 438 446 ASSERT(instructions().size() >= 4); 439 447 instructions().shrink(instructions().size() - 4); 448 } 449 450 void ALWAYS_INLINE CodeGenerator::rewindUnaryOp() 451 { 452 ASSERT(instructions().size() >= 3); 453 instructions().shrink(instructions().size() - 3); 440 454 } 441 455 … … 491 505 return target; 492 506 } 507 } else if (m_lastOpcodeID == op_not) { 508 int dstIndex; 509 int srcIndex; 510 511 retrieveLastUnaryOp(dstIndex, srcIndex); 512 513 if (cond->index() == dstIndex && cond->isTemporary() && !cond->refCount()) { 514 rewindUnaryOp(); 515 emitOpcode(target->isForwardLabel() ? op_jtrue : op_loop_if_true); 516 instructions().append(srcIndex); 517 instructions().append(target->offsetFrom(instructions().size())); 518 return target; 519 } 493 520 } 494 521
Note:
See TracChangeset
for help on using the changeset viewer.