From f579e1194046c50f2e6bb54348d48c8e7d1a53cf Mon Sep 17 00:00:00 2001 From: Ujjwal Sharma Date: Fri, 15 Mar 2019 18:35:06 +0530 Subject: deps: update V8 to 7.4.288.13 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/26685 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: Refael Ackermann --- .../compiler/test-machine-operator-reducer.cc | 139 +++++++-------------- 1 file changed, 47 insertions(+), 92 deletions(-) (limited to 'deps/v8/test/cctest/compiler/test-machine-operator-reducer.cc') diff --git a/deps/v8/test/cctest/compiler/test-machine-operator-reducer.cc b/deps/v8/test/cctest/compiler/test-machine-operator-reducer.cc index 073891a52b..61736ae2dc 100644 --- a/deps/v8/test/cctest/compiler/test-machine-operator-reducer.cc +++ b/deps/v8/test/cctest/compiler/test-machine-operator-reducer.cc @@ -256,11 +256,8 @@ TEST(ReduceWord32And) { ReducerTester R; R.binop = R.machine.Word32And(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; - R.CheckFoldBinop(x & y, x, y); - } + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(x & y, x, y); } } R.CheckPutConstantOnRight(33); @@ -282,11 +279,8 @@ TEST(ReduceWord32Or) { ReducerTester R; R.binop = R.machine.Word32Or(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; - R.CheckFoldBinop(x | y, x, y); - } + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(x | y, x, y); } } R.CheckPutConstantOnRight(36); @@ -308,11 +302,8 @@ TEST(ReduceWord32Xor) { ReducerTester R; R.binop = R.machine.Word32Xor(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; - R.CheckFoldBinop(x ^ y, x, y); - } + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(x ^ y, x, y); } } R.CheckPutConstantOnRight(39); @@ -332,10 +323,9 @@ TEST(ReduceWord32Shl) { R.binop = R.machine.Word32Shl(); // TODO(titzer): out of range shifts - FOR_INT32_INPUTS(i) { + FOR_INT32_INPUTS(x) { for (int y = 0; y < 32; y++) { - int32_t x = *i; - R.CheckFoldBinop(x << y, x, y); + R.CheckFoldBinop(base::ShlWithWraparound(x, y), x, y); } } @@ -351,10 +341,9 @@ TEST(ReduceWord64Shl) { ReducerTester R; R.binop = R.machine.Word64Shl(); - FOR_INT64_INPUTS(i) { + FOR_INT64_INPUTS(x) { for (int64_t y = 0; y < 64; y++) { - int64_t x = *i; - R.CheckFoldBinop(x << y, x, y); + R.CheckFoldBinop(base::ShlWithWraparound(x, y), x, y); } } @@ -371,9 +360,8 @@ TEST(ReduceWord32Shr) { R.binop = R.machine.Word32Shr(); // TODO(titzer): test out of range shifts - FOR_UINT32_INPUTS(i) { + FOR_UINT32_INPUTS(x) { for (uint32_t y = 0; y < 32; y++) { - uint32_t x = *i; R.CheckFoldBinop(x >> y, x, y); } } @@ -390,9 +378,8 @@ TEST(ReduceWord64Shr) { ReducerTester R; R.binop = R.machine.Word64Shr(); - FOR_UINT64_INPUTS(i) { + FOR_UINT64_INPUTS(x) { for (uint64_t y = 0; y < 64; y++) { - uint64_t x = *i; R.CheckFoldBinop(x >> y, x, y); } } @@ -410,9 +397,8 @@ TEST(ReduceWord32Sar) { R.binop = R.machine.Word32Sar(); // TODO(titzer): test out of range shifts - FOR_INT32_INPUTS(i) { + FOR_INT32_INPUTS(x) { for (int32_t y = 0; y < 32; y++) { - int32_t x = *i; R.CheckFoldBinop(x >> y, x, y); } } @@ -429,9 +415,8 @@ TEST(ReduceWord64Sar) { ReducerTester R; R.binop = R.machine.Word64Sar(); - FOR_INT64_INPUTS(i) { + FOR_INT64_INPUTS(x) { for (int64_t y = 0; y < 64; y++) { - int64_t x = *i; R.CheckFoldBinop(x >> y, x, y); } } @@ -477,11 +462,8 @@ TEST(Word32Equal) { ReducerTester R; R.binop = R.machine.Word32Equal(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; - R.CheckFoldBinop(x == y ? 1 : 0, x, y); - } + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(x == y ? 1 : 0, x, y); } } R.CheckPutConstantOnRight(48); @@ -502,9 +484,8 @@ TEST(ReduceInt32Add) { ReducerTester R; R.binop = R.machine.Int32Add(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(base::AddWithWraparound(x, y), x, y); } } @@ -523,9 +504,8 @@ TEST(ReduceInt64Add) { ReducerTester R; R.binop = R.machine.Int64Add(); - FOR_INT64_INPUTS(pl) { - FOR_INT64_INPUTS(pr) { - int64_t x = *pl, y = *pr; + FOR_INT64_INPUTS(x) { + FOR_INT64_INPUTS(y) { R.CheckFoldBinop(base::AddWithWraparound(x, y), x, y); } } @@ -542,9 +522,8 @@ TEST(ReduceInt32Sub) { ReducerTester R; R.binop = R.machine.Int32Sub(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(base::SubWithWraparound(x, y), x, y); } } @@ -561,9 +540,8 @@ TEST(ReduceInt64Sub) { ReducerTester R; R.binop = R.machine.Int64Sub(); - FOR_INT64_INPUTS(pl) { - FOR_INT64_INPUTS(pr) { - int64_t x = *pl, y = *pr; + FOR_INT64_INPUTS(x) { + FOR_INT64_INPUTS(y) { R.CheckFoldBinop(base::SubWithWraparound(x, y), x, y); } } @@ -586,9 +564,8 @@ TEST(ReduceInt32Mul) { ReducerTester R; R.binop = R.machine.Int32Mul(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(base::MulWithWraparound(x, y), x, y); } } @@ -624,9 +601,8 @@ TEST(ReduceInt32Div) { ReducerTester R; R.binop = R.machine.Int32Div(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { if (y == 0) continue; // TODO(titzer): test / 0 int32_t r = y == -1 ? base::NegateWithWraparound(x) : x / y; // INT_MIN / -1 may explode in C @@ -653,9 +629,8 @@ TEST(ReduceUint32Div) { ReducerTester R; R.binop = R.machine.Uint32Div(); - FOR_UINT32_INPUTS(pl) { - FOR_UINT32_INPUTS(pr) { - uint32_t x = *pl, y = *pr; + FOR_UINT32_INPUTS(x) { + FOR_UINT32_INPUTS(y) { if (y == 0) continue; // TODO(titzer): test / 0 R.CheckFoldBinop(x / y, x, y); } @@ -682,9 +657,8 @@ TEST(ReduceInt32Mod) { ReducerTester R; R.binop = R.machine.Int32Mod(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { if (y == 0) continue; // TODO(titzer): test % 0 int32_t r = y == -1 ? 0 : x % y; // INT_MIN % -1 may explode in C R.CheckFoldBinop(r, x, y); @@ -706,9 +680,8 @@ TEST(ReduceUint32Mod) { ReducerTester R; R.binop = R.machine.Uint32Mod(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - uint32_t x = *pl, y = *pr; + FOR_UINT32_INPUTS(x) { + FOR_UINT32_INPUTS(y) { if (y == 0) continue; // TODO(titzer): test x % 0 R.CheckFoldBinop(x % y, x, y); } @@ -734,11 +707,8 @@ TEST(ReduceInt32LessThan) { ReducerTester R; R.binop = R.machine.Int32LessThan(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; - R.CheckFoldBinop(x < y ? 1 : 0, x, y); - } + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(x < y ? 1 : 0, x, y); } } R.CheckDontPutConstantOnRight(41399); @@ -754,14 +724,11 @@ TEST(ReduceInt32LessThanOrEqual) { ReducerTester R; R.binop = R.machine.Int32LessThanOrEqual(); - FOR_INT32_INPUTS(pl) { - FOR_INT32_INPUTS(pr) { - int32_t x = *pl, y = *pr; - R.CheckFoldBinop(x <= y ? 1 : 0, x, y); - } + FOR_INT32_INPUTS(x) { + FOR_INT32_INPUTS(y) { R.CheckFoldBinop(x <= y ? 1 : 0, x, y); } } - FOR_INT32_INPUTS(i) { R.CheckDontPutConstantOnRight(*i); } + FOR_INT32_INPUTS(i) { R.CheckDontPutConstantOnRight(i); } Node* x = R.Parameter(0); @@ -773,11 +740,8 @@ TEST(ReduceUint32LessThan) { ReducerTester R; R.binop = R.machine.Uint32LessThan(); - FOR_UINT32_INPUTS(pl) { - FOR_UINT32_INPUTS(pr) { - uint32_t x = *pl, y = *pr; - R.CheckFoldBinop(x < y ? 1 : 0, x, y); - } + FOR_UINT32_INPUTS(x) { + FOR_UINT32_INPUTS(y) { R.CheckFoldBinop(x < y ? 1 : 0, x, y); } } R.CheckDontPutConstantOnRight(41399); @@ -797,11 +761,8 @@ TEST(ReduceUint32LessThanOrEqual) { ReducerTester R; R.binop = R.machine.Uint32LessThanOrEqual(); - FOR_UINT32_INPUTS(pl) { - FOR_UINT32_INPUTS(pr) { - uint32_t x = *pl, y = *pr; - R.CheckFoldBinop(x <= y ? 1 : 0, x, y); - } + FOR_UINT32_INPUTS(x) { + FOR_UINT32_INPUTS(y) { R.CheckFoldBinop(x <= y ? 1 : 0, x, y); } } R.CheckDontPutConstantOnRight(41399); @@ -846,11 +807,8 @@ TEST(ReduceFloat32Sub) { ReducerTester R; R.binop = R.machine.Float32Sub(); - FOR_FLOAT32_INPUTS(pl) { - FOR_FLOAT32_INPUTS(pr) { - float x = *pl, y = *pr; - R.CheckFoldBinop(x - y, x, y); - } + FOR_FLOAT32_INPUTS(x) { + FOR_FLOAT32_INPUTS(y) { R.CheckFoldBinop(x - y, x, y); } } Node* x = R.Parameter(); @@ -866,11 +824,8 @@ TEST(ReduceFloat64Sub) { ReducerTester R; R.binop = R.machine.Float64Sub(); - FOR_FLOAT64_INPUTS(pl) { - FOR_FLOAT64_INPUTS(pr) { - double x = *pl, y = *pr; - R.CheckFoldBinop(x - y, x, y); - } + FOR_FLOAT64_INPUTS(x) { + FOR_FLOAT64_INPUTS(y) { R.CheckFoldBinop(x - y, x, y); } } Node* x = R.Parameter(); -- cgit v1.2.1