Create run-time switch for wasm multi-value
Categories
(Core :: JavaScript: WebAssembly, enhancement, P2)
Tracking
()
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.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
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.
Assignee | ||
Comment 2•5 years ago
|
||
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.
Assignee | ||
Comment 3•5 years ago
|
||
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.
Comment 5•5 years ago
|
||
bugherder |
Assignee | ||
Comment 6•5 years ago
|
||
This needs an additional refinement in dom/workers/RuntimeService.cpp, which also reads prefs.
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
Comment 9•5 years ago
|
||
bugherder |
Description
•