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/CodeBlock.cpp

    r34684 r34842  
    463463            break;
    464464        }
     465        case op_loop: {
     466            int offset = (++it)->u.operand;
     467            printf("[%4d] loop\t\t %d(->%d)\n", location, offset, jumpTarget(begin, it, offset));
     468            break;
     469        }
    465470        case op_jtrue: {
    466471            printConditionalJump(begin, it, location, "jtrue");
    467472            break;
    468473        }
     474        case op_loop_if_true: {
     475            printConditionalJump(begin, it, location, "loop_if_true");
     476            break;
     477        }
    469478        case op_jfalse: {
    470479            printConditionalJump(begin, it, location, "jfalse");
     
    476485            int offset = (++it)->u.operand;
    477486            printf("[%4d] jless\t\t %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, jumpTarget(begin, it, offset));
     487            break;
     488        }
     489        case op_loop_if_less: {
     490            int r0 = (++it)->u.operand;
     491            int r1 = (++it)->u.operand;
     492            int offset = (++it)->u.operand;
     493            printf("[%4d] loop_if_less %s, %s, %d(->%d)\n", location, registerName(r0).c_str(), registerName(r1).c_str(), offset, jumpTarget(begin, it, offset));
    478494            break;
    479495        }
Note: See TracChangeset for help on using the changeset viewer.