Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unison.Runtime.Machine.Types
Synopsis
- type ActiveThreads = Maybe (IORef (Set ThreadId))
- type Tag = Word64
- type MCombs = RCombs Val
- type Combs = GCombs Void CombIx
- type MSection = RSection Val
- type MBranch = RBranch Val
- type MInstr = RInstr Val
- type MComb = RComb Val
- type MRef = RRef Val
- data Tracer
- refLookup :: String -> Map Reference Word64 -> Reference -> Word64
- class RuntimeProfiler prof where
- type Tick = CombIx -> K -> IO ()
- tickCallback :: Int -> Tick -> MVar Tick -> IORef Bool -> IO ()
- data CCache prof = CCache {
- sandboxed :: Bool
- tracer :: Bool -> Val -> Tracer
- profiler :: !prof
- srcCombs :: TVar (EnumMap Word64 Combs)
- combs :: TVar (EnumMap Word64 MCombs)
- combRefs :: TVar (EnumMap Word64 Reference)
- cacheableCombs :: TVar (EnumSet Word64)
- optInfos :: TVar (OptInfos Reference Symbol)
- tagRefs :: TVar (EnumMap Word64 Reference)
- freshTm :: TVar Word64
- freshTy :: TVar Word64
- intermed :: TVar (Map Reference (SuperGroup Reference Symbol))
- refTm :: TVar (Map Reference Word64)
- refTy :: TVar (Map Reference Word64)
- sandbox :: TVar (Map Reference (Set Reference))
- refNumsTm :: CCache prof -> IO (Map Reference Word64)
- refNumsTy :: CCache prof -> IO (Map Reference Word64)
- refNumTm :: CCache prof -> Reference -> IO Word64
- baseCCache :: Bool -> IO (CCache ())
- lookupCode :: CCache prof -> Referent -> IO (Maybe (Referenced Code))
- canonicalizeCodeRefs :: Code Reference -> IO (Referenced Code)
- resolveCode :: Reference -> Map Reference (SuperGroup Reference Symbol) -> Map Reference Word64 -> EnumSet Word64 -> Maybe (Code Reference)
- cacheability :: Map Reference Word64 -> EnumSet Word64 -> Reference -> Cacheability
- checkSandboxing :: CCache prof -> [Reference] -> Closure -> IO Bool
- checkValueSandboxing :: CCache prof -> [Reference] -> Value Reference -> IO (Either [Referent] [Referent])
- codeValidate :: CCache prof -> [(Reference, SuperGroup Reference Symbol)] -> IO (Maybe (Failure Text))
Documentation
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.
class RuntimeProfiler prof where Source #
Instances
RuntimeProfiler ProfileComm Source # | |
Defined in Unison.Runtime.Machine.Types Associated Types data Ticker ProfileComm Source # Methods startTicker :: ProfileComm -> IO (Ticker ProfileComm, IO ()) Source # checkTicker :: Ticker ProfileComm -> CombIx -> K -> IO () Source # | |
RuntimeProfiler () Source # | |
Constructors
CCache | |
Fields
|
lookupCode :: CCache prof -> Referent -> IO (Maybe (Referenced Code)) Source #
canonicalizeCodeRefs :: Code Reference -> IO (Referenced Code) Source #
resolveCode :: Reference -> Map Reference (SuperGroup Reference Symbol) -> Map Reference Word64 -> EnumSet Word64 -> Maybe (Code Reference) Source #
cacheability :: Map Reference Word64 -> EnumSet Word64 -> Reference -> Cacheability Source #