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

Unified Diff: test/mjsunit/wasm/start-function.js

Issue 2595733003: [wasm] Remove non-standard kExprI8Const bytecode (Closed)
Patch Set: Remove regression test Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/wasm/start-function.js
diff --git a/test/mjsunit/wasm/start-function.js b/test/mjsunit/wasm/start-function.js
index a9d512adcd173bb3c0a07552019a6d439f0a713e..60c011b7edada0b1f6482489b07614994bd75717 100644
--- a/test/mjsunit/wasm/start-function.js
+++ b/test/mjsunit/wasm/start-function.js
@@ -33,7 +33,7 @@ assertVerifies(kSig_v_v, [kExprNop]);
assertThrows(() => {instantiate(kSig_i_i, [kExprGetLocal, 0]);});
assertThrows(() => {instantiate(kSig_i_ii, [kExprGetLocal, 0]);});
assertThrows(() => {instantiate(kSig_i_dd, [kExprGetLocal, 0]);});
-assertThrows(() => {instantiate(kSig_i_v, [kExprI8Const, 0]);});
+assertThrows(() => {instantiate(kSig_i_v, [kExprI32Const, 0]);});
(function testInvalidIndex() {
print("testInvalidIndex");
@@ -69,14 +69,14 @@ assertThrows(() => {instantiate(kSig_i_v, [kExprI8Const, 0]);});
builder.addMemory(12, 12, true);
var func = builder.addFunction("", kSig_v_v)
- .addBody([kExprI8Const, 0, kExprI8Const, 66, kExprI32StoreMem, 0, 0]);
+ .addBody([kExprI32Const, 0, kExprI32Const, 55, kExprI32StoreMem, 0, 0]);
builder.addStart(func.index);
var module = builder.instantiate();
var memory = module.exports.memory.buffer;
var view = new Int8Array(memory);
- assertEquals(66, view[0]);
+ assertEquals(55, view[0]);
})();
(function testRun2() {
@@ -86,7 +86,7 @@ assertThrows(() => {instantiate(kSig_i_v, [kExprI8Const, 0]);});
builder.addMemory(12, 12, true);
var func = builder.addFunction("", kSig_v_v)
- .addBody([kExprI8Const, 0, kExprI8Const, 22, kExprI8Const, 55, kExprI32Add, kExprI32StoreMem, 0, 0]);
+ .addBody([kExprI32Const, 0, kExprI32Const, 22, kExprI32Const, 55, kExprI32Add, kExprI32StoreMem, 0, 0]);
builder.addStart(func.index);

Powered by Google App Engine
This is Rietveld 408576698