Safe Haskell | None |
---|---|
Language | Haskell98 |
- type PartitioningFn = Ptr Function -> IO [Ptr Function]
- data JITCompileCallbackManager = CallbackMgr !(Ptr JITCompileCallbackManager) !(IO ())
- newtype IndirectStubsManagerBuilder = StubsMgr (Ptr IndirectStubsManagerBuilder)
- data CompileOnDemandLayer baseLayer = CompileOnDemandLayer {
- compileLayer :: !(Ptr CompileOnDemandLayer)
- dataLayout :: !(Ptr DataLayout)
- cleanupActions :: !(IORef [IO ()])
- newIndirectStubsManagerBuilder :: ShortByteString -> IO IndirectStubsManagerBuilder
- disposeIndirectStubsManagerBuilder :: IndirectStubsManagerBuilder -> IO ()
- withIndirectStubsManagerBuilder :: ShortByteString -> (IndirectStubsManagerBuilder -> IO a) -> IO a
- newJITCompileCallbackManager :: ShortByteString -> Maybe (IO ()) -> IO JITCompileCallbackManager
- disposeJITCompileCallbackManager :: JITCompileCallbackManager -> IO ()
- withJITCompileCallbackManager :: ShortByteString -> Maybe (IO ()) -> (JITCompileCallbackManager -> IO a) -> IO a
- newCompileOnDemandLayer :: CompileLayer l => l -> TargetMachine -> (Ptr Function -> IO [Ptr Function]) -> JITCompileCallbackManager -> IndirectStubsManagerBuilder -> Bool -> IO (CompileOnDemandLayer l)
- withCompileOnDemandLayer :: CompileLayer l => l -> TargetMachine -> (Ptr Function -> IO [Ptr Function]) -> JITCompileCallbackManager -> IndirectStubsManagerBuilder -> Bool -> (CompileOnDemandLayer l -> IO a) -> IO a
Documentation
data JITCompileCallbackManager Source #
This is used by CompileOnDemandLayer
to create callback that
compile functions when they are called.
CallbackMgr !(Ptr JITCompileCallbackManager) !(IO ()) |
newtype IndirectStubsManagerBuilder Source #
This is used by CompileOnDemandLayer
to manage the stubs
created for function definitions that have not yet been compiled.
data CompileOnDemandLayer baseLayer Source #
Adding a module to a CompileOnDemandLayer
creates stubs for its
functions definitions. When one of those stubs is called, the
corresponding function body is extracted and compiled.
CompileOnDemandLayer | |
|
Eq (CompileOnDemandLayer baseLayer) Source # | |
CompileLayer (CompileOnDemandLayer l) Source # | |
newIndirectStubsManagerBuilder Source #
:: ShortByteString | target triple |
-> IO IndirectStubsManagerBuilder |
Create a new IndirectStubsManagerBuilder
.
When the stubs manager is no longer needed, it should be freed
using disposeIndirectStubsManagerBuilder
.
disposeIndirectStubsManagerBuilder :: IndirectStubsManagerBuilder -> IO () Source #
Dispose of an IndirectStubsManagerBuilder
.
withIndirectStubsManagerBuilder Source #
:: ShortByteString | target triple |
-> (IndirectStubsManagerBuilder -> IO a) | |
-> IO a |
bracket
-style wrapper around newIndirectStubsManagerBuilder
and disposeIndirectStubsManagerBuilder
.
newJITCompileCallbackManager Source #
:: ShortByteString | target triple |
-> Maybe (IO ()) | called on compilation errors |
-> IO JITCompileCallbackManager |
Create a new JITCompileCallbackManager
.
When the callback manager is no longer needed, it should be freed
using disposeJITCompileCallbackManager
.
disposeJITCompileCallbackManager :: JITCompileCallbackManager -> IO () Source #
Dispose of a JITCompileCallbackManager
.
withJITCompileCallbackManager Source #
:: ShortByteString | target triple |
-> Maybe (IO ()) | called on compilation errors |
-> (JITCompileCallbackManager -> IO a) | |
-> IO a |
Execute a computation using a new JITCompileCallbackManager
.
newCompileOnDemandLayer Source #
:: CompileLayer l | |
=> l | |
-> TargetMachine | |
-> (Ptr Function -> IO [Ptr Function]) | partitioning function |
-> JITCompileCallbackManager | |
-> IndirectStubsManagerBuilder | |
-> Bool | clone stubs into partitions |
-> IO (CompileOnDemandLayer l) |
Create a new CompileOnDemandLayer
. The partitioning function
specifies which functions should be compiled when a function is
called.
When the layer is no longer needed, it should be disposed using disposeCompileLayer
.
withCompileOnDemandLayer Source #
:: CompileLayer l | |
=> l | |
-> TargetMachine | |
-> (Ptr Function -> IO [Ptr Function]) | partitioning function |
-> JITCompileCallbackManager | |
-> IndirectStubsManagerBuilder | |
-> Bool | clone stubs into partitions |
-> (CompileOnDemandLayer l -> IO a) | |
-> IO a |
bracket
-style wrapper around newCompileOnDemandLayer
and disposeCompileLayer
.