Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (230542 => 230543)
--- trunk/Source/_javascript_Core/ChangeLog 2018-04-11 19:52:56 UTC (rev 230542)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-04-11 20:02:29 UTC (rev 230543)
@@ -1,5 +1,33 @@
2018-04-11 Yusuke Suzuki <utatane....@gmail.com>
+ [DFG] Remove CompareSlowPathGenerator
+ https://bugs.webkit.org/show_bug.cgi?id=184492
+
+ Reviewed by Mark Lam.
+
+ Now CompareSlowPathGenerator is just calling a specified function.
+ This can be altered with slowPathCall. This patch removes CompareSlowPathGenerator.
+
+ We also remove some of unnecessary USE(JSVALUE32_64) / USE(JSVALUE64) ifdefs by
+ introducing a new constructor for GPRTemporary.
+
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * dfg/DFGCompareSlowPathGenerator.h: Removed.
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::GPRTemporary::GPRTemporary):
+ (JSC::DFG::SpeculativeJIT::compileIsCellWithType):
+ (JSC::DFG::SpeculativeJIT::compileIsTypedArrayView):
+ (JSC::DFG::SpeculativeJIT::compileToObjectOrCallObjectConstructor):
+ (JSC::DFG::SpeculativeJIT::compileIsObject):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
+ (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
+ * dfg/DFGSpeculativeJIT.h:
+ (JSC::DFG::GPRTemporary::GPRTemporary):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeStrictEq):
+
+2018-04-11 Yusuke Suzuki <utatane....@gmail.com>
+
Unreviewed, build fix for 32bit
https://bugs.webkit.org/show_bug.cgi?id=184236
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (230542 => 230543)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2018-04-11 19:52:56 UTC (rev 230542)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2018-04-11 20:02:29 UTC (rev 230543)
@@ -1706,7 +1706,6 @@
E354622B1B6065D100545386 /* ConstructAbility.h in Headers */ = {isa = PBXBuildFile; fileRef = E354622A1B6065D100545386 /* ConstructAbility.h */; settings = {ATTRIBUTES = (Private, ); }; };
E3555B8A1DAE03A500F36921 /* DOMJITCallDOMGetterSnippet.h in Headers */ = {isa = PBXBuildFile; fileRef = E3555B891DAE03A200F36921 /* DOMJITCallDOMGetterSnippet.h */; settings = {ATTRIBUTES = (Private, ); }; };
E355F3531B7DC85300C50DC5 /* ModuleLoaderPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = E355F3511B7DC85300C50DC5 /* ModuleLoaderPrototype.h */; };
- E356D86420728381005AC750 /* DFGCompareSlowPathGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = E356D86320728381005AC750 /* DFGCompareSlowPathGenerator.h */; };
E35CA1541DBC3A5C00F83516 /* DOMJITHeapRange.h in Headers */ = {isa = PBXBuildFile; fileRef = E35CA1521DBC3A5600F83516 /* DOMJITHeapRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
E35CA1561DBC3A5F00F83516 /* DOMJITAbstractHeap.h in Headers */ = {isa = PBXBuildFile; fileRef = E35CA1501DBC3A5600F83516 /* DOMJITAbstractHeap.h */; settings = {ATTRIBUTES = (Private, ); }; };
E35E03601B7AB43E0073AD2A /* InspectorInstrumentationObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E35E035E1B7AB43E0073AD2A /* InspectorInstrumentationObject.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -4556,7 +4555,6 @@
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>"; };
- E356D86320728381005AC750 /* DFGCompareSlowPathGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCompareSlowPathGenerator.h; path = dfg/DFGCompareSlowPathGenerator.h; sourceTree = "<group>"; };
E35CA14F1DBC3A5600F83516 /* DOMJITAbstractHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMJITAbstractHeap.cpp; sourceTree = "<group>"; };
E35CA1501DBC3A5600F83516 /* DOMJITAbstractHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMJITAbstractHeap.h; sourceTree = "<group>"; };
E35CA1511DBC3A5600F83516 /* DOMJITHeapRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMJITHeapRange.cpp; sourceTree = "<group>"; };
@@ -7162,7 +7160,6 @@
0FC0977E1469EBC400CF2442 /* DFGCommon.h */,
0FEA0A2D170D40BF00BB722C /* DFGCommonData.cpp */,
0FEA0A2E170D40BF00BB722C /* DFGCommonData.h */,
- E356D86320728381005AC750 /* DFGCompareSlowPathGenerator.h */,
0F38B01317CFE75500B144D3 /* DFGCompilationKey.cpp */,
0F38B01417CFE75500B144D3 /* DFGCompilationKey.h */,
0F38B01517CFE75500B144D3 /* DFGCompilationMode.cpp */,
@@ -8223,7 +8220,6 @@
8BC064921E1ADCC400B2B8CA /* AsyncGeneratorPrototype.h in Headers */,
8B3BF5E41E3D368B0076A87A /* AsyncGeneratorPrototype.lut.h in Headers */,
8BC064961E1D845C00B2B8CA /* AsyncIteratorPrototype.h in Headers */,
- 0F5E0FD8207C72730097F0DE /* DFGAbstractInterpreterClobberState.h in Headers */,
6A38CFAA1E32B5AB0060206F /* AsyncStackTrace.h in Headers */,
0F7CF9571DC125900098CC12 /* AtomicsObject.h in Headers */,
0FB4677F1FDDA6E9003FCB09 /* AtomIndices.h in Headers */,
@@ -8473,6 +8469,7 @@
0F96303C1D4192CD005609D9 /* DestructionMode.h in Headers */,
A77A423E17A0BBFD00A8DB81 /* DFGAbstractHeap.h in Headers */,
A704D90317A0BAA8006BA554 /* DFGAbstractInterpreter.h in Headers */,
+ 0F5E0FD8207C72730097F0DE /* DFGAbstractInterpreterClobberState.h in Headers */,
A704D90417A0BAA8006BA554 /* DFGAbstractInterpreterInlines.h in Headers */,
0F620177143FCD3F0068B77C /* DFGAbstractValue.h in Headers */,
0FD3E4021B618AAF00C80E1E /* DFGAdaptiveInferredPropertyValueWatchpoint.h in Headers */,
@@ -8512,7 +8509,6 @@
0F04396E1B03DC0B009598B7 /* DFGCombinedLiveness.h in Headers */,
0F7B294D14C3CD4C007C3DB1 /* DFGCommon.h in Headers */,
0FEA0A32170D40BF00BB722C /* DFGCommonData.h in Headers */,
- E356D86420728381005AC750 /* DFGCompareSlowPathGenerator.h in Headers */,
0F38B01817CFE75500B144D3 /* DFGCompilationKey.h in Headers */,
0F38B01A17CFE75500B144D3 /* DFGCompilationMode.h in Headers */,
0F3B3A1B153E68F4003ED0FF /* DFGConstantFoldingPhase.h in Headers */,
Deleted: trunk/Source/_javascript_Core/dfg/DFGCompareSlowPathGenerator.h (230542 => 230543)
--- trunk/Source/_javascript_Core/dfg/DFGCompareSlowPathGenerator.h 2018-04-11 19:52:56 UTC (rev 230542)
+++ trunk/Source/_javascript_Core/dfg/DFGCompareSlowPathGenerator.h 2018-04-11 20:02:29 UTC (rev 230543)
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2018 Yusuke Suzuki <utatane....@gmail.com>.
- *
- * 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
-
-#if ENABLE(DFG_JIT)
-
-#include "DFGSlowPathGenerator.h"
-
-namespace JSC { namespace DFG {
-
-template<typename JumpType>
-class CompareSlowPathGenerator
- : public CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg> {
-public:
- CompareSlowPathGenerator(
- JumpType from, SpeculativeJIT* jit,
- S_JITOperation_EJJ function, GPRReg result, JSValueRegs arg1, JSValueRegs arg2)
- : CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg>(
- from, jit, function, NeedToSpill, ExceptionCheckRequirement::CheckNeeded, result)
- , m_arg1(arg1)
- , m_arg2(arg2)
- {
- }
-
-protected:
- void generateInternal(SpeculativeJIT* jit) override
- {
- this->setUp(jit);
- this->recordCall(jit->callOperation(this->m_function, this->m_result, m_arg1, m_arg2));
- this->tearDown(jit);
- }
-
-private:
- JSValueRegs m_arg1;
- JSValueRegs m_arg2;
-};
-
-} } // namespace JSC::DFG
-
-#endif
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (230542 => 230543)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2018-04-11 19:52:56 UTC (rev 230542)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2018-04-11 20:02:29 UTC (rev 230543)
@@ -34,7 +34,6 @@
#include "DFGCallArrayAllocatorSlowPathGenerator.h"
#include "DFGCallCreateDirectArgumentsSlowPathGenerator.h"
#include "DFGCapabilities.h"
-#include "DFGCompareSlowPathGenerator.h"
#include "DFGMayExit.h"
#include "DFGOSRExitFuzz.h"
#include "DFGSaneStringGetByValSlowPathGenerator.h"
@@ -1291,7 +1290,12 @@
else
m_gpr = m_jit->allocate();
}
-#endif // USE(JSVALUE32_64)
+#else // USE(JSVALUE32_64)
+GPRTemporary::GPRTemporary(SpeculativeJIT* jit, ReuseTag, JSValueOperand& op1, WhichValueWord)
+ : GPRTemporary(jit, Reuse, op1)
+{
+}
+#endif
JSValueRegsTemporary::JSValueRegsTemporary() { }
@@ -4031,11 +4035,7 @@
switch (node->child1().useKind()) {
case UntypedUse: {
JSValueOperand value(this, node->child1());
-#if USE(JSVALUE64)
- GPRTemporary result(this, Reuse, value);
-#else
GPRTemporary result(this, Reuse, value, PayloadWord);
-#endif
JSValueRegs valueRegs = value.jsValueRegs();
GPRReg resultGPR = result.gpr();
@@ -4082,11 +4082,7 @@
void SpeculativeJIT::compileIsTypedArrayView(Node* node)
{
JSValueOperand value(this, node->child1());
-#if USE(JSVALUE64)
- GPRTemporary result(this, Reuse, value);
-#else
GPRTemporary result(this, Reuse, value, PayloadWord);
-#endif
JSValueRegs valueRegs = value.jsValueRegs();
GPRReg resultGPR = result.gpr();
@@ -4114,11 +4110,7 @@
RELEASE_ASSERT(node->child1().useKind() == UntypedUse);
JSValueOperand value(this, node->child1());
-#if USE(JSVALUE64)
- GPRTemporary result(this, Reuse, value);
-#else
GPRTemporary result(this, Reuse, value, PayloadWord);
-#endif
JSValueRegs valueRegs = value.jsValueRegs();
GPRReg resultGPR = result.gpr();
@@ -8584,11 +8576,7 @@
void SpeculativeJIT::compileIsObject(Node* node)
{
JSValueOperand value(this, node->child1());
-#if USE(JSVALUE64)
- GPRTemporary result(this, Reuse, value);
-#else
GPRTemporary result(this, Reuse, value, TagWord);
-#endif
JSValueRegs valueRegs = value.jsValueRegs();
GPRReg resultGPR = result.gpr();
@@ -12877,11 +12865,7 @@
return;
}
-#if USE(JSVALUE64)
- GPRTemporary result(this, Reuse, arg1);
-#else
GPRTemporary result(this, Reuse, arg1, TagWord);
-#endif
GPRReg resultGPR = result.gpr();
arg1.use();
@@ -12894,10 +12878,8 @@
m_jit.compare32(cond, arg1Regs.payloadGPR(), arg2Regs.payloadGPR(), resultGPR);
- if (!isKnownInteger(node->child1().node()) || !isKnownInteger(node->child2().node())) {
- addSlowPathGenerator(std::make_unique<CompareSlowPathGenerator<JITCompiler::JumpList>>(
- slowPath, this, helperFunction, resultGPR, arg1Regs, arg2Regs));
- }
+ if (!isKnownInteger(node->child1().node()) || !isKnownInteger(node->child2().node()))
+ addSlowPathGenerator(slowPathCall(slowPath, this, helperFunction, resultGPR, arg1Regs, arg2Regs));
unblessedBooleanResult(resultGPR, node, UseChildrenCalledExplicitly);
}
@@ -12939,11 +12921,7 @@
branchTest32(callResultCondition, resultGPR, taken);
} else {
-#if USE(JSVALUE64)
- GPRTemporary result(this, Reuse, arg2);
-#else
GPRTemporary result(this, Reuse, arg2, TagWord);
-#endif
GPRReg resultGPR = result.gpr();
arg1.use();
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h (230542 => 230543)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h 2018-04-11 19:52:56 UTC (rev 230542)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h 2018-04-11 20:02:29 UTC (rev 230543)
@@ -2018,9 +2018,7 @@
else
m_gpr = m_jit->allocate();
}
-#if USE(JSVALUE32_64)
GPRTemporary(SpeculativeJIT*, ReuseTag, JSValueOperand&, WhichValueWord);
-#endif
GPRTemporary(GPRTemporary& other) = delete;
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (230542 => 230543)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2018-04-11 19:52:56 UTC (rev 230542)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2018-04-11 20:02:29 UTC (rev 230543)
@@ -453,8 +453,7 @@
m_jit.move(JITCompiler::TrustedImm64(!invert), resultGPR);
- addSlowPathGenerator(std::make_unique<CompareSlowPathGenerator<MacroAssembler::JumpList>>(
- slowPathCases, this, operationCompareStrictEq, resultGPR, arg1Regs, arg2Regs));
+ addSlowPathGenerator(slowPathCall(slowPathCases, this, operationCompareStrictEq, resultGPR, arg1Regs, arg2Regs));
done.link(&m_jit);