Skip to content

Commit

Permalink
use fixed size lists (dotnet#5011)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonerdo committed May 11, 2020
1 parent 27d91b0 commit e080273
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2679,7 +2679,7 @@ private void InterpretNewObj(int token)

if (signature.Length == arrayType.Rank)
{
lengths = new LowLevelList<int>();
lengths = new LowLevelList<int>(signature.Length);
for (int i = arguments.Length - 1; i >= 0; i--)
{
lengths.Add(arguments[i].AsInt32());
Expand All @@ -2689,8 +2689,8 @@ private void InterpretNewObj(int token)
{
Debug.Assert(arrayType.Rank * 2 == signature.Length);

lengths = new LowLevelList<int>();
lowerBounds = new LowLevelList<int>();
lengths = new LowLevelList<int>(arrayType.Rank);
lowerBounds = new LowLevelList<int>(arrayType.Rank);

for (int i = arguments.Length - 1; i >= 0; i--)
{
Expand Down

0 comments on commit e080273

Please sign in to comment.