Switch to passing the vmctx hidden argument at the beginning.
This switches to passing the vmctx hidden argument at the beginning of the argument list, rather than the end.
This commit is contained in:
@@ -235,8 +235,11 @@ impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data
|
||||
|
||||
/// Add environment-specific function parameters.
|
||||
pub fn translate_signature(mut sig: ir::Signature, pointer_type: ir::Type) -> ir::Signature {
|
||||
sig.params
|
||||
.push(AbiParam::special(pointer_type, ArgumentPurpose::VMContext));
|
||||
// Prepend the vmctx argument.
|
||||
sig.params.insert(
|
||||
0,
|
||||
AbiParam::special(pointer_type, ArgumentPurpose::VMContext),
|
||||
);
|
||||
sig
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user