| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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
- data Frame = Frame !CombIx !Int !MSection !(Ptr NativeCell)
- type FrameIndex = Int
- data Frames
- newFrames :: IO Frames
- registerFrames :: Frames -> [Frame] -> IO FrameIndex
- replaceFrames :: Frames -> FrameIndex -> [Frame] -> IO ()
- lookupFrame :: Frames -> FrameIndex -> IO Frame
Documentation
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.
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).
lookupFrame :: Frames -> FrameIndex -> IO Frame Source #