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)