Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/mono/mono/mini/aot-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -4346,9 +4346,11 @@ add_extra_method_full (MonoAotCompile *acfg, MonoMethod *method, gboolean prefer
return;
}

if (g_hash_table_lookup (acfg->prefer_instances, method))
/* Compile an instance as well */
if (g_hash_table_lookup (acfg->prefer_instances, method) && !is_open_method (orig)) {
/* Compile an instance instead */
add_extra_method_full (acfg, orig, FALSE, depth);
return;
}

/* Add it to profile_methods so its not skipped later */
if (acfg->aot_opts.profile_only && g_hash_table_lookup (acfg->profile_methods, orig))
Expand Down Expand Up @@ -9282,6 +9284,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
* for performance reasons, since gshared methods cannot implement some
* features like static virtual methods efficiently.
*/
/* Instances encountered later will be handled in add_extra_method_full () */
g_hash_table_insert (acfg->prefer_instances, method, method);
GPtrArray *instances = g_hash_table_lookup (acfg->gshared_instances, method);
if (instances) {
Expand Down