| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Unison.Runtime.JIT.Config
Description
Settings for the JIT, read from the environment by readConfig when ucm
starts, and carried in the JIT handle from then on (see JIT.hs). The mode
also has a command-line option, --jit, which overrides the variable.
How to use these is in development.md next to this module.
Synopsis
- data Mode
- data Replacements
- data ReplacementUse
- data Config = Config {
- mode :: Mode
- threshold :: Int
- batch :: Int
- batchGate :: Int
- sizeUnit :: Int
- passes :: String
- exitCall :: Bool
- copyBound :: Double
- reentryWait :: Int
- reentryAdHoc :: Int
- exitCost :: Double
- entryCost :: Double
- logging :: Bool
- dumpIR :: Maybe FilePath
- dumpMCode :: Bool
- trace :: Bool
- stats :: Bool
- statsEach :: Bool
- statsEvery :: Int
- stressPoll :: Int
- stressStack :: Maybe Int
- stressCallee :: Int
- stressCStack :: Int
- stressAlloc :: Int
- stressInstall :: Int
- stressPool :: Maybe Int
- stressLists :: Int
- stressTexts :: Int
- stressBytes :: Int
- disabled :: [String]
- replacements :: Replacements
- setReplacements :: Replacements -> IO ()
- replacementActive :: ReplacementUse -> Bool
- readConfig :: IO Config
- jitLog :: Config -> String -> IO ()
- jitDump :: String -> IO ()
Documentation
data Replacements Source #
Which of the Haskell replacements of base library definitions
(Unison.Runtime.Foreign.Function.functionReplacementList) the runtime
applies when it loads code.
Constructors
| AllReplacements | every entry of the list |
| TaggedReplacements | the entries tagged |
| NoReplacements | none (for measuring an |
Instances
| Show Replacements Source # | |
Defined in Unison.Runtime.JIT.Config Methods showsPrec :: Int -> Replacements -> ShowS # show :: Replacements -> String # showList :: [Replacements] -> ShowS # | |
| Eq Replacements Source # | |
Defined in Unison.Runtime.JIT.Config | |
data ReplacementUse Source #
The tag on an entry of the replacement list: whether it is applied
under TaggedReplacements, the JIT's default.
Constructors
| Always | |
| InterpreterOnly |
Instances
| Show ReplacementUse Source # | |
Defined in Unison.Runtime.JIT.Config Methods showsPrec :: Int -> ReplacementUse -> ShowS # show :: ReplacementUse -> String # showList :: [ReplacementUse] -> ShowS # | |
| Eq ReplacementUse Source # | |
Defined in Unison.Runtime.JIT.Config Methods (==) :: ReplacementUse -> ReplacementUse -> Bool # (/=) :: ReplacementUse -> ReplacementUse -> Bool # | |
Constructors
| Config | |
Fields
| |
replacements :: Replacements Source #
Which replacements apply, decided once. This is the one setting that
is not carried in the JIT handle: it decides how a Map value is
represented, which the value decoder (Stack.hs) and the foreign function
table (Foreign.Function) have to agree on, and neither has a handle in
reach. It is a property of the process, so a single decision is right.
A compiled program chooses it before any code loads, from the mode it
was compiled under (setReplacements; the file carries it, since its
MCode has the replacements of that mode baked in); otherwise the
environment decides: UNISON_REPLACEMENTS if set, else it follows
UNISON_JIT.
setReplacements :: Replacements -> IO () Source #
Chooses the setting, for a compiled program from the mode stored in its file. It has to happen before any code has used the setting (before the cache is restored): code already loaded under another mode can't be redone, so a late choice that differs is an error.
replacementActive :: ReplacementUse -> Bool Source #
Whether an entry with this tag is applied under the current settings.
readConfig :: IO Config Source #
Reads the settings from the environment. Called once, by ucm at
startup, after the --jit options have been put in the environment.