Closed Bug 1620986 Opened 5 years ago Closed 5 years ago

Create run-time switch for wasm multi-value

Categories

(Core :: JavaScript: WebAssembly, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(2 files)

For ease of Cranelift testing there should be a run-time switch for every feature that is supported by our regular compilers but not by Cranelift, and that is enabled by default at compile time. That way, Cranelift testers don't need a separate configuration.

The only such feature we have right now is multi-value.

With Wingo's latest multi-value patch it is easy to add such a switch in the validator: if the switch disables the feature we allow at most one function result, and there are restrictions on blocks and loops that escape me at the moment.

Depends on: 1620197
No longer blocks: wasm-reftypes

It looks like this is all very nicely set up, as far as I can tell whether we allow multiple values for anything depends on the value of WasmMultiValueFlag(cx) in WasmJS.cpp, so all we need to do is to add the command-line switch in the shell and the pref in the browser and the plumbing to get those values into the cx, and then test the value in the cx.

This adds a JS shell command line argument to disable multi-value (if
it is enabled at compile time) and an about:config option to do the
same in the browser.

At this time, multi-values are not enabled in the browser, so the
about:config option is not visible.

Manually tested this in the shell; with a default configuration but with switches --no-wasm-multi-value --shared-memory=off --wasm-compiler=cranelift, cranelift is indeed available as it should be.

Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/531bdd018faa Introduce run-time switch for multi-value. r=bbouvier,wingo
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76

This needs an additional refinement in dom/workers/RuntimeService.cpp, which also reads prefs.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Pushed by lhansen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/230b51ed8bdf Workers should read multi-value pref. r=bbouvier
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: