internal CSharpSyntaxNode( SyntaxKind kind, DiagnosticInfo[] diagnostics, SyntaxAnnotation[] annotations ) : base((ushort)kind, diagnostics, annotations) { GreenStats.NoteGreen(this); }
internal static void AddNode(GreenNode node, int hash) { if (AllChildrenInCache(node) && !node.IsMissing) { GreenStats.ItemAdded(); Debug.Assert(node.GetCacheHash() == hash); var idx = hash & CacheMask; cache[idx] = new Entry(hash, node); } }
private static GreenNode TryGetNode(int kind, GreenNode child1, GreenNode child2, GreenNode child3, GreenNode.NodeFlags flags, out int hash) { if (CanBeCached(child1, child2, child3)) { GreenStats.ItemCacheable(); int h = hash = GetCacheHash(kind, flags, child1, child2, child3); int idx = h & CacheMask; var e = cache[idx]; if (e.hash == h && e.node != null && e.node.IsCacheEquivalent(kind, flags, child1, child2, child3)) { GreenStats.CacheHit(); return(e.node); } } else { hash = -1; } return(null); }
internal CSharpSyntaxNode(SyntaxKind kind, DiagnosticInfo[] diagnostics, int fullWidth) : base((ushort)kind, diagnostics, fullWidth) { GreenStats.NoteGreen(this); }
internal CSharpSyntaxNode(SyntaxKind kind, int fullWidth) : base((ushort)kind, fullWidth) { GreenStats.NoteGreen(this); }
internal CSharpSyntaxNode(SyntaxKind kind) : base((ushort)kind) { GreenStats.NoteGreen(this); }