Ignore:
Timestamp:
Sep 23, 2008, 12:46:55 AM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-09-23 Maciej Stachowiak <[email protected]>

Reviewed by Darin.


~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 <[email protected]>

Reviewed by Darin.

~2% speedup on EarleyBoyer

(WebCore updates.)


  • bindings/js/JSQuarantinedObjectWrapper.h: (WebCore::JSQuarantinedObjectWrapper::createStructureID):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSCallbackObject.h

    r36766 r36802  
    5151    static PassRefPtr<StructureID> createStructureID(JSValue* proto)
    5252    {
    53         return StructureID::create(proto, TypeInfo(ObjectType, ImplementsHasInstance));
     53        return StructureID::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | OverridesHasInstance));
    5454    }
    5555
Note: See TracChangeset for help on using the changeset viewer.