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

Side by Side Diff: test/unittests/wasm/wasm-macro-gen-unittest.cc

Issue 1775873002: [Wasm] Convert many of the fixed-size values to LEB128. (Closed) Base URL: http://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix windows Created 4 years, 9 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
« no previous file with comments | « test/unittests/wasm/module-decoder-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/wasm/wasm-macro-gen.h" 7 #include "src/wasm/wasm-macro-gen.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 TEST_F(WasmMacroGenTest, MacroStatements) { 86 TEST_F(WasmMacroGenTest, MacroStatements) {
87 EXPECT_SIZE(8, WASM_WHILE(WASM_I8(0), WASM_NOP)); 87 EXPECT_SIZE(8, WASM_WHILE(WASM_I8(0), WASM_NOP));
88 EXPECT_SIZE(7, WASM_INC_LOCAL(0)); 88 EXPECT_SIZE(7, WASM_INC_LOCAL(0));
89 EXPECT_SIZE(7, WASM_INC_LOCAL_BY(0, 3)); 89 EXPECT_SIZE(7, WASM_INC_LOCAL_BY(0, 3));
90 90
91 EXPECT_SIZE(3, WASM_BREAK(0)); 91 EXPECT_SIZE(3, WASM_BREAK(0));
92 EXPECT_SIZE(3, WASM_CONTINUE(0)); 92 EXPECT_SIZE(3, WASM_CONTINUE(0));
93 } 93 }
94 94
95 TEST_F(WasmMacroGenTest, BrTable) { 95 TEST_F(WasmMacroGenTest, BrTable) {
96 EXPECT_SIZE(7, WASM_BR_TABLE(WASM_ZERO, 1, BR_TARGET(1))); 96 EXPECT_SIZE(8, WASM_BR_TABLE(WASM_ZERO, 1, BR_TARGET(1)));
97 } 97 }
98 98
99 99
100 TEST_F(WasmMacroGenTest, Expressions) { 100 TEST_F(WasmMacroGenTest, Expressions) {
101 EXPECT_SIZE(2, WASM_GET_LOCAL(0)); 101 EXPECT_SIZE(2, WASM_GET_LOCAL(0));
102 EXPECT_SIZE(2, WASM_GET_LOCAL(1)); 102 EXPECT_SIZE(2, WASM_GET_LOCAL(1));
103 EXPECT_SIZE(2, WASM_GET_LOCAL(12)); 103 EXPECT_SIZE(2, WASM_GET_LOCAL(12));
104 EXPECT_SIZE(2, WASM_LOAD_GLOBAL(0)); 104 EXPECT_SIZE(2, WASM_LOAD_GLOBAL(0));
105 EXPECT_SIZE(2, WASM_LOAD_GLOBAL(1)); 105 EXPECT_SIZE(2, WASM_LOAD_GLOBAL(1));
106 EXPECT_SIZE(2, WASM_LOAD_GLOBAL(12)); 106 EXPECT_SIZE(2, WASM_LOAD_GLOBAL(12));
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 EXPECT_SIZE(5, WASM_LOAD_MEM_OFFSET(kMemTypes[i], 11, WASM_ZERO)); 315 EXPECT_SIZE(5, WASM_LOAD_MEM_OFFSET(kMemTypes[i], 11, WASM_ZERO));
316 } 316 }
317 for (size_t i = 0; i < arraysize(kMemTypes); i++) { 317 for (size_t i = 0; i < arraysize(kMemTypes); i++) {
318 EXPECT_SIZE(7, WASM_STORE_MEM_OFFSET(kMemTypes[i], 13, WASM_ZERO, 318 EXPECT_SIZE(7, WASM_STORE_MEM_OFFSET(kMemTypes[i], 13, WASM_ZERO,
319 WASM_GET_LOCAL(0))); 319 WASM_GET_LOCAL(0)));
320 } 320 }
321 } 321 }
322 } // namespace wasm 322 } // namespace wasm
323 } // namespace internal 323 } // namespace internal
324 } // namespace v8 324 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/wasm/module-decoder-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698