提交 5be1b0dd 编写于 作者: A Artur Spychaj

Use a BitVector instead of bool[] in analyzer

上级 afbcfe18
......@@ -554,17 +554,17 @@ private SyntaxNode FindStatement(SyntaxNode declarationBody, int position, out i
Debug.Assert(updatedMethods.Count == 0);
var updatedTrackingSpans = new List<KeyValuePair<ActiveStatementId, TextSpan>>();
bool[] editedActiveStatements = new bool[newActiveStatements.Length];
BitVector editedActiveStatements = BitVector.Create(newActiveStatements.Length);
for (int i = 0; i < script.Edits.Length; i++)
{
var edit = script.Edits[i];
AnalyzeUpdatedActiveMethodBodies(script, i, editMap, oldText, newText, documentId, trackingService, oldActiveStatements, newActiveStatements, newExceptionRegions, updatedMethods, editedActiveStatements, updatedTrackingSpans, diagnostics);
AnalyzeUpdatedActiveMethodBodies(script, i, editMap, oldText, newText, documentId, trackingService, oldActiveStatements, ref editedActiveStatements, newActiveStatements, newExceptionRegions, updatedMethods, updatedTrackingSpans, diagnostics);
ReportSyntacticRudeEdits(diagnostics, script.Match, edit, editMap);
}
UpdateUneditedSpans(diagnostics, script.Match, oldText, newText, documentId, trackingService, oldActiveStatements, newActiveStatements, newExceptionRegions, editedActiveStatements, updatedTrackingSpans);
UpdateUneditedSpans(diagnostics, script.Match, oldText, newText, documentId, trackingService, oldActiveStatements, editedActiveStatements, newActiveStatements, newExceptionRegions, updatedTrackingSpans);
if (updatedTrackingSpans.Count > 0)
{
......@@ -580,9 +580,9 @@ private SyntaxNode FindStatement(SyntaxNode declarationBody, int position, out i
DocumentId documentId,
IActiveStatementTrackingService trackingService,
ImmutableArray<ActiveStatementSpan> oldActiveStatements,
BitVector editedActiveStatements,
[In, Out]LinePositionSpan[] newActiveStatements,
[In, Out]ImmutableArray<LinePositionSpan>[] newExceptionRegions,
[In, Out]bool[] editedActiveStatements,
[In, Out]List<KeyValuePair<ActiveStatementId, TextSpan>> updatedTrackingSpans)
{
Debug.Assert(oldActiveStatements.Length == newActiveStatements.Length);
......@@ -842,10 +842,10 @@ internal struct UpdatedMemberInfo
DocumentId documentId,
IActiveStatementTrackingService trackingService,
ImmutableArray<ActiveStatementSpan> oldActiveStatements,
ref BitVector editedActiveStatements,
[Out]LinePositionSpan[] newActiveStatements,
[Out]ImmutableArray<LinePositionSpan>[] newExceptionRegions,
[Out]List<UpdatedMemberInfo> updatedMembers,
[Out]bool[] editedActiveStatements,
[Out]List<KeyValuePair<ActiveStatementId, TextSpan>> updatedTrackingSpans,
[Out]List<RudeEditDiagnostic> diagnostics)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册