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

Unified Diff: test/mjsunit/wasm/globals.js

Issue 2594993002: [wasm] Rename wasm::LocalType to wasm::ValueType and kAst* to kWasm* (Closed)
Patch Set: Fix inspector tests Created 4 years 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/mjsunit/wasm/gc-frame.js ('k') | test/mjsunit/wasm/import-table.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/globals.js
diff --git a/test/mjsunit/wasm/globals.js b/test/mjsunit/wasm/globals.js
index d1ee9600746bb78a51b57c30a41abd3cc2391a2c..d32185f1b7fbde7de1d55ca724ef89704445bc42 100644
--- a/test/mjsunit/wasm/globals.js
+++ b/test/mjsunit/wasm/globals.js
@@ -15,34 +15,34 @@ function TestImported(type, val, expected) {
builder.addFunction("main", sig)
.addBody([kExprGetGlobal, g.index])
.exportAs("main");
- builder.addGlobal(kAstI32); // pad
+ builder.addGlobal(kWasmI32); // pad
var instance = builder.instantiate({uuu: {foo: val}});
assertEquals(expected, instance.exports.main());
}
-TestImported(kAstI32, 300.1, 300);
-TestImported(kAstF32, 87234.87238, Math.fround(87234.87238));
-TestImported(kAstF64, 77777.88888, 77777.88888);
+TestImported(kWasmI32, 300.1, 300);
+TestImported(kWasmF32, 87234.87238, Math.fround(87234.87238));
+TestImported(kWasmF64, 77777.88888, 77777.88888);
function TestExported(type, val, expected) {
print("TestExported " + type + "(" + val +")" + " = " + expected);
var builder = new WasmModuleBuilder();
var sig = makeSig([type], []);
- builder.addGlobal(kAstI32); // pad
+ builder.addGlobal(kWasmI32); // pad
var g = builder.addGlobal(type, false)
.exportAs("foo");
g.init = val;
- builder.addGlobal(kAstI32); // pad
+ builder.addGlobal(kWasmI32); // pad
var instance = builder.instantiate();
assertEquals(expected, instance.exports.foo);
}
-TestExported(kAstI32, 455.5, 455);
-TestExported(kAstF32, -999.34343, Math.fround(-999.34343));
-TestExported(kAstF64, 87347.66666, 87347.66666);
+TestExported(kWasmI32, 455.5, 455);
+TestExported(kWasmF32, -999.34343, Math.fround(-999.34343));
+TestExported(kWasmF64, 87347.66666, 87347.66666);
function TestImportedExported(type, val, expected) {
@@ -50,19 +50,19 @@ function TestImportedExported(type, val, expected) {
var builder = new WasmModuleBuilder();
var sig = makeSig([type], []);
var i = builder.addImportedGlobal("ttt", "foo", type);
- builder.addGlobal(kAstI32); // pad
+ builder.addGlobal(kWasmI32); // pad
var o = builder.addGlobal(type, false)
.exportAs("bar");
o.init_index = i;
- builder.addGlobal(kAstI32); // pad
+ builder.addGlobal(kWasmI32); // pad
var instance = builder.instantiate({ttt: {foo: val}});
assertEquals(expected, instance.exports.bar);
}
-TestImportedExported(kAstI32, 415.5, 415);
-TestImportedExported(kAstF32, -979.34343, Math.fround(-979.34343));
-TestImportedExported(kAstF64, 81347.66666, 81347.66666);
+TestImportedExported(kWasmI32, 415.5, 415);
+TestImportedExported(kWasmF32, -979.34343, Math.fround(-979.34343));
+TestImportedExported(kWasmF64, 81347.66666, 81347.66666);
function TestGlobalIndexSpace(type, val) {
print("TestGlobalIndexSpace(" + val + ") = " + val);
@@ -82,6 +82,6 @@ function TestGlobalIndexSpace(type, val) {
assertEquals(val, instance.exports.main());
}
-TestGlobalIndexSpace(kAstI32, 123);
-TestGlobalIndexSpace(kAstF32, 54321.125);
-TestGlobalIndexSpace(kAstF64, 12345.678);
+TestGlobalIndexSpace(kWasmI32, 123);
+TestGlobalIndexSpace(kWasmF32, 54321.125);
+TestGlobalIndexSpace(kWasmF64, 12345.678);
« no previous file with comments | « test/mjsunit/wasm/gc-frame.js ('k') | test/mjsunit/wasm/import-table.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698