Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: test/unittests/wasm/loop-assignment-analysis-unittest.cc

Issue 1830663002: [wasm] Binary 11: AST changes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « test/unittests/wasm/ast-decoder-unittest.cc ('k') | test/unittests/wasm/wasm-macro-gen-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698