PY3: COME_FROM -> COME_FROM_FINALLY as appropriate

We now have all WITH_ op jumps associated in the grammar

Also, some COME_FROM_LOOP grammar fixes
This commit is contained in:
rocky
2016-09-27 02:59:05 -04:00
parent 1fc8ac4700
commit 051efb80f5
3 changed files with 15 additions and 9 deletions

View File

@@ -208,12 +208,9 @@ class Scanner3(Scanner):
come_from_name = 'COME_FROM'
if (inst.offset in offset_action):
action = offset_action[inst.offset]
if (action.type == 'end'
if (action.type == 'end'
and (self.opName(jump_offset)[len('SETUP_'):]
== action.name)
# After the grammar is fully adjusted, remove the below
# test
and action.name in ['EXCEPT', 'LOOP', 'WITH']):
== action.name)):
come_from_name = '%s_%s' % (
(come_from_name, action.name))
pass