Skip to content

Compile (with a Cassette Pass) until fire breakpoint is hit #306

@oxinabox

Description

@oxinabox

The idea that @MikeInnes and I came up with last night:

User actions:

  1. set 1 or more breakpoints
  2. run @compiled_run foo()
  3. the code runs as compiled until the function containing the breakpoint is hit.
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions