Changeset 36036 in webkit for trunk/JavaScriptCore/kjs/nodes.h


Ignore:
Timestamp:
Sep 2, 2008, 7:58:14 PM (17 years ago)
Author:
[email protected]
Message:

2008-09-02 Geoffrey Garen <[email protected]>

Reviewed by Anders Carlsson.


Added optimized paths for comparing to null.


SunSpider says 0.5% faster.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.h

    r35986 r36036  
    209209        virtual bool isNumber() const KJS_FAST_CALL { return false; }
    210210        virtual bool isString() const KJS_FAST_CALL { return false; }
     211        virtual bool isNull() const KJS_FAST_CALL { return false; }
    211212        virtual bool isPure(CodeGenerator&) const KJS_FAST_CALL { return false; }       
    212213        virtual bool isLocation() const KJS_FAST_CALL { return false; }
     
    245246        {
    246247        }
     248
     249        virtual bool isNull() const KJS_FAST_CALL { return true; }
    247250
    248251        virtual RegisterID* emitCode(CodeGenerator&, RegisterID* = 0) KJS_FAST_CALL;
Note: See TracChangeset for help on using the changeset viewer.