diff options
author | Zoltan Varga <vargaz@gmail.com> | 2018-02-21 03:53:07 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-02-23 17:18:44 +0300 |
commit | b7031bccfc8fbc4a3b22490fad0b87aad288f745 (patch) | |
tree | 2c80a6a0c595c57ca16cdb88bbc90d2dd15a98b5 | |
parent | 3538148a18d6fdeb3296afd0b4f064e1d2f9dd8f (diff) |
Emit the same instances in hybrid aot mode as in full aot mode.
Fixes https://github.com/mono/mono/issues/7086.
-rw-r--r-- | mono/mini/aot-compiler.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c index 10ad19bb2cc..9c31d8d4a09 100644 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@ -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: @@ -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))) { @@ -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)) |