[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)
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

index 626d68b..3a30a49 100644 (file)
@@ -202,6 +202,7 @@ set(JavaScriptCore_SOURCES
     builtins/BuiltinExecutableCreator.cpp
 
     bytecode/AccessCase.cpp
+    bytecode/AccessCaseSnippetParams.cpp
     bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp
     bytecode/ArithProfile.cpp
     bytecode/ArrayAllocationProfile.cpp
@@ -224,7 +225,6 @@ set(JavaScriptCore_SOURCES
     bytecode/CodeType.cpp
     bytecode/ComplexGetStatus.cpp
     bytecode/DFGExitProfile.cpp
-    bytecode/DOMJITAccessCasePatchpointParams.cpp
     bytecode/DataFormat.cpp
     bytecode/DeferredCompilationCallback.cpp
     bytecode/DeferredSourceDump.cpp
@@ -323,7 +323,6 @@ set(JavaScriptCore_SOURCES
     dfg/DFGConstantHoistingPhase.cpp
     dfg/DFGCriticalEdgeBreakingPhase.cpp
     dfg/DFGDCEPhase.cpp
-    dfg/DFGDOMJITPatchpointParams.cpp
     dfg/DFGDesiredIdentifiers.cpp
     dfg/DFGDesiredTransitions.cpp
     dfg/DFGDesiredWatchpoints.cpp
@@ -401,6 +400,7 @@ set(JavaScriptCore_SOURCES
     dfg/DFGSSAConversionPhase.cpp
     dfg/DFGSSALoweringPhase.cpp
     dfg/DFGSafepoint.cpp
+    dfg/DFGSnippetParams.cpp
     dfg/DFGSpeculativeJIT.cpp
     dfg/DFGSpeculativeJIT32_64.cpp
     dfg/DFGSpeculativeJIT64.cpp
@@ -458,7 +458,6 @@ set(JavaScriptCore_SOURCES
     ftl/FTLCapabilities.cpp
     ftl/FTLCommonValues.cpp
     ftl/FTLCompile.cpp
-    ftl/FTLDOMJITPatchpointParams.cpp
     ftl/FTLExceptionTarget.cpp
     ftl/FTLExitArgument.cpp
     ftl/FTLExitArgumentForOperand.cpp
@@ -484,6 +483,7 @@ set(JavaScriptCore_SOURCES
     ftl/FTLSaveRestore.cpp
     ftl/FTLSlowPathCall.cpp
     ftl/FTLSlowPathCallKey.cpp
+    ftl/FTLSnippetParams.cpp
     ftl/FTLState.cpp
     ftl/FTLThunks.cpp
     ftl/FTLValueRange.cpp
index 9c30895..00b5c0b 100644 (file)
@@ -1,3 +1,80 @@
+2017-05-27  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [DOMJIT] Move DOMJIT patchpoint infrastructure out of domjit
+        https://bugs.webkit.org/show_bug.cgi?id=172260
+
+        Reviewed by Filip Pizlo.
+
+        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:
+
 2017-05-26  Keith Miller  <keith_miller@apple.com>
 
         REEGRESSION(r217459): testapi fails in JSExportTest's wrapperForNSObjectisObject().
index c2afa52..824509b 100644 (file)
                E18E3A590DF9278C00D90B34 /* VM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18E3A570DF9278C00D90B34 /* VM.cpp */; };
                E318CBC01B8AEF5100A2929D /* JSModuleNamespaceObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E318CBBE1B8AEF5100A2929D /* JSModuleNamespaceObject.cpp */; };
                E318CBC11B8AEF5100A2929D /* JSModuleNamespaceObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E318CBBF1B8AEF5100A2929D /* JSModuleNamespaceObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               E322E5A21DA64439006E7709 /* DFGDOMJITPatchpointParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E322E5A01DA64435006E7709 /* DFGDOMJITPatchpointParams.cpp */; };
-               E322E5A31DA64439006E7709 /* DFGDOMJITPatchpointParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E322E5A11DA64435006E7709 /* DFGDOMJITPatchpointParams.h */; };
-               E322E5A61DA644A8006E7709 /* FTLDOMJITPatchpointParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E322E5A41DA644A4006E7709 /* FTLDOMJITPatchpointParams.cpp */; };
-               E322E5A71DA644A8006E7709 /* FTLDOMJITPatchpointParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E322E5A51DA644A4006E7709 /* FTLDOMJITPatchpointParams.h */; };
+               E322E5A21DA64439006E7709 /* DFGSnippetParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E322E5A01DA64435006E7709 /* DFGSnippetParams.cpp */; };
+               E322E5A31DA64439006E7709 /* DFGSnippetParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E322E5A11DA64435006E7709 /* DFGSnippetParams.h */; };
+               E322E5A61DA644A8006E7709 /* FTLSnippetParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E322E5A41DA644A4006E7709 /* FTLSnippetParams.cpp */; };
+               E322E5A71DA644A8006E7709 /* FTLSnippetParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E322E5A51DA644A4006E7709 /* FTLSnippetParams.h */; };
                E326C4971ECBEF6300A9A905 /* ClassInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E326C4961ECBEF5700A9A905 /* ClassInfo.cpp */; };
                E328C6C71DA4304500D255FD /* MaxFrameExtentForSlowPathCall.h in Headers */ = {isa = PBXBuildFile; fileRef = 65860177185A8F5E00030EEE /* MaxFrameExtentForSlowPathCall.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E328C6C81DA4306100D255FD /* RegisterAtOffsetList.h in Headers */ = {isa = PBXBuildFile; fileRef = 6540C79D1B82D99D000F6B79 /* RegisterAtOffsetList.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E328DAEA1D38D005001A2529 /* BytecodeRewriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3D264291D38C042000BE174 /* BytecodeRewriter.cpp */; };
                E328DAEB1D38D005001A2529 /* BytecodeRewriter.h in Headers */ = {isa = PBXBuildFile; fileRef = E3D2642A1D38C042000BE174 /* BytecodeRewriter.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E32AB2441DCD75F400D7533A /* MacroAssemblerHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = E380A76B1DCD7195000F89E6 /* MacroAssemblerHelpers.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               E32FF1EA1DA7571C00A8BF21 /* DOMJITSlowPathCalls.h in Headers */ = {isa = PBXBuildFile; fileRef = E3CB1E241DA7540A00FA1E56 /* DOMJITSlowPathCalls.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E33637A51B63220200EE0840 /* ReflectObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E33637A31B63220200EE0840 /* ReflectObject.cpp */; };
                E33637A61B63220200EE0840 /* ReflectObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E33637A41B63220200EE0840 /* ReflectObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E33B3E261B7ABD750048DB2E /* InspectorInstrumentationObject.lut.h in Headers */ = {isa = PBXBuildFile; fileRef = E33B3E251B7ABD750048DB2E /* InspectorInstrumentationObject.lut.h */; };
                E34EDBF71DB5FFC900DC87A5 /* FrameTracers.h in Headers */ = {isa = PBXBuildFile; fileRef = E34EDBF61DB5FFC100DC87A5 /* FrameTracers.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E350708A1DC49BBF0089BCD6 /* DOMJITSignature.h in Headers */ = {isa = PBXBuildFile; fileRef = E35070891DC49BB60089BCD6 /* DOMJITSignature.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E354622B1B6065D100545386 /* ConstructAbility.h in Headers */ = {isa = PBXBuildFile; fileRef = E354622A1B6065D100545386 /* ConstructAbility.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               E3555B8A1DAE03A500F36921 /* DOMJITCallDOMGetterPatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = E3555B891DAE03A200F36921 /* DOMJITCallDOMGetterPatchpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E3555B8A1DAE03A500F36921 /* DOMJITCallDOMGetterSnippet.h in Headers */ = {isa = PBXBuildFile; fileRef = E3555B891DAE03A200F36921 /* DOMJITCallDOMGetterSnippet.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E355F3521B7DC85300C50DC5 /* ModuleLoaderPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E355F3501B7DC85300C50DC5 /* ModuleLoaderPrototype.cpp */; };
                E355F3531B7DC85300C50DC5 /* ModuleLoaderPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = E355F3511B7DC85300C50DC5 /* ModuleLoaderPrototype.h */; };
                E35CA1531DBC3A5C00F83516 /* DOMJITHeapRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E35CA1511DBC3A5600F83516 /* DOMJITHeapRange.cpp */; };
                E35E03601B7AB43E0073AD2A /* InspectorInstrumentationObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E35E035E1B7AB43E0073AD2A /* InspectorInstrumentationObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3794E751B77EB97005543AE /* ModuleAnalyzer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3794E731B77EB97005543AE /* ModuleAnalyzer.cpp */; };
                E3794E761B77EB97005543AE /* ModuleAnalyzer.h in Headers */ = {isa = PBXBuildFile; fileRef = E3794E741B77EB97005543AE /* ModuleAnalyzer.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               E37AD83C1DA4928600F3D412 /* DOMJITPatchpointParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E37AD83A1DA4928000F3D412 /* DOMJITPatchpointParams.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               E37AD83D1DA4928600F3D412 /* DOMJITReg.h in Headers */ = {isa = PBXBuildFile; fileRef = E37AD83B1DA4928000F3D412 /* DOMJITReg.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3963CEE1B73F75000EB4CE5 /* NodesAnalyzeModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3963CEC1B73F75000EB4CE5 /* NodesAnalyzeModule.cpp */; };
                E39D45F51D39005600B3B377 /* InterpreterInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = E39D9D841D39000600667282 /* InterpreterInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E39DA4A61B7E8B7C0084F33A /* JSModuleRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E39DA4A41B7E8B7C0084F33A /* JSModuleRecord.cpp */; };
                E39DA4A71B7E8B7C0084F33A /* JSModuleRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = E39DA4A51B7E8B7C0084F33A /* JSModuleRecord.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3A421431D6F58930007C617 /* PreciseJumpTargetsInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = E3A421421D6F588F0007C617 /* PreciseJumpTargetsInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               E3BFD0BB1DAF80870065DEA2 /* DOMJITAccessCasePatchpointParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3BFD0B91DAF807C0065DEA2 /* DOMJITAccessCasePatchpointParams.cpp */; };
-               E3BFD0BC1DAF808E0065DEA2 /* DOMJITAccessCasePatchpointParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E3BFD0BA1DAF807C0065DEA2 /* DOMJITAccessCasePatchpointParams.h */; };
-               E3C08E3C1DA41B810039478F /* DOMJITPatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C08E3B1DA41B7B0039478F /* DOMJITPatchpoint.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E3BFD0BB1DAF80870065DEA2 /* AccessCaseSnippetParams.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3BFD0B91DAF807C0065DEA2 /* AccessCaseSnippetParams.cpp */; };
+               E3BFD0BC1DAF808E0065DEA2 /* AccessCaseSnippetParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E3BFD0BA1DAF807C0065DEA2 /* AccessCaseSnippetParams.h */; };
                E3C79CAB1DB9A4DC00D1ECA4 /* DOMJITEffect.h in Headers */ = {isa = PBXBuildFile; fileRef = E3C79CAA1DB9A4D600D1ECA4 /* DOMJITEffect.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3D239C81B829C1C00BBEF67 /* JSModuleEnvironment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3D239C61B829C1C00BBEF67 /* JSModuleEnvironment.cpp */; };
                E3D239C91B829C1C00BBEF67 /* JSModuleEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = E3D239C71B829C1C00BBEF67 /* JSModuleEnvironment.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3D877741E65C0A000BE945A /* BytecodeDumper.h in Headers */ = {isa = PBXBuildFile; fileRef = E3D877721E65C08900BE945A /* BytecodeDumper.h */; };
                E3EF88741B66DF23003F26CB /* JSPropertyNameIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3EF88721B66DF23003F26CB /* JSPropertyNameIterator.cpp */; };
                E3EF88751B66DF23003F26CB /* JSPropertyNameIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = E3EF88731B66DF23003F26CB /* JSPropertyNameIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E3F23A7F1ECF13EE00978D99 /* SnippetSlowPathCalls.h in Headers */ = {isa = PBXBuildFile; fileRef = E3F23A7E1ECF13E500978D99 /* SnippetSlowPathCalls.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E3F23A801ECF13F500978D99 /* SnippetReg.h in Headers */ = {isa = PBXBuildFile; fileRef = E3F23A7D1ECF13E500978D99 /* SnippetReg.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E3F23A811ECF13FA00978D99 /* SnippetParams.h in Headers */ = {isa = PBXBuildFile; fileRef = E3F23A7C1ECF13E500978D99 /* SnippetParams.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E3F23A821ECF13FE00978D99 /* Snippet.h in Headers */ = {isa = PBXBuildFile; fileRef = E3F23A7B1ECF13E500978D99 /* Snippet.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E3FF75331D9CEA1800C7E16D /* DOMJITGetterSetter.h in Headers */ = {isa = PBXBuildFile; fileRef = E3FF752F1D9CEA1200C7E16D /* DOMJITGetterSetter.h */; settings = {ATTRIBUTES = (Private, ); }; };
-               E3FFC8531DAD7D1500DEA53E /* DOMJITValue.h in Headers */ = {isa = PBXBuildFile; fileRef = E3FFC8521DAD7D1000DEA53E /* DOMJITValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E49DC16B12EF293E00184A1F /* SourceProviderCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E49DC15512EF277200184A1F /* SourceProviderCache.cpp */; };
                E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC15112EF272200184A1F /* SourceProviderCache.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E49DC16D12EF295300184A1F /* SourceProviderCacheItem.h in Headers */ = {isa = PBXBuildFile; fileRef = E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E30677971B8BC6F5003F87F0 /* ModuleLoaderPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = ModuleLoaderPrototype.js; sourceTree = "<group>"; };
                E318CBBE1B8AEF5100A2929D /* JSModuleNamespaceObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSModuleNamespaceObject.cpp; sourceTree = "<group>"; };
                E318CBBF1B8AEF5100A2929D /* JSModuleNamespaceObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSModuleNamespaceObject.h; sourceTree = "<group>"; };
-               E322E5A01DA64435006E7709 /* DFGDOMJITPatchpointParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGDOMJITPatchpointParams.cpp; path = dfg/DFGDOMJITPatchpointParams.cpp; sourceTree = "<group>"; };
-               E322E5A11DA64435006E7709 /* DFGDOMJITPatchpointParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGDOMJITPatchpointParams.h; path = dfg/DFGDOMJITPatchpointParams.h; sourceTree = "<group>"; };
-               E322E5A41DA644A4006E7709 /* FTLDOMJITPatchpointParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLDOMJITPatchpointParams.cpp; path = ftl/FTLDOMJITPatchpointParams.cpp; sourceTree = "<group>"; };
-               E322E5A51DA644A4006E7709 /* FTLDOMJITPatchpointParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLDOMJITPatchpointParams.h; path = ftl/FTLDOMJITPatchpointParams.h; sourceTree = "<group>"; };
+               E322E5A01DA64435006E7709 /* DFGSnippetParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGSnippetParams.cpp; path = dfg/DFGSnippetParams.cpp; sourceTree = "<group>"; };
+               E322E5A11DA64435006E7709 /* DFGSnippetParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGSnippetParams.h; path = dfg/DFGSnippetParams.h; sourceTree = "<group>"; };
+               E322E5A41DA644A4006E7709 /* FTLSnippetParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLSnippetParams.cpp; path = ftl/FTLSnippetParams.cpp; sourceTree = "<group>"; };
+               E322E5A51DA644A4006E7709 /* FTLSnippetParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLSnippetParams.h; path = ftl/FTLSnippetParams.h; sourceTree = "<group>"; };
                E326C4961ECBEF5700A9A905 /* ClassInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ClassInfo.cpp; sourceTree = "<group>"; };
                E33637A31B63220200EE0840 /* ReflectObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReflectObject.cpp; sourceTree = "<group>"; };
                E33637A41B63220200EE0840 /* ReflectObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReflectObject.h; sourceTree = "<group>"; };
                E34EDBF61DB5FFC100DC87A5 /* FrameTracers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FrameTracers.h; sourceTree = "<group>"; };
                E35070891DC49BB60089BCD6 /* DOMJITSignature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITSignature.h; sourceTree = "<group>"; };
                E354622A1B6065D100545386 /* ConstructAbility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConstructAbility.h; sourceTree = "<group>"; };
-               E3555B891DAE03A200F36921 /* DOMJITCallDOMGetterPatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITCallDOMGetterPatchpoint.h; sourceTree = "<group>"; };
+               E3555B891DAE03A200F36921 /* DOMJITCallDOMGetterSnippet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITCallDOMGetterSnippet.h; sourceTree = "<group>"; };
                E355F3501B7DC85300C50DC5 /* ModuleLoaderPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModuleLoaderPrototype.cpp; sourceTree = "<group>"; };
                E355F3511B7DC85300C50DC5 /* ModuleLoaderPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleLoaderPrototype.h; sourceTree = "<group>"; };
                E35CA14F1DBC3A5600F83516 /* DOMJITAbstractHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMJITAbstractHeap.cpp; sourceTree = "<group>"; };
                E35E03611B7AB4850073AD2A /* InspectorInstrumentationObject.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = InspectorInstrumentationObject.js; sourceTree = "<group>"; };
                E3794E731B77EB97005543AE /* ModuleAnalyzer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModuleAnalyzer.cpp; sourceTree = "<group>"; };
                E3794E741B77EB97005543AE /* ModuleAnalyzer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleAnalyzer.h; sourceTree = "<group>"; };
-               E37AD83A1DA4928000F3D412 /* DOMJITPatchpointParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITPatchpointParams.h; sourceTree = "<group>"; };
-               E37AD83B1DA4928000F3D412 /* DOMJITReg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITReg.h; sourceTree = "<group>"; };
                E380A76B1DCD7195000F89E6 /* MacroAssemblerHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssemblerHelpers.h; sourceTree = "<group>"; };
                E3963CEC1B73F75000EB4CE5 /* NodesAnalyzeModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodesAnalyzeModule.cpp; sourceTree = "<group>"; };
                E39D9D841D39000600667282 /* InterpreterInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InterpreterInlines.h; sourceTree = "<group>"; };
                E39DA4A41B7E8B7C0084F33A /* JSModuleRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSModuleRecord.cpp; sourceTree = "<group>"; };
                E39DA4A51B7E8B7C0084F33A /* JSModuleRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSModuleRecord.h; sourceTree = "<group>"; };
                E3A421421D6F588F0007C617 /* PreciseJumpTargetsInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreciseJumpTargetsInlines.h; sourceTree = "<group>"; };
-               E3BFD0B91DAF807C0065DEA2 /* DOMJITAccessCasePatchpointParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMJITAccessCasePatchpointParams.cpp; sourceTree = "<group>"; };
-               E3BFD0BA1DAF807C0065DEA2 /* DOMJITAccessCasePatchpointParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITAccessCasePatchpointParams.h; sourceTree = "<group>"; };
-               E3C08E3B1DA41B7B0039478F /* DOMJITPatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITPatchpoint.h; sourceTree = "<group>"; };
+               E3BFD0B91DAF807C0065DEA2 /* AccessCaseSnippetParams.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessCaseSnippetParams.cpp; sourceTree = "<group>"; };
+               E3BFD0BA1DAF807C0065DEA2 /* AccessCaseSnippetParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessCaseSnippetParams.h; sourceTree = "<group>"; };
                E3C79CAA1DB9A4D600D1ECA4 /* DOMJITEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITEffect.h; sourceTree = "<group>"; };
-               E3CB1E241DA7540A00FA1E56 /* DOMJITSlowPathCalls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITSlowPathCalls.h; sourceTree = "<group>"; };
                E3D239C61B829C1C00BBEF67 /* JSModuleEnvironment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSModuleEnvironment.cpp; sourceTree = "<group>"; };
                E3D239C71B829C1C00BBEF67 /* JSModuleEnvironment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSModuleEnvironment.h; sourceTree = "<group>"; };
                E3D264261D38C042000BE174 /* BytecodeGeneratorification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BytecodeGeneratorification.cpp; sourceTree = "<group>"; };
                E3D877721E65C08900BE945A /* BytecodeDumper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BytecodeDumper.h; sourceTree = "<group>"; };
                E3EF88721B66DF23003F26CB /* JSPropertyNameIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPropertyNameIterator.cpp; sourceTree = "<group>"; };
                E3EF88731B66DF23003F26CB /* JSPropertyNameIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPropertyNameIterator.h; sourceTree = "<group>"; };
+               E3F23A7B1ECF13E500978D99 /* Snippet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Snippet.h; sourceTree = "<group>"; };
+               E3F23A7C1ECF13E500978D99 /* SnippetParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SnippetParams.h; sourceTree = "<group>"; };
+               E3F23A7D1ECF13E500978D99 /* SnippetReg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SnippetReg.h; sourceTree = "<group>"; };
+               E3F23A7E1ECF13E500978D99 /* SnippetSlowPathCalls.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SnippetSlowPathCalls.h; sourceTree = "<group>"; };
                E3FF752F1D9CEA1200C7E16D /* DOMJITGetterSetter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITGetterSetter.h; sourceTree = "<group>"; };
-               E3FFC8521DAD7D1000DEA53E /* DOMJITValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITValue.h; sourceTree = "<group>"; };
                E49DC14912EF261A00184A1F /* SourceProviderCacheItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceProviderCacheItem.h; sourceTree = "<group>"; };
                E49DC15112EF272200184A1F /* SourceProviderCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SourceProviderCache.h; sourceTree = "<group>"; };
                E49DC15512EF277200184A1F /* SourceProviderCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceProviderCache.cpp; sourceTree = "<group>"; };
                                0FEA0A211709606900BB722C /* FTLCommonValues.h */,
                                0FB387911BFD31A100E3AB1E /* FTLCompile.cpp */,
                                0FEA0A01170513DB00BB722C /* FTLCompile.h */,
-                               E322E5A41DA644A4006E7709 /* FTLDOMJITPatchpointParams.cpp */,
-                               E322E5A51DA644A4006E7709 /* FTLDOMJITPatchpointParams.h */,
                                0F9D4C0A1C3E1C11006CD984 /* FTLExceptionTarget.cpp */,
                                0F9D4C0B1C3E1C11006CD984 /* FTLExceptionTarget.h */,
                                0F235BBD17178E1C00690C7F /* FTLExitArgument.cpp */,
                                0F25F1AB181635F300522F39 /* FTLSlowPathCall.h */,
                                0F25F1AC181635F300522F39 /* FTLSlowPathCallKey.cpp */,
                                0F25F1AD181635F300522F39 /* FTLSlowPathCallKey.h */,
+                               E322E5A41DA644A4006E7709 /* FTLSnippetParams.cpp */,
+                               E322E5A51DA644A4006E7709 /* FTLSnippetParams.h */,
                                0F235BC117178E1C00690C7F /* FTLStackmapArgumentList.h */,
                                0FEA0A151706BB9000BB722C /* FTLState.cpp */,
                                0FEA0A07170513DB00BB722C /* FTLState.h */,
                                0FEE98421A89227500754E93 /* SetupVarargsFrame.cpp */,
                                0FEE98401A8865B600754E93 /* SetupVarargsFrame.h */,
                                A709F2EF17A0AC0400512E98 /* SlowPathCall.h */,
+                               E3F23A7B1ECF13E500978D99 /* Snippet.h */,
                                FE187A0C1C02EBA70038BBCA /* SnippetOperand.h */,
+                               E3F23A7C1ECF13E500978D99 /* SnippetParams.h */,
+                               E3F23A7D1ECF13E500978D99 /* SnippetReg.h */,
+                               E3F23A7E1ECF13E500978D99 /* SnippetSlowPathCalls.h */,
                                A7386551118697B400540279 /* SpecializedThunkJIT.h */,
                                A7FF647A18C52E8500B55307 /* SpillRegistersMode.h */,
                                DC7997811CDE9F9E004D4A09 /* TagRegistersMode.cpp */,
                                0F5A1271192D9FDF008764A3 /* DFGDoesGC.cpp */,
                                0F5A1272192D9FDF008764A3 /* DFGDoesGC.h */,
                                0FD81AD0154FB4EB00983E72 /* DFGDominators.h */,
-                               E322E5A01DA64435006E7709 /* DFGDOMJITPatchpointParams.cpp */,
-                               E322E5A11DA64435006E7709 /* DFGDOMJITPatchpointParams.h */,
+                               E322E5A01DA64435006E7709 /* DFGSnippetParams.cpp */,
+                               E322E5A11DA64435006E7709 /* DFGSnippetParams.h */,
                                0F1E3A441534CBAD000F9456 /* DFGDoubleFormatState.h */,
                                0FD3C82014115CF800FD81CB /* DFGDriver.cpp */,
                                0FD3C82214115D0E00FD81CB /* DFGDriver.h */,
                                0FBC0AE51496C7C100D4FBDD /* DFGExitProfile.h */,
                                0F2EBBAA1DEDF94E00990369 /* DirectEvalCodeCache.cpp */,
                                969A07920ED1D3AE00F1F681 /* DirectEvalCodeCache.h */,
-                               E3BFD0B91DAF807C0065DEA2 /* DOMJITAccessCasePatchpointParams.cpp */,
-                               E3BFD0BA1DAF807C0065DEA2 /* DOMJITAccessCasePatchpointParams.h */,
+                               E3BFD0B91DAF807C0065DEA2 /* AccessCaseSnippetParams.cpp */,
+                               E3BFD0BA1DAF807C0065DEA2 /* AccessCaseSnippetParams.h */,
                                14AD91121DCA97FD0014F9FE /* EvalCodeBlock.cpp */,
                                14AD91061DCA92940014F9FE /* EvalCodeBlock.h */,
                                14142E521B796EDD00F4BF4B /* ExecutableInfo.h */,
                        children = (
                                E35CA14F1DBC3A5600F83516 /* DOMJITAbstractHeap.cpp */,
                                E35CA1501DBC3A5600F83516 /* DOMJITAbstractHeap.h */,
-                               E3555B891DAE03A200F36921 /* DOMJITCallDOMGetterPatchpoint.h */,
+                               E3555B891DAE03A200F36921 /* DOMJITCallDOMGetterSnippet.h */,
                                E3C79CAA1DB9A4D600D1ECA4 /* DOMJITEffect.h */,
                                E3FF752F1D9CEA1200C7E16D /* DOMJITGetterSetter.h */,
                                E35CA1511DBC3A5600F83516 /* DOMJITHeapRange.cpp */,
                                E35CA1521DBC3A5600F83516 /* DOMJITHeapRange.h */,
-                               E3C08E3B1DA41B7B0039478F /* DOMJITPatchpoint.h */,
-                               E37AD83A1DA4928000F3D412 /* DOMJITPatchpointParams.h */,
-                               E37AD83B1DA4928000F3D412 /* DOMJITReg.h */,
                                E35070891DC49BB60089BCD6 /* DOMJITSignature.h */,
-                               E3CB1E241DA7540A00FA1E56 /* DOMJITSlowPathCalls.h */,
-                               E3FFC8521DAD7D1000DEA53E /* DOMJITValue.h */,
                        );
                        path = domjit;
                        sourceTree = "<group>";
                                0F8364B7164B0C110053329A /* DFGBranchDirection.h in Headers */,
                                86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */,
                                0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */,
+                               E3F23A821ECF13FE00978D99 /* Snippet.h in Headers */,
                                0FBDB9AD1AB0FBC6000B57E5 /* DFGCallCreateDirectArgumentsSlowPathGenerator.h in Headers */,
                                0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */,
                                0FFFC95814EF90A200C72532 /* DFGCFAPhase.h in Headers */,
                                0F5A1274192D9FDF008764A3 /* DFGDoesGC.h in Headers */,
                                FE1BD0251E72053800134BC9 /* HeapVerifier.h in Headers */,
                                0FD81AD3154FB4F000983E72 /* DFGDominators.h in Headers */,
-                               E322E5A31DA64439006E7709 /* DFGDOMJITPatchpointParams.h in Headers */,
+                               E322E5A31DA64439006E7709 /* DFGSnippetParams.h in Headers */,
                                0F1E3A471534CBB9000F9456 /* DFGDoubleFormatState.h in Headers */,
                                0FD3C82814115D4F00FD81CB /* DFGDriver.h in Headers */,
                                0F66E16C14DF3F1600B7B2E4 /* DFGEdge.h in Headers */,
                                0F37308F1C0CD68500052BFA /* DisallowMacroScratchRegisterUsage.h in Headers */,
                                0FF42731158EBD54004CB9FF /* Disassembler.h in Headers */,
                                E35CA1561DBC3A5F00F83516 /* DOMJITAbstractHeap.h in Headers */,
-                               E3BFD0BC1DAF808E0065DEA2 /* DOMJITAccessCasePatchpointParams.h in Headers */,
-                               E3555B8A1DAE03A500F36921 /* DOMJITCallDOMGetterPatchpoint.h in Headers */,
+                               E3BFD0BC1DAF808E0065DEA2 /* AccessCaseSnippetParams.h in Headers */,
+                               E3555B8A1DAE03A500F36921 /* DOMJITCallDOMGetterSnippet.h in Headers */,
                                E3C79CAB1DB9A4DC00D1ECA4 /* DOMJITEffect.h in Headers */,
                                E3FF75331D9CEA1800C7E16D /* DOMJITGetterSetter.h in Headers */,
                                E35CA1541DBC3A5C00F83516 /* DOMJITHeapRange.h in Headers */,
                                0F5CF9891E9ED65200C18692 /* AirStackAllocation.h in Headers */,
-                               E3C08E3C1DA41B810039478F /* DOMJITPatchpoint.h in Headers */,
                                534638711E70CF3D00F12AC1 /* JSRunLoopTimer.h in Headers */,
                                FE6F56DE1E64EAD600D17801 /* VMTraps.h in Headers */,
-                               E37AD83C1DA4928600F3D412 /* DOMJITPatchpointParams.h in Headers */,
-                               E37AD83D1DA4928600F3D412 /* DOMJITReg.h in Headers */,
                                E350708A1DC49BBF0089BCD6 /* DOMJITSignature.h in Headers */,
-                               E32FF1EA1DA7571C00A8BF21 /* DOMJITSlowPathCalls.h in Headers */,
-                               E3FFC8531DAD7D1500DEA53E /* DOMJITValue.h in Headers */,
                                A70447EE17A0BD7000F5898E /* DumpContext.h in Headers */,
                                FE318FE01CAC982F00DFCC54 /* ECMAScriptSpecInternalFunctions.h in Headers */,
                                2A83638618D7D0EE0000EBCC /* EdenGCActivityCallback.h in Headers */,
                                147341D21DC02E2E00AA29BA /* EvalExecutable.h in Headers */,
                                A54982041891D0B00081E5B8 /* EventLoop.h in Headers */,
                                FE1C0FFD1B193E9800B53FCA /* Exception.h in Headers */,
+                               E3F23A7F1ECF13EE00978D99 /* SnippetSlowPathCalls.h in Headers */,
                                FE6029D91D6E1E4F0030204D /* ExceptionEventLocation.h in Headers */,
                                0F12DE101979D5FD0006FF4E /* ExceptionFuzz.h in Headers */,
                                BC18C4000E16F5CD00B34460 /* ExceptionHelpers.h in Headers */,
                                0FEA0A0A170513DB00BB722C /* FTLCapabilities.h in Headers */,
                                0FEA0A231709606900BB722C /* FTLCommonValues.h in Headers */,
                                0FEA0A0C170513DB00BB722C /* FTLCompile.h in Headers */,
-                               E322E5A71DA644A8006E7709 /* FTLDOMJITPatchpointParams.h in Headers */,
+                               E322E5A71DA644A8006E7709 /* FTLSnippetParams.h in Headers */,
                                0F9D4C0D1C3E1C11006CD984 /* FTLExceptionTarget.h in Headers */,
                                AD412B341E7B2E9E008AF157 /* WasmContext.h in Headers */,
                                0F235BD417178E1C00690C7F /* FTLExitArgument.h in Headers */,
                                0F32BD111BB34F190093A57F /* HeapHelperPool.h in Headers */,
                                526AC4B71E977C5D003500E1 /* WasmCodeBlock.h in Headers */,
                                C2DA778318E259990066FCB6 /* HeapInlines.h in Headers */,
+                               E3F23A811ECF13FA00978D99 /* SnippetParams.h in Headers */,
                                2AD8932B17E3868F00668276 /* HeapIterationScope.h in Headers */,
                                A5339EC91BB4B4600054F005 /* HeapObserver.h in Headers */,
                                A5398FAB1C750DA40060A963 /* HeapProfiler.h in Headers */,
                                E33F50851B8437A000413856 /* JSInternalPromiseDeferred.h in Headers */,
                                E33F50751B8421C000413856 /* JSInternalPromisePrototype.h in Headers */,
                                A503FA1E188E0FB000110F14 /* JSJavaScriptCallFramePrototype.h in Headers */,
+                               E3F23A801ECF13F500978D99 /* SnippetReg.h in Headers */,
                                7013CA8C1B491A9400CAE613 /* JSJob.h in Headers */,
                                BC18C4160E16F5CD00B34460 /* JSLexicalEnvironment.h in Headers */,
                                534E034E1E4D4B1600213F64 /* AccessCase.h in Headers */,
                                C2981FD817BAEE4B00A3BC98 /* DFGDesiredWeakReferences.cpp in Sources */,
                                0FF427641591A1CC004CB9FF /* DFGDisassembler.cpp in Sources */,
                                0F5A1273192D9FDF008764A3 /* DFGDoesGC.cpp in Sources */,
-                               E322E5A21DA64439006E7709 /* DFGDOMJITPatchpointParams.cpp in Sources */,
+                               E322E5A21DA64439006E7709 /* DFGSnippetParams.cpp in Sources */,
                                0FD3C82614115D4000FD81CB /* DFGDriver.cpp in Sources */,
                                0FF0F19E16B72A0B005DF95B /* DFGEdge.cpp in Sources */,
                                0F8F14331ADF090100ED792C /* DFGEpoch.cpp in Sources */,
                                14386A741DD69895008652C4 /* DirectEvalExecutable.cpp in Sources */,
                                0F9D3370165DBB90005AD387 /* Disassembler.cpp in Sources */,
                                E35CA1551DBC3A5F00F83516 /* DOMJITAbstractHeap.cpp in Sources */,
-                               E3BFD0BB1DAF80870065DEA2 /* DOMJITAccessCasePatchpointParams.cpp in Sources */,
+                               E3BFD0BB1DAF80870065DEA2 /* AccessCaseSnippetParams.cpp in Sources */,
                                E35CA1531DBC3A5C00F83516 /* DOMJITHeapRange.cpp in Sources */,
                                A70447ED17A0BD7000F5898E /* DumpContext.cpp in Sources */,
                                FE318FDF1CAC982700DFCC54 /* ECMAScriptSpecInternalFunctions.cpp in Sources */,
                                0FEA0A09170513DB00BB722C /* FTLCapabilities.cpp in Sources */,
                                0FEA0A271709623B00BB722C /* FTLCommonValues.cpp in Sources */,
                                0FB387921BFD31A100E3AB1E /* FTLCompile.cpp in Sources */,
-                               E322E5A61DA644A8006E7709 /* FTLDOMJITPatchpointParams.cpp in Sources */,
+                               E322E5A61DA644A8006E7709 /* FTLSnippetParams.cpp in Sources */,
                                0F9D4C0C1C3E1C11006CD984 /* FTLExceptionTarget.cpp in Sources */,
                                0F235BD317178E1C00690C7F /* FTLExitArgument.cpp in Sources */,
                                0F235BD517178E1C00690C7F /* FTLExitArgumentForOperand.cpp in Sources */,
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "DOMJITAccessCasePatchpointParams.h"
+#include "AccessCaseSnippetParams.h"
 
 #include "LinkBuffer.h"
 #include "PolymorphicAccess.h"
@@ -35,7 +35,7 @@
 namespace JSC {
 
 template<typename JumpType, typename FunctionType, typename ResultType, typename... Arguments>
-class SlowPathCallGeneratorWithArguments : public DOMJITAccessCasePatchpointParams::SlowPathCallGenerator {
+class SlowPathCallGeneratorWithArguments : public AccessCaseSnippetParams::SlowPathCallGenerator {
 public:
     SlowPathCallGeneratorWithArguments(JumpType from, CCallHelpers::Label to, FunctionType function, ResultType result, std::tuple<Arguments...> arguments)
         : m_from(from)
@@ -47,11 +47,11 @@ public:
     }
 
     template<size_t... ArgumentsIndex>
-    CCallHelpers::JumpList generateImpl(AccessGenerationState& state, const RegisterSet& usedRegistersByPatchpoint, CCallHelpers& jit, std::index_sequence<ArgumentsIndex...>)
+    CCallHelpers::JumpList generateImpl(AccessGenerationState& state, const RegisterSet& usedRegistersBySnippet, CCallHelpers& jit, std::index_sequence<ArgumentsIndex...>)
     {
         CCallHelpers::JumpList exceptions;
-        // We spill (1) the used registers by IC and (2) the used registers by DOMJIT::Patchpoint.
-        AccessGenerationState::SpillState spillState = state.preserveLiveRegistersToStackForCall(usedRegistersByPatchpoint);
+        // We spill (1) the used registers by IC and (2) the used registers by Snippet.
+        AccessGenerationState::SpillState spillState = state.preserveLiveRegistersToStackForCall(usedRegistersBySnippet);
 
         jit.store32(
             CCallHelpers::TrustedImm32(state.callSiteIndexForExceptionHandlingOrOriginal().bits()),
@@ -86,10 +86,10 @@ public:
         return exceptions;
     }
 
-    CCallHelpers::JumpList generate(AccessGenerationState& state, const RegisterSet& usedRegistersByPatchpoint, CCallHelpers& jit) override
+    CCallHelpers::JumpList generate(AccessGenerationState& state, const RegisterSet& usedRegistersBySnippet, CCallHelpers& jit) override
     {
         m_from.link(&jit);
-        CCallHelpers::JumpList exceptions = generateImpl(state, usedRegistersByPatchpoint, jit, std::make_index_sequence<std::tuple_size<std::tuple<Arguments...>>::value>());
+        CCallHelpers::JumpList exceptions = generateImpl(state, usedRegistersBySnippet, jit, std::make_index_sequence<std::tuple_size<std::tuple<Arguments...>>::value>());
         jit.jump().linkTo(m_to, &jit);
         return exceptions;
     }
@@ -103,20 +103,20 @@ protected:
 };
 
 #define JSC_DEFINE_CALL_OPERATIONS(OperationType, ResultType, ...) \
-    void DOMJITAccessCasePatchpointParams::addSlowPathCallImpl(CCallHelpers::JumpList from, CCallHelpers& jit, OperationType operation, ResultType result, std::tuple<__VA_ARGS__> args) \
+    void AccessCaseSnippetParams::addSlowPathCallImpl(CCallHelpers::JumpList from, CCallHelpers& jit, OperationType operation, ResultType result, std::tuple<__VA_ARGS__> args) \
     { \
         CCallHelpers::Label to = jit.label(); \
         m_generators.append(std::make_unique<SlowPathCallGeneratorWithArguments<CCallHelpers::JumpList, OperationType, ResultType, __VA_ARGS__>>(from, to, operation, result, args)); \
     } \
 
-DOMJIT_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
+SNIPPET_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
 #undef JSC_DEFINE_CALL_OPERATIONS
 
-CCallHelpers::JumpList DOMJITAccessCasePatchpointParams::emitSlowPathCalls(AccessGenerationState& state, const RegisterSet& usedRegistersByPatchpoint, CCallHelpers& jit)
+CCallHelpers::JumpList AccessCaseSnippetParams::emitSlowPathCalls(AccessGenerationState& state, const RegisterSet& usedRegistersBySnippet, CCallHelpers& jit)
 {
     CCallHelpers::JumpList exceptions;
     for (auto& generator : m_generators)
-        exceptions.append(generator->generate(state, usedRegistersByPatchpoint, jit));
+        exceptions.append(generator->generate(state, usedRegistersBySnippet, jit));
     return exceptions;
 }
 
 
 #if ENABLE(JIT)
 
-#include "DOMJITPatchpointParams.h"
+#include "SnippetParams.h"
 
 namespace JSC {
 
 struct AccessGenerationState;
 
-class DOMJITAccessCasePatchpointParams : public DOMJIT::PatchpointParams {
+class AccessCaseSnippetParams : public SnippetParams {
 public:
-    DOMJITAccessCasePatchpointParams(VM& vm, Vector<DOMJIT::Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
-        : DOMJIT::PatchpointParams(vm, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch))
+    AccessCaseSnippetParams(VM& vm, Vector<Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
+        : SnippetParams(vm, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch))
     {
     }
 
     class SlowPathCallGenerator {
     public:
         virtual ~SlowPathCallGenerator() { }
-        virtual CCallHelpers::JumpList generate(AccessGenerationState&, const RegisterSet& usedRegistersByPatchpoint, CCallHelpers&) = 0;
+        virtual CCallHelpers::JumpList generate(AccessGenerationState&, const RegisterSet& usedRegistersBySnippet, CCallHelpers&) = 0;
     };
 
-    CCallHelpers::JumpList emitSlowPathCalls(AccessGenerationState&, const RegisterSet& usedRegistersByPatchpoint, CCallHelpers&);
+    CCallHelpers::JumpList emitSlowPathCalls(AccessGenerationState&, const RegisterSet& usedRegistersBySnippet, CCallHelpers&);
 
 private:
 #define JSC_DEFINE_CALL_OPERATIONS(OperationType, ResultType, ...) void addSlowPathCallImpl(CCallHelpers::JumpList, CCallHelpers&, OperationType, ResultType, std::tuple<__VA_ARGS__> args) override;
-    DOMJIT_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
+    SNIPPET_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
 #undef JSC_DEFINE_CALL_OPERATIONS
     Vector<std::unique_ptr<SlowPathCallGenerator>> m_generators;
 };
index ae7ad76..460984e 100644 (file)
@@ -28,8 +28,8 @@
 
 #if ENABLE(JIT)
 
-#include "DOMJITAccessCasePatchpointParams.h"
-#include "DOMJITCallDOMGetterPatchpoint.h"
+#include "AccessCaseSnippetParams.h"
+#include "DOMJITCallDOMGetterSnippet.h"
 #include "DOMJITGetterSetter.h"
 #include "HeapInlines.h"
 #include "JSCJSValueInlines.h"
@@ -122,12 +122,12 @@ void GetterSetterAccessCase::emitDOMJITGetter(AccessGenerationState& state, GPRR
     GPRReg baseGPR = state.baseGPR;
     GPRReg scratchGPR = state.scratchGPR;
 
-    // We construct the environment that can execute the DOMJIT::Patchpoint here.
-    Ref<DOMJIT::CallDOMGetterPatchpoint> patchpoint = domJIT()->callDOMGetter();
+    // We construct the environment that can execute the DOMJIT::Snippet here.
+    Ref<DOMJIT::CallDOMGetterSnippet> snippet = domJIT()->callDOMGetter();
 
     Vector<GPRReg> gpScratch;
     Vector<FPRReg> fpScratch;
-    Vector<DOMJIT::Value> regs;
+    Vector<SnippetParams::Value> regs;
 
     ScratchRegisterAllocator allocator(stubInfo.patch.usedRegisters);
     allocator.lock(baseGPR);
@@ -144,18 +144,18 @@ void GetterSetterAccessCase::emitDOMJITGetter(AccessGenerationState& state, GPRR
 
     // valueRegs and baseForGetGPR may be the same. For example, in Baseline JIT, we pass the same regT0 for baseGPR and valueRegs.
     // In FTL, there is no constraint that the baseForGetGPR interferes with the result. To make implementation simple in
-    // DOMJIT::Patchpoint, DOMJIT::Patchpoint assumes that result registers always early interfere with input registers, in this case,
+    // Snippet, Snippet assumes that result registers always early interfere with input registers, in this case,
     // baseForGetGPR. So we move baseForGetGPR to the other register if baseForGetGPR == valueRegs.
     if (baseForGetGPR != valueRegs.payloadGPR()) {
         paramBaseGPR = baseForGetGPR;
-        if (!patchpoint->requireGlobalObject)
+        if (!snippet->requireGlobalObject)
             remainingScratchGPR = scratchGPR;
         else
             paramGlobalObjectGPR = scratchGPR;
     } else {
         jit.move(valueRegs.payloadGPR(), scratchGPR);
         paramBaseGPR = scratchGPR;
-        if (patchpoint->requireGlobalObject)
+        if (snippet->requireGlobalObject)
             paramGlobalObjectGPR = allocator.allocateScratchGPR();
     }
 
@@ -163,22 +163,22 @@ void GetterSetterAccessCase::emitDOMJITGetter(AccessGenerationState& state, GPRR
 
     regs.append(paramValueRegs);
     regs.append(paramBaseGPR);
-    if (patchpoint->requireGlobalObject) {
+    if (snippet->requireGlobalObject) {
         ASSERT(paramGlobalObjectGPR != InvalidGPRReg);
-        regs.append(DOMJIT::Value(paramGlobalObjectGPR, globalObjectForDOMJIT));
+        regs.append(SnippetParams::Value(paramGlobalObjectGPR, globalObjectForDOMJIT));
     }
 
-    if (patchpoint->numGPScratchRegisters) {
+    if (snippet->numGPScratchRegisters) {
         unsigned i = 0;
         if (remainingScratchGPR != InvalidGPRReg) {
             gpScratch.append(remainingScratchGPR);
             ++i;
         }
-        for (; i < patchpoint->numGPScratchRegisters; ++i)
+        for (; i < snippet->numGPScratchRegisters; ++i)
             gpScratch.append(allocator.allocateScratchGPR());
     }
 
-    for (unsigned i = 0; i < patchpoint->numFPScratchRegisters; ++i)
+    for (unsigned i = 0; i < snippet->numFPScratchRegisters; ++i)
         fpScratch.append(allocator.allocateScratchFPR());
 
     // Let's store the reused registers to the stack. After that, we can use allocated scratch registers.
@@ -193,20 +193,20 @@ void GetterSetterAccessCase::emitDOMJITGetter(AccessGenerationState& state, GPRR
         if (paramGlobalObjectGPR != InvalidGPRReg)
             dataLog("paramGlobalObjectGPR = ", paramGlobalObjectGPR, "\n");
         dataLog("paramValueRegs = ", paramValueRegs, "\n");
-        for (unsigned i = 0; i < patchpoint->numGPScratchRegisters; ++i)
+        for (unsigned i = 0; i < snippet->numGPScratchRegisters; ++i)
             dataLog("gpScratch[", i, "] = ", gpScratch[i], "\n");
     }
 
-    if (patchpoint->requireGlobalObject)
+    if (snippet->requireGlobalObject)
         jit.move(CCallHelpers::TrustedImmPtr(globalObjectForDOMJIT), paramGlobalObjectGPR);
 
-    // We just spill the registers used in DOMJIT::Patchpoint here. For not spilled registers here explicitly,
+    // We just spill the registers used in Snippet here. For not spilled registers here explicitly,
     // they must be in the used register set passed by the callers (Baseline, DFG, and FTL) if they need to be kept.
     // Some registers can be locked, but not in the used register set. For example, the caller could make baseGPR
     // same to valueRegs, and not include it in the used registers since it will be changed.
     RegisterSet registersToSpillForCCall;
     for (auto& value : regs) {
-        DOMJIT::Reg reg = value.reg();
+        SnippetReg reg = value.reg();
         if (reg.isJSValueRegs())
             registersToSpillForCCall.set(reg.jsValueRegs());
         else if (reg.isGPR())
@@ -220,8 +220,8 @@ void GetterSetterAccessCase::emitDOMJITGetter(AccessGenerationState& state, GPRR
         registersToSpillForCCall.set(reg);
     registersToSpillForCCall.exclude(RegisterSet::registersToNotSaveForCCall());
 
-    DOMJITAccessCasePatchpointParams params(state.m_vm, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
-    patchpoint->generator()->run(jit, params);
+    AccessCaseSnippetParams params(state.m_vm, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
+    snippet->generator()->run(jit, params);
     allocator.restoreReusedRegistersByPopping(jit, preservedState);
     state.succeed();
     
index d8ba898..c8ddda5 100644 (file)
@@ -2406,8 +2406,8 @@ bool AbstractInterpreter<AbstractStateType>::executeEffects(unsigned clobberLimi
     }
     case CallDOMGetter: {
         CallDOMGetterData* callDOMGetterData = node->callDOMGetterData();
-        DOMJIT::CallDOMGetterPatchpoint* patchpoint = callDOMGetterData->patchpoint;
-        if (patchpoint->effect.writes)
+        DOMJIT::CallDOMGetterSnippet* snippet = callDOMGetterData->snippet;
+        if (snippet->effect.writes)
             clobberWorld(node->origin.semantic, clobberLimit);
         forNode(node).setType(m_graph, callDOMGetterData->domJIT->resultType());
         break;
index d5d0f82..57cdbfb 100644 (file)
@@ -2975,8 +2975,8 @@ bool ByteCodeParser::handleIntrinsicGetter(int resultOperand, const GetByIdVaria
 
 static void blessCallDOMGetter(Node* node)
 {
-    DOMJIT::CallDOMGetterPatchpoint* patchpoint = node->callDOMGetterData()->patchpoint;
-    if (!patchpoint->effect.mustGenerate())
+    DOMJIT::CallDOMGetterSnippet* snippet = node->callDOMGetterData()->snippet;
+    if (!snippet->effect.mustGenerate())
         node->clearFlags(NodeMustGenerate);
 }
 
@@ -2997,16 +2997,16 @@ bool ByteCodeParser::handleDOMJITGetter(int resultOperand, const GetByIdVariant&
     addToGraph(CheckSubClass, OpInfo(domJIT->thisClassInfo()), thisNode);
 
     CallDOMGetterData* callDOMGetterData = m_graph.m_callDOMGetterData.add();
-    Ref<DOMJIT::CallDOMGetterPatchpoint> callDOMGetterPatchpoint = domJIT->callDOMGetter();
-    m_graph.m_domJITPatchpoints.append(callDOMGetterPatchpoint.ptr());
+    Ref<DOMJIT::CallDOMGetterSnippet> callDOMGetterSnippet = domJIT->callDOMGetter();
+    m_graph.m_domJITSnippets.append(callDOMGetterSnippet.copyRef());
 
     callDOMGetterData->domJIT = domJIT;
-    callDOMGetterData->patchpoint = callDOMGetterPatchpoint.ptr();
+    callDOMGetterData->snippet = callDOMGetterSnippet.ptr();
     callDOMGetterData->identifierNumber = identifierNumber;
 
     Node* callDOMGetterNode = nullptr;
     // GlobalObject of thisNode is always used to create a DOMWrapper.
-    if (callDOMGetterPatchpoint->requireGlobalObject) {
+    if (callDOMGetterSnippet->requireGlobalObject) {
         Node* globalObject = addToGraph(GetGlobalObject, thisNode);
         callDOMGetterNode = addToGraph(CallDOMGetter, OpInfo(callDOMGetterData), OpInfo(prediction), thisNode, globalObject);
     } else
index f783435..bd6e713 100644 (file)
@@ -33,7 +33,7 @@
 #include "DFGHeapLocation.h"
 #include "DFGLazyNode.h"
 #include "DFGPureValue.h"
-#include "DOMJITCallDOMGetterPatchpoint.h"
+#include "DOMJITCallDOMGetterSnippet.h"
 #include "DOMJITSignature.h"
 
 namespace JSC { namespace DFG {
@@ -992,8 +992,8 @@ void clobberize(Graph& graph, Node* node, const ReadFunctor& read, const WriteFu
         return;
 
     case CallDOMGetter: {
-        DOMJIT::CallDOMGetterPatchpoint* patchpoint = node->callDOMGetterData()->patchpoint;
-        DOMJIT::Effect effect = patchpoint->effect;
+        DOMJIT::CallDOMGetterSnippet* snippet = node->callDOMGetterData()->snippet;
+        DOMJIT::Effect effect = snippet->effect;
         if (effect.reads) {
             if (effect.reads == DOMJIT::HeapRange::top())
                 read(World);
index a30f142..8edcfab 100644 (file)
@@ -1883,9 +1883,9 @@ private:
         }
 
         case CallDOMGetter: {
-            DOMJIT::CallDOMGetterPatchpoint* patchpoint = node->callDOMGetterData()->patchpoint;
+            DOMJIT::CallDOMGetterSnippet* snippet = node->callDOMGetterData()->snippet;
             fixEdge<CellUse>(node->child1()); // DOM.
-            if (patchpoint->requireGlobalObject)
+            if (snippet->requireGlobalObject)
                 fixEdge<KnownCellUse>(node->child2()); // GlobalObject.
             break;
         }
index e9a5705..e34beb3 100644 (file)
@@ -979,7 +979,7 @@ public:
     HashMap<CodeBlock*, std::unique_ptr<BytecodeKills>> m_bytecodeKills;
     HashSet<std::pair<JSObject*, PropertyOffset>> m_safeToLoad;
     HashMap<PropertyTypeKey, InferredType::Descriptor> m_inferredTypes;
-    Vector<RefPtr<DOMJIT::Patchpoint>> m_domJITPatchpoints;
+    Vector<Ref<Snippet>> m_domJITSnippets;
     std::unique_ptr<Dominators> m_dominators;
     std::unique_ptr<PrePostNumbering> m_prePostNumbering;
     std::unique_ptr<NaturalLoops> m_naturalLoops;
index 66b3f10..0722652 100644 (file)
@@ -64,8 +64,7 @@ namespace JSC {
 
 namespace DOMJIT {
 class GetterSetter;
-class Patchpoint;
-class CallDOMGetterPatchpoint;
+class CallDOMGetterSnippet;
 class Signature;
 }
 
@@ -73,6 +72,8 @@ namespace Profiler {
 class ExecutionCounter;
 }
 
+class Snippet;
+
 namespace DFG {
 
 class Graph;
@@ -239,7 +240,7 @@ struct StackAccessData {
 
 struct CallDOMGetterData {
     DOMJIT::GetterSetter* domJIT { nullptr };
-    DOMJIT::CallDOMGetterPatchpoint* patchpoint { nullptr };
+    DOMJIT::CallDOMGetterSnippet* snippet { nullptr };
     unsigned identifierNumber { 0 };
 };
 
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "DFGDOMJITPatchpointParams.h"
+#include "DFGSnippetParams.h"
 
 #if ENABLE(DFG_JIT)
 
@@ -40,12 +40,12 @@ static void dispatch(SpeculativeJIT* jit, CCallHelpers::JumpList from, Operation
 }
 
 #define JSC_DEFINE_CALL_OPERATIONS(OperationType, ResultType, ...) \
-    void DOMJITPatchpointParams::addSlowPathCallImpl(CCallHelpers::JumpList from, CCallHelpers&, OperationType operation, ResultType result, std::tuple<__VA_ARGS__> args) \
+    void SnippetParams::addSlowPathCallImpl(CCallHelpers::JumpList from, CCallHelpers&, OperationType operation, ResultType result, std::tuple<__VA_ARGS__> args) \
     { \
         dispatch(m_jit, from, operation, result, args, std::make_index_sequence<std::tuple_size<decltype(args)>::value>()); \
     } \
 
-DOMJIT_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
+SNIPPET_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
 #undef JSC_DEFINE_CALL_OPERATIONS
 
 } }
 #if ENABLE(DFG_JIT)
 
 #include "DFGSpeculativeJIT.h"
-#include "DOMJITPatchpointParams.h"
+#include "Snippet.h"
+#include "SnippetParams.h"
 
 namespace JSC { namespace DFG {
     
 class SpeculativeJIT;
 
-class DOMJITPatchpointParams : public DOMJIT::PatchpointParams {
+class SnippetParams : public JSC::SnippetParams {
 public:
-    DOMJITPatchpointParams(SpeculativeJIT* jit, Vector<DOMJIT::Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
-        : DOMJIT::PatchpointParams(jit->vm(), WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch))
+    SnippetParams(SpeculativeJIT* jit, Vector<Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
+        : JSC::SnippetParams(jit->vm(), WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch))
         , m_jit(jit)
     {
     }
 
 private:
 #define JSC_DEFINE_CALL_OPERATIONS(OperationType, ResultType, ...) void addSlowPathCallImpl(CCallHelpers::JumpList, CCallHelpers&, OperationType, ResultType, std::tuple<__VA_ARGS__> args) override;
-    DOMJIT_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
+    SNIPPET_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
 #undef JSC_DEFINE_CALL_OPERATIONS
 
     SpeculativeJIT* m_jit;
index 20d0271..2f1b581 100644 (file)
 #include "DFGCallArrayAllocatorSlowPathGenerator.h"
 #include "DFGCallCreateDirectArgumentsSlowPathGenerator.h"
 #include "DFGCapabilities.h"
-#include "DFGDOMJITPatchpointParams.h"
 #include "DFGMayExit.h"
 #include "DFGOSRExitFuzz.h"
 #include "DFGSaneStringGetByValSlowPathGenerator.h"
 #include "DFGSlowPathGenerator.h"
-#include "DOMJITPatchpoint.h"
+#include "DFGSnippetParams.h"
 #include "DirectArguments.h"
 #include "JITAddGenerator.h"
 #include "JITBitAndGenerator.h"
@@ -7771,15 +7770,15 @@ void SpeculativeJIT::compileGetButterfly(Node* node)
     storageResult(resultGPR, node);
 }
 
-static void allocateTemporaryRegistersForPatchpoint(SpeculativeJIT* jit, Vector<GPRTemporary>& gpHolders, Vector<FPRTemporary>& fpHolders, Vector<GPRReg>& gpScratch, Vector<FPRReg>& fpScratch, DOMJIT::Patchpoint& patchpoint)
+static void allocateTemporaryRegistersForSnippet(SpeculativeJIT* jit, Vector<GPRTemporary>& gpHolders, Vector<FPRTemporary>& fpHolders, Vector<GPRReg>& gpScratch, Vector<FPRReg>& fpScratch, Snippet& snippet)
 {
-    for (unsigned i = 0; i < patchpoint.numGPScratchRegisters; ++i) {
+    for (unsigned i = 0; i < snippet.numGPScratchRegisters; ++i) {
         GPRTemporary temporary(jit);
         gpScratch.append(temporary.gpr());
         gpHolders.append(WTFMove(temporary));
     }
 
-    for (unsigned i = 0; i < patchpoint.numFPScratchRegisters; ++i) {
+    for (unsigned i = 0; i < snippet.numFPScratchRegisters; ++i) {
         FPRTemporary temporary(jit);
         fpScratch.append(temporary.fpr());
         fpHolders.append(WTFMove(temporary));
@@ -7870,38 +7869,38 @@ void SpeculativeJIT::compileCallDOM(Node* node)
 
 void SpeculativeJIT::compileCallDOMGetter(Node* node)
 {
-    DOMJIT::CallDOMGetterPatchpoint* patchpoint = node->callDOMGetterData()->patchpoint;
+    DOMJIT::CallDOMGetterSnippet* snippet = node->callDOMGetterData()->snippet;
 
     Vector<GPRReg> gpScratch;
     Vector<FPRReg> fpScratch;
-    Vector<DOMJIT::Value> regs;
+    Vector<SnippetParams::Value> regs;
 
     JSValueRegsTemporary result(this);
     regs.append(result.regs());
 
     Edge& baseEdge = node->child1();
     SpeculateCellOperand base(this, baseEdge);
-    regs.append(DOMJIT::Value(base.gpr(), m_state.forNode(baseEdge).value()));
+    regs.append(SnippetParams::Value(base.gpr(), m_state.forNode(baseEdge).value()));
 
     std::optional<SpeculateCellOperand> globalObject;
-    if (patchpoint->requireGlobalObject) {
+    if (snippet->requireGlobalObject) {
         Edge& globalObjectEdge = node->child2();
         globalObject.emplace(this, globalObjectEdge);
-        regs.append(DOMJIT::Value(globalObject->gpr(), m_state.forNode(globalObjectEdge).value()));
+        regs.append(SnippetParams::Value(globalObject->gpr(), m_state.forNode(globalObjectEdge).value()));
     }
 
     Vector<GPRTemporary> gpTempraries;
     Vector<FPRTemporary> fpTempraries;
-    allocateTemporaryRegistersForPatchpoint(this, gpTempraries, fpTempraries, gpScratch, fpScratch, *patchpoint);
-    DOMJITPatchpointParams params(this, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
-    patchpoint->generator()->run(m_jit, params);
+    allocateTemporaryRegistersForSnippet(this, gpTempraries, fpTempraries, gpScratch, fpScratch, *snippet);
+    SnippetParams params(this, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
+    snippet->generator()->run(m_jit, params);
     jsValueResult(result.regs(), node);
 }
 
 void SpeculativeJIT::compileCheckSubClass(Node* node)
 {
     const ClassInfo* classInfo = node->classInfo();
-    if (!classInfo->checkSubClassPatchpoint) {
+    if (!classInfo->checkSubClassSnippet) {
         SpeculateCellOperand base(this, node->child1());
         GPRTemporary other(this);
         GPRTemporary specified(this);
@@ -7924,22 +7923,22 @@ void SpeculativeJIT::compileCheckSubClass(Node* node)
         return;
     }
 
-    RefPtr<DOMJIT::Patchpoint> patchpoint = classInfo->checkSubClassPatchpoint();
+    Ref<Snippet> snippet = classInfo->checkSubClassSnippet();
 
     Vector<GPRReg> gpScratch;
     Vector<FPRReg> fpScratch;
-    Vector<DOMJIT::Value> regs;
+    Vector<SnippetParams::Value> regs;
 
     SpeculateCellOperand base(this, node->child1());
     GPRReg baseGPR = base.gpr();
-    regs.append(DOMJIT::Value(baseGPR, m_state.forNode(node->child1()).value()));
+    regs.append(SnippetParams::Value(baseGPR, m_state.forNode(node->child1()).value()));
 
     Vector<GPRTemporary> gpTempraries;
     Vector<FPRTemporary> fpTempraries;
-    allocateTemporaryRegistersForPatchpoint(this, gpTempraries, fpTempraries, gpScratch, fpScratch, *patchpoint);
+    allocateTemporaryRegistersForSnippet(this, gpTempraries, fpTempraries, gpScratch, fpScratch, snippet.get());
 
-    DOMJITPatchpointParams params(this, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
-    CCallHelpers::JumpList failureCases = patchpoint->generator()->run(m_jit, params);
+    SnippetParams params(this, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
+    CCallHelpers::JumpList failureCases = snippet->generator()->run(m_jit, params);
     speculationCheck(BadType, JSValueSource::unboxedCell(baseGPR), node->child1(), failureCases);
     noResult(node);
 }
 #if ENABLE(JIT)
 
 #include "DOMJITEffect.h"
-#include "DOMJITPatchpoint.h"
 #include "RegisterSet.h"
+#include "Snippet.h"
 
 namespace JSC { namespace DOMJIT {
 
-class CallDOMGetterPatchpoint : public Patchpoint {
+class CallDOMGetterSnippet : public Snippet {
 public:
-    static Ref<CallDOMGetterPatchpoint> create()
+    static Ref<CallDOMGetterSnippet> create()
     {
-        return adoptRef(*new CallDOMGetterPatchpoint());
+        return adoptRef(*new CallDOMGetterSnippet());
     }
 
     // To look up DOMWrapper cache, GlobalObject is required.
-    // FIXME: Later, we will extend this patchpoint to represent the result type by DOMJIT::Signature.
+    // FIXME: Later, we will extend this snippet to represent the result type by DOMJIT::Signature.
     // And after that, we will automatically pass a global object when the result type includes a DOM wrapper thing.
     // https://bugs.webkit.org/show_bug.cgi?id=162980
     bool requireGlobalObject { true };
@@ -49,7 +49,7 @@ public:
     Effect effect { };
 
 private:
-    CallDOMGetterPatchpoint() = default;
+    CallDOMGetterSnippet() = default;
 };
 
 } }
index a255b69..2cf3f3c 100644 (file)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#include "DOMJITCallDOMGetterPatchpoint.h"
+#include "DOMJITCallDOMGetterSnippet.h"
 #include "PropertySlot.h"
 #include "PutPropertySlot.h"
 #include "SpeculatedType.h"
@@ -53,7 +53,7 @@ public:
     SpeculatedType resultType() const { return m_resultType; }
 
 #if ENABLE(JIT)
-    virtual Ref<DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() = 0;
+    virtual Ref<CallDOMGetterSnippet> callDOMGetter() = 0;
 #endif
 
 private:
index 29cd7a8..8dd9c14 100644 (file)
@@ -37,10 +37,6 @@ namespace JSC { namespace DOMJIT {
 #define JSC_DOMJIT_SIGNATURE_MAX_ARGUMENTS 2
 #define JSC_DOMJIT_SIGNATURE_MAX_ARGUMENTS_INCLUDING_THIS (1 + JSC_DOMJIT_SIGNATURE_MAX_ARGUMENTS)
 
-class Patchpoint;
-
-typedef Ref<Patchpoint> CheckDOMGeneratorFunction(void);
-
 class Signature {
 public:
     template<typename... Arguments>
diff --git a/Source/JavaScriptCore/domjit/DOMJITValue.h b/Source/JavaScriptCore/domjit/DOMJITValue.h
deleted file mode 100644 (file)
index de6cb93..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2016 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "DOMJITReg.h"
-
-#if ENABLE(JIT)
-
-namespace JSC { namespace DOMJIT {
-
-class Value {
-public:
-    Value(Reg reg)
-        : m_reg(reg)
-    {
-    }
-
-    Value(Reg reg, JSValue value)
-        : m_reg(reg)
-        , m_value(value)
-    {
-    }
-
-    bool isGPR() const { return m_reg.isGPR(); }
-    bool isFPR() const { return m_reg.isFPR(); }
-    bool isJSValueRegs() const { return m_reg.isJSValueRegs(); }
-    GPRReg gpr() const { return m_reg.gpr(); }
-    FPRReg fpr() const { return m_reg.fpr(); }
-    JSValueRegs jsValueRegs() const { return m_reg.jsValueRegs(); }
-
-    Reg reg() const
-    {
-        return m_reg;
-    }
-
-    JSValue value() const
-    {
-        return m_value;
-    }
-
-private:
-    Reg m_reg;
-    JSValue m_value;
-};
-
-} }
-
-#endif
index 99e0410..9924b8f 100644 (file)
 #include "DFGInPlaceAbstractState.h"
 #include "DFGOSRAvailabilityAnalysisPhase.h"
 #include "DFGOSRExitFuzz.h"
-#include "DOMJITPatchpoint.h"
 #include "DirectArguments.h"
 #include "FTLAbstractHeapRepository.h"
 #include "FTLAvailableRecovery.h"
-#include "FTLDOMJITPatchpointParams.h"
 #include "FTLExceptionTarget.h"
 #include "FTLForOSREntryJITCode.h"
 #include "FTLFormattedValue.h"
@@ -58,6 +56,7 @@
 #include "FTLOperations.h"
 #include "FTLOutput.h"
 #include "FTLPatchpointExceptionHandle.h"
+#include "FTLSnippetParams.h"
 #include "FTLThunks.h"
 #include "FTLWeightedTarget.h"
 #include "JITAddGenerator.h"
@@ -10207,7 +10206,7 @@ private:
         LValue cell = lowCell(m_node->child1());
 
         const ClassInfo* classInfo = m_node->classInfo();
-        if (!classInfo->checkSubClassPatchpoint) {
+        if (!classInfo->checkSubClassSnippet) {
             LBasicBlock loop = m_out.newBlock();
             LBasicBlock parentClass = m_out.newBlock();
             LBasicBlock continuation = m_out.newBlock();
@@ -10230,7 +10229,7 @@ private:
             return;
         }
 
-        RefPtr<DOMJIT::Patchpoint> domJIT = classInfo->checkSubClassPatchpoint();
+        RefPtr<Snippet> domJIT = classInfo->checkSubClassSnippet();
         PatchpointValue* patchpoint = m_out.patchpoint(Void);
         patchpoint->appendSomeRegister(cell);
         patchpoint->append(m_tagMask, ValueRep::reg(GPRInfo::tagMaskRegister));
@@ -10255,9 +10254,9 @@ private:
 
                 Vector<GPRReg> gpScratch;
                 Vector<FPRReg> fpScratch;
-                Vector<DOMJIT::Value> regs;
+                Vector<SnippetParams::Value> regs;
 
-                regs.append(DOMJIT::Value(params[0].gpr(), child1Constant));
+                regs.append(SnippetParams::Value(params[0].gpr(), child1Constant));
 
                 for (unsigned i = 0; i < domJIT->numGPScratchRegisters; ++i)
                     gpScratch.append(params.gpScratch(i));
@@ -10267,7 +10266,7 @@ private:
 
                 RefPtr<OSRExitHandle> handle = exitDescriptor->emitOSRExitLater(*state, BadType, origin, params, osrExitArgumentOffset);
 
-                DOMJITPatchpointParams domJITParams(*state, params, node, nullptr, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
+                SnippetParams domJITParams(*state, params, node, nullptr, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
                 CCallHelpers::JumpList failureCases = domJIT->generator()->run(jit, domJITParams);
 
                 jit.addLinkTask([=] (LinkBuffer& linkBuffer) {
@@ -10330,7 +10329,7 @@ private:
 
     void compileCallDOMGetter()
     {
-        DOMJIT::CallDOMGetterPatchpoint* domJIT = m_node->callDOMGetterData()->patchpoint;
+        DOMJIT::CallDOMGetterSnippet* domJIT = m_node->callDOMGetterData()->snippet;
 
         Edge& baseEdge = m_node->child1();
         LValue base = lowCell(baseEdge);
@@ -10364,12 +10363,12 @@ private:
 
                 Vector<GPRReg> gpScratch;
                 Vector<FPRReg> fpScratch;
-                Vector<DOMJIT::Value> regs;
+                Vector<SnippetParams::Value> regs;
 
                 regs.append(JSValueRegs(params[0].gpr()));
-                regs.append(DOMJIT::Value(params[1].gpr(), baseConstant));
+                regs.append(SnippetParams::Value(params[1].gpr(), baseConstant));
                 if (domJIT->requireGlobalObject)
-                    regs.append(DOMJIT::Value(params[2].gpr(), globalObjectConstant));
+                    regs.append(SnippetParams::Value(params[2].gpr(), globalObjectConstant));
 
                 for (unsigned i = 0; i < domJIT->numGPScratchRegisters; ++i)
                     gpScratch.append(params.gpScratch(i));
@@ -10379,7 +10378,7 @@ private:
 
                 Box<CCallHelpers::JumpList> exceptions = exceptionHandle->scheduleExitCreation(params)->jumps(jit);
 
-                DOMJITPatchpointParams domJITParams(*state, params, node, exceptions, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
+                SnippetParams domJITParams(*state, params, node, exceptions, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
                 domJIT->generator()->run(jit, domJITParams);
             });
         patchpoint->effects = Effects::forCall();
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "FTLDOMJITPatchpointParams.h"
+#include "FTLSnippetParams.h"
 
 #if ENABLE(FTL_JIT)
 
@@ -50,12 +50,12 @@ static void dispatch(CCallHelpers& jit, FTL::State* state, const B3::StackmapGen
 }
 
 #define JSC_DEFINE_CALL_OPERATIONS(OperationType, ResultType, ...) \
-    void DOMJITPatchpointParams::addSlowPathCallImpl(CCallHelpers::JumpList from, CCallHelpers& jit, OperationType operation, ResultType result, std::tuple<__VA_ARGS__> args) \
+    void SnippetParams::addSlowPathCallImpl(CCallHelpers::JumpList from, CCallHelpers& jit, OperationType operation, ResultType result, std::tuple<__VA_ARGS__> args) \
     { \
         dispatch(jit, &m_state, m_params, m_node, m_exceptions, from, operation, result, args, std::make_index_sequence<std::tuple_size<decltype(args)>::value>()); \
     } \
 
-DOMJIT_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
+SNIPPET_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
 #undef JSC_DEFINE_CALL_OPERATIONS
 
 } }
 #if ENABLE(FTL_JIT)
 
 #include "B3StackmapGenerationParams.h"
-#include "DOMJITPatchpointParams.h"
 #include "FTLState.h"
+#include "Snippet.h"
+#include "SnippetParams.h"
 
 namespace JSC { namespace FTL {
 
 class State;
 
-class DOMJITPatchpointParams : public DOMJIT::PatchpointParams {
+class SnippetParams : public JSC::SnippetParams {
 public:
-    DOMJITPatchpointParams(State& state, const B3::StackmapGenerationParams& params, DFG::Node* node, Box<CCallHelpers::JumpList> exceptions, Vector<DOMJIT::Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
-        : DOMJIT::PatchpointParams(state.vm(), WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch))
+    SnippetParams(State& state, const B3::StackmapGenerationParams& params, DFG::Node* node, Box<CCallHelpers::JumpList> exceptions, Vector<Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
+        : JSC::SnippetParams(state.vm(), WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch))
         , m_state(state)
         , m_params(params)
         , m_node(node)
@@ -48,7 +49,7 @@ public:
 
 private:
 #define JSC_DEFINE_CALL_OPERATIONS(OperationType, ResultType, ...) void addSlowPathCallImpl(CCallHelpers::JumpList, CCallHelpers&, OperationType, ResultType, std::tuple<__VA_ARGS__> args) override;
-    DOMJIT_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
+    SNIPPET_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
 #undef JSC_DEFINE_CALL_OPERATIONS
 
     State& m_state;
similarity index 69%
rename from Source/JavaScriptCore/domjit/DOMJITPatchpoint.h
rename to Source/JavaScriptCore/jit/Snippet.h
index bb9f5e4..eaca0ca 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2017 Yusuke Suzuki <utatane.tea@gmail.com>.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #include "CCallHelpers.h"
 #include "RegisterSet.h"
 
-namespace JSC { namespace DOMJIT {
+namespace JSC {
 
-class PatchpointParams;
+class SnippetParams;
 
-typedef CCallHelpers::JumpList PatchpointGeneratorFunction(CCallHelpers&, PatchpointParams&);
-typedef SharedTask<PatchpointGeneratorFunction> PatchpointGenerator;
+typedef CCallHelpers::JumpList SnippetCompilerFunction(CCallHelpers&, SnippetParams&);
+typedef SharedTask<SnippetCompilerFunction> SnippetCompiler;
 
-// DOMJIT patchpoint is the way to inject an opaque code generator into DFG and FTL.
+// Snippet is the way to inject an opaque code generator into DFG and FTL.
 // While B3::Patchpoint is self-contained about its compilation information,
-// DOMJIT::Patchpoint depends on which DFG Node invokes. For example, CheckDOM will
+// Snippet depends on which DFG Node invokes. For example, CheckDOM will
 // link returned failureCases to BadType OSRExit, but this information is offered
-// from CheckDOM DFG Node, not from this patchpoint. This patchpoint mainly focuses
+// from CheckDOM DFG Node, not from this snippet. This snippet mainly focuses
 // on injecting a snippet generator that can tell register usage and can be used
 // in both DFG and FTL.
-class Patchpoint : public ThreadSafeRefCounted<Patchpoint> {
+class Snippet : public ThreadSafeRefCounted<Snippet> {
 public:
-    static Ref<Patchpoint> create()
+    static Ref<Snippet> create()
     {
-        return adoptRef(*new Patchpoint());
+        return adoptRef(*new Snippet());
     }
 
     template<typename Functor>
     void setGenerator(const Functor& functor)
     {
-        m_generator = createSharedTask<PatchpointGeneratorFunction>(functor);
+        m_generator = createSharedTask<SnippetCompilerFunction>(functor);
     }
 
-    RefPtr<PatchpointGenerator> generator() const { return m_generator; }
+    RefPtr<SnippetCompiler> generator() const { return m_generator; }
 
     uint8_t numGPScratchRegisters { 0 };
     uint8_t numFPScratchRegisters { 0 };
 
 protected:
-    Patchpoint() = default;
+    Snippet() = default;
 
 private:
-    RefPtr<PatchpointGenerator> m_generator;
+    RefPtr<SnippetCompiler> m_generator;
 };
 
-} }
+}
 
 #endif
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2017 Yusuke Suzuki <utatane.tea@gmail.com>.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #if ENABLE(JIT)
 
 #include "CCallHelpers.h"
-#include "DOMJITSlowPathCalls.h"
-#include "DOMJITValue.h"
 #include "JITOperations.h"
 #include "RegisterSet.h"
+#include "SnippetReg.h"
+#include "SnippetSlowPathCalls.h"
 
-namespace JSC { namespace DOMJIT {
+namespace JSC {
 
-class PatchpointParams {
-WTF_MAKE_NONCOPYABLE(PatchpointParams);
+class SnippetParams {
+WTF_MAKE_NONCOPYABLE(SnippetParams);
 public:
-    virtual ~PatchpointParams() { }
+    virtual ~SnippetParams() { }
+
+    class Value {
+    public:
+        Value(SnippetReg reg)
+            : m_reg(reg)
+        {
+        }
+
+        Value(SnippetReg reg, JSValue value)
+            : m_reg(reg)
+            , m_value(value)
+        {
+        }
+
+        bool isGPR() const { return m_reg.isGPR(); }
+        bool isFPR() const { return m_reg.isFPR(); }
+        bool isJSValueRegs() const { return m_reg.isJSValueRegs(); }
+        GPRReg gpr() const { return m_reg.gpr(); }
+        FPRReg fpr() const { return m_reg.fpr(); }
+        JSValueRegs jsValueRegs() const { return m_reg.jsValueRegs(); }
+
+        SnippetReg reg() const
+        {
+            return m_reg;
+        }
+
+        JSValue value() const
+        {
+            return m_value;
+        }
+
+    private:
+        SnippetReg m_reg;
+        JSValue m_value;
+    };
 
     unsigned size() const { return m_regs.size(); }
     const Value& at(unsigned index) const { return m_regs[index]; }
@@ -47,7 +83,7 @@ public:
     GPRReg gpScratch(unsigned index) const { return m_gpScratch[index]; }
     FPRReg fpScratch(unsigned index) const { return m_fpScratch[index]; }
 
-    PatchpointParams(VM& vm, Vector<Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
+    SnippetParams(VM& vm, Vector<Value>&& regs, Vector<GPRReg>&& gpScratch, Vector<FPRReg>&& fpScratch)
         : m_vm(vm)
         , m_regs(WTFMove(regs))
         , m_gpScratch(WTFMove(gpScratch))
@@ -65,7 +101,7 @@ public:
 
 private:
 #define JSC_DEFINE_CALL_OPERATIONS(OperationType, ResultType, ...) JS_EXPORT_PRIVATE virtual void addSlowPathCallImpl(CCallHelpers::JumpList, CCallHelpers&, OperationType, ResultType, std::tuple<__VA_ARGS__> args) = 0;
-    DOMJIT_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
+    SNIPPET_SLOW_PATH_CALLS(JSC_DEFINE_CALL_OPERATIONS)
 #undef JSC_DEFINE_CALL_OPERATIONS
 
     VM& m_vm;
@@ -74,6 +110,6 @@ private:
     Vector<FPRReg> m_fpScratch;
 };
 
-} }
+}
 
 #endif
similarity index 87%
rename from Source/JavaScriptCore/domjit/DOMJITReg.h
rename to Source/JavaScriptCore/jit/SnippetReg.h
index ea9eab8..24a0c0f 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2017 Yusuke Suzuki <utatane.tea@gmail.com>.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #if ENABLE(JIT)
 
-namespace JSC { namespace DOMJIT {
+namespace JSC {
 
 // It is quite unfortunate that 32 bit environment exists on DFG! This means that JSValueRegs contains 2 registers
-// in such an environment. If we use GPRReg and FPRReg in DOMJITPatchpointParams, DOMJITPatchpointParams may contain
+// in such an environment. If we use GPRReg and FPRReg in SnippetParams, SnippetParams may contain
 // different number of registers in 32bit and 64bit environments when we pass JSValueRegs, it is confusing.
-// Therefore, we introduce an abstraction that DOMJIT::Reg, which is a polymorphic register class. It can refer FPRReg,
+// Therefore, we introduce an abstraction that SnippetReg, which is a polymorphic register class. It can refer FPRReg,
 // GPRReg, and "JSValueRegs". Note that isGPR() will return false if the target Reg is "JSValueRegs" even if the
 // environment is 64bit.
 //
 // FIXME: Eventually we should move this class into JSC and make is available for other JIT code.
 // https://bugs.webkit.org/show_bug.cgi?id=162990
-class Reg {
+class SnippetReg {
 public:
     enum class Type : uint8_t {
         GPR = 0,
@@ -49,17 +50,17 @@ public:
         JSValue = 2,
     };
 
-    Reg(GPRReg reg)
+    SnippetReg(GPRReg reg)
         : m_variant(reg)
     {
     }
 
-    Reg(FPRReg reg)
+    SnippetReg(FPRReg reg)
         : m_variant(reg)
     {
     }
 
-    Reg(JSValueRegs regs)
+    SnippetReg(JSValueRegs regs)
         : m_variant(regs)
     {
     }
@@ -88,6 +89,6 @@ private:
     Variant<GPRReg, FPRReg, JSValueRegs> m_variant;
 };
 
-} }
+}
 
 #endif
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2016 Apple Inc. All rights reserved.
+ * Copyright (C) 2017 Yusuke Suzuki <utatane.tea@gmail.com>.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -28,7 +29,7 @@
 #if ENABLE(JIT)
 
 // macro(OperationType, ArgType1, ArgType2, ...)
-#define DOMJIT_SLOW_PATH_CALLS(macro) \
+#define SNIPPET_SLOW_PATH_CALLS(macro) \
     macro(J_JITOperation_EP, JSValueRegs, GPRReg) \
     macro(J_JITOperation_EGP, JSValueRegs, GPRReg, GPRReg) \
 
index b4cca57..8f8f2d6 100644 (file)
@@ -31,8 +31,6 @@
 #include "Completion.h"
 #include "ConfigFile.h"
 #include "DOMJITGetterSetter.h"
-#include "DOMJITPatchpoint.h"
-#include "DOMJITPatchpointParams.h"
 #include "Disassembler.h"
 #include "Exception.h"
 #include "ExceptionHelpers.h"
@@ -68,6 +66,8 @@
 #include "ReleaseHeapAccessScope.h"
 #include "SamplingProfiler.h"
 #include "ShadowChicken.h"
+#include "Snippet.h"
+#include "SnippetParams.h"
 #include "StackVisitor.h"
 #include "StructureInlines.h"
 #include "StructureRareDataInlines.h"
@@ -589,10 +589,10 @@ public:
     }
 
 #if ENABLE(JIT)
-    static RefPtr<DOMJIT::Patchpoint> checkSubClassPatchpoint()
+    static Ref<Snippet> checkSubClassSnippet()
     {
-        Ref<DOMJIT::Patchpoint> patchpoint = DOMJIT::Patchpoint::create();
-        patchpoint->setGenerator([=](CCallHelpers& jit, DOMJIT::PatchpointParams& params) {
+        Ref<Snippet> snippet = Snippet::create();
+        snippet->setGenerator([=](CCallHelpers& jit, SnippetParams& params) {
             CCallHelpers::JumpList failureCases;
             failureCases.append(jit.branch8(
                 CCallHelpers::NotEqual,
@@ -600,7 +600,7 @@ public:
                 CCallHelpers::TrustedImm32(JSC::JSType(LastJSCObjectType + 1))));
             return failureCases;
         });
-        return WTFMove(patchpoint);
+        return snippet;
     }
 #endif
 
@@ -659,18 +659,18 @@ public:
             return JSValue::encode(jsNumber(static_cast<DOMJITGetter*>(pointer)->value()));
         }
 
-        Ref<DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override
+        Ref<DOMJIT::CallDOMGetterSnippet> callDOMGetter() override
         {
-            Ref<DOMJIT::CallDOMGetterPatchpoint> patchpoint = DOMJIT::CallDOMGetterPatchpoint::create();
-            patchpoint->requireGlobalObject = false;
-            patchpoint->setGenerator([=](CCallHelpers& jit, DOMJIT::PatchpointParams& params) {
+            Ref<DOMJIT::CallDOMGetterSnippet> snippet = DOMJIT::CallDOMGetterSnippet::create();
+            snippet->requireGlobalObject = false;
+            snippet->setGenerator([=](CCallHelpers& jit, SnippetParams& params) {
                 JSValueRegs results = params[0].jsValueRegs();
                 GPRReg dom = params[1].gpr();
                 params.addSlowPathCall(jit.jump(), jit, slowCall, results, dom);
                 return CCallHelpers::JumpList();
 
             });
-            return patchpoint;
+            return snippet;
         }
 #endif
     };
@@ -747,23 +747,23 @@ public:
             return JSValue::encode(jsNumber(object->value()));
         }
 
-        Ref<DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override
+        Ref<DOMJIT::CallDOMGetterSnippet> callDOMGetter() override
         {
-            RefPtr<DOMJIT::CallDOMGetterPatchpoint> patchpoint = DOMJIT::CallDOMGetterPatchpoint::create();
+            RefPtr<DOMJIT::CallDOMGetterSnippet> snippet = DOMJIT::CallDOMGetterSnippet::create();
             static_assert(GPRInfo::numberOfRegisters >= 4, "Number of registers should be larger or equal to 4.");
-            patchpoint->numGPScratchRegisters = GPRInfo::numberOfRegisters - 4;
-            patchpoint->numFPScratchRegisters = 3;
-            patchpoint->setGenerator([=](CCallHelpers& jit, DOMJIT::PatchpointParams& params) {
+            snippet->numGPScratchRegisters = GPRInfo::numberOfRegisters - 4;
+            snippet->numFPScratchRegisters = 3;
+            snippet->setGenerator([=](CCallHelpers& jit, SnippetParams& params) {
                 JSValueRegs results = params[0].jsValueRegs();
                 GPRReg domGPR = params[1].gpr();
-                for (unsigned i = 0; i < patchpoint->numGPScratchRegisters; ++i)
+                for (unsigned i = 0; i < snippet->numGPScratchRegisters; ++i)
                     jit.move(CCallHelpers::TrustedImm32(42), params.gpScratch(i));
 
                 params.addSlowPathCall(jit.jump(), jit, slowCall, results, domGPR);
                 return CCallHelpers::JumpList();
 
             });
-            return *patchpoint.get();
+            return *snippet.get();
         }
 #endif
     };
@@ -853,11 +853,11 @@ public:
     }
 
 #if ENABLE(JIT)
-    static RefPtr<DOMJIT::Patchpoint> checkSubClassPatchpoint()
+    static Ref<Snippet> checkSubClassSnippet()
     {
-        Ref<DOMJIT::Patchpoint> patchpoint = DOMJIT::Patchpoint::create();
-        patchpoint->numFPScratchRegisters = 1;
-        patchpoint->setGenerator([=](CCallHelpers& jit, DOMJIT::PatchpointParams& params) {
+        Ref<Snippet> snippet = Snippet::create();
+        snippet->numFPScratchRegisters = 1;
+        snippet->setGenerator([=](CCallHelpers& jit, SnippetParams& params) {
             static const double value = 42.0;
             CCallHelpers::JumpList failureCases;
             // May use scratch registers.
@@ -868,7 +868,7 @@ public:
                 CCallHelpers::TrustedImm32(JSC::JSType(LastJSCObjectType + 1))));
             return failureCases;
         });
-        return WTFMove(patchpoint);
+        return snippet;
     }
 #endif
 
@@ -943,14 +943,14 @@ const ClassInfo Root::s_info = { "Root", &Base::s_info, nullptr, nullptr, CREATE
 const ClassInfo ImpureGetter::s_info = { "ImpureGetter", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(ImpureGetter) };
 const ClassInfo CustomGetter::s_info = { "CustomGetter", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(CustomGetter) };
 #if ENABLE(JIT)
-const ClassInfo DOMJITNode::s_info = { "DOMJITNode", &Base::s_info, nullptr, &DOMJITNode::checkSubClassPatchpoint, CREATE_METHOD_TABLE(DOMJITNode) };
+const ClassInfo DOMJITNode::s_info = { "DOMJITNode", &Base::s_info, nullptr, &DOMJITNode::checkSubClassSnippet, CREATE_METHOD_TABLE(DOMJITNode) };
 #else
 const ClassInfo DOMJITNode::s_info = { "DOMJITNode", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(DOMJITNode) };
 #endif
 const ClassInfo DOMJITGetter::s_info = { "DOMJITGetter", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(DOMJITGetter) };
 const ClassInfo DOMJITGetterComplex::s_info = { "DOMJITGetterComplex", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(DOMJITGetterComplex) };
 #if ENABLE(JIT)
-const ClassInfo DOMJITFunctionObject::s_info = { "DOMJITFunctionObject", &Base::s_info, nullptr, &DOMJITFunctionObject::checkSubClassPatchpoint, CREATE_METHOD_TABLE(DOMJITFunctionObject) };
+const ClassInfo DOMJITFunctionObject::s_info = { "DOMJITFunctionObject", &Base::s_info, nullptr, &DOMJITFunctionObject::checkSubClassSnippet, CREATE_METHOD_TABLE(DOMJITFunctionObject) };
 #else
 const ClassInfo DOMJITFunctionObject::s_info = { "DOMJITFunctionObject", &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(DOMJITFunctionObject) };
 #endif
index 1122c83..96e7c60 100644 (file)
@@ -31,12 +31,10 @@ class PrintStream;
 };
 
 namespace JSC {
-namespace DOMJIT {
-class Patchpoint;
-}
 
 class HeapSnapshotBuilder;
 class JSArrayBufferView;
+class Snippet;
 struct HashTable;
 
 struct MethodTable {
@@ -217,8 +215,8 @@ struct ClassInfo {
 
     const HashTable* staticPropHashTable;
 
-    typedef RefPtr<DOMJIT::Patchpoint> (*CheckSubClassPatchpointFunctionPtr)(void);
-    CheckSubClassPatchpointFunctionPtr checkSubClassPatchpoint;
+    typedef Ref<Snippet> (*CheckSubClassSnippetFunctionPtr)(void);
+    CheckSubClassSnippetFunctionPtr checkSubClassSnippet;
 
     MethodTable methodTable;
 
index 78c7ea7..be1b224 100644 (file)
@@ -1,3 +1,46 @@
+2017-05-27  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [DOMJIT] Move DOMJIT patchpoint infrastructure out of domjit
+        https://bugs.webkit.org/show_bug.cgi?id=172260
+
+        Reviewed by Filip Pizlo.
+
+        * 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.
+
 2017-05-26  Simon Fraser  <simon.fraser@apple.com>
 
         getComputedStyle returns percentage values for left / right / top / bottom
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebCore_FWD_DOMJITPatchpoint_h
-#define WebCore_FWD_DOMJITPatchpoint_h
-#include <JavaScriptCore/DOMJITPatchpoint.h>
+#ifndef WebCore_FWD_Snippet_h
+#define WebCore_FWD_Snippet_h
+#include <JavaScriptCore/Snippet.h>
 #endif
@@ -23,7 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef WebCore_FWD_DOMJITPatchpointParams_h
-#define WebCore_FWD_DOMJITPatchpointParams_h
-#include <JavaScriptCore/DOMJITPatchpointParams.h>
+#ifndef WebCore_FWD_SnippetParams_h
+#define WebCore_FWD_SnippetParams_h
+#include <JavaScriptCore/SnippetParams.h>
 #endif
index 20681af..96c6572 100644 (file)
@@ -2229,11 +2229,11 @@ sub GenerateHeader
         }
     }
 
-    # CheckSubClass Patchpoint function.
+    # CheckSubClass Snippet function.
     if ($interface->extendedAttributes->{DOMJIT}) {
-        $headerIncludes{"<domjit/DOMJITPatchpoint.h>"} = 1;
+        $headerIncludes{"<jit/Snippet.h>"} = 1;
         push(@headerContent, "#if ENABLE(JIT)\n");
-        push(@headerContent, "RefPtr<JSC::DOMJIT::Patchpoint> checkSubClassPatchpointFor${className}();\n");
+        push(@headerContent, "Ref<JSC::Snippet> checkSubClassSnippetFor${className}();\n");
         push(@headerContent, "#endif\n");
     }
 
@@ -2254,7 +2254,7 @@ sub GenerateHeader
             push(@headerContent, "public:\n");
             push(@headerContent, "    ${domJITClassName}();\n");
             push(@headerContent, "#if ENABLE(JIT)\n");
-            push(@headerContent, "    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;\n");
+            push(@headerContent, "    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;\n");
             push(@headerContent, "#endif\n");
             push(@headerContent, "};\n\n");
         }
@@ -3462,7 +3462,7 @@ sub GenerateImplementation
     if ($interface->extendedAttributes->{DOMJIT}) {
         push(@implContent, "\n");
         push(@implContent, "#if ENABLE(JIT)\n");
-        push(@implContent, ", &checkSubClassPatchpointFor${className}\n");
+        push(@implContent, ", &checkSubClassSnippetFor${className}\n");
         push(@implContent, "#else\n");
         push(@implContent, ", nullptr\n");
         push(@implContent, "#endif\n");
index fb82c27..4eeefd2 100644 (file)
@@ -68,7 +68,7 @@ class TestDOMJITAnyAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITAnyAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -77,7 +77,7 @@ class TestDOMJITBooleanAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITBooleanAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -86,7 +86,7 @@ class TestDOMJITByteAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITByteAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -95,7 +95,7 @@ class TestDOMJITOctetAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITOctetAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -104,7 +104,7 @@ class TestDOMJITShortAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITShortAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -113,7 +113,7 @@ class TestDOMJITUnsignedShortAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITUnsignedShortAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -122,7 +122,7 @@ class TestDOMJITLongAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITLongAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -131,7 +131,7 @@ class TestDOMJITUnsignedLongAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITUnsignedLongAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -140,7 +140,7 @@ class TestDOMJITLongLongAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITLongLongAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -149,7 +149,7 @@ class TestDOMJITUnsignedLongLongAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITUnsignedLongLongAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -158,7 +158,7 @@ class TestDOMJITFloatAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITFloatAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -167,7 +167,7 @@ class TestDOMJITUnrestrictedFloatAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITUnrestrictedFloatAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -176,7 +176,7 @@ class TestDOMJITDoubleAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITDoubleAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -185,7 +185,7 @@ class TestDOMJITUnrestrictedDoubleAttrDOMJIT : public JSC::DOMJIT::GetterSetter
 public:
     TestDOMJITUnrestrictedDoubleAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -194,7 +194,7 @@ class TestDOMJITDomStringAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITDomStringAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -203,7 +203,7 @@ class TestDOMJITByteStringAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITByteStringAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -212,7 +212,7 @@ class TestDOMJITUsvStringAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITUsvStringAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -221,7 +221,7 @@ class TestDOMJITNodeAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITNodeAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -230,7 +230,7 @@ class TestDOMJITBooleanNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITBooleanNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -239,7 +239,7 @@ class TestDOMJITByteNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITByteNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -248,7 +248,7 @@ class TestDOMJITOctetNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITOctetNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -257,7 +257,7 @@ class TestDOMJITShortNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITShortNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -266,7 +266,7 @@ class TestDOMJITUnsignedShortNullableAttrDOMJIT : public JSC::DOMJIT::GetterSett
 public:
     TestDOMJITUnsignedShortNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -275,7 +275,7 @@ class TestDOMJITLongNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITLongNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -284,7 +284,7 @@ class TestDOMJITUnsignedLongNullableAttrDOMJIT : public JSC::DOMJIT::GetterSette
 public:
     TestDOMJITUnsignedLongNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -293,7 +293,7 @@ class TestDOMJITLongLongNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITLongLongNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -302,7 +302,7 @@ class TestDOMJITUnsignedLongLongNullableAttrDOMJIT : public JSC::DOMJIT::GetterS
 public:
     TestDOMJITUnsignedLongLongNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -311,7 +311,7 @@ class TestDOMJITFloatNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITFloatNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -320,7 +320,7 @@ class TestDOMJITUnrestrictedFloatNullableAttrDOMJIT : public JSC::DOMJIT::Getter
 public:
     TestDOMJITUnrestrictedFloatNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -329,7 +329,7 @@ class TestDOMJITDoubleNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITDoubleNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -338,7 +338,7 @@ class TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT : public JSC::DOMJIT::Gette
 public:
     TestDOMJITUnrestrictedDoubleNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -347,7 +347,7 @@ class TestDOMJITDomStringNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITDomStringNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -356,7 +356,7 @@ class TestDOMJITByteStringNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter
 public:
     TestDOMJITByteStringNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -365,7 +365,7 @@ class TestDOMJITUsvStringNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITUsvStringNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
@@ -374,7 +374,7 @@ class TestDOMJITNodeNullableAttrDOMJIT : public JSC::DOMJIT::GetterSetter {
 public:
     TestDOMJITNodeNullableAttrDOMJIT();
 #if ENABLE(JIT)
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> callDOMGetter() override;
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> callDOMGetter() override;
 #endif
 };
 
index 1ba3106..0835283 100644 (file)
@@ -82,13 +82,13 @@ struct TypeChecker<Element> {
 };
 
 template<typename DOMInterface>
-Ref<JSC::DOMJIT::Patchpoint> checkDOM()
+Ref<JSC::Snippet> checkDOM()
 {
-    Ref<JSC::DOMJIT::Patchpoint> patchpoint = JSC::DOMJIT::Patchpoint::create();
-    patchpoint->setGenerator([=](CCallHelpers& jit, JSC::DOMJIT::PatchpointParams& params) {
+    Ref<JSC::Snippet> snippet = JSC::Snippet::create();
+    snippet->setGenerator([=](CCallHelpers& jit, JSC::SnippetParams& params) {
         return TypeChecker<DOMInterface>::branchIfFail(jit, params[0].gpr());
     });
-    return patchpoint;
+    return snippet;
 }
 
 } }
index 1370e56..6209d20 100644 (file)
@@ -28,9 +28,9 @@
 
 #include "JSDOMWrapper.h"
 #include "Node.h"
-#include <domjit/DOMJITPatchpoint.h>
-#include <domjit/DOMJITPatchpointParams.h>
 #include <interpreter/FrameTracers.h>
+#include <jit/Snippet.h>
+#include <jit/SnippetParams.h>
 
 #if ENABLE(JIT)
 
@@ -73,7 +73,7 @@ void tryLookUpWrapperCache(CCallHelpers& jit, CCallHelpers::JumpList& failureCas
 }
 
 template<typename WrappedType, typename ToJSFunction>
-void toWrapper(CCallHelpers& jit, JSC::DOMJIT::PatchpointParams& params, GPRReg wrapped, GPRReg globalObject, JSValueRegs result, ToJSFunction function, JSC::JSValue globalObjectConstant)
+void toWrapper(CCallHelpers& jit, JSC::SnippetParams& params, GPRReg wrapped, GPRReg globalObject, JSValueRegs result, ToJSFunction function, JSC::JSValue globalObjectConstant)
 {
     ASSERT(wrapped != result.payloadGPR());
     ASSERT(globalObject != result.payloadGPR());
index b6616b2..343460f 100644 (file)
 #include "JSDOMWrapper.h"
 #include "JSElement.h"
 #include "JSHTMLElement.h"
-#include <domjit/DOMJITPatchpoint.h>
-#include <domjit/DOMJITPatchpointParams.h>
+#include <jit/Snippet.h>
+#include <jit/SnippetParams.h>
 
 using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<JSC::DOMJIT::Patchpoint> checkSubClassPatchpointForJSDocument()
+Ref<JSC::Snippet> checkSubClassSnippetForJSDocument()
 {
     return DOMJIT::checkDOM<Document>();
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> DocumentDocumentElementDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> DocumentDocumentElementDOMJIT::callDOMGetter()
 {
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> patchpoint = JSC::DOMJIT::CallDOMGetterPatchpoint::create();
-    patchpoint->numGPScratchRegisters = 1;
-    patchpoint->setGenerator([=](CCallHelpers& jit, JSC::DOMJIT::PatchpointParams& params) {
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> snippet = JSC::DOMJIT::CallDOMGetterSnippet::create();
+    snippet->numGPScratchRegisters = 1;
+    snippet->setGenerator([=](CCallHelpers& jit, JSC::SnippetParams& params) {
         JSValueRegs result = params[0].jsValueRegs();
         GPRReg document = params[1].gpr();
         GPRReg globalObject = params[2].gpr();
@@ -70,8 +70,8 @@ Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> DocumentDocumentElementDOMJIT::callDOM
 
         return CCallHelpers::JumpList();
     });
-    patchpoint->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Document_documentElement);
-    return patchpoint;
+    snippet->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Document_documentElement);
+    return snippet;
 }
 
 static void loadLocalName(CCallHelpers& jit, GPRReg htmlElement, GPRReg localNameImpl)
@@ -80,11 +80,11 @@ static void loadLocalName(CCallHelpers& jit, GPRReg htmlElement, GPRReg localNam
     jit.loadPtr(CCallHelpers::Address(localNameImpl, QualifiedName::QualifiedNameImpl::localNameMemoryOffset()), localNameImpl);
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> DocumentBodyDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> DocumentBodyDOMJIT::callDOMGetter()
 {
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> patchpoint = JSC::DOMJIT::CallDOMGetterPatchpoint::create();
-    patchpoint->numGPScratchRegisters = 2;
-    patchpoint->setGenerator([=](CCallHelpers& jit, JSC::DOMJIT::PatchpointParams& params) {
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> snippet = JSC::DOMJIT::CallDOMGetterSnippet::create();
+    snippet->numGPScratchRegisters = 2;
+    snippet->setGenerator([=](CCallHelpers& jit, JSC::SnippetParams& params) {
         JSValueRegs result = params[0].jsValueRegs();
         GPRReg document = params[1].gpr();
         GPRReg globalObject = params[2].gpr();
@@ -137,8 +137,8 @@ Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> DocumentBodyDOMJIT::callDOMGetter()
 
         return CCallHelpers::JumpList();
     });
-    patchpoint->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Document_body);
-    return patchpoint;
+    snippet->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Document_body);
+    return snippet;
 }
 
 }
index b5722a3..7dcb1b2 100644 (file)
@@ -34,7 +34,7 @@ using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<JSC::DOMJIT::Patchpoint> checkSubClassPatchpointForJSDocumentFragment()
+Ref<JSC::Snippet> checkSubClassSnippetForJSDocumentFragment()
 {
     return DOMJIT::checkDOM<DocumentFragment>();
 }
index 7e74b27..6aca92d 100644 (file)
@@ -34,7 +34,7 @@ using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<JSC::DOMJIT::Patchpoint> checkSubClassPatchpointForJSElement()
+Ref<JSC::Snippet> checkSubClassSnippetForJSElement()
 {
     return DOMJIT::checkDOM<Element>();
 }
index 7594f1e..ddb8478 100644 (file)
@@ -34,7 +34,7 @@ using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<JSC::DOMJIT::Patchpoint> checkSubClassPatchpointForJSEvent()
+Ref<JSC::Snippet> checkSubClassSnippetForJSEvent()
 {
     return DOMJIT::checkDOM<Event>();
 }
index 38d0cb1..8aebb01 100644 (file)
 #include "DOMJITHelpers.h"
 #include "JSDOMWrapper.h"
 #include "Node.h"
-#include <domjit/DOMJITPatchpoint.h>
-#include <domjit/DOMJITPatchpointParams.h>
 #include <interpreter/FrameTracers.h>
+#include <jit/Snippet.h>
+#include <jit/SnippetParams.h>
 
 using namespace JSC;
 
 namespace WebCore {
 
-RefPtr<JSC::DOMJIT::Patchpoint> checkSubClassPatchpointForJSNode()
+Ref<JSC::Snippet> checkSubClassSnippetForJSNode()
 {
     return DOMJIT::checkDOM<Node>();
 }
@@ -49,11 +49,11 @@ RefPtr<JSC::DOMJIT::Patchpoint> checkSubClassPatchpointForJSNode()
 enum class IsContainerGuardRequirement { Required, NotRequired };
 
 template<typename WrappedNode>
-static Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> createCallDOMGetterForOffsetAccess(ptrdiff_t offset, IsContainerGuardRequirement isContainerGuardRequirement)
+static Ref<JSC::DOMJIT::CallDOMGetterSnippet> createCallDOMGetterForOffsetAccess(ptrdiff_t offset, IsContainerGuardRequirement isContainerGuardRequirement)
 {
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> patchpoint = JSC::DOMJIT::CallDOMGetterPatchpoint::create();
-    patchpoint->numGPScratchRegisters = 1;
-    patchpoint->setGenerator([=](CCallHelpers& jit, JSC::DOMJIT::PatchpointParams& params) {
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> snippet = JSC::DOMJIT::CallDOMGetterSnippet::create();
+    snippet->numGPScratchRegisters = 1;
+    snippet->setGenerator([=](CCallHelpers& jit, JSC::SnippetParams& params) {
         JSValueRegs result = params[0].jsValueRegs();
         GPRReg node = params[1].gpr();
         GPRReg globalObject = params[2].gpr();
@@ -78,50 +78,50 @@ static Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> createCallDOMGetterForOffsetAcc
         done.link(&jit);
         return CCallHelpers::JumpList();
     });
-    return patchpoint;
+    return snippet;
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodeFirstChildDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> NodeFirstChildDOMJIT::callDOMGetter()
 {
-    auto patchpoint = createCallDOMGetterForOffsetAccess<Node>(CAST_OFFSET(Node*, ContainerNode*) + ContainerNode::firstChildMemoryOffset(), IsContainerGuardRequirement::Required);
-    patchpoint->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_firstChild);
-    return patchpoint;
+    auto snippet = createCallDOMGetterForOffsetAccess<Node>(CAST_OFFSET(Node*, ContainerNode*) + ContainerNode::firstChildMemoryOffset(), IsContainerGuardRequirement::Required);
+    snippet->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_firstChild);
+    return snippet;
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodeLastChildDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> NodeLastChildDOMJIT::callDOMGetter()
 {
-    auto patchpoint = createCallDOMGetterForOffsetAccess<Node>(CAST_OFFSET(Node*, ContainerNode*) + ContainerNode::lastChildMemoryOffset(), IsContainerGuardRequirement::Required);
-    patchpoint->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_lastChild);
-    return patchpoint;
+    auto snippet = createCallDOMGetterForOffsetAccess<Node>(CAST_OFFSET(Node*, ContainerNode*) + ContainerNode::lastChildMemoryOffset(), IsContainerGuardRequirement::Required);
+    snippet->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_lastChild);
+    return snippet;
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodeNextSiblingDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> NodeNextSiblingDOMJIT::callDOMGetter()
 {
-    auto patchpoint = createCallDOMGetterForOffsetAccess<Node>(Node::nextSiblingMemoryOffset(), IsContainerGuardRequirement::NotRequired);
-    patchpoint->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_nextSibling);
-    return patchpoint;
+    auto snippet = createCallDOMGetterForOffsetAccess<Node>(Node::nextSiblingMemoryOffset(), IsContainerGuardRequirement::NotRequired);
+    snippet->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_nextSibling);
+    return snippet;
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodePreviousSiblingDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> NodePreviousSiblingDOMJIT::callDOMGetter()
 {
-    auto patchpoint = createCallDOMGetterForOffsetAccess<Node>(Node::previousSiblingMemoryOffset(), IsContainerGuardRequirement::NotRequired);
-    patchpoint->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_previousSibling);
-    return patchpoint;
+    auto snippet = createCallDOMGetterForOffsetAccess<Node>(Node::previousSiblingMemoryOffset(), IsContainerGuardRequirement::NotRequired);
+    snippet->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_previousSibling);
+    return snippet;
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodeParentNodeDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> NodeParentNodeDOMJIT::callDOMGetter()
 {
-    auto patchpoint = createCallDOMGetterForOffsetAccess<ContainerNode>(Node::parentNodeMemoryOffset(), IsContainerGuardRequirement::NotRequired);
-    patchpoint->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_parentNode);
-    return patchpoint;
+    auto snippet = createCallDOMGetterForOffsetAccess<ContainerNode>(Node::parentNodeMemoryOffset(), IsContainerGuardRequirement::NotRequired);
+    snippet->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_parentNode);
+    return snippet;
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodeNodeTypeDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> NodeNodeTypeDOMJIT::callDOMGetter()
 {
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> patchpoint = JSC::DOMJIT::CallDOMGetterPatchpoint::create();
-    patchpoint->effect = JSC::DOMJIT::Effect::forPure();
-    patchpoint->requireGlobalObject = false;
-    patchpoint->setGenerator([=](CCallHelpers& jit, JSC::DOMJIT::PatchpointParams& params) {
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> snippet = JSC::DOMJIT::CallDOMGetterSnippet::create();
+    snippet->effect = JSC::DOMJIT::Effect::forPure();
+    snippet->requireGlobalObject = false;
+    snippet->setGenerator([=](CCallHelpers& jit, JSC::SnippetParams& params) {
         JSValueRegs result = params[0].jsValueRegs();
         GPRReg node = params[1].gpr();
         jit.load8(CCallHelpers::Address(node, JSC::JSCell::typeInfoTypeOffset()), result.payloadGPR());
@@ -129,14 +129,14 @@ Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodeNodeTypeDOMJIT::callDOMGetter()
         jit.boxInt32(result.payloadGPR(), result);
         return CCallHelpers::JumpList();
     });
-    return patchpoint;
+    return snippet;
 }
 
-Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodeOwnerDocumentDOMJIT::callDOMGetter()
+Ref<JSC::DOMJIT::CallDOMGetterSnippet> NodeOwnerDocumentDOMJIT::callDOMGetter()
 {
-    Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> patchpoint = JSC::DOMJIT::CallDOMGetterPatchpoint::create();
-    patchpoint->numGPScratchRegisters = 2;
-    patchpoint->setGenerator([=](CCallHelpers& jit, JSC::DOMJIT::PatchpointParams& params) {
+    Ref<JSC::DOMJIT::CallDOMGetterSnippet> snippet = JSC::DOMJIT::CallDOMGetterSnippet::create();
+    snippet->numGPScratchRegisters = 2;
+    snippet->setGenerator([=](CCallHelpers& jit, JSC::SnippetParams& params) {
         JSValueRegs result = params[0].jsValueRegs();
         GPRReg node = params[1].gpr();
         GPRReg globalObject = params[2].gpr();
@@ -160,8 +160,8 @@ Ref<JSC::DOMJIT::CallDOMGetterPatchpoint> NodeOwnerDocumentDOMJIT::callDOMGetter
         done.link(&jit);
         return CCallHelpers::JumpList();
     });
-    patchpoint->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_ownerDocument);
-    return patchpoint;
+    snippet->effect = JSC::DOMJIT::Effect::forDef(DOMJIT::AbstractHeapRepository::Node_ownerDocument);
+    return snippet;
 }
 
 }