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

Unified Diff: test/cctest/wasm/test-run-wasm-module.cc

Issue 2493433002: [wasm] Only immutable imported globals are valid initializer expressions (Closed)
Patch Set: Removed another test Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | test/mjsunit/wasm/data-segments.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-run-wasm-module.cc
diff --git a/test/cctest/wasm/test-run-wasm-module.cc b/test/cctest/wasm/test-run-wasm-module.cc
index cf2d6bb189e28a76f7de3e1e6c76f0e844f5a313..12633e92aeb76851d804cb97678e8b7e9769f01a 100644
--- a/test/cctest/wasm/test-run-wasm-module.cc
+++ b/test/cctest/wasm/test-run-wasm-module.cc
@@ -755,35 +755,6 @@ static void RunWasmModuleGlobalInitTest(LocalType type, CType expected) {
ExportAsMain(f1);
TestModule(&zone, builder, expected);
}
-
- for (int padding = 0; padding < 5; padding++) {
- // Test with a global index
- WasmModuleBuilder* builder = new (&zone) WasmModuleBuilder(&zone);
- for (int i = 0; i < padding; i++) { // pad global before
- builder->AddGlobal(kAstI32, false, false, WasmInitExpr(i + 40000));
- }
-
- uint32_t global1 =
- builder->AddGlobal(type, false, false, WasmInitExpr(expected));
-
- for (int i = 0; i < padding; i++) { // pad global middle
- builder->AddGlobal(kAstI32, false, false, WasmInitExpr(i + 50000));
- }
-
- uint32_t global2 =
- builder->AddGlobal(type, false, false,
- WasmInitExpr(WasmInitExpr::kGlobalIndex, global1));
-
- for (int i = 0; i < padding; i++) { // pad global after
- builder->AddGlobal(kAstI32, false, false, WasmInitExpr(i + 60000));
- }
-
- WasmFunctionBuilder* f1 = builder->AddFunction(&sig);
- byte code[] = {WASM_GET_GLOBAL(global2)};
- f1->EmitCode(code, sizeof(code));
- ExportAsMain(f1);
- TestModule(&zone, builder, expected);
- }
}
Cleanup();
}
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | test/mjsunit/wasm/data-segments.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698