Diff
Modified: trunk/JSTests/ChangeLog (209164 => 209165)
--- trunk/JSTests/ChangeLog 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/ChangeLog 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,3 +1,37 @@
+2016-11-30 JF Bastien <jfbast...@apple.com>
+
+ WebAssembly builder: don't throw when checker not implemented
+ https://bugs.webkit.org/show_bug.cgi?id=165219
+
+ Reviewed by Mark Lam.
+
+ We should perform whichever checks we've implemented, and assume the rest are OK until bug #163421 is fixed.
+
+ * wasm/Builder.js:
+ * wasm/README.md:
+ * wasm/function-tests/add-12.js:
+ * wasm/function-tests/br-if-loop-less-than.js:
+ * wasm/function-tests/brTableAsIf.js:
+ * wasm/function-tests/brTableManyValues.js:
+ * wasm/function-tests/brTableWithLoop.js:
+ * wasm/function-tests/dumb-eq-if-then-else.js:
+ * wasm/function-tests/dumb-less-than-fallthrough.js:
+ * wasm/function-tests/dumb-less-than-ite.js:
+ * wasm/function-tests/eqz.js:
+ * wasm/function-tests/factorial.js:
+ * wasm/function-tests/float-sub.js:
+ * wasm/function-tests/i32-load.js:
+ * wasm/function-tests/i32-load8-s.js:
+ * wasm/function-tests/if-then-else-fallthrough.js:
+ * wasm/function-tests/if-then-fallthrough.js:
+ * wasm/function-tests/loop-mult.js:
+ * wasm/function-tests/loop-sum.js:
+ * wasm/function-tests/max.js:
+ * wasm/function-tests/min.js:
+ * wasm/function-tests/ret5.js:
+ * wasm/function-tests/select.js:
+ * wasm/self-test/test_BuilderJSON.js:
+
2016-11-29 JF Bastien <jfbast...@apple.com>
WebAssembly JS API: improve Instance
Modified: trunk/JSTests/wasm/Builder.js (209164 => 209165)
--- trunk/JSTests/wasm/Builder.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/Builder.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -190,13 +190,17 @@
case "prev": break; // FIXME implement prev, checking for whetever the parameter type was. https://bugs.webkit.org/show_bug.cgi?id=163421
case "size": break; // FIXME implement size. https://bugs.webkit.org/show_bug.cgi?id=163421
default: throw new Error(`Implementation problem: unhandled meta-type "${expect}" on "${op}"`);
- }
+ }
}
}
};
const _checkImms = (op, imms, expectedImms, ret) => {
- assert.eq(imms.length, expectedImms.length, `"${op}" expects ${expectedImms.length} immediates, got ${imms.length}`);
+ const minExpectedImms = expectedImms.filter(i => i.type.slice(-1) !== '*').length;
+ if (minExpectedImms !== expectedImms.length)
+ assert.ge(imms.length, minExpectedImms, `"${op}" expects at least ${minExpectedImms} immediate${minExpectedImms !== 1 ? 's' : ''}, got ${imms.length}`);
+ else
+ assert.eq(imms.length, minExpectedImms, `"${op}" expects exactly ${minExpectedImms} immediate${minExpectedImms !== 1 ? 's' : ''}, got ${imms.length}`);
for (let idx = 0; idx !== expectedImms.length; ++idx) {
const got = imms[idx];
const expect = expectedImms[idx];
@@ -205,23 +209,23 @@
assert.truthy(_isValidValue(got, "i32"), `Invalid value on ${op}: got "${got}", expected i32`);
// FIXME check function indices. https://bugs.webkit.org/show_bug.cgi?id=163421
break;
- case "local_index": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
- case "global_index": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
- case "type_index": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
+ case "local_index": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
+ case "global_index": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
+ case "type_index": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
case "value":
assert.truthy(_isValidValue(got, ret[0]), `Invalid value on ${op}: got "${got}", expected ${ret[0]}`);
break;
- case "flags": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
- case "offset": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
+ case "flags": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
+ case "offset": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
// Control:
- case "default_target": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
- case "relative_depth": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
+ case "default_target": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
+ case "relative_depth": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
case "sig":
// FIXME this should be isValidBlockType https://bugs.webkit.org/show_bug.cgi?id=164724
- assert.truthy(WASM.isValidValueType(imms[idx]), `Invalid block type on ${op}: "${imms[idx]}"`);
+ assert.truthy(imms[idx] === "void" || WASM.isValidValueType(imms[idx]), `Invalid block type on ${op}: "${imms[idx]}"`);
break;
- case "target_count": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
- case "target_table": throw new Error(`Unimplemented: "${expect.name}" on "${op}"`);
+ case "target_count": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
+ case "target_table": break; // improve checking https://bugs.webkit.org/show_bug.cgi?id=163421
default: throw new Error(`Implementation problem: unhandled immediate "${expect.name}" on "${op}"`);
}
}
Modified: trunk/JSTests/wasm/README.md (209164 => 209165)
--- trunk/JSTests/wasm/README.md 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/README.md 2016-12-01 01:03:02 UTC (rev 209165)
@@ -35,7 +35,6 @@
// Construct the equivalent of: (module (func "answer" (i32.const 42) (return)))
builder
- .setChecked(false) // FIXME remove once checking is better implemented.
// Declare a Type section, which the builder will auto-fill as functions are defined.
.Type().End()
// Declare a Function section, which the builder will auto-fill as functions are defined.
Modified: trunk/JSTests/wasm/function-tests/add-12.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/add-12.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/add-12.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
Modified: trunk/JSTests/wasm/function-tests/br-if-loop-less-than.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/br-if-loop-less-than.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/br-if-loop-less-than.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -48,4 +47,4 @@
[{type: "i32", value: 0 }, [{ type: "i32", value: 1 }, { type: "i32", value: 1 }]],
[{type: "i32", value: 1 }, [{ type: "i32", value: 2 }, { type: "i32", value: 6 }]],
[{type: "i32", value: 0 }, [{ type: "i32", value: 100 }, { type: "i32", value: 6 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/brTableAsIf.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/brTableAsIf.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/brTableAsIf.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -23,4 +22,4 @@
[{type: "i32", value: 20 }, [{ type: "i32", value: 1 }]],
[{type: "i32", value: 20 }, [{ type: "i32", value: 11 }]],
[{type: "i32", value: 20 }, [{ type: "i32", value: -100 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/brTableManyValues.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/brTableManyValues.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/brTableManyValues.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -40,4 +39,4 @@
[{type: "i32", value: 214 }, [{ type: "i32", value: 5 }]],
[{type: "i32", value: 214 }, [{ type: "i32", value: -1 }]],
[{type: "i32", value: 214 }, [{ type: "i32", value: -1000 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/brTableWithLoop.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/brTableWithLoop.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/brTableWithLoop.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -27,4 +26,4 @@
bin.trim();
testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 1 }, [{ type: "i32", value: 0 }]],
[{type: "i32", value: 2 }, [{ type: "i32", value: 1 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/dumb-eq-if-then-else.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/dumb-eq-if-then-else.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/dumb-eq-if-then-else.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Memory().InitialMaxPages(1, 1).End()
@@ -31,4 +30,4 @@
[{type: "i32", value: 0 }, [{ type: "i32", value: 0 }, { type: "i32", value: 0 }]],
[{type: "i32", value: 1 }, [{ type: "i32", value: 2 }, { type: "i32", value: 6 }]],
[{type: "i32", value: 1 }, [{ type: "i32", value: 100 }, { type: "i32", value: 6 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/dumb-less-than-fallthrough.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/dumb-less-than-fallthrough.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/dumb-less-than-fallthrough.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -36,4 +35,4 @@
[{type: "i32", value: 0 }, [{ type: "i32", value: 1 }, { type: "i32", value: 1 }]],
[{type: "i32", value: 1 }, [{ type: "i32", value: 2 }, { type: "i32", value: 6 }]],
[{type: "i32", value: 0 }, [{ type: "i32", value: 100 }, { type: "i32", value: 6 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/dumb-less-than-ite.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/dumb-less-than-ite.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/dumb-less-than-ite.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -42,4 +41,4 @@
[{type: "i32", value: 0 }, [{ type: "i32", value: 0 }, { type: "i32", value: 0 }]],
[{type: "i32", value: 1 }, [{ type: "i32", value: 2 }, { type: "i32", value: 6 }]],
[{type: "i32", value: 0 }, [{ type: "i32", value: 100 }, { type: "i32", value: 6 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/eqz.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/eqz.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/eqz.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Memory().InitialMaxPages(1, 1).End()
Modified: trunk/JSTests/wasm/function-tests/factorial.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/factorial.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/factorial.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -28,4 +27,4 @@
[{type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
[{type: "i32", value: 2 }, [{ type: "i32", value: 2 }]],
[{type: "i32", value: 24 }, [{ type: "i32", value: 4 }]],
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/float-sub.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/float-sub.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/float-sub.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -28,4 +27,4 @@
[[{type: "f32", value: -1.5 }, [{ type: "f32", value: 0 }, { type: "f32", value: 1.5 }]],
[{type: "f32", value: 87.6234 }, [{ type: "f32", value: 100.1234 }, { type: "f32", value: 12.5 }]]
]
- );
\ No newline at end of file
+ );
Modified: trunk/JSTests/wasm/function-tests/i32-load.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/i32-load.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/i32-load.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Memory().InitialMaxPages(1, 1).End()
@@ -20,4 +19,4 @@
testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 0 }, [{ type: "i32", value: 0 }, { type: "i32", value: 10 }]],
[{type: "i32", value: 100 }, [{ type: "i32", value: 100 }, { type: "i32", value: 112 }]],
[{type: "i32", value: 1000000 }, [{ type: "i32", value: 1000000 }, { type: "i32", value: 10 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/i32-load8-s.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/i32-load8-s.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/i32-load8-s.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Memory().InitialMaxPages(1, 1).End()
@@ -20,4 +19,4 @@
testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 0 }, [{ type: "i32", value: 0 }, { type: "i32", value: 10 }]],
[{type: "i32", value: 100 }, [{ type: "i32", value: 100 }, { type: "i32", value: 112 }]],
[{type: "i32", value: 0x40 }, [{ type: "i32", value: 1000000 }, { type: "i32", value: 10 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/if-then-else-fallthrough.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/if-then-else-fallthrough.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/if-then-else-fallthrough.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -22,4 +21,4 @@
bin.trim();
testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 1 }, [{ type: "i32", value: 0 }]],
[{type: "i32", value: 2 }, [{ type: "i32", value: 1 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/if-then-fallthrough.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/if-then-fallthrough.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/if-then-fallthrough.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -22,4 +21,4 @@
bin.trim();
testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 1 }, [{ type: "i32", value: 0 }]],
[{type: "i32", value: 2 }, [{ type: "i32", value: 1 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/loop-mult.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/loop-mult.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/loop-mult.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -35,4 +34,4 @@
[{type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
[{type: "i32", value: 3 }, [{ type: "i32", value: 2 }]],
[{type: "i32", value: 5050 }, [{ type: "i32", value: 100 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/loop-sum.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/loop-sum.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/loop-sum.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
@@ -35,4 +34,4 @@
[{type: "i32", value: 1 }, [{ type: "i32", value: 1 }]],
[{type: "i32", value: 3 }, [{ type: "i32", value: 2 }]],
[{type: "i32", value: 5050 }, [{ type: "i32", value: 100 }]]
- ]);
\ No newline at end of file
+ ]);
Modified: trunk/JSTests/wasm/function-tests/max.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/max.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/max.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Memory().InitialMaxPages(1, 1).End()
Modified: trunk/JSTests/wasm/function-tests/min.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/min.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/min.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Memory().InitialMaxPages(1, 1).End()
Modified: trunk/JSTests/wasm/function-tests/ret5.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/ret5.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/ret5.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
let code = b.Type().End()
.Function().End()
.Code();
@@ -13,4 +12,4 @@
.End();
const bin = b.WebAssembly();
bin.trim();
-testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 5 }, []]]);
\ No newline at end of file
+testWasmModuleFunctions(bin.get(), 1, [[{type: "i32", value: 5 }, []]]);
Modified: trunk/JSTests/wasm/function-tests/select.js (209164 => 209165)
--- trunk/JSTests/wasm/function-tests/select.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/function-tests/select.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -1,7 +1,6 @@
import Builder from '../Builder.js'
const b = new Builder();
-b.setChecked(false);
b.Type().End()
.Function().End()
.Code()
Modified: trunk/JSTests/wasm/self-test/test_BuilderJSON.js (209164 => 209165)
--- trunk/JSTests/wasm/self-test/test_BuilderJSON.js 2016-12-01 00:28:04 UTC (rev 209164)
+++ trunk/JSTests/wasm/self-test/test_BuilderJSON.js 2016-12-01 01:03:02 UTC (rev 209165)
@@ -403,7 +403,7 @@
})();
(function CheckedOpcodeArgumentsTooMany() {
- assertOpThrows(f => f.Nop("uh-oh!"), `Not the same: "1" and "0": "nop" expects 0 immediates, got 1`);
+ assertOpThrows(f => f.Nop("uh-oh!"), `Not the same: "1" and "0": "nop" expects exactly 0 immediates, got 1`);
})();
(function UncheckedOpcodeArgumentsTooMany() {
@@ -411,7 +411,7 @@
})();
(function CheckedOpcodeArgumentsNotEnough() {
- assertOpThrows(f => f.I32Const(), `Not the same: "0" and "1": "i32.const" expects 1 immediates, got 0`);
+ assertOpThrows(f => f.I32Const(), `Not the same: "0" and "1": "i32.const" expects exactly 1 immediate, got 0`);
})();
(function UncheckedOpcodeArgumentsNotEnough() {