internal static IEnumerable <StatementSyntax> Analyze( CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion ) { var walker = new ExitPointsWalker( compilation, member, node, firstInRegion, lastInRegion ); try { bool badRegion = false; walker.Analyze(ref badRegion); var result = walker._branchesOutOf.ToImmutableAndFree(); walker._branchesOutOf = null; return(badRegion ? SpecializedCollections.EmptyEnumerable <StatementSyntax>() : result); } finally { walker.Free(); } }
internal static ImmutableArray <StatementSyntax> Analyze(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion) { var walker = new ExitPointsWalker(compilation, member, node, firstInRegion, lastInRegion); try { return(walker.Analyze()); } finally { walker.Free(); } }
internal static IEnumerable<StatementSyntax> Analyze(CSharpCompilation compilation, Symbol member, BoundNode node, BoundNode firstInRegion, BoundNode lastInRegion) { var walker = new ExitPointsWalker(compilation, member, node, firstInRegion, lastInRegion); try { bool badRegion = false; walker.Analyze(ref badRegion); var result = walker._branchesOutOf.ToImmutableAndFree(); walker._branchesOutOf = null; return badRegion ? SpecializedCollections.EmptyEnumerable<StatementSyntax>() : result; } finally { walker.Free(); } }