Diff
Modified: trunk/JSTests/ChangeLog (237252 => 237253)
--- trunk/JSTests/ChangeLog 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/JSTests/ChangeLog 2018-10-18 11:22:51 UTC (rev 237253)
@@ -1,3 +1,17 @@
+2018-10-18 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r237242.
+ https://bugs.webkit.org/show_bug.cgi?id=190701
+
+ it breaks "stress/sampling-profiler-basic.js" (Requested by
+ caiolima on #webkit).
+
+ Reverted changeset:
+
+ "[BigInt] Add ValueSub into DFG"
+ https://bugs.webkit.org/show_bug.cgi?id=186176
+ https://trac.webkit.org/changeset/237242
+
2018-10-17 Keith Miller <keith_mil...@apple.com>
AI does not clear Phantom allocation nodes.
Modified: trunk/JSTests/stress/big-int-subtraction-jit.js (237252 => 237253)
--- trunk/JSTests/stress/big-int-subtraction-jit.js 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/JSTests/stress/big-int-subtraction-jit.js 2018-10-18 11:22:51 UTC (rev 237253)
@@ -8,12 +8,12 @@
}
function bigIntAddition(x, y) {
- return x - y - 1n;
+ return x - y;
}
noInline(bigIntAddition);
for (let i = 0; i < 10000; i++) {
let r = bigIntAddition(3n, 10n);
- assert.sameValue(r, -8n, 3n + " - " + 10n + " - 1 = " + r);
+ assert.sameValue(r, -7n, 3n + " - " + 10n + " = " + r);
}
Deleted: trunk/JSTests/stress/value-sub-big-int-prediction-propagation.js (237252 => 237253)
--- trunk/JSTests/stress/value-sub-big-int-prediction-propagation.js 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/JSTests/stress/value-sub-big-int-prediction-propagation.js 2018-10-18 11:22:51 UTC (rev 237253)
@@ -1,18 +0,0 @@
-//@ runBigIntEnabled
-
-function assert(v, e) {
- if (v !== e)
- throw new Error("Expected value: " + e + " but got: " + v)
-}
-
-function bigIntPropagation(a, b) {
- let c = a - b;
- return c - 0n;
-}
-noInline(bigIntPropagation);
-
-for (let i = 0; i < 100000; i++) {
- let out = bigIntPropagation(0xffffffffffffffffffffffffffffffn, 0x1n);
- assert(out, 0xfffffffffffffffffffffffffffffen)
-}
-
Deleted: trunk/JSTests/stress/value-sub-big-int-untyped.js (237252 => 237253)
--- trunk/JSTests/stress/value-sub-big-int-untyped.js 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/JSTests/stress/value-sub-big-int-untyped.js 2018-10-18 11:22:51 UTC (rev 237253)
@@ -1,26 +0,0 @@
-//@ runBigIntEnabled
-
-function assert(v, e) {
- if (v !== e)
- throw new Error("Expected value: " + e + " but got: " + v)
-}
-
-function bigIntOperations(a, b) {
- let c = a - b;
- return a - c;
-}
-noInline(bigIntOperations);
-
-c = 0;
-let o = { valueOf: function () {
- c++;
- return 0b1111n;
-}};
-
-for (let i = 0; i < 100000; i++) {
- let out = bigIntOperations(o, 0b1010n);
- assert(out, 10n);
-}
-
-assert(c, 200000);
-
Modified: trunk/Source/_javascript_Core/ChangeLog (237252 => 237253)
--- trunk/Source/_javascript_Core/ChangeLog 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-10-18 11:22:51 UTC (rev 237253)
@@ -1,3 +1,17 @@
+2018-10-18 Commit Queue <commit-qu...@webkit.org>
+
+ Unreviewed, rolling out r237242.
+ https://bugs.webkit.org/show_bug.cgi?id=190701
+
+ it breaks "stress/sampling-profiler-basic.js" (Requested by
+ caiolima on #webkit).
+
+ Reverted changeset:
+
+ "[BigInt] Add ValueSub into DFG"
+ https://bugs.webkit.org/show_bug.cgi?id=186176
+ https://trac.webkit.org/changeset/237242
+
2018-10-18 Takafumi Kubota <takafumi.kubota1...@sslab.ics.keio.ac.jp>
Missing #pragma once in WasmOpcodeOrigin.h
Modified: trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h 2018-10-18 11:22:51 UTC (rev 237253)
@@ -589,15 +589,11 @@
forNode(node).fixTypeForRepresentation(m_graph, node);
break;
}
-
- case ValueSub:
+
case ValueAdd: {
- DFG_ASSERT(m_graph, node, node->binaryUseKind() == UntypedUse || node->binaryUseKind() == BigIntUse);
+ ASSERT(node->binaryUseKind() == UntypedUse);
clobberWorld();
- if (node->binaryUseKind() == BigIntUse)
- setTypeForNode(node, SpecBigInt);
- else
- setTypeForNode(node, SpecString | SpecBytecodeNumber | SpecBigInt);
+ setTypeForNode(node, SpecString | SpecBytecodeNumber);
break;
}
Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -4933,10 +4933,7 @@
case op_sub: {
Node* op1 = get(VirtualRegister(currentInstruction[2].u.operand));
Node* op2 = get(VirtualRegister(currentInstruction[3].u.operand));
- if (op1->hasNumberResult() && op2->hasNumberResult())
- set(VirtualRegister(currentInstruction[1].u.operand), makeSafe(addToGraph(ArithSub, op1, op2)));
- else
- set(VirtualRegister(currentInstruction[1].u.operand), makeSafe(addToGraph(ValueSub, op1, op2)));
+ set(VirtualRegister(currentInstruction[1].u.operand), makeSafe(addToGraph(ArithSub, op1, op2)));
NEXT_OPCODE(op_sub);
}
Modified: trunk/Source/_javascript_Core/dfg/DFGClobberize.h (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGClobberize.h 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGClobberize.h 2018-10-18 11:22:51 UTC (rev 237253)
@@ -639,7 +639,6 @@
case ValueBitOr:
case ValueNegate:
case ValueAdd:
- case ValueSub:
case SetFunctionName:
case GetDynamicVar:
case PutDynamicVar:
Modified: trunk/Source/_javascript_Core/dfg/DFGDoesGC.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGDoesGC.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGDoesGC.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -99,7 +99,6 @@
case ValueBitAnd:
case ValueBitOr:
case ValueAdd:
- case ValueSub:
case ValueNegate:
case TryGetById:
case GetById:
Modified: trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -98,39 +98,7 @@
// This gets handled by fixupGetAndSetLocalsInBlock().
return;
}
-
- case ValueSub: {
- Edge& child1 = node->child1();
- Edge& child2 = node->child2();
-
- if (Node::shouldSpeculateBigInt(child1.node(), child2.node())) {
- fixEdge<BigIntUse>(child1);
- fixEdge<BigIntUse>(child2);
- break;
- }
- if (Node::shouldSpeculateUntypedForArithmetic(node->child1().node(), node->child2().node())) {
- fixEdge<UntypedUse>(child1);
- fixEdge<UntypedUse>(child2);
- break;
- }
-
- if (attemptToMakeIntegerAdd(node)) {
- // FIXME: [DFG] Clear ArithSub when ArithMode is Unchecked
- // https://bugs.webkit.org/show_bug.cgi?id=190607
- node->setOp(ArithSub);
- break;
- }
-
- DFG_ASSERT(m_graph, node, Node::shouldSpeculateNumberOrBooleanExpectingDefined(child1.node(), child2.node()));
- fixDoubleOrBooleanEdge(node->child1());
- fixDoubleOrBooleanEdge(node->child2());
- node->setOp(ArithSub);
- node->setResult(NodeResultDouble);
-
- break;
- }
-
case ValueBitOr:
case ValueBitAnd: {
if (Node::shouldSpeculateBigInt(node->child1().node(), node->child2().node())) {
@@ -325,8 +293,13 @@
case ArithAdd:
case ArithSub: {
- // FIXME: [DFG] Clear ArithSub when ArithMode is Unchecked
- // https://bugs.webkit.org/show_bug.cgi?id=190607
+ if (op == ArithSub
+ && Node::shouldSpeculateUntypedForArithmetic(node->child1().node(), node->child2().node())) {
+ fixEdge<UntypedUse>(node->child1());
+ fixEdge<UntypedUse>(node->child2());
+ node->setResult(NodeResultJS);
+ break;
+ }
if (attemptToMakeIntegerAdd(node))
break;
fixDoubleOrBooleanEdge(node->child1());
Modified: trunk/Source/_javascript_Core/dfg/DFGGraph.h (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGGraph.h 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGGraph.h 2018-10-18 11:22:51 UTC (rev 237253)
@@ -238,7 +238,7 @@
AddSpeculationMode addSpeculationMode(Node* add, bool leftShouldSpeculateInt32, bool rightShouldSpeculateInt32, PredictionPass pass)
{
- ASSERT(add->op() == ValueAdd || add->op() == ValueSub || add->op() == ArithAdd || add->op() == ArithSub);
+ ASSERT(add->op() == ValueAdd || add->op() == ArithAdd || add->op() == ArithSub);
RareCaseProfilingSource source = add->sourceFor(pass);
Modified: trunk/Source/_javascript_Core/dfg/DFGNodeType.h (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGNodeType.h 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGNodeType.h 2018-10-18 11:22:51 UTC (rev 237253)
@@ -171,8 +171,6 @@
/* Add of values may either be arithmetic, or result in string concatenation. */\
macro(ValueAdd, NodeResultJS | NodeMustGenerate) \
\
- macro(ValueSub, NodeResultJS | NodeMustGenerate) \
- \
/* Add of values that always convers its inputs to strings. May have two or three kids. */\
macro(StrCat, NodeResultJS | NodeMustGenerate) \
\
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -1286,17 +1286,6 @@
RELEASE_AND_RETURN(scope, regexp->test(exec, globalObject, input));
}
-JSCell* JIT_OPERATION operationSubBigInt(ExecState* exec, JSCell* op1, JSCell* op2)
-{
- VM* vm = &exec->vm();
- NativeCallFrameTracer tracer(vm, exec);
-
- JSBigInt* leftOperand = jsCast<JSBigInt*>(op1);
- JSBigInt* rightOperand = jsCast<JSBigInt*>(op2);
-
- return JSBigInt::sub(*vm, leftOperand, rightOperand);
-}
-
JSCell* JIT_OPERATION operationBitAndBigInt(ExecState* exec, JSCell* op1, JSCell* op2)
{
VM* vm = &exec->vm();
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.h (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.h 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.h 2018-10-18 11:22:51 UTC (rev 237253)
@@ -163,7 +163,6 @@
size_t JIT_OPERATION operationRegExpTest(ExecState*, JSGlobalObject*, RegExpObject*, EncodedJSValue) WTF_INTERNAL;
size_t JIT_OPERATION operationRegExpTestGeneric(ExecState*, JSGlobalObject*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
size_t JIT_OPERATION operationCompareStrictEqCell(ExecState*, JSCell* op1, JSCell* op2) WTF_INTERNAL;
-JSCell* JIT_OPERATION operationSubBigInt(ExecState*, JSCell* op1, JSCell* op2) WTF_INTERNAL;
JSCell* JIT_OPERATION operationBitAndBigInt(ExecState*, JSCell* op1, JSCell* op2) WTF_INTERNAL;
JSCell* JIT_OPERATION operationBitOrBigInt(ExecState*, JSCell* op1, JSCell* op2) WTF_INTERNAL;
size_t JIT_OPERATION operationSameValue(ExecState*, EncodedJSValue, EncodedJSValue) WTF_INTERNAL;
Modified: trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGPredictionPropagationPhase.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -246,33 +246,6 @@
break;
}
- case ValueSub: {
- SpeculatedType left = node->child1()->prediction();
- SpeculatedType right = node->child2()->prediction();
-
- if (left && right) {
- if (isFullNumberOrBooleanSpeculationExpectingDefined(left)
- && isFullNumberOrBooleanSpeculationExpectingDefined(right)) {
- if (m_graph.addSpeculationMode(node, m_pass) != DontSpeculateInt32)
- changed |= mergePrediction(SpecInt32Only);
- else if (m_graph.addShouldSpeculateAnyInt(node))
- changed |= mergePrediction(SpecInt52Only);
- else
- changed |= mergePrediction(speculatedDoubleTypeForPredictions(left, right));
- } else if (isBigIntSpeculation(left) && isBigIntSpeculation(right))
- changed |= mergePrediction(SpecBigInt);
- else {
- changed |= mergePrediction(SpecInt32Only);
- if (node->mayHaveDoubleResult())
- changed |= mergePrediction(SpecBytecodeDouble);
- if (node->mayHaveNonNumberResult())
- changed |= mergePrediction(SpecBigInt);
- }
- }
-
- break;
- }
-
case ValueBitOr:
case ValueBitAnd: {
if (node->child1()->shouldSpeculateBigInt() && node->child2()->shouldSpeculateBigInt())
@@ -548,7 +521,6 @@
switch (node->op()) {
case ValueAdd:
- case ValueSub:
case ArithAdd:
case ArithSub: {
SpeculatedType left = node->child1()->prediction();
@@ -1096,7 +1068,6 @@
case ValueBitAnd:
case ValueNegate:
case ValueAdd:
- case ValueSub:
case ArithAdd:
case ArithSub:
case ArithNegate:
Modified: trunk/Source/_javascript_Core/dfg/DFGSafeToExecute.h (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGSafeToExecute.h 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGSafeToExecute.h 2018-10-18 11:22:51 UTC (rev 237253)
@@ -230,7 +230,6 @@
case ValueBitOr:
case ValueNegate:
case ValueAdd:
- case ValueSub:
case TryGetById:
case DeleteById:
case DeleteByVal:
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -3871,51 +3871,6 @@
compileMathIC(node, addIC, needsScratchGPRReg, needsScratchFPRReg, repatchingFunction, nonRepatchingFunction);
}
-void SpeculativeJIT::compileValueSub(Node* node)
-{
- Edge& leftChild = node->child1();
- Edge& rightChild = node->child2();
-
- if (node->binaryUseKind() == UntypedUse) {
-#if USE(JSVALUE64)
- bool needsScratchGPRReg = true;
- bool needsScratchFPRReg = false;
-#else
- bool needsScratchGPRReg = true;
- bool needsScratchFPRReg = true;
-#endif
-
- CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
- ArithProfile* arithProfile = baselineCodeBlock->arithProfileForBytecodeOffset(node->origin.semantic.bytecodeIndex);
- Instruction* instruction = &baselineCodeBlock->instructions()[node->origin.semantic.bytecodeIndex];
- JITSubIC* subIC = m_jit.codeBlock()->addJITSubIC(arithProfile, instruction);
- auto repatchingFunction = operationValueSubOptimize;
- auto nonRepatchingFunction = operationValueSub;
-
- compileMathIC(node, subIC, needsScratchGPRReg, needsScratchFPRReg, repatchingFunction, nonRepatchingFunction);
- return;
- }
-
- ASSERT(leftChild.useKind() == BigIntUse && rightChild.useKind() == BigIntUse);
-
- SpeculateCellOperand left(this, node->child1());
- SpeculateCellOperand right(this, node->child2());
- GPRReg leftGPR = left.gpr();
- GPRReg rightGPR = right.gpr();
-
- speculateBigInt(leftChild, leftGPR);
- speculateBigInt(rightChild, rightGPR);
-
- flushRegisters();
- GPRFlushedCallResult result(this);
- GPRReg resultGPR = result.gpr();
-
- callOperation(operationSubBigInt, resultGPR, leftGPR, rightGPR);
-
- m_jit.exceptionCheck();
- cellResult(resultGPR, node);
-}
-
template <typename Generator, typename RepatchingFunction, typename NonRepatchingFunction>
void SpeculativeJIT::compileMathIC(Node* node, JITBinaryMathIC<Generator>* mathIC, bool needsScratchGPRReg, bool needsScratchFPRReg, RepatchingFunction repatchingFunction, NonRepatchingFunction nonRepatchingFunction)
{
@@ -4551,6 +4506,26 @@
return;
}
+ case UntypedUse: {
+#if USE(JSVALUE64)
+ bool needsScratchGPRReg = true;
+ bool needsScratchFPRReg = false;
+#else
+ bool needsScratchGPRReg = true;
+ bool needsScratchFPRReg = true;
+#endif
+
+ CodeBlock* baselineCodeBlock = m_jit.graph().baselineCodeBlockFor(node->origin.semantic);
+ ArithProfile* arithProfile = baselineCodeBlock->arithProfileForBytecodeOffset(node->origin.semantic.bytecodeIndex);
+ Instruction* instruction = &baselineCodeBlock->instructions()[node->origin.semantic.bytecodeIndex];
+ JITSubIC* subIC = m_jit.codeBlock()->addJITSubIC(arithProfile, instruction);
+ auto repatchingFunction = operationValueSubOptimize;
+ auto nonRepatchingFunction = operationValueSub;
+
+ compileMathIC(node, subIC, needsScratchGPRReg, needsScratchFPRReg, repatchingFunction, nonRepatchingFunction);
+ return;
+ }
+
default:
RELEASE_ASSERT_NOT_REACHED();
return;
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.h 2018-10-18 11:22:51 UTC (rev 237253)
@@ -1344,7 +1344,6 @@
void compileArithDoubleUnaryOp(Node*, double (*doubleFunction)(double), double (*operation)(ExecState*, EncodedJSValue));
void compileValueAdd(Node*);
- void compileValueSub(Node*);
void compileArithAdd(Node*);
void compileMakeRope(Node*);
void compileArithAbs(Node*);
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -2029,10 +2029,6 @@
compileValueAdd(node);
break;
- case ValueSub:
- compileValueSub(node);
- break;
-
case StrCat: {
compileStrCat(node);
break;
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -2171,10 +2171,6 @@
compileValueAdd(node);
break;
- case ValueSub:
- compileValueSub(node);
- break;
-
case StrCat: {
compileStrCat(node);
break;
Modified: trunk/Source/_javascript_Core/dfg/DFGValidate.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/dfg/DFGValidate.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/dfg/DFGValidate.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -254,7 +254,6 @@
break;
case MakeRope:
case ValueAdd:
- case ValueSub:
case ArithAdd:
case ArithSub:
case ArithMul:
Modified: trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/ftl/FTLCapabilities.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -90,7 +90,6 @@
case ValueBitOr:
case ValueNegate:
case ValueAdd:
- case ValueSub:
case StrCat:
case ArithAdd:
case ArithClz32:
Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (237252 => 237253)
--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2018-10-18 09:25:26 UTC (rev 237252)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp 2018-10-18 11:22:51 UTC (rev 237253)
@@ -593,9 +593,6 @@
case ValueAdd:
compileValueAdd();
break;
- case ValueSub:
- compileValueSub();
- break;
case StrCat:
compileStrCat();
break;
@@ -1868,25 +1865,6 @@
compileBinaryMathIC<JITAddGenerator>(arithProfile, instruction, repatchingFunction, nonRepatchingFunction);
}
- void compileValueSub()
- {
- if (m_node->isBinaryUseKind(BigIntUse)) {
- LValue left = lowBigInt(m_node->child1());
- LValue right = lowBigInt(m_node->child2());
-
- LValue result = vmCall(pointerType(), m_out.operation(operationSubBigInt), m_callFrame, left, right);
- setJSValue(result);
- return;
- }
-
- CodeBlock* baselineCodeBlock = m_ftlState.graph.baselineCodeBlockFor(m_node->origin.semantic);
- ArithProfile* arithProfile = baselineCodeBlock->arithProfileForBytecodeOffset(m_node->origin.semantic.bytecodeIndex);
- Instruction* instruction = &baselineCodeBlock->instructions()[m_node->origin.semantic.bytecodeIndex];
- auto repatchingFunction = operationValueSubOptimize;
- auto nonRepatchingFunction = operationValueSub;
- compileBinaryMathIC<JITSubGenerator>(arithProfile, instruction, repatchingFunction, nonRepatchingFunction);
- }
-
template <typename Generator, typename Func1, typename Func2,
typename = std::enable_if_t<std::is_function<typename std::remove_pointer<Func1>::type>::value && std::is_function<typename std::remove_pointer<Func2>::type>::value>>
void compileUnaryMathIC(ArithProfile* arithProfile, Instruction* instruction, Func1 repatchingFunction, Func2 nonRepatchingFunction)