Skip to content

Commit 7174e34

Browse files
dicejfitzgenalexcrichtonpchickeyshenpengfeng
authored
WIP upstream merge (bytecodealliance#68)
* Do proper subtype checking for imported globals during instantiation (bytecodealliance#10304) * pulley: Fix a panic compiling with debug info (bytecodealliance#10305) Debug into doesn't work on Pulley anyway but it's better to return a first-class error rather than a panic. This commit fills out a simple missing instruction in the Pulley backend to ensure that compilation gets far enough to the DWARF transform where there's no pulley support and an error is returned. * Improve rebuild detection of test-programs (bytecodealliance#10303) This commit improves the logic of detecting when to rebuild the `test-programs` artifacts used during test by parsing the `*.d` files that Cargo emits as part of its compilation and using that as the `cargo:rerun-if-changed` directive. This not only includes what was previously depended on but additionally includes features such as `path` dependencies which might temporarily be used during development. * Add a missing `apt-get update` before install (bytecodealliance#10310) I always forget this and it always bites us within a few months. Alas. * wasmtime-wit-bindgen: gen is a reserved keyword in the lexer starting in 2024 edition (bytecodealliance#10308) * Test natively on AArch64, not emulated (bytecodealliance#10306) This commit updates the aarch64 tests to use the new `*-arm` images from GitHub instead of running through QEMU emulation. This should be a bit faster but primarily helps build confidence that it runs on real hardware. I'll note that release builds aren't updated at this time to run on native hardware since that's moreso about glibc compatibility and it's a bit easier to keep the setup we currently have for that. If `*-arm` machines are noticably faster than the default x64 machines then we could in theory move everything over to an aarch64-based machine as opposed to just the aarch64 build. * chore: fix some typos in comments (bytecodealliance#10309) Signed-off-by: shenpengfeng <xinhangzhou@icloud.com> * Rename `VMRuntimeLimits` to `VMStoreContext` (bytecodealliance#10307) Way back in time, this struct originally contained the stack and fuel limits. Then it also got the epoch deadline. Then it also got the exit FP/PC and entry FP. Now it is just the place where we put per-store mutable data that is accessed by JIT code and must be shared between all `VMContext`s. So it is time to rename it. This commit is purely mechanical and just renames the type and various methods and variables that use/access it. * wasmtime-wit-bindgen: emit a definition for all types in a wit interface (bytecodealliance#10311) * wasmtime-wit-bindgen: emit a definition for all types in a wit The calculation of TypeInfo only reaches types which are passed to or from a function. For types which are not reachable, default to the defining them according to the ownership setting given to bindgen. I have my doubts that `with`-reuse of bindgen types actually works properly when bindgen is set to Ownership::Borrowing but thats out of scope for this PR, which is to fix bytecodealliance#10090 * component-macro: bless bindgen test output * asm: sse orpd implementation (bytecodealliance#10273) * sse orpd implementation assembler integration with isle format add clippy reason, reorder avx priority in isle bless tests for orpd create separate xmm module validate function rewrite sse condition add quote from manual for sse prefix format changes move Xmm bits under Reg * use new isle constructors for sse * remove unused function * minor changes * Winch: Fix consts and multivalue returns (bytecodealliance#10315) * fixed broken link (bytecodealliance#10318) * chore: fix parenthesis balance (bytecodealliance#10317) parentheses are not balanced here * winch(aarch64): ABI integration (bytecodealliance#10312) * winch(aarch64): ABI integration This commit finalizes the ABI integration between Winch and Cranelift, notably: * Updates the Cranelift ABI to ensure that all the Winch register clobbers are taken into account. * Updates the Winch ABI to treat x28 as callee-saved, since it's used as the shadow stack pointer. The alternative to treating x28 as callee-saved is to treat it as caller-saved and save it when required e.g., at call-sites, even though this approach works, it's probably more efficient to perform a store/pop once per function, to minimize the number of move instructions required. There are still some changes needed in order to fully enable running spec tests for aarch64, however, this change is one step further. If interested, you can run the call.wast test via: cargo run -- wast -Ccompiler=winch tests/spec_testsuite/call_indirect.wast * Update disas tests * Use `alloc_zeroed` to allocate dynamic table elements (bytecodealliance#10313) * Use `alloc_zeroed` to allocate dynamic table elements This allows us to get pre-zeroed memory from the global allocator, rather than needing to manually zero-initialize the elements. * Don't ask the global allocator to allocate a block of size zero * x64: use Rust types for assembler immediates (bytecodealliance#10302) Previously we used `AssemblerImm*` and `AssemblerSimm*` throughout the x64 ISLE to indicate the type of immediate an instruction would receive. Alex has noted previously that this is unnecessary; it does after all create more ties between the `cranelift-codegen` ISLE and `cranelift-assembler-x64` that could possibly break in the future. This change removes those ties by using Rust types in ISLE (e.g., `u8`, `i8`, `u16`, etc.) and converting to the expected assembler type in the ISLE glue layer. * Update ir.md (bytecodealliance#10319) Hello, A possible typo in this text: "Forward" Should be "Foreword" "Forward" means to move ahead, but the correct term for an introduction is "Foreword". Thanks. * Expose GC refs to Wasm in `gc_alloc_raw` libcall (bytecodealliance#10322) * Expose GC refs to Wasm in `gc_alloc_raw` libcall As we are returning a GC reference to Wasm, we need to mark that GC reference as exposed to Wasm. Fixes bytecodealliance#9669 * miri ignore test that calls wasm and therefore can't run in miri * Bump Wasmtime to 32.0.0 (bytecodealliance#10330) Co-authored-by: Wasmtime Publish <wasmtime-publish@users.noreply.github.com> * add component-model-async/{fused|futures|streams}.wast tests (bytecodealliance#10106) * add component-model-async/{fused|futures|streams}.wast tests This is another piece of bytecodealliance#9582 which I'm splitting out to make review easier. The fused.wast test exercises fused adapter generation for various flavors of intercomponent async->async, async->sync, and sync->async calls. The futures.wast and streams.wast tests exercise the various intrinsics (e.g. `stream.read`, `future.close_writable`, etc.) involving `future`s and `stream`s. The remaining changes fill in some TODOs to make the tests pass, plus plumbing for a few intrinsics which aren't needed for these tests but which set the foundation for future tests. Signed-off-by: Joel Dice <joel.dice@fermyon.com> * address review feedback Signed-off-by: Joel Dice <joel.dice@fermyon.com> --------- Signed-off-by: Joel Dice <joel.dice@fermyon.com> * Update wasm-tools to the latest revision (bytecodealliance#10314) * Update wasm-tools to the latest revision * Update component async bits for new intrinsics * Ignore options for now * I truly, and fundamentally, do not understand `cargo vet` * Fix a test * Ignore fuzzing `testcase0.wasm` et al in `.gitignore` (bytecodealliance#10341) * remove temporary patch from Cargo.toml Signed-off-by: Joel Dice <joel.dice@fermyon.com> * Fix building artifacts alone in isolation Few more crate features needed * Rename backpressure intrinsic * Patch to work-in-progress branches * temporarily stub-out waitable-set.wait calls in tests Signed-off-by: Joel Dice <joel.dice@fermyon.com> * fix WAT/WAST test regressions Signed-off-by: Joel Dice <joel.dice@fermyon.com> * Switch to published wasm-tools deps * bless bindgen test output Signed-off-by: Joel Dice <joel.dice@fermyon.com> * remove realloc from `task.return` in WAT tests This is no longer allowed by wasmparser. Signed-off-by: Joel Dice <joel.dice@fermyon.com> * Switch to wit-bindgen upstream --------- Signed-off-by: shenpengfeng <xinhangzhou@icloud.com> Signed-off-by: Joel Dice <joel.dice@fermyon.com> Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com> Co-authored-by: Alex Crichton <alex@alexcrichton.com> Co-authored-by: Pat Hickey <p.hickey@f5.com> Co-authored-by: shenpengfeng <xinhangzhou@icloud.com> Co-authored-by: Rahul <rahul.s.chaphalkar@intel.com> Co-authored-by: Jeffrey Charles <jeff.charles@shopify.com> Co-authored-by: ifsheldon <39153080+ifsheldon@users.noreply.github.com> Co-authored-by: Bongjun Jang <bongjun.jang@kaist.ac.kr> Co-authored-by: Saúl Cabrera <saulecabrera@gmail.com> Co-authored-by: Andrew Brown <andrew.brown@intel.com> Co-authored-by: owen <158327443+owenzimmew06@users.noreply.github.com> Co-authored-by: wasmtime-publish <59749941+wasmtime-publish@users.noreply.github.com> Co-authored-by: Wasmtime Publish <wasmtime-publish@users.noreply.github.com>
1 parent 12314ff commit 7174e34

File tree

600 files changed

+4513
-1812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

600 files changed

+4513
-1812
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ examples/.cache
2727
cranelift/isle/veri/veri_engine/test_output
2828
crates/explorer/node_modules
2929
tests/all/pulley_provenance_test.cwasm
30-
artifacts
30+
/artifacts
31+
testcase*.wat
32+
testcase*.wasm

0 commit comments

Comments
 (0)