Skip to content
  • mjs@apple.com's avatar
    JavaScriptCore: · a6dc93d6
    mjs@apple.com authored
    2008-09-23  Maciej Stachowiak  <mjs@apple.com>
    
            Reviewed by Darin.
    
            - speed up instanceof some more
            https://bugs.webkit.org/show_bug.cgi?id=20818
            
            ~2% speedup on EarleyBoyer
    
            The idea here is to record in the StructureID whether the class
            needs a special hasInstance or if it can use the normal logic from
            JSObject. 
            
            Based on this I inlined the real work directly into
            cti_op_instanceof and put the fastest checks up front and the
            error handling at the end (so it should be fairly straightforward
            to split off the beginning to be inlined if desired).
    
            I only did this for CTI, not the bytecode interpreter.
            
            * API/JSCallbackObject.h:
            (JSC::JSCallbackObject::createStructureID):
            * ChangeLog:
            * VM/Machine.cpp:
            (JSC::Machine::cti_op_instanceof):
            * kjs/JSImmediate.h:
            (JSC::JSImmediate::isAnyImmediate):
            * kjs/TypeInfo.h:
            (JSC::TypeInfo::overridesHasInstance):
            (JSC::TypeInfo::flags):
    
    WebCore:
    
    2008-09-23  Maciej Stachowiak  <mjs@apple.com>
    
            Reviewed by Darin.
    
            - speed up instanceof some more
            https://bugs.webkit.org/show_bug.cgi?id=20818
    
            ~2% speedup on EarleyBoyer
    
            (WebCore updates.)
            
            * bindings/js/JSQuarantinedObjectWrapper.h:
            (WebCore::JSQuarantinedObjectWrapper::createStructureID):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@36802 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    a6dc93d6