[webkit-changes] [WebKit/WebKit] 31aebd: [JSC] Simplify toThis operation
Yusuke Suzuki
noreply at github.com
Fri Oct 28 15:33:27 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 31aebd3fc407818a8f06a584c1b44c867ece902a
https://github.com/WebKit/WebKit/commit/31aebd3fc407818a8f06a584c1b44c867ece902a
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2022-10-28 (Fri, 28 Oct 2022)
Changed paths:
M Source/JavaScriptCore/API/JSContextRef.cpp
M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
M Source/JavaScriptCore/dfg/DFGGraph.h
M Source/JavaScriptCore/runtime/ClassInfo.h
M Source/JavaScriptCore/runtime/JSCJSValue.cpp
M Source/JavaScriptCore/runtime/JSCJSValue.h
M Source/JavaScriptCore/runtime/JSCJSValueInlines.h
M Source/JavaScriptCore/runtime/JSCell.cpp
M Source/JavaScriptCore/runtime/JSCell.h
M Source/JavaScriptCore/runtime/JSObject.cpp
M Source/JavaScriptCore/runtime/JSObject.h
M Source/JavaScriptCore/runtime/JSScope.cpp
M Source/JavaScriptCore/runtime/JSScope.h
M Source/JavaScriptCore/runtime/JSString.cpp
M Source/JavaScriptCore/runtime/JSString.h
Log Message:
-----------
[JSC] Simplify toThis operation
https://bugs.webkit.org/show_bug.cgi?id=247162
rdar://101662631
Reviewed by Mark Lam.
This patch removes toThis hook in ClassInfo, and simplfy JSValue::toThis.
It is called relatively frequently in runtime functions. We should avoid dispatching
dynamic virtual function for most of the cases.
* Source/JavaScriptCore/API/JSContextRef.cpp:
(JSContextGetGlobalObject):
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::isToThisAnIdentity):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* Source/JavaScriptCore/dfg/DFGGraph.h:
* Source/JavaScriptCore/runtime/ClassInfo.h:
* Source/JavaScriptCore/runtime/JSCJSValue.cpp:
(JSC::JSValue::toThisSloppySlowCase const):
(JSC::JSValue::toThisSlowCase const): Deleted.
* Source/JavaScriptCore/runtime/JSCJSValue.h:
* Source/JavaScriptCore/runtime/JSCJSValueInlines.h:
(JSC::JSValue::toThis const):
* Source/JavaScriptCore/runtime/JSCell.cpp:
(JSC::JSCell::toThis): Deleted.
* Source/JavaScriptCore/runtime/JSCell.h:
* Source/JavaScriptCore/runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::toThis): Deleted.
* Source/JavaScriptCore/runtime/JSObject.h:
* Source/JavaScriptCore/runtime/JSScope.cpp:
(JSC::JSScope::toThis): Deleted.
* Source/JavaScriptCore/runtime/JSScope.h:
* Source/JavaScriptCore/runtime/JSString.cpp:
(JSC::JSString::toThis): Deleted.
* Source/JavaScriptCore/runtime/JSString.h:
Canonical link: https://commits.webkit.org/256115@main
More information about the webkit-changes
mailing list