[DOMJIT] Move DOMJIT patchpoint infrastructure out of domjit
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 May 2017 19:03:41 +0000 (19:03 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 27 May 2017 19:03:41 +0000 (19:03 +0000)
commit6d14eae02905b1bbed20786c8573de339496a7a6
tree0d91253e3dfa7df482cb965f1d91c592d1f11488
parentc740e9f1554b7cfd93d6487e054aaeb37ef7c9ed
[DOMJIT] Move DOMJIT patchpoint infrastructure out of domjit
https://bugs.webkit.org/show_bug.cgi?id=172260

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

DOMJIT::Patchpoint is now used for generalized CheckSubClass. And it becomes mature enough
to be used as a general-purpose injectable compiler over all the JIT tiers.

We extract DOMJIT::Patchpoint to jit/ and rename it JSC::Snippet.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* bytecode/AccessCaseSnippetParams.cpp: Renamed from Source/JavaScriptCore/bytecode/DOMJITAccessCasePatchpointParams.cpp.
(JSC::SlowPathCallGeneratorWithArguments::generateImpl):
(JSC::AccessCaseSnippetParams::emitSlowPathCalls):
* bytecode/AccessCaseSnippetParams.h: Renamed from Source/JavaScriptCore/bytecode/DOMJITAccessCasePatchpointParams.h.
(JSC::AccessCaseSnippetParams::AccessCaseSnippetParams):
* bytecode/GetterSetterAccessCase.cpp:
(JSC::GetterSetterAccessCase::emitDOMJITGetter):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::blessCallDOMGetter):
(JSC::DFG::ByteCodeParser::handleDOMJITGetter):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGGraph.h:
* dfg/DFGNode.h:
* dfg/DFGSnippetParams.cpp: Renamed from Source/JavaScriptCore/dfg/DFGDOMJITPatchpointParams.cpp.
* dfg/DFGSnippetParams.h: Renamed from Source/JavaScriptCore/dfg/DFGDOMJITPatchpointParams.h.
(JSC::DFG::SnippetParams::SnippetParams):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::allocateTemporaryRegistersForSnippet):
(JSC::DFG::SpeculativeJIT::compileCallDOMGetter):
(JSC::DFG::SpeculativeJIT::compileCheckSubClass):
(JSC::DFG::allocateTemporaryRegistersForPatchpoint): Deleted.
* domjit/DOMJITCallDOMGetterSnippet.h: Renamed from Source/JavaScriptCore/domjit/DOMJITCallDOMGetterPatchpoint.h.
(JSC::DOMJIT::CallDOMGetterSnippet::create):
* domjit/DOMJITGetterSetter.h:
* domjit/DOMJITSignature.h:
* domjit/DOMJITValue.h: Removed.
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCheckSubClass):
(JSC::FTL::DFG::LowerDFGToB3::compileCallDOMGetter):
* ftl/FTLSnippetParams.cpp: Renamed from Source/JavaScriptCore/ftl/FTLDOMJITPatchpointParams.cpp.
* ftl/FTLSnippetParams.h: Renamed from Source/JavaScriptCore/ftl/FTLDOMJITPatchpointParams.h.
(JSC::FTL::SnippetParams::SnippetParams):
* jit/Snippet.h: Renamed from Source/JavaScriptCore/domjit/DOMJITPatchpoint.h.
(JSC::Snippet::create):
(JSC::Snippet::setGenerator):
(JSC::Snippet::generator):
* jit/SnippetParams.h: Renamed from Source/JavaScriptCore/domjit/DOMJITPatchpointParams.h.
(JSC::SnippetParams::~SnippetParams):
(JSC::SnippetParams::Value::Value):
(JSC::SnippetParams::Value::isGPR):
(JSC::SnippetParams::Value::isFPR):
(JSC::SnippetParams::Value::isJSValueRegs):
(JSC::SnippetParams::Value::gpr):
(JSC::SnippetParams::Value::fpr):
(JSC::SnippetParams::Value::jsValueRegs):
(JSC::SnippetParams::Value::reg):
(JSC::SnippetParams::Value::value):
(JSC::SnippetParams::SnippetParams):
* jit/SnippetReg.h: Renamed from Source/JavaScriptCore/domjit/DOMJITReg.h.
(JSC::SnippetReg::SnippetReg):
* jit/SnippetSlowPathCalls.h: Renamed from Source/JavaScriptCore/domjit/DOMJITSlowPathCalls.h.
* jsc.cpp:
(WTF::DOMJITNode::checkSubClassSnippet):
(WTF::DOMJITFunctionObject::checkSubClassSnippet):
(WTF::DOMJITNode::checkSubClassPatchpoint): Deleted.
(WTF::DOMJITFunctionObject::checkSubClassPatchpoint): Deleted.
* runtime/ClassInfo.h:

Source/WebCore:

* ForwardingHeaders/jit/Snippet.h: Renamed from Source/WebCore/ForwardingHeaders/domjit/DOMJITPatchpoint.h.
* ForwardingHeaders/jit/SnippetParams.h: Renamed from Source/WebCore/ForwardingHeaders/domjit/DOMJITPatchpointParams.h.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestDOMJIT.h:
* domjit/DOMJITCheckDOM.h:
(WebCore::DOMJIT::checkDOM):
* domjit/DOMJITHelpers.h:
(WebCore::DOMJIT::toWrapper):
* domjit/JSDocumentDOMJIT.cpp:
(WebCore::checkSubClassSnippetForJSDocument):
(WebCore::DocumentDocumentElementDOMJIT::callDOMGetter):
(WebCore::DocumentBodyDOMJIT::callDOMGetter):
(WebCore::checkSubClassPatchpointForJSDocument): Deleted.
* domjit/JSDocumentFragmentDOMJIT.cpp:
(WebCore::checkSubClassSnippetForJSDocumentFragment):
(WebCore::checkSubClassPatchpointForJSDocumentFragment): Deleted.
* domjit/JSElementDOMJIT.cpp:
(WebCore::checkSubClassSnippetForJSElement):
(WebCore::checkSubClassPatchpointForJSElement): Deleted.
* domjit/JSEventDOMJIT.cpp:
(WebCore::checkSubClassSnippetForJSEvent):
(WebCore::checkSubClassPatchpointForJSEvent): Deleted.
* domjit/JSNodeDOMJIT.cpp:
(WebCore::checkSubClassSnippetForJSNode):
(WebCore::createCallDOMGetterForOffsetAccess):
(WebCore::NodeFirstChildDOMJIT::callDOMGetter):
(WebCore::NodeLastChildDOMJIT::callDOMGetter):
(WebCore::NodeNextSiblingDOMJIT::callDOMGetter):
(WebCore::NodePreviousSiblingDOMJIT::callDOMGetter):
(WebCore::NodeParentNodeDOMJIT::callDOMGetter):
(WebCore::NodeNodeTypeDOMJIT::callDOMGetter):
(WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter):
(WebCore::checkSubClassPatchpointForJSNode): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217523 268f45cc-cd09-0410-ab3c-d52691b4dbfc
40 files changed:
Source/JavaScriptCore/CMakeLists.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
Source/JavaScriptCore/bytecode/AccessCaseSnippetParams.cpp [moved from Source/JavaScriptCore/bytecode/DOMJITAccessCasePatchpointParams.cpp with 81% similarity]
Source/JavaScriptCore/bytecode/AccessCaseSnippetParams.h [moved from Source/JavaScriptCore/bytecode/DOMJITAccessCasePatchpointParams.h with 78% similarity]
Source/JavaScriptCore/bytecode/GetterSetterAccessCase.cpp
Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/dfg/DFGClobberize.h
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
Source/JavaScriptCore/dfg/DFGGraph.h
Source/JavaScriptCore/dfg/DFGNode.h
Source/JavaScriptCore/dfg/DFGSnippetParams.cpp [moved from Source/JavaScriptCore/dfg/DFGDOMJITPatchpointParams.cpp with 89% similarity]
Source/JavaScriptCore/dfg/DFGSnippetParams.h [moved from Source/JavaScriptCore/dfg/DFGDOMJITPatchpointParams.h with 82% similarity]
Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
Source/JavaScriptCore/domjit/DOMJITCallDOMGetterSnippet.h [moved from Source/JavaScriptCore/domjit/DOMJITCallDOMGetterPatchpoint.h with 84% similarity]
Source/JavaScriptCore/domjit/DOMJITGetterSetter.h
Source/JavaScriptCore/domjit/DOMJITSignature.h
Source/JavaScriptCore/domjit/DOMJITValue.h [deleted file]
Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
Source/JavaScriptCore/ftl/FTLSnippetParams.cpp [moved from Source/JavaScriptCore/ftl/FTLDOMJITPatchpointParams.cpp with 90% similarity]
Source/JavaScriptCore/ftl/FTLSnippetParams.h [moved from Source/JavaScriptCore/ftl/FTLDOMJITPatchpointParams.h with 80% similarity]
Source/JavaScriptCore/jit/Snippet.h [moved from Source/JavaScriptCore/domjit/DOMJITPatchpoint.h with 69% similarity]
Source/JavaScriptCore/jit/SnippetParams.h [moved from Source/JavaScriptCore/domjit/DOMJITPatchpointParams.h with 69% similarity]
Source/JavaScriptCore/jit/SnippetReg.h [moved from Source/JavaScriptCore/domjit/DOMJITReg.h with 87% similarity]
Source/JavaScriptCore/jit/SnippetSlowPathCalls.h [moved from Source/JavaScriptCore/domjit/DOMJITSlowPathCalls.h with 93% similarity]
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/ClassInfo.h
Source/WebCore/ChangeLog
Source/WebCore/ForwardingHeaders/jit/Snippet.h [moved from Source/WebCore/ForwardingHeaders/domjit/DOMJITPatchpoint.h with 91% similarity]
Source/WebCore/ForwardingHeaders/jit/SnippetParams.h [moved from Source/WebCore/ForwardingHeaders/domjit/DOMJITPatchpointParams.h with 90% similarity]
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.h
Source/WebCore/domjit/DOMJITCheckDOM.h
Source/WebCore/domjit/DOMJITHelpers.h
Source/WebCore/domjit/JSDocumentDOMJIT.cpp
Source/WebCore/domjit/JSDocumentFragmentDOMJIT.cpp
Source/WebCore/domjit/JSElementDOMJIT.cpp
Source/WebCore/domjit/JSEventDOMJIT.cpp
Source/WebCore/domjit/JSNodeDOMJIT.cpp