Skip to content

Commit

Permalink
[mono][wasm] Fix support for virtual invokes.
Browse files Browse the repository at this point in the history
Fixes #86621.
  • Loading branch information
vargaz authored and github-actions committed May 24, 2023
1 parent ce689d9 commit ccf7836
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 ccf7836

Please sign in to comment.