Closed ezrosent closed 9 months ago
Done! This uncovered a preexisting issue with converting empty functions:
@funcA(p: ptr<int>) {
ret;
}
@main {
five: int = const 5;
x: ptr<int> = alloc five;
call @funcA x;
free x;
}
Gets translated back correctly, but @funcA
had an empty body
@funcA(p: ptr<int>) {
}
Which caused the bril interpreter to panic. I added some code to fix that.
Wire in memory ops in to_cfg. Opening a draft as there are a few questions in to_cfg I'd like to resolve.
Fixes #343