ayaports/user/dotnet8-build/runtime_82678-add-stub-for-mini-is-gsharedvt-inst.patch

66 lines
2.9 KiB
Diff

From 30a1cfa37f87fc1100022ca82b833f3f486e84bb Mon Sep 17 00:00:00 2001
Patch-Source: https://github.com/dotnet/runtime/pull/82678
From: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date: Sat, 25 Feb 2023 23:32:43 +0200
Subject: [PATCH 1/2] Add guard around mini_is_gsharedvt_inst call
---
src/mono/mono/mini/aot-runtime.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/runtime/src/mono/mono/mini/aot-runtime.c b/src/runtime/src/mono/mono/mini/aot-runtime.c
index 683fee00852e7..edc401a5fada2 100644
--- a/src/runtime/src/mono/mono/mini/aot-runtime.c
+++ b/src/runtime/src/mono/mono/mini/aot-runtime.c
@@ -4530,8 +4530,10 @@ mono_aot_can_dedup (MonoMethod *method)
!mini_is_gsharedvt_signature (mono_method_signature_internal (method)) &&
!mini_is_gsharedvt_klass (method->klass)) {
MonoGenericContext *context = mono_method_get_context (method);
+#ifdef MONO_ARCH_GSHAREDVT_SUPPORTED
if (context->method_inst && mini_is_gsharedvt_inst (context->method_inst))
return FALSE;
+#endif
/* No point in dedup-ing private instances */
if ((context->class_inst && inst_is_private (context->class_inst)) ||
(context->method_inst && inst_is_private (context->method_inst)))
From f8f685624d361a76bb425f91c2ab2558dd67ace6 Mon Sep 17 00:00:00 2001
From: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Date: Sun, 26 Feb 2023 06:22:08 +0200
Subject: [PATCH 2/2] Add stub for mini_is_gsharedvt_inst
---
src/mono/mono/mini/aot-runtime.c | 2 --
src/mono/mono/mini/mini-generic-sharing.c | 6 ++++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/runtime/src/mono/mono/mini/aot-runtime.c b/src/runtime/src/mono/mono/mini/aot-runtime.c
index edc401a5fada2..683fee00852e7 100644
--- a/src/runtime/src/mono/mono/mini/aot-runtime.c
+++ b/src/runtime/src/mono/mono/mini/aot-runtime.c
@@ -4530,10 +4530,8 @@ mono_aot_can_dedup (MonoMethod *method)
!mini_is_gsharedvt_signature (mono_method_signature_internal (method)) &&
!mini_is_gsharedvt_klass (method->klass)) {
MonoGenericContext *context = mono_method_get_context (method);
-#ifdef MONO_ARCH_GSHAREDVT_SUPPORTED
if (context->method_inst && mini_is_gsharedvt_inst (context->method_inst))
return FALSE;
-#endif
/* No point in dedup-ing private instances */
if ((context->class_inst && inst_is_private (context->class_inst)) ||
(context->method_inst && inst_is_private (context->method_inst)))
diff --git a/src/runtime/src/mono/mono/mini/mini-generic-sharing.c b/src/runtime/src/mono/mono/mini/mini-generic-sharing.c
index 6b81872c4f307..3f4823477e115 100644
--- a/src/runtime/src/mono/mono/mini/mini-generic-sharing.c
+++ b/src/runtime/src/mono/mono/mini/mini-generic-sharing.c
@@ -4859,4 +4859,10 @@ mini_method_to_shared (MonoMethod *method)
return NULL;
}
+gboolean
+mini_is_gsharedvt_inst (MonoGenericInst *inst)
+{
+ return FALSE;
+}
+
#endif /* !MONO_ARCH_GSHAREDVT_SUPPORTED */