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

Unified Diff: test/mjsunit/wasm/data-segments.js

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 | « test/cctest/wasm/test-run-wasm-module.cc ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/data-segments.js
diff --git a/test/mjsunit/wasm/data-segments.js b/test/mjsunit/wasm/data-segments.js
index a0d2286ac7581940a2744b408c7242332783ff4e..8cff5e17567620c26ebaf37e1fd81b039899536b 100644
--- a/test/mjsunit/wasm/data-segments.js
+++ b/test/mjsunit/wasm/data-segments.js
@@ -32,30 +32,6 @@ SimpleDataSegmentTest(4);
SimpleDataSegmentTest(12);
SimpleDataSegmentTest(1064);
-function GlobalInitTest(offset) {
- print("GlobalInitTest(" + offset + ")...");
- var builder = new WasmModuleBuilder();
- builder.addMemory(1, 1, false);
- var g = builder.addGlobal(kAstI32, false);
- g.init = offset;
- builder.addFunction("load", kSig_i_i)
- .addBody([kExprGetLocal, 0, kExprI32LoadMem, 0, 0])
- .exportAs("load");
- builder.addDataSegment(g.index, [7, 7, 7, 7], true);
-
- var buffer = builder.toBuffer(debug);
- var instance = new WebAssembly.Instance(new WebAssembly.Module(buffer));
- for (var i = offset - 20; i < offset + 20; i += 4) {
- if (i < 0) continue;
- var expected = i == offset ? 117901063 : 0;
- assertEquals(expected, instance.exports.load(i));
- }
-}
-
-GlobalInitTest(0);
-GlobalInitTest(12);
-GlobalInitTest(3040);
-
function GlobalImportedInitTest(pad) {
print("GlobaleImportedInitTest(" + pad + ")...");
var builder = new WasmModuleBuilder();
« no previous file with comments | « test/cctest/wasm/test-run-wasm-module.cc ('k') | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698