From 547b7c960a3af1b10b3ae9108a5311a6cfd2ed12 Mon Sep 17 00:00:00 2001 From: Chris Pressey Date: Tue, 11 Dec 2018 22:40:23 +0000 Subject: [PATCH] Restore the debugging (which should be rethought, anyway). --- src/sixtypical/analyzer.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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.