Changeset 37422 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 8, 2008, 5:20:41 AM (17 years ago)
Author:
Simon Hausmann
Message:

2008-10-08 Prasanth Ullattil <[email protected]>

Reviewed by Oliver Hunt.

Avoid endless loops when compiling without the computed goto
optimization.

NEXT_OPCODE expands to "continue", which will not work inside
loops.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r37417 r37422  
     12008-10-08  Prasanth Ullattil  <[email protected]>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Avoid endless loops when compiling without the computed goto
     6        optimization.
     7
     8        NEXT_OPCODE expands to "continue", which will not work inside
     9        loops.
     10
     11        * VM/Machine.cpp:
     12        (JSC::Machine::privateExecute):
     13
    1142008-10-08  Maciej Stachowiak  <[email protected]>
    215
  • trunk/JavaScriptCore/VM/Machine.cpp

    r37417 r37422  
    15041504    NEXT_OPCODE;
    15051505#else
    1506     #define NEXT_OPCODE MACHINE_SAMPLING_sample(this->codeBlock(r), vPC); continue
     1506    #define NEXT_OPCODE MACHINE_SAMPLING_sample(this->codeBlock(r), vPC); goto interpreterLoopStart
    15071507#if DUMP_OPCODE_STATS
    15081508    #define BEGIN_OPCODE(opcode) case opcode: OpcodeStats::recordInstruction(opcode);
     
    15101510    #define BEGIN_OPCODE(opcode) case opcode:
    15111511#endif
    1512     while (1) // iterator loop begins
     1512    while (1) { // iterator loop begins
     1513    interpreterLoopStart:;
    15131514    switch (vPC->u.opcode)
    15141515#endif
     
    39143915    }
    39153916    }
     3917#if !HAVE(COMPUTED_GOTO)
     3918    } // iterator loop ends
     3919#endif
    39163920    #undef NEXT_OPCODE
    39173921    #undef BEGIN_OPCODE
Note: See TracChangeset for help on using the changeset viewer.