From d8dfd37cc6b8b7d70dabced70661e690cc81e709 Mon Sep 17 00:00:00 2001 From: Steve Hawley Date: Mon, 9 May 2022 14:23:22 -0400 Subject: [PATCH] [nnyeah] IConvertible ancient history (#14945) This was old code that hung around from before we discovered that we can't fully handle `IConvertible` --- tools/nnyeah/nnyeah/MethodTransformations.cs | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tools/nnyeah/nnyeah/MethodTransformations.cs b/tools/nnyeah/nnyeah/MethodTransformations.cs index 4d3b210bfbbf..c3d523436d5a 100644 --- a/tools/nnyeah/nnyeah/MethodTransformations.cs +++ b/tools/nnyeah/nnyeah/MethodTransformations.cs @@ -174,22 +174,6 @@ public Dictionary GetTransforms (ModuleDefinition module Instruction.Create (OpCodes.Call, mref) })); - var iconvertibleTypeRef = new TypeReference ("System", "IConvertible", module, module.TypeSystem.CoreLibrary); - var iformatProviderTypeRef = new TypeReference ("System", "IFormatProvider", module, module.TypeSystem.CoreLibrary); - var iformatProviderVar = new VariableDefinition (iformatProviderTypeRef); - mref = new MethodReference ("ToBoolean", module.TypeSystem.Boolean, iconvertibleTypeRef); - mref = module.ImportReference (mref); - allTransforms.Add (new Transformation ("System.Boolean System.nint::System.IConvertible.ToBoolean(System.IFormatProvider)", - TransformationAction.Replace, - new List () { - Instruction.Create (OpCodes.Stloc, iformatProviderVar), - Instruction.Create (OpCodes.Unbox, module.TypeSystem.IntPtr), - Instruction.Create (OpCodes.Conv_I8), - Instruction.Create (OpCodes.Box, module.TypeSystem.Int64), - Instruction.Create (OpCodes.Ldloc, iformatProviderVar), - Instruction.Create (OpCodes.Call, mref) - })); - var marshalTypeReference = new TypeReference ("System.Runtime.InteropServices", "Marshal", module, module.TypeSystem.CoreLibrary); mref = new MethodReference ("CopyArray", module.TypeSystem.Void, marshalTypeReference); mref.Parameters.Add (new ParameterDefinition (module.TypeSystem.IntPtr));