From 6208d2bc916788c336f7834e5cfe41d4d0b0085d Mon Sep 17 00:00:00 2001 From: liiir1985 Date: Wed, 25 May 2022 10:42:16 +0800 Subject: [PATCH] Fixed #698 --- .../Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ILRuntime/Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs b/ILRuntime/Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs index 88095299..85886e92 100644 --- a/ILRuntime/Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs +++ b/ILRuntime/Runtime/Intepreter/RegisterVM/ILIntepreter.Register.cs @@ -2860,6 +2860,7 @@ public unsafe partial class ILIntepreter dst = *(StackObject**)&objRef->Value; var ft = domain.GetTypeByIndex(dst->Value) as ILType; ilm = ft.GetVirtualMethod(ilm) as ILMethod; + useRegister = ilm.ShouldUseRegisterVM; } else { @@ -2867,6 +2868,7 @@ public unsafe partial class ILIntepreter if (obj == null) throw new NullReferenceException(); ilm = ((ILTypeInstance)obj).Type.GetVirtualMethod(ilm) as ILMethod; + useRegister = ilm.ShouldUseRegisterVM; } } if (useRegister)