Closed maximumspatium closed 6 years ago
Cool, merged with a comment that it unit-like test for a future pass.
Note that I thought this would go to tests/decomp/ first, and tried to drop it there too, but got an error:
File "/mnt/hdd/projects/ScratchABlock/decomp.py", line 196, in match_if_else_inv_ladder_recursive
assert len(block.branches) == 2, "Must be applied before match_if_else_ladder"
AssertionError: Must be applied before match_if_else_ladder
That's an example of mis-assumptions (and/or mis-ordering) of passes.
So far, turned that assert into a warning in 3a10ad1f3467502889403b488aa984bf5542235c
Ok, trying it now leads to nondeterministic variations in if-else structuring:
$a3 = 250;
} else if ($a2_0 == 100) {
$a3 = 100;
- } else if ($a2_0 == 200) {
+ } else if ($a2_0 != 200) {
+ } else {
$a3 = 200;
}
- } else if ($a2_0 != 500) {
- } else {
+ } else if ($a2_0 == 500) {
$a3 = 500;
}
} else if ($a2_0 == 750) {
Here it goes.