-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
Description
The idea that @MikeInnes and I came up with last night:
User actions:
- set 1 or more breakpoints
- run
@compiled_run foo()
- the code runs as compiled until the function containing the breakpoint is hit.
- Now we are in the interpretter, for all stepping etc, until we step out, then we are compiled again.
Now to do this we need a Cassette style pass,
that replaces every function call (in the compiled section) with:
Pseudocode:
if contains_breakpoint(f, args...)
interpret(f, args...)
else
recurse(ctx, f, args...)
end
Further more, when Continue
is run we can switch back into that compile.
(Possibly "ContinueCompiled").
The cost of this, you can't StepOut
into compiled code.
Unless you made the compiled section actually have the full instrumention of MagneticReadHead.
But the advantage of this simpler compiler pass code over MagneticReadHead
is that it doesn't add anywhere need as many statements to the Code IR.
So while everything still needs to recompile, it doesn't hit those compile-time blackholes that MRH has.
aminya