Nix flake for RPython interpreters
修订版 | f528ed9af6fc755d947d17316af30491e2310795 (tree) |
---|---|
时间 | 2024-06-02 13:21:41 |
作者 | Corbin <cds@corb...> |
Commiter | Corbin |
bf: Correctly compile empty loops.
They are used as comments in some codebases. In particular, this allows
us to run awib, the infamous self-hosting polyglot Brainfuck compiler.
@@ -121,6 +121,7 @@ def loop(ops): | ||
121 | 121 | return rv |
122 | 122 | |
123 | 123 | def peep(ops): |
124 | + if not ops: return ops | |
124 | 125 | rv = [] |
125 | 126 | temp = ops[0] |
126 | 127 | for op in ops[1:]: |