unison-runtime-0.0.0
Safe HaskellNone
LanguageHaskell2010

Unison.Runtime.JIT.Frames

Description

The frame table, one per JIT. A native caller whose callee exits writes a frame record naming an entry here; the trampoline turns the record into the Push frame the interpreter would have pushed. See unison-runtimesrcUnisonRuntimeJIT/design.md, "Frames: native code records, Haskell builds".

Synopsis

Documentation

data Frame Source #

The fixed parts of a Push frame for one Let: the body's CombIx, stack guard and section, and the cell holding the body's native code.

Constructors

Frame !CombIx !Int !MSection !(Ptr NativeCell) 

type FrameIndex = Int Source #

1-based.

registerFrames :: Frames -> [Frame] -> IO FrameIndex Source #

Adds a module's frames and returns the index of the first one. The rest follow consecutively, in the order given.

replaceFrames :: Frames -> FrameIndex -> [Frame] -> IO () Source #

Overwrites frames registered earlier, starting at the given index (see replaceExits).