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/JSString.h

    r97292 r97381  
    432432        JSObject* toObject(ExecState*, JSGlobalObject*) const;
    433433        UString toString(ExecState*) const;
     434        double toNumber(ExecState*) const;
    434435       
    435436        bool getStringPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
     
    502503            }
    503504        }
    504 
    505         virtual double toNumber(ExecState*) const;
    506505
    507506        virtual JSObject* toThisObject(ExecState*) const;
Note: See TracChangeset for help on using the changeset viewer.