Index: test/unittests/wasm/loop-assignment-analysis-unittest.cc |
diff --git a/test/unittests/wasm/loop-assignment-analysis-unittest.cc b/test/unittests/wasm/loop-assignment-analysis-unittest.cc |
index c134de890d22ff73bc42944e45c75d1b5613155f..919ce8e2345617e5930806814e2966b93b2149da 100644 |
--- a/test/unittests/wasm/loop-assignment-analysis-unittest.cc |
+++ b/test/unittests/wasm/loop-assignment-analysis-unittest.cc |
@@ -52,7 +52,7 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Empty1) { |
TEST_F(WasmLoopAssignmentAnalyzerTest, One) { |
num_locals = 5; |
for (int i = 0; i < 5; i++) { |
- byte code[] = {WASM_LOOP(1, WASM_SET_ZERO(i))}; |
+ byte code[] = {WASM_LOOP(WASM_SET_ZERO(i))}; |
BitVector* assigned = Analyze(code, code + arraysize(code)); |
for (int j = 0; j < assigned->length(); j++) { |
CHECK_EQ(j == i, assigned->Contains(j)); |
@@ -63,7 +63,7 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, One) { |
TEST_F(WasmLoopAssignmentAnalyzerTest, OneBeyond) { |
num_locals = 5; |
for (int i = 0; i < 5; i++) { |
- byte code[] = {WASM_LOOP(1, WASM_SET_ZERO(i)), WASM_SET_ZERO(1)}; |
+ byte code[] = {WASM_LOOP(WASM_SET_ZERO(i)), WASM_SET_ZERO(1)}; |
BitVector* assigned = Analyze(code, code + arraysize(code)); |
for (int j = 0; j < assigned->length(); j++) { |
CHECK_EQ(j == i, assigned->Contains(j)); |
@@ -75,7 +75,7 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Two) { |
num_locals = 5; |
for (int i = 0; i < 5; i++) { |
for (int j = 0; j < 5; j++) { |
- byte code[] = {WASM_LOOP(2, WASM_SET_ZERO(i), WASM_SET_ZERO(j))}; |
+ byte code[] = {WASM_LOOP(WASM_SET_ZERO(i), WASM_SET_ZERO(j))}; |
BitVector* assigned = Analyze(code, code + arraysize(code)); |
for (int k = 0; k < assigned->length(); k++) { |
bool expected = k == i || k == j; |
@@ -89,7 +89,7 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, NestedIf) { |
num_locals = 5; |
for (int i = 0; i < 5; i++) { |
byte code[] = {WASM_LOOP( |
- 1, WASM_IF_ELSE(WASM_SET_ZERO(0), WASM_SET_ZERO(i), WASM_SET_ZERO(1)))}; |
+ WASM_IF_ELSE(WASM_SET_ZERO(0), WASM_SET_ZERO(i), WASM_SET_ZERO(1)))}; |
BitVector* assigned = Analyze(code, code + arraysize(code)); |
for (int j = 0; j < assigned->length(); j++) { |
bool expected = i == j || j == 0 || j == 1; |
@@ -128,7 +128,7 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, BigLocal) { |
TEST_F(WasmLoopAssignmentAnalyzerTest, Break) { |
num_locals = 3; |
byte code[] = { |
- WASM_LOOP(1, WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(1, WASM_SET_ZERO(1)))), |
+ WASM_LOOP(WASM_IF(WASM_GET_LOCAL(0), WASM_BRV(1, WASM_SET_ZERO(1)))), |
WASM_SET_ZERO(0)}; |
BitVector* assigned = Analyze(code, code + arraysize(code)); |
@@ -141,10 +141,10 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Break) { |
TEST_F(WasmLoopAssignmentAnalyzerTest, Loop1) { |
num_locals = 5; |
byte code[] = { |
- WASM_LOOP(1, WASM_IF(WASM_GET_LOCAL(0), |
- WASM_BRV(0, WASM_SET_LOCAL( |
- 3, WASM_I32_SUB(WASM_GET_LOCAL(0), |
- WASM_I8(1)))))), |
+ WASM_LOOP(WASM_IF( |
+ WASM_GET_LOCAL(0), |
+ WASM_BRV(0, WASM_SET_LOCAL( |
+ 3, WASM_I32_SUB(WASM_GET_LOCAL(0), WASM_I8(1)))))), |
WASM_GET_LOCAL(0)}; |
BitVector* assigned = Analyze(code, code + arraysize(code)); |
@@ -160,16 +160,15 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Loop2) { |
const byte kSum = 3; |
byte code[] = {WASM_BLOCK( |
- 3, |
WASM_WHILE( |
WASM_GET_LOCAL(kIter), |
- WASM_BLOCK(2, WASM_SET_LOCAL( |
- kSum, WASM_F32_ADD( |
- WASM_GET_LOCAL(kSum), |
- WASM_LOAD_MEM(MachineType::Float32(), |
- WASM_GET_LOCAL(kIter)))), |
- WASM_SET_LOCAL(kIter, WASM_I32_SUB(WASM_GET_LOCAL(kIter), |
- WASM_I8(4))))), |
+ WASM_BLOCK( |
+ WASM_SET_LOCAL( |
+ kSum, WASM_F32_ADD(WASM_GET_LOCAL(kSum), |
+ WASM_LOAD_MEM(MachineType::Float32(), |
+ WASM_GET_LOCAL(kIter)))), |
+ WASM_SET_LOCAL(kIter, |
+ WASM_I32_SUB(WASM_GET_LOCAL(kIter), WASM_I8(4))))), |
WASM_STORE_MEM(MachineType::Float32(), WASM_ZERO, WASM_GET_LOCAL(kSum)), |
WASM_GET_LOCAL(kIter))}; |