Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Some JSValue cleanup
https://bugs.webkit.org/show_bug.cgi?id=69320 ../JavaScriptCore: Reviewed by Darin Adler. No measurable performance change. Removed some JSValue::get* functions. get* used to be an optimization when every value operation was a virtual function call: get* would combine two virtual calls into one. Now, with non-virtual, inlined functions, get* isn't faster, and may be slightly slower. Merged getBoolean(bool&) and getBoolean() into asBoolean(). Merged uncheckedGetNumber(), getJSNumber() and getNumber() into asNumber(). * runtime/JSValue.h: * runtime/JSValueInlineMethods.h: (JSC::JSValue::asNumber): (JSC::JSValue::asBoolean): As promised! * runtime/NumberPrototype.cpp: (JSC::toThisNumber): (JSC::numberProtoFuncToExponential): (JSC::numberProtoFuncToFixed): (JSC::numberProtoFuncToPrecision): (JSC::numberProtoFuncToString): (JSC::numberProtoFuncToLocaleString): (JSC::numberProtoFuncValueOf): Removed a bunch of uses of getJSNumber() by switching to toThisNumber(). * API/JSCallbackObjectFunctions.h: (JSC::::toNumber): * dfg/DFGGraph.h: (JSC::DFG::Graph::valueOfNumberConstant): (JSC::DFG::Graph::valueOfBooleanConstant): * dfg/DFGOperations.cpp: (JSC::DFG::putByVal): * interpreter/Interpreter.cpp: (JSC::Interpreter::privateExecute): * jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION): * runtime/DateInstance.h: (JSC::DateInstance::internalNumber): * runtime/FunctionPrototype.cpp: (JSC::functionProtoFuncBind): * runtime/JSArray.cpp: (JSC::compareNumbersForQSort): Replaced getNumber() => isNumber() / asNumber(). getBoolean() => isBoolean() / asBoolean(), uncheckedGetNumber() => asNumber(). * runtime/JSCell.cpp: * runtime/JSCell.h: Nixed getJSNumber(). * runtime/JSGlobalObjectFunctions.cpp: (JSC::globalFuncParseInt): * runtime/JSONObject.cpp: (JSC::gap): (JSC::Stringifier::Stringifier): (JSC::Stringifier::appendStringifiedValue): * runtime/NumberObject.cpp: * runtime/NumberObject.h: (JSC::NumberObject::createStructure): * runtime/Operations.h: (JSC::JSValue::equalSlowCaseInline): (JSC::JSValue::strictEqual): (JSC::jsLess): (JSC::jsLessEq): (JSC::jsAdd): Replaced getNumber() => isNumber() / asNumber(). getBoolean() => isBoolean() / asBoolean(), uncheckedGetNumber() => asNumber(). ../WebCore: Reviewed by Darin Adler. * bindings/js/JSDOMBinding.cpp: (WebCore::valueToDate): * bindings/js/JSErrorHandler.cpp: (WebCore::JSErrorHandler::handleEvent): * bindings/js/JSEventListener.cpp: (WebCore::JSEventListener::handleEvent): * bindings/js/JSSQLTransactionCustom.cpp: (WebCore::JSSQLTransaction::executeSql): * bindings/js/JSSQLTransactionSyncCustom.cpp: (WebCore::JSSQLTransactionSync::executeSql): * bindings/js/ScriptValue.cpp: (WebCore::jsToInspectorValue): * bindings/js/SerializedScriptValue.cpp: (WebCore::CloneSerializer::dumpIfTerminal): * bindings/objc/WebScriptObject.mm: (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]): * bridge/jni/jsc/JNIUtilityPrivate.cpp: (JSC::Bindings::convertValueToJValue): Updated for JSC changes. ../WebKit/mac: Reviewed by Darin Adler. * WebView/WebView.mm: (aeDescFromJSValue): Updated for JSC changes. Canonical link: https://commits.webkit.org/85434@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@96673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
e82a44c
commit 4566a764e4d8c9d4dfbefad8c00180b8cc5e2872
Showing
31 changed files
with
249 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.