[dotnet-linker] Improve method naming a bit according to reviews.

This commit is contained in:
Rolf Bjarne Kvinge 2023-05-15 15:51:08 +02:00
Родитель 4053da70e0
Коммит e4830a84aa
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -68,16 +68,16 @@ namespace Xamarin.Linker {
}
}
public static Instruction Create (this ILProcessor il, bool value)
public static Instruction CreateLdc (this ILProcessor il, bool value)
{
if (value)
return il.Create (OpCodes.Ldc_I4_1);
return il.Create (OpCodes.Ldc_I4_0);
}
public static void Emit (this ILProcessor il, bool value)
public static void EmitLdc (this ILProcessor il, bool value)
{
il.Append (il.Create (value));
il.Append (il.CreateLdc (value));
}
public static GenericInstanceMethod CreateGenericInstanceMethod (this MethodReference mr, params TypeReference [] genericTypeArguments)

Просмотреть файл

@ -698,7 +698,7 @@ namespace Xamarin.Linker {
postProcessing.Add (il.CreateLoadArgument (nativeParameterIndex));
postProcessing.Add (il.Create (OpCodes.Ldloc, indirectVariable));
postProcessing.Add (il.Create (OpCodes.Ldloc, copyIndirectVariable));
postProcessing.Add (il.Create (isOutParameter));
postProcessing.Add (il.CreateLdc (isOutParameter));
postProcessing.Add (il.Create (OpCodes.Call, managed_to_native));
return true;
}
@ -773,7 +773,7 @@ namespace Xamarin.Linker {
il.Emit (OpCodes.Ldarg_1); // SEL
il.Emit (OpCodes.Ldtoken, method);
il.Emit (parameter == -1); // evenInFinalizerQueue
il.EmitLdc (parameter == -1); // evenInFinalizerQueue
il.Emit (OpCodes.Call, abr.Runtime_GetNSObject_T___System_IntPtr_System_IntPtr_System_RuntimeMethodHandle_bool.CreateGenericInstanceMethod (type));
var tmpVariable = il.Body.AddVariable (type);
il.Emit (OpCodes.Stloc, tmpVariable);