Skip to content

Commit c89372d

Browse files
committed
[SyntaxTreeDeserializer] Update comments for WeakLookupTable
1 parent 21dc6f2 commit c89372d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Sources/SwiftSyntax/SwiftSyntax.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ extension RawSyntax : Identifiable {}
5454
/// instance of the deserializer must be used for all subsequent
5555
/// deserializations.
5656
public final class SyntaxTreeDeserializer {
57-
// FIXME: This lookup table just accumulates nodes, we should invalidate nodes
58-
// that are no longer used at some point and remove them from the table
59-
6057
/// Syntax nodes that have already been parsed and are able to be reused if
6158
/// they were omitted in an incremental syntax tree transfer
6259
private var nodeLookupTable: WeakLookupTable<RawSyntax> = .init()
@@ -65,7 +62,7 @@ public final class SyntaxTreeDeserializer {
6562
/// `nodeLookupTable`. Because `nodeLookupTable` only holds a weak reference
6663
/// to the RawSyntax nodes, all retired `RawSyntax` nodes will be deallocated
6764
/// once we set a new tree. The weak references in `nodeLookupTable` will then
68-
/// become `nil` but will also never be accessed again.
65+
/// become `nil` and the slot will be reused to refer another node.
6966
private var nodeLookupTree: RawSyntax? = nil
7067

7168
/// The IDs of the nodes that were reused as part of incremental syntax

0 commit comments

Comments
 (0)