Cranellift: remove Baldrdash support and related features. (#4571)
* Cranellift: remove Baldrdash support and related features.
As noted in Mozilla's bugzilla bug 1781425 [1], the SpiderMonkey team
has recently determined that their current form of integration with
Cranelift is too hard to maintain, and they have chosen to remove it
from their codebase. If and when they decide to build updated support
for Cranelift, they will adopt different approaches to several details
of the integration.
In the meantime, after discussion with the SpiderMonkey folks, they
agree that it makes sense to remove the bits of Cranelift that exist
to support the integration ("Baldrdash"), as they will not need
them. Many of these bits are difficult-to-maintain special cases that
are not actually tested in Cranelift proper: for example, the
Baldrdash integration required Cranelift to emit function bodies
without prologues/epilogues, and instead communicate very precise
information about the expected frame size and layout, then stitched
together something post-facto. This was brittle and caused a lot of
incidental complexity ("fallthrough returns", the resulting special
logic in block-ordering); this is just one example. As another
example, one particular Baldrdash ABI variant processed stack args in
reverse order, so our ABI code had to support both traversal
orders. We had a number of other Baldrdash-specific settings as well
that did various special things.
This PR removes Baldrdash ABI support, the `fallthrough_return`
instruction, and pulls some threads to remove now-unused bits as a
result of those two, with the understanding that the SpiderMonkey folks
will build new functionality as needed in the future and we can perhaps
find cleaner abstractions to make it all work.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1781425
* Review feedback.
* Fix (?) DWARF debug tests: add `--disable-cache` to wasmtime invocations.
The debugger tests invoke `wasmtime` from within each test case under
the control of a debugger (gdb or lldb). Some of these tests started to
inexplicably fail in CI with unrelated changes, and the failures were
only inconsistently reproducible locally. It seems to be cache related:
if we disable cached compilation on the nested `wasmtime` invocations,
the tests consistently pass.
* Review feedback.
This commit is contained in:
@@ -95,14 +95,16 @@ Planned uses
|
||||
|
||||
Cranelift is designed to be a code generator for WebAssembly, but it is
|
||||
general enough to be useful elsewhere too. The initial planned uses that
|
||||
affected its design are:
|
||||
affected its design were:
|
||||
|
||||
- [WebAssembly compiler for the SpiderMonkey engine in
|
||||
Firefox](spidermonkey.md#phase-1-webassembly).
|
||||
- [Backend for the IonMonkey JavaScript JIT compiler in
|
||||
Firefox](spidermonkey.md#phase-2-ionmonkey).
|
||||
- [Debug build backend for the Rust compiler](rustc.md).
|
||||
- [Wasmtime non-Web wasm engine](https://github.com/bytecodealliance/wasmtime).
|
||||
- [Wasmtime non-Web wasm engine](https://github.com/bytecodealliance/wasmtime).
|
||||
- [Debug build backend for the Rust compiler](rustc.md).
|
||||
- WebAssembly compiler for the SpiderMonkey engine in Firefox
|
||||
(currently not planned anymore; SpiderMonkey team may re-assess in
|
||||
the future).
|
||||
- Backend for the IonMonkey JavaScript JIT compiler in Firefox
|
||||
(currently not planned anymore; SpiderMonkey team may re-assess in
|
||||
the future).
|
||||
|
||||
Building Cranelift
|
||||
------------------
|
||||
|
||||
Reference in New Issue
Block a user