Update wasm-tools crates (#4246)
This commit updates the wasm-tools family of crates, notably pulling in the refactorings and updates from bytecodealliance/wasm-tools#621 for the latest iteration of the component model. This commit additionally updates all support for the component model for these changes, notably: * Many bits and pieces of type information was refactored. Many `FooTypeIndex` namings are now `TypeFooIndex`. Additionally there is now `TypeIndex` as well as `ComponentTypeIndex` for the two type index spaces in a component. * A number of new sections are now processed to handle the core and component variants. * Internal maps were split such as the `funcs` map into `component_funcs` and `funcs` (same for `instances`). * Canonical options are now processed individually instead of one bulk `into` definition. Overall this was not a major update to the internals of handling the component model in Wasmtime. Instead this was mostly a surface-level refactoring to make sure that everything lines up with the new binary format for components. * All text syntax used in tests was updated to the new syntax.
This commit is contained in:
@@ -171,7 +171,7 @@ fn parse_local_decls<FE: FuncEnvironment + ?Sized>(
|
||||
builder.set_srcloc(cur_srcloc(reader));
|
||||
let pos = reader.original_position();
|
||||
let count = reader.read_var_u32()?;
|
||||
let ty = reader.read_type()?;
|
||||
let ty = reader.read_val_type()?;
|
||||
validator.define_locals(pos, count, ty)?;
|
||||
declare_locals(builder, count, ty, &mut next_local, environ)?;
|
||||
}
|
||||
@@ -187,12 +187,12 @@ fn parse_local_decls<FE: FuncEnvironment + ?Sized>(
|
||||
fn declare_locals<FE: FuncEnvironment + ?Sized>(
|
||||
builder: &mut FunctionBuilder,
|
||||
count: u32,
|
||||
wasm_type: wasmparser::Type,
|
||||
wasm_type: wasmparser::ValType,
|
||||
next_local: &mut usize,
|
||||
environ: &mut FE,
|
||||
) -> WasmResult<()> {
|
||||
// All locals are initialized to 0.
|
||||
use wasmparser::Type::*;
|
||||
use wasmparser::ValType::*;
|
||||
let zeroval = match wasm_type {
|
||||
I32 => builder.ins().iconst(ir::types::I32, 0),
|
||||
I64 => builder.ins().iconst(ir::types::I64, 0),
|
||||
|
||||
Reference in New Issue
Block a user