diff --git a/src/sixtypical/analyzer.py b/src/sixtypical/analyzer.py index d1006c6..2298e53 100644 --- a/src/sixtypical/analyzer.py +++ b/src/sixtypical/analyzer.py @@ -411,14 +411,16 @@ class Analyzer(object): self.analyze_block(routine.block, context) + trashed = set(context.each_touched()) - set(context.each_meaningful()) + if self.debug: print("at end of routine `{}`:".format(routine.name)) print(context) - #print("trashed: ", LocationRef.format_set(trashed)) + print("trashed: ", LocationRef.format_set(trashed)) print("outputs: ", LocationRef.format_set(type_.outputs)) - #trashed_outputs = type_.outputs & trashed - #if trashed_outputs: - # print("TRASHED OUTPUTS: ", LocationRef.format_set(trashed_outputs)) + trashed_outputs = type_.outputs & trashed + if trashed_outputs: + print("TRASHED OUTPUTS: ", LocationRef.format_set(trashed_outputs)) print('') print('-' * 79) print('') @@ -438,8 +440,6 @@ class Analyzer(object): raise InconsistentExitError("Exit contexts are not consistent") context.update_from(exit_context) - trashed = set(context.each_touched()) - set(context.each_meaningful()) - # these all apply whether we encountered goto(s) in this routine, or not...: # can't trash an output.