-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IR Pass based #14
IR Pass based #14
Conversation
So cool :) |
This is actually kind of interesting. @vtjnash + @Keno + me + others have been musing for a while about what it would look like for pre-type-inference IR to be fully SSA form (like the optimizer's IR). If that were to happen, you couldn't accomplish the thing you've implemented here via a simple Cassette pass. Though I guess we could bake-in additional mechanisms to ensure this kind of thing could still work (e.g. the compiler could keep around a separate queryable cache for the original variable names etc.). This change isn't likely to happen in the near future (or maybe ever) anyway, just food for thought. |
FWIW, I don't think we should ever delete the ability to handle Slots from inference. While SSA form is helpful for writing mutation passes (it simplifies updating non-local information), it's not always a clear win (there's a reason that clang avoids them). So don't avoid them just because the later optimizer passes don't need to optimize them, or think that means we need to remove them from the IR. |
Certainly, not advocating for removing slots. Just pointing out that this PR demonstrates one of the potential negative consequences of removing them (it'd make this PR harder to implement) 🙂 |
With a bit more tinkering it works!
@jrevels do you think this might be a nice example for the Cassette docs? |
All the tests are probably broken now. Todo is to hook the breakpoint stuff in (right now it just initially begins by breakpointing immediately), |
working on it
insert all the needed breaks in the detailed IR (broken) insert all the needed breaks in the detailed IR
…ing up setbreakpoint etc
Merged into #23 |
To be a Real debugger,
you need to be able to step though a method,
call by call, seeing how all the local variables are changing.
Not just our current game of Leap to the next call and examine it's inputs.
(and with #5 outputs)
This PR is to be able to do that, or at least the core parts of that