Changeset 38369 in webkit for trunk/JavaScriptCore/VM/CodeBlock.h


Ignore:
Timestamp:
Nov 13, 2008, 4:53:35 AM (17 years ago)
Author:
[email protected]
Message:

2008-11-13 Maciej Stachowiak <[email protected]>

Reviewed by Cameron Zwarich.


  • remove immediate checks from native codegen for known non-immediate cases like "this"


~.5% speedup on v8 benchmarks


In the future we can extend this model to remove all sorts of
typechecks based on local type info or type inference.


I also added an assertion to verify that all slow cases linked as
many slow case jumps as the corresponding fast case generated, and
fixed the pre-existing cases where this was not true.


  • VM/CTI.cpp: (JSC::CTI::emitJumpSlowCaseIfNotJSCell): (JSC::CTI::linkSlowCaseIfNotJSCell): (JSC::CTI::compileBinaryArithOp): (JSC::CTI::compileBinaryArithOpSlowCase): (JSC::CTI::privateCompileMainPass): (JSC::CTI::privateCompileSlowCases):
  • VM/CTI.h:
  • VM/CodeBlock.h: (JSC::CodeBlock::isKnownNotImmediate):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/VM/CodeBlock.h

    r38368 r38369  
    256256        }
    257257
     258        inline bool isKnownNotImmediate(int index)
     259        {
     260            if (index == thisRegister)
     261                return true;
     262
     263            if (isConstantRegisterIndex(index))
     264                return !JSImmediate::isImmediate(getConstant(index));
     265
     266            return false;
     267        }
     268
    258269        ALWAYS_INLINE bool isConstantRegisterIndex(int index)
    259270        {
Note: See TracChangeset for help on using the changeset viewer.