Skip to content

Commit

Permalink
[mono][wasm] Fix support for virtual invokes. (#86709)
Browse files Browse the repository at this point in the history
Fixes #86621.

Co-authored-by: Zoltan Varga <vargaz@gmail.com>
  • Loading branch information
github-actions[bot] and vargaz authored May 25, 2023
1 parent c6e1d37 commit 61d367b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/mono/mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -7528,7 +7528,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
goto calli_end;
}
}
if (cfg->llvm_only && !(cfg->method->wrapper_type && cfg->method->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD))
/* Some wrappers use calli with ftndesc-es */
if (cfg->llvm_only && !(cfg->method->wrapper_type &&
cfg->method->wrapper_type != MONO_WRAPPER_DYNAMIC_METHOD &&
cfg->method->wrapper_type != MONO_WRAPPER_DELEGATE_INVOKE))
ins = mini_emit_llvmonly_calli (cfg, fsig, sp, addr);
else
ins = (MonoInst*)mini_emit_calli_full (cfg, fsig, sp, addr, NULL, NULL, tailcall);
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/mini-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -2920,7 +2920,7 @@ get_ftnptr_for_method (MonoMethod *method, gboolean need_unbox, MonoError *error
res = mini_add_method_trampoline (method, res, mono_method_needs_static_rgctx_invoke (method, TRUE), need_unbox);
return res;
} else {
return mini_llvmonly_load_method_ftndesc (method, FALSE, FALSE, error);
return mini_llvmonly_load_method_ftndesc (method, FALSE, need_unbox, error);
}
}

Expand Down

0 comments on commit 61d367b

Please sign in to comment.