From 34aa080d7800eb80cecc107b3fd658edd03f58ce Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Thu, 6 May 2021 20:10:16 -0500 Subject: [PATCH] return true for IsDynamicCodeSupported when interpreter is available (#52422) --- src/mono/mono/mini/intrinsics.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mono/mono/mini/intrinsics.c b/src/mono/mono/mini/intrinsics.c index 8d1f527..519bcfb 100644 --- a/src/mono/mono/mini/intrinsics.c +++ b/src/mono/mono/mini/intrinsics.c @@ -1946,10 +1946,14 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign if (in_corlib && !strcmp ("System.Runtime.CompilerServices", cmethod_klass_name_space) && !strcmp ("RuntimeFeature", cmethod_klass_name)) { - if (!strcmp (cmethod->name, "get_IsDynamicCodeSupported") || !strcmp (cmethod->name, "get_IsDynamicCodeCompiled")) { + if (!strcmp (cmethod->name, "get_IsDynamicCodeCompiled")) { EMIT_NEW_ICONST (cfg, ins, cfg->full_aot ? 0 : 1); ins->type = STACK_I4; return ins; + } else if (!strcmp (cmethod->name, "get_IsDynamicCodeSupported")) { + EMIT_NEW_ICONST (cfg, ins, cfg->full_aot ? (cfg->interp ? 1 : 0) : 1); + ins->type = STACK_I4; + return ins; } } -- 2.7.4