You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ./sourir examples/mwe.sou --quiet --opt min_live
Scope error in the optimized program (min_live):
Error in function main version anon version anon
0 | var obj = nil
1 | branch (obj == nil) error l1
2 |l1:
3 | drop obj
4 | branch true error done
5 |done:
6 | return true
7 |error:
8 | return false
At instruction 7,
the scope coming from instruction 4 and
the scope coming from instruction 1
are incompatible:
- the latter declares {var obj} and the former does not
array v[2]
call a = '_args_check ()
stop 0
function _args_check ()
var x
branch true error loop
loop:
branch (x == nil) error loop
error:
return false
$ ./sourir examples/mwe.sou --quiet --opt prune,hoist_assign,min_live
Scope error in the optimized program (prune, hoist_assign, min_live):
Error in function main version anon line 1: Variable v is not declared.
call a = '_args_check ()
stop 0
function _args_check ()
goto error
goto loop
loop:
error:
return false
I confirm that the above bugs have been fixed. The examples are no longer valid, due to changes in the parser (requiring $ to prefix branch labels) and the constraint that branch labels cannot have multiple predecessors. But the corrected examples no longer trigger the bugs.
I don't remember the exact PRs that fixed these bugs, but #143, #144 seem to be the most relevant.
However, I found a new bug. I was trying to fix the vector example, and was getting a misleading error message. Here's the MWE:
The vector example is still in progress. The unoptimized version works, but running some of the passes reveals bugs. I ran these on top of #132.
Some of these bugs may be related, or may be masking each other. Many of these bugs were found when attempting to reduce the first few examples.
The text was updated successfully, but these errors were encountered: