Ignore:
Timestamp:
Jun 27, 2008, 9:02:03 PM (17 years ago)
Author:
[email protected]
Message:

Bug 18626: SQUIRRELFISH: support the "slow script" dialog <https://bugs.webkit.org/show_bug.cgi?id=18626>
<rdar://problem/5973931> Slow script dialog needs to be reimplemented for squirrelfish

Reviewed by Sam

Adds support for the slow script dialog in squirrelfish. This requires the addition
of three new op codes, op_loop, op_loop_if_true, and op_loop_if_less which have the
same behaviour as their simple jump equivalents but have an additional time out check.

Additional assertions were added to other jump instructions to prevent accidentally
creating loops with jump types that do not support time out checks.

Sunspider does not report a regression, however this appears very sensitive to code
layout and hardware, so i would expect up to a 1% regression on other systems.

Part of this required moving the old timeout logic from JSGlobalObject and into Machine
which is the cause of a number of the larger diff blocks.

File:
1 edited

Legend:

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

    r34838 r34842  
    438438PassRefPtr<LabelID> CodeGenerator::emitJump(LabelID* target)
    439439{
    440     emitOpcode(op_jmp);
     440    emitOpcode(target->isForwardLabel() ? op_jmp : op_loop);
    441441    instructions().append(target->offsetFrom(instructions().size()));
    442442    return target;
     
    454454        if (cond->index() == dstIndex && !cond->refCount()) {
    455455            rewindBinaryOp();
    456             emitOpcode(op_jless);
     456            emitOpcode(target->isForwardLabel() ? op_jless : op_loop_if_less);
    457457            instructions().append(src1Index);
    458458            instructions().append(src2Index);
     
    462462    }
    463463   
    464     emitOpcode(op_jtrue);
     464    emitOpcode(target->isForwardLabel() ? op_jtrue : op_loop_if_true);
    465465    instructions().append(cond->index());
    466466    instructions().append(target->offsetFrom(instructions().size()));
     
    470470PassRefPtr<LabelID> CodeGenerator::emitJumpIfFalse(RegisterID* cond, LabelID* target)
    471471{
     472    ASSERT(target->isForwardLabel());
    472473    emitOpcode(op_jfalse);
    473474    instructions().append(cond->index());
     
    10441045{
    10451046    ASSERT(scopeDepth() - targetScopeDepth >= 0);
     1047    ASSERT(target->isForwardLabel());
    10461048
    10471049    size_t scopeDelta = scopeDepth() - targetScopeDepth;
Note: See TracChangeset for help on using the changeset viewer.