De-virtualize JSObject::defaultValue
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Nov 2011 01:15:06 +0000 (01:15 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Nov 2011 01:15:06 +0000 (01:15 +0000)
commit7b60235d7b5457c38bbb34659e94d2903bdebae7
tree42c6d6bcfbe541bcbcf313e5da02bff1b8085bdd
parentda0bf19e2560a1e45a77dedc2c1a5c50abf48833
De-virtualize JSObject::defaultValue
https://bugs.webkit.org/show_bug.cgi?id=71146

Reviewed by Sam Weinig.

Source/JavaScriptCore:

Added defaultValue to the MethodTable.  Replaced all virtual versions of
defaultValue with static versions.  Replaced all call sites with lookups in the
MethodTable.

* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/ClassInfo.h:
* runtime/ExceptionHelpers.cpp:
(JSC::InterruptedExecutionError::defaultValue):
(JSC::TerminatedExecutionError::defaultValue):
* runtime/ExceptionHelpers.h:
* runtime/JSCell.cpp:
(JSC::JSCell::defaultValue):
* runtime/JSCell.h:
* runtime/JSNotAnObject.cpp:
(JSC::JSNotAnObject::defaultValue):
* runtime/JSNotAnObject.h:
* runtime/JSObject.cpp:
(JSC::JSObject::getPrimitiveNumber):
(JSC::JSObject::defaultValue):
* runtime/JSObject.h:
(JSC::JSObject::toPrimitive):

Source/WebCore:

No new tests.

Added defaultValue to the MethodTable.  Replaced all virtual versions of
defaultValue with static versions.  Replaced all call sites with lookups in the
MethodTable.

* WebCore.exp.in:
* bridge/objc/objc_runtime.h:
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::defaultValue):
* bridge/runtime_object.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@98932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/runtime/ClassInfo.h
Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
Source/JavaScriptCore/runtime/ExceptionHelpers.h
Source/JavaScriptCore/runtime/JSCell.cpp
Source/JavaScriptCore/runtime/JSCell.h
Source/JavaScriptCore/runtime/JSNotAnObject.cpp
Source/JavaScriptCore/runtime/JSNotAnObject.h
Source/JavaScriptCore/runtime/JSObject.cpp
Source/JavaScriptCore/runtime/JSObject.h
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bridge/objc/objc_runtime.h
Source/WebCore/bridge/objc/objc_runtime.mm
Source/WebCore/bridge/runtime_object.cpp
Source/WebCore/bridge/runtime_object.h