winch: Prepare for an update to the wasm-tools crates (#5238)
This commit prepares the `winch` crate for updating `wasm-tools`, notably changing a bit about how the visitation of operators works. This moves the function body and wasm validator out of the `CodeGen` structure and into parameters threaded into the emission of the actual function. Additionally the `VisitOperator` implementation was updated to remove the explicit calls to the validator, favoring instead a macro-generated solution to guarantee that all validation happens before any translation proceeds. This means that the `VisitOperator for CodeGen` impl is now infallible and the various methods have been inlined into the trait methods as well as removing the `Result<_>`. Finally this commit updates translation to call `validator.finish(..)` which is required to perform the final validation steps of the function body.
This commit is contained in:
@@ -85,7 +85,7 @@ pub trait TargetIsa: Send + Sync {
|
||||
fn compile_function(
|
||||
&self,
|
||||
sig: &FuncType,
|
||||
body: FunctionBody,
|
||||
body: &FunctionBody,
|
||||
validator: FuncValidator<ValidatorResources>,
|
||||
) -> Result<Vec<String>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user