@@ -2333,7 +2333,7 @@ public static bool TryEmit(Expression expr,
23332333
23342334 case ExpressionType.Default:
23352335 if (exprType != typeof(void) && (parent & ParentFlags.IgnoreResult) == 0)
2336- EmitDefault(exprType, il );
2336+ EmitDefault(il, exprType );
23372337 return true;
23382338
23392339 case ExpressionType.Index:
@@ -2690,7 +2690,8 @@ private static bool TryEmitCoalesceOperator(BinaryExpression expr, IReadOnlyList
26902690 return il.EmitPopIfIgnoreResult(parent);
26912691 }
26922692
2693- private static void EmitDefault(Type type, ILGenerator il)
2693+ /// <summary>Emit default op code for the type</summary>
2694+ public static void EmitDefault(ILGenerator il, Type type)
26942695 {
26952696 if (type.IsClass)
26962697 {
@@ -6216,8 +6217,9 @@ private static void EmitLoadLocalVariableAddress(ILGenerator il, int location)
62166217 il.Demit(OpCodes.Ldloca, (short)location);
62176218 }
62186219
6220+ /// <summary>Load local variable on stack</summary>
62196221 [MethodImpl((MethodImplOptions)256)]
6220- internal static bool EmitLoadLocalVariable(ILGenerator il, int location)
6222+ public static bool EmitLoadLocalVariable(ILGenerator il, int location)
62216223 {
62226224 if (location == 0)
62236225 il.Demit(OpCodes.Ldloc_0);
@@ -6267,8 +6269,9 @@ private static int EmitStoreLocalVariable(ILGenerator il, Type type)
62676269 return location;
62686270 }
62696271
6272+ /// <summary>Stores and loads the variable</summary>
62706273 [MethodImpl((MethodImplOptions)256)]
6271- internal static void EmitStoreAndLoadLocalVariable(ILGenerator il, int location)
6274+ public static void EmitStoreAndLoadLocalVariable(ILGenerator il, int location)
62726275 {
62736276 if (location == 0)
62746277 {
@@ -6302,7 +6305,8 @@ internal static void EmitStoreAndLoadLocalVariable(ILGenerator il, int location)
63026305 }
63036306 }
63046307
6305- internal static int EmitStoreAndLoadLocalVariable(ILGenerator il, Type t)
6308+ /// <summary>Stores and loads the variable, and returns it</summary>
6309+ public static int EmitStoreAndLoadLocalVariable(ILGenerator il, Type t)
63066310 {
63076311 var location = il.GetNextLocalVarIndex(t);
63086312 EmitStoreAndLoadLocalVariable(il, location);
@@ -8150,7 +8154,7 @@ public static T GetFirst<T>(this IEnumerable<T> source)
81508154 }
81518155
81528156 [RequiresUnreferencedCode(Trimming.Message)]
8153- internal static class ILGeneratorTools
8157+ public static class ILGeneratorTools
81548158 {
81558159#if DEMIT
81568160 [MethodImpl((MethodImplOptions)256)]
0 commit comments