public FluentEmitter Stloc(params uint[] indexes)
{
if (indexes == null)
throw new ArgumentNullException(nameof(indexes));
foreach (var i in indexes)
{
if (Variables.Count <= i)
throw new IndexOutOfRangeException($"no variable found at index {i}");
switch (i)
{
case 0:
Emit(OpCodes.Stloc_0);
break;
case 1:
Emit(OpCodes.Stloc_1);
break;
case 2:
Emit(OpCodes.Stloc_2);
break;
case 3:
Emit(OpCodes.Stloc_3);
break;
default:
Emit(i < sbyte.MaxValue ? OpCodes.Stloc_S : OpCodes.Stloc, Variables[(int) i]);
break;
}
}
return this;
}