1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-06-02 18:41:35 +00:00

Restore the debugging (which should be rethought, anyway).

This commit is contained in:
Chris Pressey 2018-12-11 22:40:23 +00:00
parent d13c6a94a2
commit 547b7c960a

View File

@ -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.