Update WasmBase::IsSupported not to use backing field (#79884)
authorMarek Safar <marek.safar@gmail.com>
Thu, 22 Dec 2022 18:29:09 +0000 (19:29 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Dec 2022 18:29:09 +0000 (19:29 +0100)
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Wasm/WasmBase.cs
src/mono/mono/mini/interp/transform.c

index 4d24ab8..cbe3994 100644 (file)
@@ -9,7 +9,7 @@ namespace System.Runtime.Intrinsics.Wasm
     [Intrinsic]
     internal abstract class WasmBase
     {
-        public static bool IsSupported { get; }
+        public static bool IsSupported { get => IsSupported; }
 
         /// <summary>
         ///   i32.clz
index dcfa175..994033b 100644 (file)
@@ -2613,7 +2613,8 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
        } else if (in_corlib &&
                        (!strncmp ("System.Runtime.Intrinsics.Arm", klass_name_space, 29) ||
                        !strncmp ("System.Runtime.Intrinsics.PackedSimd", klass_name_space, 36) ||
-                       !strncmp ("System.Runtime.Intrinsics.X86", klass_name_space, 29)) &&
+                       !strncmp ("System.Runtime.Intrinsics.X86", klass_name_space, 29) ||
+                       !strncmp ("System.Runtime.Intrinsics.Wasm", klass_name_space, 30)) &&
                        !strcmp (tm, "get_IsSupported")) {
                *op = MINT_LDC_I4_0;
        } else if (in_corlib &&