Skip to content

Commit ffa12cc

Browse files
authored
Revert "[mono][aot] Deduplicate runtime invoke wrappers on iOS (#85908)" (#87066)
We have encountered more frequent failures following the merge as outlined in #85908 (comment), so we will revert the change and try to reproduce the issue locally using the same version of macOS and iPhone as on the CI environment. Reverts #85908
1 parent 7e47c13 commit ffa12cc

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4334,9 +4334,6 @@ 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-
43404337
int index;
43414338

43424339
index = GPOINTER_TO_UINT (g_hash_table_lookup (acfg->method_indexes, method));
@@ -4423,6 +4420,9 @@ add_extra_method_full (MonoAotCompile *acfg, MonoMethod *method, gboolean prefer
44234420
mono_error_assert_ok (error);
44244421
}
44254422

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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4556,7 +4556,12 @@ mono_aot_can_dedup (MonoMethod *method)
45564556
/* Use a set of wrappers/instances which work and useful */
45574557
switch (method->wrapper_type) {
45584558
case MONO_WRAPPER_RUNTIME_INVOKE:
4559+
#ifdef TARGET_WASM
45594560
return TRUE;
4561+
#else
4562+
return FALSE;
4563+
#endif
4564+
break;
45604565
case MONO_WRAPPER_OTHER: {
45614566
WrapperInfo *info = mono_marshal_get_wrapper_info (method);
45624567

0 commit comments

Comments
 (0)