Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform ranges and simple expressions #63

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

yurydelendik
Copy link
Contributor

@yurydelendik yurydelendik commented Mar 19, 2019

Depends on bytecodealliance/cranelift#698

Introduces writing of the .debug_rnglist and .debug_loc sections. The wasm ranges are converted to native ranges, and if needed, further spitted by for expression/var location handling.

TODO:

  • refactor inner loops into iterators
  • don't assume vmctx stay the same in a var range

@yurydelendik
Copy link
Contributor Author

yurydelendik commented Mar 19, 2019

Teaser screenshot of debugging wasm in vscode, which runs wasmtime and handled by lldb-mi:

Screen Shot 2019-03-15 at 7 05 26 PM

@yurydelendik
Copy link
Contributor Author

depends on #186

Cargo.toml Outdated Show resolved Hide resolved
src/wasm2obj.rs Outdated Show resolved Hide resolved
wasmtime-jit/src/compiler.rs Outdated Show resolved Hide resolved
@sunfishcode
Copy link
Member

Thanks!

@sunfishcode sunfishcode merged commit 4f04d7d into bytecodealliance:master Aug 9, 2019
pc.read_u8()?;
let ty = pc.read_uleb128()?;
assert_eq!(ty, 0);
let index = pc.read_sleb128()?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this should be uleb128

howjmay pushed a commit to howjmay/wasmtime that referenced this pull request Jan 24, 2022
This complements bytecodealliance#3086

Fixes bytecodealliance#63.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
dhil added a commit to dhil/wasmtime that referenced this pull request Feb 8, 2024
…dealliance#88)

This patch adds a baseline implementation for our WasmFX instruction
set implementation. It is a baseline in the sense that it is not
particularly optimised. The implementation is mostly disjoint from the
main (or optimised) implementation, though, there is one particular
code that is shared at the moment and that is
`ContinuationReference`. The current implementation exploits that the
pointer size of `*mut ContinuationObject` and `*mut VMContRef` is the
same. It is a slight hack that probably have to change in the
future. Another important thing to remark is that the implementation
is built on top of vanilla Wasmtime Fiber, meaning that we should in
principle support the same architectures as Wasmtime Fiber.

This patch also factors the "main" or "optimised" implementation and
the baseline implementation into separate modules in the cranelift
crate, c.f. the `wasmfx/` subdirectory, where `optimized.rs` contains
the compiler code for the optimised implementation, `baseline.rs`
contains the code for the baseline implementation, and `shared.rs`
contains the common utilities used by both implementations.

Resolves bytecodealliance#63.

---------

Co-authored-by: Frank Emrich <git@emrich.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants