Skip to content

Commit 4258272

Browse files
authored
[mono][aot] Deduplicate runtime invoke wrappers on iOS (#85908)
* Deduplicate runtime invoke wrappers on iOS * Move log to the add_extra_method_full
1 parent 2551c65 commit 4258272

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/mono/mono/mini/aot-compiler.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4334,6 +4334,9 @@ collect_dedup_method (MonoAotCompile *acfg, MonoMethod *method)
43344334
static int
43354335
add_method_full (MonoAotCompile *acfg, MonoMethod *method, gboolean extra, int depth)
43364336
{
4337+
if (collect_dedup_method (acfg, method))
4338+
return -1;
4339+
43374340
int index;
43384341

43394342
index = GPOINTER_TO_UINT (g_hash_table_lookup (acfg->method_indexes, method));
@@ -4420,9 +4423,6 @@ add_extra_method_full (MonoAotCompile *acfg, MonoMethod *method, gboolean prefer
44204423
mono_error_assert_ok (error);
44214424
}
44224425

4423-
if (collect_dedup_method (acfg, method))
4424-
return;
4425-
44264426
if (acfg->aot_opts.log_generics)
44274427
aot_printf (acfg, "%*sAdding method %s.\n", depth, "", mono_method_get_full_name (method));
44284428

src/mono/mono/mini/aot-runtime.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4555,12 +4555,7 @@ mono_aot_can_dedup (MonoMethod *method)
45554555
/* Use a set of wrappers/instances which work and useful */
45564556
switch (method->wrapper_type) {
45574557
case MONO_WRAPPER_RUNTIME_INVOKE:
4558-
#ifdef TARGET_WASM
45594558
return TRUE;
4560-
#else
4561-
return FALSE;
4562-
#endif
4563-
break;
45644559
case MONO_WRAPPER_OTHER: {
45654560
WrapperInfo *info = mono_marshal_get_wrapper_info (method);
45664561

0 commit comments

Comments
 (0)