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/kjs/JSImmediate.h

    r36726 r36802  
    155155        }
    156156
     157        static ALWAYS_INLINE bool isAnyImmediate(const JSValue* v1, const JSValue* v2, JSValue* v3)
     158        {
     159            return (reinterpret_cast<uintptr_t>(v1) | reinterpret_cast<uintptr_t>(v2) | reinterpret_cast<uintptr_t>(v3)) & TagMask;
     160        }
     161
    157162        static ALWAYS_INLINE bool areBothImmediate(const JSValue* v1, const JSValue* v2)
    158163        {
Note: See TracChangeset for help on using the changeset viewer.