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/kjs/JSGlobalObject.h

    r34838 r34842  
    9090            int recursion;
    9191
    92             unsigned timeoutTime;
    93             unsigned timeAtLastCheckTimeout;
    94             unsigned timeExecuting;
    95             unsigned timeoutCheckCount;
    96             unsigned tickCount;
    97             unsigned ticksUntilNextTimeoutCheck;
    98 
    9992            RegExpConstructor* regExpConstructor;
    10093            ErrorConstructor* errorConstructor;
     
    203196        unsigned pageGroupIdentifier() const { return d()->pageGroupIdentifier; }
    204197
    205         void setTimeoutTime(unsigned timeoutTime) { d()->timeoutTime = timeoutTime; }
     198        void setTimeoutTime(unsigned timeoutTime);
    206199        void startTimeoutCheck();
    207200        void stopTimeoutCheck();
    208         bool timedOut();
    209201
    210202        Debugger* debugger() const { return d()->debugger; }
     
    263255        void addStaticGlobals(GlobalPropertyInfo*, int count);
    264256
    265     private:
    266         bool checkTimeout();
    267         void resetTimeoutCheck();
    268257    };
    269258
     
    299288    }
    300289
    301     inline bool JSGlobalObject::timedOut()
    302     {
    303         d()->tickCount++;
    304 
    305         if (d()->tickCount != d()->ticksUntilNextTimeoutCheck)
    306             return false;
    307 
    308         return checkTimeout();
    309     }
    310 
    311290    inline JSGlobalObject* ScopeChainNode::globalObject() const
    312291    {
Note: See TracChangeset for help on using the changeset viewer.