Update all dependencies to latest versions
wasmtime 31→43, wasm-encoder/wasmparser 0.228→0.246, rustyline 15→18. API migrations: F64Const now takes Ieee64 wrapper, wasmtime has own Error type (wasmtime::bail! in host closures), cache_config_load_default removed. Add performance regression limits to benchmark tests.
This commit is contained in:
@@ -349,7 +349,7 @@ fn emit_op(f: &mut Function, op: &IrOp, ctx: &mut EmitCtx) {
|
||||
IrOp::PushF64(val) => {
|
||||
fsp_dec(f);
|
||||
f.instruction(&Instruction::GlobalGet(FSP))
|
||||
.instruction(&Instruction::F64Const(*val))
|
||||
.instruction(&Instruction::F64Const((*val).into()))
|
||||
.instruction(&Instruction::F64Store(MEM8));
|
||||
}
|
||||
|
||||
@@ -855,14 +855,14 @@ fn emit_op(f: &mut Function, op: &IrOp, ctx: &mut EmitCtx) {
|
||||
// -- Float comparisons (cross-stack) --------------------------------
|
||||
IrOp::FZeroEq => {
|
||||
fpop(f);
|
||||
f.instruction(&Instruction::F64Const(0.0))
|
||||
f.instruction(&Instruction::F64Const(0.0.into()))
|
||||
.instruction(&Instruction::F64Eq);
|
||||
bool_to_forth_flag(f, SCRATCH_BASE);
|
||||
push_via_local(f, SCRATCH_BASE + 1);
|
||||
}
|
||||
IrOp::FZeroLt => {
|
||||
fpop(f);
|
||||
f.instruction(&Instruction::F64Const(0.0))
|
||||
f.instruction(&Instruction::F64Const(0.0.into()))
|
||||
.instruction(&Instruction::F64Lt);
|
||||
bool_to_forth_flag(f, SCRATCH_BASE);
|
||||
push_via_local(f, SCRATCH_BASE + 1);
|
||||
|
||||
@@ -282,8 +282,6 @@ impl ForthVM {
|
||||
pub fn new_with_config(wafer_config: WaferConfig) -> anyhow::Result<Self> {
|
||||
let mut config = wasmtime::Config::new();
|
||||
config.cranelift_nan_canonicalization(false);
|
||||
// Best-effort module caching
|
||||
let _ = config.cache_config_load_default();
|
||||
let engine = Engine::new(&config)?;
|
||||
let output = Arc::new(Mutex::new(String::new()));
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ struct RunnerHost {}
|
||||
fn make_engine() -> anyhow::Result<Engine> {
|
||||
let mut config = wasmtime::Config::new();
|
||||
config.cranelift_nan_canonicalization(false);
|
||||
Engine::new(&config)
|
||||
Ok(Engine::new(&config)?)
|
||||
}
|
||||
|
||||
/// Execute a pre-compiled `.wasm` module from a file path.
|
||||
@@ -336,7 +336,7 @@ fn create_host_func(
|
||||
((hi << 32) | lo, divisor)
|
||||
};
|
||||
if divisor == 0 {
|
||||
anyhow::bail!("division by zero");
|
||||
wasmtime::bail!("division by zero");
|
||||
}
|
||||
let quot = (dividend / divisor) as u32;
|
||||
let rem = (dividend % divisor) as u32;
|
||||
@@ -368,7 +368,7 @@ fn create_host_func(
|
||||
// Unimplemented host function: trap with a clear message.
|
||||
let name_owned = name.to_string();
|
||||
Func::new(store, void_type, move |_caller, _params, _results| {
|
||||
anyhow::bail!("host function '{name_owned}' is not available in standalone mode")
|
||||
wasmtime::bail!("host function '{name_owned}' is not available in standalone mode")
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user