Skip to content

Commit

Permalink
Fix #5: fix optimize1 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Feb 22, 2018
1 parent c0fa62d commit 51996d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aheui/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def optimize_deadcode1(self):
min_stacksize = min_stacksize_map[pc]
if min_stacksize >= 0:
min_diff = min_stacksize - stacksize
if min_diff <= c.OP_STACKADD[op] - c.OP_STACKDEL[op]:
if min_diff <= 0 and min_diff <= c.OP_STACKADD[op] - c.OP_STACKDEL[op]:
break
if op == c.OP_BRPOP1 or op == c.OP_BRPOP2:
reqsize = c.OP_REQSIZE[op]
Expand Down

0 comments on commit 51996d7

Please sign in to comment.