Changeset 34541 in webkit for trunk/JavaScriptCore/VM/Machine.cpp


Ignore:
Timestamp:
Jun 14, 2008, 3:13:18 PM (17 years ago)
Author:
[email protected]
Message:

2008-06-14 Maciej Stachowiak <[email protected]>

Reviewed by Oliver.


  • initialize local vars as side effect of call instead of in bytecode 1.004x speedup on SunSpider.

This removes just the dispatch overhead for these loads - in the
future, dead store elimination might be able to eliminate them
entirely.


  • VM/CodeGenerator.cpp: (KJS::CodeGenerator::CodeGenerator): For function blocks, don't emit loads of undefined for var initialization.
  • VM/Machine.cpp: (KJS::slideRegisterWindowForCall): Instead, initialize locals as part of the call.
File:
1 edited

Legend:

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

    r34497 r34541  
    405405            *(it + shift) = *it;
    406406    }
     407   
     408    // initialize local variable slots
     409    for (Register* it = r - newCodeBlock->numVars; it != r; ++it)
     410        (*it).u.jsValue = jsUndefined();
    407411
    408412    return r;
Note: See TracChangeset for help on using the changeset viewer.