Ignore:
Timestamp:
Oct 13, 2011, 12:24:53 PM (14 years ago)
Author:
[email protected]
Message:

De-virtualized JSCell::toNumber
https://bugs.webkit.org/show_bug.cgi?id=69858

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Removed JSCallbackObject::toNumber because its no longer necessary since
JSObject::toNumber now suffices since we implicitly add valueOf to an object's
prototype whenever a convertToType callback is provided.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:

De-virtualized JSCell::toNumber, JSObject::toNumber, and JSString::toNumber.

  • runtime/JSCell.cpp:

(JSC::JSCell::toNumber):

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

Removed JSNotAnObject::toNumber because its result doesn't matter and it implements
defaultValue, therefore JSObject::toNumber can cover its case.

  • runtime/JSNotAnObject.cpp:
  • runtime/JSNotAnObject.h:

Source/JavaScriptGlue:

Removed UserObjectImp::toNumber because it's no longer necessary since
JSObject::toNumber can cover this case.

  • UserObjectImp.cpp:
  • UserObjectImp.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r97292 r97381  
    8282        bool getPrimitiveNumber(ExecState*, double& number, JSValue&) const;
    8383        bool toBoolean(ExecState*) const;
    84         virtual double toNumber(ExecState*) const;
     84        double toNumber(ExecState*) const;
    8585        UString toString(ExecState*) const;
    8686        JSObject* toObject(ExecState*, JSGlobalObject*) const;
Note: See TracChangeset for help on using the changeset viewer.