Closed Bug 1847763 Opened 1 year ago Closed 1 year ago

Rename old instructions in the text of Wasm tests

Categories

(Core :: JavaScript: WebAssembly, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: yury, Assigned: contact+hg)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

Attachments

(2 files)

Currently our tests are using old identifiers in the text, e.g. get_local vs local.get -- see https://github.com/WebAssembly/spec/issues/884 .

The tests at js/src/jit-test/tests/wasm/async-instantiate.js use: get_local, set_local, get_global, etc. It is possible that the tooling will stop supporting that.

Assignee: nobody → contact+hg
Status: NEW → ASSIGNED

Depends on D186075

Hello,

I confirmed there was no regression by applying (locally) the following diff to wast:

--- third_party/rust/wast/src/core/expr.rs      2023-08-12 20:31:11.592309224 +0200
+++ ../wast-test/src/core/expr.rs       2023-08-12 20:25:19.508456462 +0200
@@ -529,11 +529,11 @@

         Drop : [0x1a] : "drop",
         Select(SelectTypes<'a>) : [] : "select",
-        LocalGet(Index<'a>) : [0x20] : "local.get" | "get_local",
-        LocalSet(Index<'a>) : [0x21] : "local.set" | "set_local",
-        LocalTee(Index<'a>) : [0x22] : "local.tee" | "tee_local",
-        GlobalGet(Index<'a>) : [0x23] : "global.get" | "get_global",
-        GlobalSet(Index<'a>) : [0x24] : "global.set" | "set_global",
+        LocalGet(Index<'a>) : [0x20] : "local.get",
+        LocalSet(Index<'a>) : [0x21] : "local.set",
+        LocalTee(Index<'a>) : [0x22] : "local.tee",
+        GlobalGet(Index<'a>) : [0x23] : "global.get",
+        GlobalSet(Index<'a>) : [0x24] : "global.set",

         TableGet(TableArg<'a>) : [0x25] : "table.get",
         TableSet(TableArg<'a>) : [0x26] : "table.set",

(In reply to Simon Thoby from comment #3)

I confirmed there was no regression by applying (locally) the following diff to wast:

We cannot directly fix this in our tree -- we just users of the upstream library. It is probably worth to reports that at https://github.com/bytecodealliance/wasm-tools to phase out the old syntax.

Pushed by ydelendik@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8de9999fd26a Replace instances of old local/global setters and getters in the wasm JIT tests r=yury https://hg.mozilla.org/integration/autoland/rev/578b082b38f7 Fix an invalid error case in the JS opcode tests r=yury
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: