Update wasm-tools dependencies (#4970)
* Update wasm-tools dependencies This update brings in a number of features such as: * The component model binary format and AST has been slightly adjusted in a few locations. Names are dropped from parameters/results now in the internal representation since they were not used anyway. At this time the ability to bind a multi-return function has not been exposed. * The `wasmparser` validator pass will now share allocations with prior functions, providing what's probably a very minor speedup for Wasmtime itself. * The text format for many component-related tests now requires named parameters. * Some new relaxed-simd instructions are updated to be ignored. I hope to have a follow-up to expose the multi-return ability to the embedding API of components. * Update audit information for new crates
This commit is contained in:
@@ -94,7 +94,7 @@ use smallvec::SmallVec;
|
||||
use std::cmp;
|
||||
use std::convert::TryFrom;
|
||||
use std::vec::Vec;
|
||||
use wasmparser::{FuncValidator, MemoryImmediate, Operator, WasmModuleResources};
|
||||
use wasmparser::{FuncValidator, MemArg, Operator, WasmModuleResources};
|
||||
|
||||
// Clippy warns about "align: _" but its important to document that the flags field is ignored
|
||||
#[cfg_attr(
|
||||
@@ -590,13 +590,14 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
state.pushn(inst_results);
|
||||
}
|
||||
Operator::CallIndirect {
|
||||
index,
|
||||
type_index,
|
||||
table_index,
|
||||
table_byte: _,
|
||||
} => {
|
||||
// `index` is the index of the function's signature and `table_index` is the index of
|
||||
// the table to search the function in.
|
||||
let (sigref, num_args) = state.get_indirect_sig(builder.func, *index, environ)?;
|
||||
// `type_index` is the index of the function's signature and
|
||||
// `table_index` is the index of the table to search the function
|
||||
// in.
|
||||
let (sigref, num_args) = state.get_indirect_sig(builder.func, *type_index, environ)?;
|
||||
let table = state.get_or_create_table(builder.func, *table_index, environ)?;
|
||||
let callee = state.pop1();
|
||||
|
||||
@@ -608,7 +609,7 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
builder,
|
||||
TableIndex::from_u32(*table_index),
|
||||
table,
|
||||
TypeIndex::from_u32(*index),
|
||||
TypeIndex::from_u32(*type_index),
|
||||
sigref,
|
||||
callee,
|
||||
state.peekn(num_args),
|
||||
@@ -2005,18 +2006,22 @@ pub fn translate_operator<FE: FuncEnvironment + ?Sized>(
|
||||
| Operator::I32x4RelaxedTruncSatF32x4U
|
||||
| Operator::I32x4RelaxedTruncSatF64x2SZero
|
||||
| Operator::I32x4RelaxedTruncSatF64x2UZero
|
||||
| Operator::F32x4Fma
|
||||
| Operator::F32x4Fms
|
||||
| Operator::F64x2Fma
|
||||
| Operator::F64x2Fms
|
||||
| Operator::I8x16LaneSelect
|
||||
| Operator::I16x8LaneSelect
|
||||
| Operator::I32x4LaneSelect
|
||||
| Operator::I64x2LaneSelect
|
||||
| Operator::F32x4RelaxedFma
|
||||
| Operator::F32x4RelaxedFnma
|
||||
| Operator::F64x2RelaxedFma
|
||||
| Operator::F64x2RelaxedFnma
|
||||
| Operator::I8x16RelaxedLaneselect
|
||||
| Operator::I16x8RelaxedLaneselect
|
||||
| Operator::I32x4RelaxedLaneselect
|
||||
| Operator::I64x2RelaxedLaneselect
|
||||
| Operator::F32x4RelaxedMin
|
||||
| Operator::F32x4RelaxedMax
|
||||
| Operator::F64x2RelaxedMin
|
||||
| Operator::F64x2RelaxedMax => {
|
||||
| Operator::F64x2RelaxedMax
|
||||
| Operator::I16x8RelaxedQ15mulrS
|
||||
| Operator::I16x8DotI8x16I7x16S
|
||||
| Operator::I32x4DotI8x16I7x16AddS
|
||||
| Operator::F32x4RelaxedDotBf16x8AddF32x4 => {
|
||||
return Err(wasm_unsupported!("proposed relaxed-simd operator {:?}", op));
|
||||
}
|
||||
};
|
||||
@@ -2165,7 +2170,7 @@ fn translate_unreachable_operator<FE: FuncEnvironment + ?Sized>(
|
||||
/// various parameters are returned describing the valid heap address if
|
||||
/// execution reaches that point.
|
||||
fn prepare_addr<FE: FuncEnvironment + ?Sized>(
|
||||
memarg: &MemoryImmediate,
|
||||
memarg: &MemArg,
|
||||
access_size: u32,
|
||||
builder: &mut FunctionBuilder,
|
||||
state: &mut FuncTranslationState,
|
||||
@@ -2342,7 +2347,7 @@ fn prepare_addr<FE: FuncEnvironment + ?Sized>(
|
||||
}
|
||||
|
||||
fn prepare_atomic_addr<FE: FuncEnvironment + ?Sized>(
|
||||
memarg: &MemoryImmediate,
|
||||
memarg: &MemArg,
|
||||
loaded_bytes: u32,
|
||||
builder: &mut FunctionBuilder,
|
||||
state: &mut FuncTranslationState,
|
||||
@@ -2394,7 +2399,7 @@ fn prepare_atomic_addr<FE: FuncEnvironment + ?Sized>(
|
||||
|
||||
/// Translate a load instruction.
|
||||
fn translate_load<FE: FuncEnvironment + ?Sized>(
|
||||
memarg: &MemoryImmediate,
|
||||
memarg: &MemArg,
|
||||
opcode: ir::Opcode,
|
||||
result_ty: Type,
|
||||
builder: &mut FunctionBuilder,
|
||||
@@ -2415,7 +2420,7 @@ fn translate_load<FE: FuncEnvironment + ?Sized>(
|
||||
|
||||
/// Translate a store instruction.
|
||||
fn translate_store<FE: FuncEnvironment + ?Sized>(
|
||||
memarg: &MemoryImmediate,
|
||||
memarg: &MemArg,
|
||||
opcode: ir::Opcode,
|
||||
builder: &mut FunctionBuilder,
|
||||
state: &mut FuncTranslationState,
|
||||
@@ -2460,7 +2465,7 @@ fn translate_atomic_rmw<FE: FuncEnvironment + ?Sized>(
|
||||
widened_ty: Type,
|
||||
access_ty: Type,
|
||||
op: AtomicRmwOp,
|
||||
memarg: &MemoryImmediate,
|
||||
memarg: &MemArg,
|
||||
builder: &mut FunctionBuilder,
|
||||
state: &mut FuncTranslationState,
|
||||
environ: &mut FE,
|
||||
@@ -2503,7 +2508,7 @@ fn translate_atomic_rmw<FE: FuncEnvironment + ?Sized>(
|
||||
fn translate_atomic_cas<FE: FuncEnvironment + ?Sized>(
|
||||
widened_ty: Type,
|
||||
access_ty: Type,
|
||||
memarg: &MemoryImmediate,
|
||||
memarg: &MemArg,
|
||||
builder: &mut FunctionBuilder,
|
||||
state: &mut FuncTranslationState,
|
||||
environ: &mut FE,
|
||||
@@ -2550,7 +2555,7 @@ fn translate_atomic_cas<FE: FuncEnvironment + ?Sized>(
|
||||
fn translate_atomic_load<FE: FuncEnvironment + ?Sized>(
|
||||
widened_ty: Type,
|
||||
access_ty: Type,
|
||||
memarg: &MemoryImmediate,
|
||||
memarg: &MemArg,
|
||||
builder: &mut FunctionBuilder,
|
||||
state: &mut FuncTranslationState,
|
||||
environ: &mut FE,
|
||||
@@ -2583,7 +2588,7 @@ fn translate_atomic_load<FE: FuncEnvironment + ?Sized>(
|
||||
|
||||
fn translate_atomic_store<FE: FuncEnvironment + ?Sized>(
|
||||
access_ty: Type,
|
||||
memarg: &MemoryImmediate,
|
||||
memarg: &MemArg,
|
||||
builder: &mut FunctionBuilder,
|
||||
state: &mut FuncTranslationState,
|
||||
environ: &mut FE,
|
||||
|
||||
Reference in New Issue
Block a user