Skip to content

Commit

Permalink
Fix performance issue in source-map (#4261)
Browse files Browse the repository at this point in the history
  • Loading branch information
csyonghe authored Jun 3, 2024
1 parent 68bf31e commit 89c1fd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/compiler-core/slang-source-map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void SourceMap::advanceToLine(Index nextLineIndex)
const auto lastEntryIndex = m_lineEntries.getCount();

// For all the new entries they will need to point to the end
m_lineStarts.setCount(nextLineIndex + 1);
m_lineStarts.growToCount(nextLineIndex + 1);

Index* starts = m_lineStarts.getBuffer();
for (Index i = currentLineIndex + 1; i < nextLineIndex + 1; ++i)
Expand Down

0 comments on commit 89c1fd0

Please sign in to comment.