ETModel_OpcodeHelper_Binding.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Reflection;
  5. using System.Runtime.InteropServices;
  6. using ILRuntime.CLR.TypeSystem;
  7. using ILRuntime.CLR.Method;
  8. using ILRuntime.Runtime.Enviorment;
  9. using ILRuntime.Runtime.Intepreter;
  10. using ILRuntime.Runtime.Stack;
  11. using ILRuntime.Reflection;
  12. using ILRuntime.CLR.Utils;
  13. namespace ILRuntime.Runtime.Generated
  14. {
  15. unsafe class ETModel_OpcodeHelper_Binding
  16. {
  17. public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
  18. {
  19. BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
  20. MethodBase method;
  21. Type[] args;
  22. Type type = typeof(ETModel.OpcodeHelper);
  23. args = new Type[]{typeof(System.UInt16)};
  24. method = type.GetMethod("IsNeedDebugLogMessage", flag, null, args, null);
  25. app.RegisterCLRMethodRedirection(method, IsNeedDebugLogMessage_0);
  26. }
  27. static StackObject* IsNeedDebugLogMessage_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
  28. {
  29. ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
  30. StackObject* ptr_of_this_method;
  31. StackObject* __ret = ILIntepreter.Minus(__esp, 1);
  32. ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
  33. System.UInt16 @opcode = (ushort)ptr_of_this_method->Value;
  34. var result_of_this_method = ETModel.OpcodeHelper.IsNeedDebugLogMessage(@opcode);
  35. __ret->ObjectType = ObjectTypes.Integer;
  36. __ret->Value = result_of_this_method ? 1 : 0;
  37. return __ret + 1;
  38. }
  39. }
  40. }