Rename DOMJIT safe/unsafeFunction to functionWithTypeChecks and functionWithoutTypeCh...
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Aug 2019 17:13:51 +0000 (17:13 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Aug 2019 17:13:51 +0000 (17:13 +0000)
commitbdf71b93ccb120bac503656dc4905a957f946f9f
tree4d7af4660d3e2ba59bc6f295fa498dd3523b740c
parent60e7700e84d448ec87e603793737973f3dbaef24
Rename DOMJIT safe/unsafeFunction to functionWithTypeChecks and functionWithoutTypeChecks.
https://bugs.webkit.org/show_bug.cgi?id=200323

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

The DOMJIT has a notion of a safeFunction and an unsafeFunction.  The safeFunction
is effectively the same as the unsafeFunction with added type check.  The DFG/FTL
will emit code to call the unsafeFunction if it has already emitted the needed
type check or proven that it isn't needed.  Otherwise, the DFG/FTL will emit
code to call the safeFunction (which does its own type check) instead.

This patch renames these functions to better describe their difference.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCallDOM):
* domjit/DOMJITSignature.h:
(JSC::DOMJIT::Signature::Signature):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOM):
* tools/JSDollarVM.cpp:
(JSC::DOMJITFunctionObject::functionWithTypeCheck):
(JSC::DOMJITFunctionObject::functionWithoutTypeCheck):
(JSC::DOMJITFunctionObject::finishCreation):
(JSC::DOMJITCheckSubClassObject::functionWithTypeCheck):
(JSC::DOMJITCheckSubClassObject::functionWithoutTypeCheck):
(JSC::DOMJITCheckSubClassObject::finishCreation):
(JSC::DOMJITFunctionObject::safeFunction): Deleted.
(JSC::DOMJITFunctionObject::unsafeFunction): Deleted.
(JSC::DOMJITCheckSubClassObject::safeFunction): Deleted.
(JSC::DOMJITCheckSubClassObject::unsafeFunction): Deleted.

Source/WebCore:

No new tests.  This is just a refactoring exercise.

* bindings/scripts/CodeGeneratorJS.pm:
(GetArgumentTypeForFunctionWithoutTypeCheck):
(GenerateImplementation):
(GenerateOperationDefinition):
(ToNativeForFunctionWithoutTypeCheck):
(GetUnsafeArgumentType): Deleted.
(UnsafeToNative): Deleted.
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
(WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
(WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetAttribute): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionItem): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionHasAttribute): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementById): Deleted.
(WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementsByName): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/domjit/DOMJITSignature.h
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Source/JavaScriptCore/tools/JSDollarVM.cpp
Source/WebCore/ChangeLog
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp