Title: [186811] trunk/Source/_javascript_Core
- Revision
- 186811
- Author
- mmir...@apple.com
- Date
- 2015-07-14 13:18:02 -0700 (Tue, 14 Jul 2015)
Log Message
Unreviewed, rolling out r186805.
Made raytracer on octane 80% slower
Reverted changeset:
"Makes compileArithSub in the DFG ensure that the constant is
an int32."
https://bugs.webkit.org/show_bug.cgi?id=146910
http://trac.webkit.org/changeset/186805
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (186810 => 186811)
--- trunk/Source/_javascript_Core/ChangeLog 2015-07-14 20:06:10 UTC (rev 186810)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-07-14 20:18:02 UTC (rev 186811)
@@ -1,3 +1,16 @@
+2015-07-14 Matthew Mirman <mmir...@apple.com>
+
+ Unreviewed, rolling out r186805.
+
+ Made raytracer on octane 80% slower
+
+ Reverted changeset:
+
+ "Makes compileArithSub in the DFG ensure that the constant is
+ an int32."
+ https://bugs.webkit.org/show_bug.cgi?id=146910
+ http://trac.webkit.org/changeset/186805
+
2015-07-13 Matthew Mirman <mmir...@apple.com>
Makes compileArithSub in the DFG ensure that the constant is an int32.
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp (186810 => 186811)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2015-07-14 20:06:10 UTC (rev 186810)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT.cpp 2015-07-14 20:18:02 UTC (rev 186811)
@@ -2989,7 +2989,7 @@
case Int32Use: {
ASSERT(!shouldCheckNegativeZero(node->arithMode()));
- if (node->child2()->isInt32Constant()) {
+ if (node->child2()->isNumberConstant()) {
SpeculateInt32Operand op1(this, node->child1());
int32_t imm2 = node->child2()->asInt32();
GPRTemporary result(this);
@@ -3006,7 +3006,7 @@
return;
}
- if (node->child1()->isInt32Constant()) {
+ if (node->child1()->isNumberConstant()) {
int32_t imm1 = node->child1()->asInt32();
SpeculateInt32Operand op2(this, node->child2());
GPRTemporary result(this);
Modified: trunk/Source/_javascript_Core/dfg/DFGValidate.cpp (186810 => 186811)
--- trunk/Source/_javascript_Core/dfg/DFGValidate.cpp 2015-07-14 20:06:10 UTC (rev 186810)
+++ trunk/Source/_javascript_Core/dfg/DFGValidate.cpp 2015-07-14 20:18:02 UTC (rev 186811)
@@ -574,9 +574,9 @@
return;
if (m_graph.m_planStage < PlanStage::AfterFixup)
- return;
-
- VALIDATE((node, edge), edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepMachineIntUse);
+ VALIDATE((node, edge), edge.useKind() == UntypedUse);
+ else
+ VALIDATE((node, edge), edge.useKind() == DoubleRepUse || edge.useKind() == DoubleRepRealUse || edge.useKind() == DoubleRepMachineIntUse);
}
void checkOperand(
Modified: trunk/Source/_javascript_Core/tests/stress/arith-add-with-constants.js (186810 => 186811)
--- trunk/Source/_javascript_Core/tests/stress/arith-add-with-constants.js 2015-07-14 20:06:10 UTC (rev 186810)
+++ trunk/Source/_javascript_Core/tests/stress/arith-add-with-constants.js 2015-07-14 20:18:02 UTC (rev 186811)
@@ -167,105 +167,56 @@
testArithAdd42WrittenAsInteger();
-
-
-// Test "value + 42".
-function arithAdd42WrittenAsInteger(x) {
- var a = x + 42;
- var b = 42 + x;
+function arithAdd42WrittenAsDouble(x) {
+ var a = x + 42.0;
+ var b = 42. + x;
if (!(isNaN(x) && isNaN(a) && isNaN(b)) && a !== b)
- throw "Internal error on arithAdd42WrittenAsInteger, a = " + a + " b = " + b;
+ throw "Internal error on arithAdd42WrittenAsDouble, a = " + a + " b = " + b;
return a;
}
-noInline(arithAdd42WrittenAsInteger);
+noInline(arithAdd42WrittenAsDouble);
-function testArithAdd42WrittenAsInteger() {
+function testArithAdd42WrittenAsDouble() {
for (var i = 0; i < 1e4; ++i) {
- var result = arithAdd42WrittenAsInteger(13);
+ var result = arithAdd42WrittenAsDouble(13);
if (result !== 55) {
- throw "arithAdd42WrittenAsInteger(13) = " + result + ", expected 55";
+ throw "arithAdd42WrittenAsDouble(i) = " + result + ", expected 55";
}
}
for (var i = 0; i < 1e4; ++i) {
- var result = arithAdd42WrittenAsInteger(-0);
+ var result = arithAdd42WrittenAsDouble(-0);
if (result !== 42) {
- throw "arithAdd42WrittenAsInteger(-0) = " + result + ", expected 42";
+ throw "arithAdd42WrittenAsDouble(-0) = " + result + ", expected 42";
}
}
for (var i = 0; i < 1e4; ++i) {
- var result = arithAdd42WrittenAsInteger(13.3);
+ var result = arithAdd42WrittenAsDouble(13.3);
if (result !== 55.3) {
- throw "arithAdd42WrittenAsInteger(13.3) = " + result + ", expected 55.3";
+ throw "arithAdd42WrittenAsDouble(13.3) = " + result + ", expected 55.3";
}
}
for (var i = 0; i < 1e4; ++i) {;
- var result = arithAdd42WrittenAsInteger(NaN);
+ var result = arithAdd42WrittenAsDouble(NaN);
if (!isNaN(result)) {
- throw "arithAdd42WrittenAsInteger(NaN) = " + result + ", expected NaN";
+ throw "arithAdd42WrittenAsDouble(NaN) = " + result + ", expected NaN";
}
}
for (var i = 0; i < 1e4; ++i) {;
- var result = arithAdd42WrittenAsInteger(Infinity);
+ var result = arithAdd42WrittenAsDouble(Infinity);
if (isFinite(result)) {
- throw "arithAdd42WrittenAsInteger(Infinity) = " + result + ", expected Infinity";
+ throw "arithAdd42WrittenAsDouble(Infinity) = " + result + ", expected Infinity";
}
}
for (var i = 0; i < 1e4; ++i) {;
- var result = arithAdd42WrittenAsInteger(-Infinity);
+ var result = arithAdd42WrittenAsDouble(-Infinity);
if (isFinite(result) || result >= 0) {
- throw "arithAdd42WrittenAsInteger(-Infinity) = " + result + ", expected -Infinity";
+ throw "arithAdd42WrittenAsDouble(-Infinity) = " + result + ", expected -Infinity";
}
}
}
-testArithAdd42WrittenAsInteger();
-
-function arithSub42WrittenAsDouble(x) {
- var a = (x|0) - 42.0;
- var b = -42. + (x|0);
- if (!(isNaN(x) && isNaN(a) && isNaN(b)) && a !== b)
- throw "Internal error on arithSub42WrittenAsDouble, a = " + a + " b = " + b;
- return a;
-}
-noInline(arithSub42WrittenAsDouble);
-
-function testArithSub42WrittenAsDouble() {
- for (var i = 0; i < 1e4; ++i) {
- var result = arithSub42WrittenAsDouble(13);
- if (result !== -29) {
- throw "arithSub42WrittenAsDouble(13) = " + result + ", expected -29";
- }
- }
-
- for (var i = 0; i < 1e4; ++i) {
- var result = arithSub42WrittenAsDouble(-0);
- if (result !== -42) {
- throw "arithSub42WrittenAsDouble(-0) = " + result + ", expected -42";
- }
- }
-
- for (var i = 0; i < 1e4; ++i) {
- var result = arithSub42WrittenAsDouble(13.3);
- if (result !== -29) {
- throw "arithSub42WrittenAsDouble(13.3) = " + result + ", expected -29";
- }
- }
-}
-testArithSub42WrittenAsDouble();
-
-
-function doubleConstant(){
- Math.min(0.0);
- +0.0;
-} noInline(doubleConstant);
-
-function testDoubleConstant(){
- for (var i = 0; i < 1e4; ++i) {
- doubleConstant();
- }
-}
-testDoubleConstant();
+testArithAdd42WrittenAsDouble();
\ No newline at end of file
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes