Skip to content

Commit

Permalink
Emit the same instances in hybrid aot mode as in full aot mode.
Browse files Browse the repository at this point in the history
Fixes mono#7086.
  • Loading branch information
vargaz authored and monojenkins committed Feb 21, 2018
1 parent b242e82 commit 8a92bc8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mono/mini/aot-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -7917,7 +7917,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
* encountered.
*/
depth = GPOINTER_TO_UINT (g_hash_table_lookup (acfg->method_depth, method));
if (!acfg->aot_opts.no_instances && depth < 32 && mono_aot_mode_is_full (&acfg->aot_opts)) {
if (!acfg->aot_opts.no_instances && depth < 32 && (mono_aot_mode_is_full (&acfg->aot_opts) || mono_aot_mode_is_hybrid (&acfg->aot_opts))) {
for (patch_info = cfg->patch_info; patch_info; patch_info = patch_info->next) {
switch (patch_info->type) {
case MONO_PATCH_INFO_RGCTX_FETCH:
Expand All @@ -7937,7 +7937,7 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)

if (!m)
break;
if (m->is_inflated && mono_aot_mode_is_full (&acfg->aot_opts)) {
if (m->is_inflated && (mono_aot_mode_is_full (&acfg->aot_opts) || mono_aot_mode_is_hybrid (&acfg->aot_opts))) {
if (!(mono_class_generic_sharing_enabled (m->klass) &&
mono_method_is_generic_sharable_full (m, FALSE, FALSE, FALSE)) &&
(!method_has_type_vars (m) || mono_method_is_generic_sharable_full (m, TRUE, TRUE, FALSE))) {
Expand Down Expand Up @@ -10984,7 +10984,7 @@ collect_methods (MonoAotCompile *acfg)
}
}

if (mono_aot_mode_is_full (&acfg->aot_opts))
if (mono_aot_mode_is_full (&acfg->aot_opts) || mono_aot_mode_is_hybrid (&acfg->aot_opts))
add_generic_instances (acfg);

if (mono_aot_mode_is_full (&acfg->aot_opts))
Expand Down

0 comments on commit 8a92bc8

Please sign in to comment.