Fix comments

This commit is contained in:
Paul Pacheco 2020-09-28 22:35:21 -05:00
parent 5c4d8a27cc
commit 53452cc003

View File

@ -251,7 +251,9 @@ static MethodDefinition GenerateArrayWriteFunc(TypeReference variable)
return writerFunc;
}
// int length
writerFunc.Body.Variables.Add(new VariableDefinition(WeaverTypes.Import<int>()));
// int i
writerFunc.Body.Variables.Add(new VariableDefinition(WeaverTypes.Import<int>()));
@ -265,7 +267,7 @@ static MethodDefinition GenerateArrayWriteFunc(TypeReference variable)
// writer.WritePackedInt32(count);
// for (int i=0; i < count; i++)
// for (int i=0; i < length; i++)
GenerateFor(worker, () =>
{
// writer.Write(value[i]);
@ -317,7 +319,9 @@ static MethodDefinition GenerateArraySegmentWriteFunc(TypeReference variable)
return writerFunc;
}
// int length
writerFunc.Body.Variables.Add(new VariableDefinition(WeaverTypes.Import<int>()));
// int i
writerFunc.Body.Variables.Add(new VariableDefinition(WeaverTypes.Import<int>()));
ILProcessor worker = writerFunc.Body.GetILProcessor();
@ -330,7 +334,7 @@ static MethodDefinition GenerateArraySegmentWriteFunc(TypeReference variable)
worker.Append(worker.Create(OpCodes.Stloc_0));
// writer.WritePackedInt32(count);
// for (int i=0; i < count; i++)
// for (int i=0; i < length; i++)
GenerateFor(worker, () =>
{
// writer.Write(value.Array[i + value.Offset]);
@ -367,8 +371,9 @@ static MethodDefinition GenerateListWriteFunc(TypeReference variable)
return writerFunc;
}
// int length
writerFunc.Body.Variables.Add(new VariableDefinition(WeaverTypes.Import<int>()));
// int i;
writerFunc.Body.Variables.Add(new VariableDefinition(WeaverTypes.Import<int>()));
writerFunc.Body.InitLocals = true;