unison-runtime-0.0.0
Safe HaskellNone
LanguageHaskell2010

Unison.Runtime.Machine.Types

Synopsis

Documentation

type Tick = CombIx -> K -> IO () Source #

type ActiveThreads = Maybe (IORef (Set ThreadId)) Source #

A ref storing every currently active thread. This is helpful for cleaning up orphaned threads when the main process completes.

We track threads when running in a host process like UCM, otherwise, in one-off environments Nothing is used and we don't bother tracking forked threads since they'll be cleaned up automatically on process termination.

initialNativeCells :: Int Source #

How many native code cells a fresh cache starts with. Each is 16 bytes.

refNumsTy :: CCache prof -> IO (Map Reference Word64) Source #

The process-wide type numbering (Unison.Runtime.TypeNumbers).

class RuntimeProfiler prof where Source #

Associated Types

data Ticker prof Source #

Methods

startTicker :: prof -> IO (Ticker prof, IO ()) Source #

checkTicker :: Ticker prof -> CombIx -> K -> IO () Source #

Instances

Instances details
RuntimeProfiler ProfileComm Source # 
Instance details

Defined in Unison.Runtime.Machine.Types

Associated Types

newtype Ticker ProfileComm 
Instance details

Defined in Unison.Runtime.Machine.Types

RuntimeProfiler () Source # 
Instance details

Defined in Unison.Runtime.Machine.Types

Associated Types

data Ticker () 
Instance details

Defined in Unison.Runtime.Machine.Types

data Ticker () = NilTick

Methods

startTicker :: () -> IO (Ticker (), IO ()) Source #

checkTicker :: Ticker () -> CombIx -> K -> IO () Source #

data family Ticker prof Source #

Instances

Instances details
newtype Ticker ProfileComm Source # 
Instance details

Defined in Unison.Runtime.Machine.Types

data Ticker () Source # 
Instance details

Defined in Unison.Runtime.Machine.Types

data Ticker () = NilTick

type MCombs = RCombs Val Source #

The code the interpreter runs: MCode over resolved combinators and these values. (Defined here, below the JIT modules, so that the JIT handle can be a field of the code cache without an import cycle.)