| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "test/unittests/test-utils.h" | 5 #include "test/unittests/test-utils.h" |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "test/cctest/wasm/test-signatures.h" | 9 #include "test/cctest/wasm/test-signatures.h" |
| 10 | 10 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 WASM_BLOCK(2, WASM_SET_LOCAL( | 177 WASM_BLOCK(2, WASM_SET_LOCAL( |
| 178 kSum, WASM_F32_ADD( | 178 kSum, WASM_F32_ADD( |
| 179 WASM_GET_LOCAL(kSum), | 179 WASM_GET_LOCAL(kSum), |
| 180 WASM_LOAD_MEM(MachineType::Float32(), | 180 WASM_LOAD_MEM(MachineType::Float32(), |
| 181 WASM_GET_LOCAL(kIter)))), | 181 WASM_GET_LOCAL(kIter)))), |
| 182 WASM_SET_LOCAL(kIter, WASM_I32_SUB(WASM_GET_LOCAL(kIter), | 182 WASM_SET_LOCAL(kIter, WASM_I32_SUB(WASM_GET_LOCAL(kIter), |
| 183 WASM_I8(4))))), | 183 WASM_I8(4))))), |
| 184 WASM_STORE_MEM(MachineType::Float32(), WASM_ZERO, WASM_GET_LOCAL(kSum)), | 184 WASM_STORE_MEM(MachineType::Float32(), WASM_ZERO, WASM_GET_LOCAL(kSum)), |
| 185 WASM_GET_LOCAL(kIter))}; | 185 WASM_GET_LOCAL(kIter))}; |
| 186 | 186 |
| 187 BitVector* assigned = Analyze(code + 2, code + arraysize(code)); | 187 BitVector* assigned = Analyze(code + 1, code + arraysize(code)); |
| 188 for (int j = 0; j < assigned->length(); j++) { | 188 for (int j = 0; j < assigned->length(); j++) { |
| 189 bool expected = j == kIter || j == kSum; | 189 bool expected = j == kIter || j == kSum; |
| 190 CHECK_EQ(expected, assigned->Contains(j)); | 190 CHECK_EQ(expected, assigned->Contains(j)); |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 | 194 |
| 195 } // namespace wasm | 195 } // namespace wasm |
| 196 } // namespace internal | 196 } // namespace internal |
| 197 } // namespace v8 | 197 } // namespace v8 |
| OLD | NEW |