alexcrichton opened PR #3178 from less-target-isa
to main
:
This commit started off by deleting the
cranelift_codegen::settings
reexport in thewasmtime-environ
crate and then basically played
whack-a-mole until everything compiled again. The main result of this is
that thewasmtime-*
family of crates have generally less of a
dependency on theTargetIsa
trait and type from Cranelift. While the
dependency isn't entirely severed yet this is at least a significant
start.This commit is intended to be largely refactorings, no functional
changes are intended here. The refactorings are:
A
CompilerBuilder
trait has been added towasmtime_environ
which
server as an abstraction used to create compilers and configure them
in a uniform fashion. Thewasmtime::Config
type now uses this
instead of cranelift-specific settings. Thewasmtime-jit
crate
exports the ability to create a compiler builder from a
CompilationStrategy
, which only works for Cranelift right now. In a
cranelift-less build of Wasmtime this is expected to return a trait
object that fails all requests to compile.The
Compiler
trait in thewasmtime_environ
crate has been souped
up with a number of methods that Wasmtime and other crates needed.The
wasmtime-debug
crate is now moved entirely behind the
wasmtime-cranelift
crate.The
wasmtime-cranelift
crate is now only depended on by the
wasmtime-jit
crate.Wasm types in
cranelift-wasm
no longer contain their IR type,
instead they only contain theWasmType
. This is required to get
everything to align correctly but will also be required in a future
refactoring where the types used bycranelift-wasm
will be extracted
to a separate crate.I moved around a fair bit of code in
wasmtime-cranelift
.Some gdb-specific jit-specific code has moved from
wasmtime-debug
to
wasmtime-jit
.Note that this is built on https://github.com/bytecodealliance/wasmtime/pull/3176, but I wanted to keep all these refactorings ideally bite-ish sized to be more easily digestable
bjorn3 submitted PR review.
bjorn3 created PR review comment:
Just a reminder to either remove or uncomment this code.
bjorn3 created PR review comment:
Same
bjorn3 submitted PR review.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
/// Construct a new `Compiler`.
bjorn3 submitted PR review.
bjorn3 created PR review comment:
Same
alexcrichton updated PR #3178 from less-target-isa
to main
.
alexcrichton updated PR #3178 from less-target-isa
to main
.
alexcrichton updated PR #3178 from less-target-isa
to main
.
alexcrichton updated PR #3178 from less-target-isa
to main
.
alexcrichton updated PR #3178 from less-target-isa
to main
.
alexcrichton edited PR #3178 from less-target-isa
to main
:
This commit started off by deleting the
cranelift_codegen::settings
reexport in thewasmtime-environ
crate and then basically played
whack-a-mole until everything compiled again. The main result of this is
that thewasmtime-*
family of crates have generally less of a
dependency on theTargetIsa
trait and type from Cranelift. While the
dependency isn't entirely severed yet this is at least a significant
start.This commit is intended to be largely refactorings, no functional
changes are intended here. The refactorings are:
A
CompilerBuilder
trait has been added towasmtime_environ
which
server as an abstraction used to create compilers and configure them
in a uniform fashion. Thewasmtime::Config
type now uses this
instead of cranelift-specific settings. Thewasmtime-jit
crate
exports the ability to create a compiler builder from a
CompilationStrategy
, which only works for Cranelift right now. In a
cranelift-less build of Wasmtime this is expected to return a trait
object that fails all requests to compile.The
Compiler
trait in thewasmtime_environ
crate has been souped
up with a number of methods that Wasmtime and other crates needed.The
wasmtime-debug
crate is now moved entirely behind the
wasmtime-cranelift
crate.The
wasmtime-cranelift
crate is now only depended on by the
wasmtime-jit
crate.Wasm types in
cranelift-wasm
no longer contain their IR type,
instead they only contain theWasmType
. This is required to get
everything to align correctly but will also be required in a future
refactoring where the types used bycranelift-wasm
will be extracted
to a separate crate.I moved around a fair bit of code in
wasmtime-cranelift
.Some gdb-specific jit-specific code has moved from
wasmtime-debug
to
wasmtime-jit
.
Note that this is built on https://github.com/bytecodealliance/wasmtime/pull/3176, but I wanted to keep all these refactorings ideally bite-ish sized to be more easily digestable
alexcrichton updated PR #3178 from less-target-isa
to main
.
alexcrichton requested pchickey for a review on PR #3178.
pchickey submitted PR review.
pchickey submitted PR review.
pchickey created PR review comment:
I am grateful that we have gotten rid of all these redundant duplications!
alexcrichton merged PR #3178.
Last updated: Nov 22 2024 at 16:03 UTC