Ignore:
Timestamp:
Nov 4, 2011, 1:37:32 PM (14 years ago)
Author:
[email protected]
Message:

De-virtualize JSObject::hasInstance
https://bugs.webkit.org/show_bug.cgi?id=71430

Reviewed by Darin Adler.

Added hasInstance to the MethodTable, changed all the virtual
implementations of hasInstance to static ones, and replaced
all call sites with corresponding lookups in the MethodTable.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::::hasInstance):

  • API/JSValueRef.cpp:

(JSValueIsInstanceOfConstructor):

(JSC::Interpreter::privateExecute):

  • jit/JITStubs.cpp:

(JSC::DEFINE_STUB_FUNCTION):

  • runtime/ClassInfo.h:
  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::hasInstance):

  • runtime/JSBoundFunction.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::hasInstance):

  • runtime/JSCell.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::hasInstance):

  • runtime/JSObject.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSValueRef.cpp

    r99264 r99312  
    176176    if (!jsConstructor->structure()->typeInfo().implementsHasInstance())
    177177        return false;
    178     bool result = jsConstructor->hasInstance(exec, jsValue, jsConstructor->get(exec, exec->propertyNames().prototype)); // false if an exception is thrown
     178    bool result = jsConstructor->methodTable()->hasInstance(jsConstructor, exec, jsValue, jsConstructor->get(exec, exec->propertyNames().prototype)); // false if an exception is thrown
    179179    if (exec->hadException()) {
    180180        if (exception)
Note: See TracChangeset for help on using the changeset viewer.