From e2baccb4e50b521dc9e74f3d37dcb65c7163c008 Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 18 Apr 2020 23:18:24 -0400 Subject: [PATCH] Reinstate 3.5 tests --- .../{11_return_val.pyc-notyet => 11_return_val.pyc} | Bin ...low_bugs.pyc-notyet => 05_control_flow_bugs.pyc} | Bin ...low_bugs.pyc-notyet => 05_control_flow_bugs.pyc} | Bin uncompyle6/parsers/reducecheck/or_check.py | 5 ++++- 4 files changed, 4 insertions(+), 1 deletion(-) rename test/bytecode_3.5/{11_return_val.pyc-notyet => 11_return_val.pyc} (100%) rename test/bytecode_3.5_run/{05_control_flow_bugs.pyc-notyet => 05_control_flow_bugs.pyc} (100%) rename test/bytecode_3.8_run/{05_control_flow_bugs.pyc-notyet => 05_control_flow_bugs.pyc} (100%) diff --git a/test/bytecode_3.5/11_return_val.pyc-notyet b/test/bytecode_3.5/11_return_val.pyc similarity index 100% rename from test/bytecode_3.5/11_return_val.pyc-notyet rename to test/bytecode_3.5/11_return_val.pyc diff --git a/test/bytecode_3.5_run/05_control_flow_bugs.pyc-notyet b/test/bytecode_3.5_run/05_control_flow_bugs.pyc similarity index 100% rename from test/bytecode_3.5_run/05_control_flow_bugs.pyc-notyet rename to test/bytecode_3.5_run/05_control_flow_bugs.pyc diff --git a/test/bytecode_3.8_run/05_control_flow_bugs.pyc-notyet b/test/bytecode_3.8_run/05_control_flow_bugs.pyc similarity index 100% rename from test/bytecode_3.8_run/05_control_flow_bugs.pyc-notyet rename to test/bytecode_3.8_run/05_control_flow_bugs.pyc diff --git a/uncompyle6/parsers/reducecheck/or_check.py b/uncompyle6/parsers/reducecheck/or_check.py index 0479ce9d..ca2c289a 100644 --- a/uncompyle6/parsers/reducecheck/or_check.py +++ b/uncompyle6/parsers/reducecheck/or_check.py @@ -8,6 +8,9 @@ def or_check(self, lhs, n, rule, ast, tokens, first, last): # for t in range(first, last): print(tokens[t]) # print("="*40) + if (first, last) == (2, 6): + from trepan.api import debug; debug() + if rhs[0:2] in (("expr_jt", "expr"), ("expr_jitop", "expr"), ("expr_jit", "expr")): @@ -45,7 +48,7 @@ def or_check(self, lhs, n, rule, ast, tokens, first, last): return True # If the jmp is backwards - if last_token == "POP_JUMP_IF_FALSE" and self.version != 2.7: + if last_token == "POP_JUMP_IF_FALSE" and not self.version in (2.7, 3.5): if last_token.attr < last_token_offset: # For a backwards loop, well compare to the instruction *after* # then POP_JUMP...