Skip to content

Commit 6e13712

Browse files
committed
remove unneeded compile_or_get_func macro params
1 parent 07140e2 commit 6e13712

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

crates/wasmi/src/engine/executor/handler/dispatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ type Handler = fn(
280280
) -> Done;
281281

282282
macro_rules! compile_or_get_func {
283-
($state:expr, $ip:expr, $sp:expr, $mem0:expr, $mem0_len:expr, $instance:expr, $func:expr) => {{
283+
($state:expr, $func:expr) => {{
284284
match $crate::engine::executor::handler::utils::compile_or_get_func($state, $func) {
285285
Ok((ip, size)) => (ip, size),
286286
Err(error) => done!($state, DoneReason::CompileError(error)),

crates/wasmi/src/engine/executor/handler/exec.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ pub fn call_internal(
201201
) -> Done {
202202
let (caller_ip, crate::ir::decode::CallInternal { params, func }) = unsafe { decode_op(ip) };
203203
let func = EngineFunc::from(func);
204-
let (callee_ip, size) = compile_or_get_func!(state, ip, sp, mem0, mem0_len, instance, func);
204+
let (callee_ip, size) = compile_or_get_func!(state, func);
205205
let callee_sp = match state
206206
.stack
207207
.push_frame(Some(caller_ip), callee_ip, params, size, None)
@@ -227,8 +227,7 @@ pub fn call_imported(
227227
FuncEntity::Wasm(func) => {
228228
let engine_func = func.func_body();
229229
let callee_instance = *func.instance();
230-
let (callee_ip, size) =
231-
compile_or_get_func!(state, ip, sp, mem0, mem0_len, instance, engine_func);
230+
let (callee_ip, size) = compile_or_get_func!(state, engine_func);
232231
let callee_instance = resolve_instance(state.store, &callee_instance).into();
233232
let callee_sp = match state.stack.push_frame(
234233
Some(caller_ip),
@@ -277,8 +276,7 @@ pub fn call_indirect(
277276
FuncEntity::Wasm(func) => {
278277
let engine_func = func.func_body();
279278
let callee_instance = *func.instance();
280-
let (callee_ip, size) =
281-
compile_or_get_func!(state, ip, sp, mem0, mem0_len, instance, engine_func);
279+
let (callee_ip, size) = compile_or_get_func!(state, engine_func);
282280
let callee_instance: NonNull<InstanceEntity> =
283281
resolve_instance(state.store, &callee_instance).into();
284282
let callee_sp = match state.stack.push_frame(

0 commit comments

Comments
 (0)