Support for multi-value wasm (#399)
* deps: bump wasmparser to 0.39.2 This has a bug fix for multi-value Wasm validation that is required for getting the spec tests passing. https://github.com/yurydelendik/wasmparser.rs/pull/135 * Update cranelift to 0.46.1 to get multi-value Wasm support The `cranelift_wasm` APIs had to change a little bit to maintain state necessary when translating multi-value Wasm blocks. The `translate_module` function now returns a `ModuleTranslationState` that is borrowed during each function's translation. * Enable multi-value proposal's spec tests This enables all the Wasm multi-value proposal's spec tests other than the ones that rely on functions having more return values than registers available on the target. That is not supported by cranelift yet. * wasmtime-interface-types: always use multi-value Wasm And remove the return pointer hacks that work around the lack of multi-value.
This commit is contained in:
committed by
Dan Gohman
parent
9d54f84a32
commit
842faf5aa6
@@ -238,7 +238,13 @@ fn handle_module(
|
||||
// Decide how to compile.
|
||||
let strategy = pick_compilation_strategy(cranelift, lightbeam);
|
||||
|
||||
let (module, lazy_function_body_inputs, lazy_data_initializers, target_config) = {
|
||||
let (
|
||||
module,
|
||||
module_translation,
|
||||
lazy_function_body_inputs,
|
||||
lazy_data_initializers,
|
||||
target_config,
|
||||
) = {
|
||||
let environ = ModuleEnvironment::new(isa.frontend_config(), tunables);
|
||||
|
||||
let translation = environ
|
||||
@@ -247,6 +253,7 @@ fn handle_module(
|
||||
|
||||
(
|
||||
translation.module,
|
||||
translation.module_translation.unwrap(),
|
||||
translation.function_body_inputs,
|
||||
translation.data_initializers,
|
||||
translation.target_config,
|
||||
@@ -259,6 +266,7 @@ fn handle_module(
|
||||
CompilationStrategy::Auto | CompilationStrategy::Cranelift => {
|
||||
Cranelift::compile_module(
|
||||
&module,
|
||||
&module_translation,
|
||||
lazy_function_body_inputs,
|
||||
&*isa,
|
||||
generate_debug_info,
|
||||
@@ -268,6 +276,7 @@ fn handle_module(
|
||||
#[cfg(feature = "lightbeam")]
|
||||
CompilationStrategy::Lightbeam => Lightbeam::compile_module(
|
||||
&module,
|
||||
&module_translation,
|
||||
lazy_function_body_inputs,
|
||||
&*isa,
|
||||
generate_debug_info,
|
||||
|
||||
Reference in New Issue
Block a user