internal static GreenNode TryGetNode( int kind, GreenNode child1, SyntaxFactoryContext context, out int hash ) { return(SyntaxNodeCache.TryGetNode(kind, child1, GetNodeFlags(context), out hash)); }
internal static WithTwoChildren List(CSharpSyntaxNode child0, CSharpSyntaxNode child1) { Debug.Assert(child0 != null); Debug.Assert(child1 != null); int hash; GreenNode cached = SyntaxNodeCache.TryGetNode((short)SyntaxKind.List, child0, child1, out hash); if (cached != null) { return((WithTwoChildren)cached); } var result = new WithTwoChildren(child0, child1); if (hash >= 0) { SyntaxNodeCache.AddNode(result, hash); } return(result); }