Ignore:
Timestamp:
Jun 24, 2008, 5:41:40 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-24 Cameron Zwarich <[email protected]>

Reviewed by Maciej.

Make the conversion of the pair (less, jtrue) to jless use register
reference counting information for safety instead of requiring callers
to decide whether it is safe.

No changes on SunSpider codegen.

  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::emitJumpIfTrue):
  • VM/CodeGenerator.h:
  • kjs/nodes.cpp: (KJS::DoWhileNode::emitCode): (KJS::WhileNode::emitCode): (KJS::ForNode::emitCode): (KJS::CaseBlockNode::emitCodeForBlock):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CodeGenerator.cpp

    r34781 r34784  
    426426}
    427427
    428 PassRefPtr<LabelID> CodeGenerator::emitJumpIfTrueMayCombine(RegisterID* cond, LabelID* target)
     428PassRefPtr<LabelID> CodeGenerator::emitJumpIfTrue(RegisterID* cond, LabelID* target)
    429429{
    430430    if (m_lastOpcodeID == op_less) {
     
    435435        retrieveLastBinaryOp(dstIndex, src1Index, src2Index);
    436436       
    437         if (cond->index() == dstIndex) {
     437        if (cond->index() == dstIndex && !cond->refCount()) {
    438438            rewindBinaryOp();
    439439            emitOpcode(op_jless);
     
    445445    }
    446446   
    447     return emitJumpIfTrue(cond, target);
    448 }
    449 
    450 PassRefPtr<LabelID> CodeGenerator::emitJumpIfTrue(RegisterID* cond, LabelID* target)
    451 {
    452447    emitOpcode(op_jtrue);
    453448    instructions().append(cond->index());
Note: See TracChangeset for help on using the changeset viewer.