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: http://svn.webkit.org/repository/webkit/trunk@98932 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/runtime/JSCell.cpp b/Source/JavaScriptCore/runtime/JSCell.cpp
index f3f7227..ffeccfc 100644
--- a/Source/JavaScriptCore/runtime/JSCell.cpp
+++ b/Source/JavaScriptCore/runtime/JSCell.cpp
@@ -163,4 +163,10 @@
ASSERT_NOT_REACHED();
}
+JSValue JSCell::defaultValue(const JSObject*, ExecState*, PreferredPrimitiveType)
+{
+ ASSERT_NOT_REACHED();
+ return jsUndefined();
+}
+
} // namespace JSC