Class LLVMORC


  • public class LLVMORC
    extends java.lang.Object
    • Method Detail

      • LLVMOrcCreateInstance

        public static long LLVMOrcCreateInstance​(long TM)
        Create an ORC JIT stack.

        The client owns the resulting stack, and must call OrcDisposeInstance to destroy it and free its memory. The JIT stack will take ownership of the TargetMachine, which will be destroyed when the stack is destroyed. The client should not attempt to dispose of the Target Machine, or it will result in a double-free.

      • nLLVMOrcGetErrorMsg

        public static long nLLVMOrcGetErrorMsg​(long JITStack)
        Unsafe version of: OrcGetErrorMsg
      • LLVMOrcGetErrorMsg

        @Nullable
        public static java.lang.String LLVMOrcGetErrorMsg​(long JITStack)
        Get the error message for the most recent error (if any).

        This message is owned by the ORC JIT Stack and will be freed when the stack is disposed of by OrcDisposeInstance.

      • nLLVMOrcGetMangledSymbol

        public static void nLLVMOrcGetMangledSymbol​(long JITStack,
                                                    long MangledSymbol,
                                                    long Symbol)
        Unsafe version of: OrcGetMangledSymbol
      • LLVMOrcGetMangledSymbol

        public static void LLVMOrcGetMangledSymbol​(long JITStack,
                                                   PointerBuffer MangledSymbol,
                                                   java.nio.ByteBuffer Symbol)
        
        public static void LLVMOrcGetMangledSymbol​(long JITStack,
                                                   PointerBuffer MangledSymbol,
                                                   java.lang.CharSequence Symbol)
        
        Mangle the given symbol. Memory will be allocated for MangledSymbol to hold the result.
      • nLLVMOrcDisposeMangledSymbol

        public static void nLLVMOrcDisposeMangledSymbol​(long MangledSymbol)
        Unsafe version of: OrcDisposeMangledSymbol
      • LLVMOrcDisposeMangledSymbol

        public static void LLVMOrcDisposeMangledSymbol​(java.nio.ByteBuffer MangledSymbol)
        Dispose of a mangled symbol.
      • nLLVMOrcCreateLazyCompileCallback

        public static long nLLVMOrcCreateLazyCompileCallback​(long JITStack,
                                                             long RetAddr,
                                                             long Callback,
                                                             long CallbackCtx)
        Unsafe version of: OrcCreateLazyCompileCallback
      • LLVMOrcCreateLazyCompileCallback

        public static long LLVMOrcCreateLazyCompileCallback​(long JITStack,
                                                            java.nio.LongBuffer RetAddr,
                                                            LLVMOrcLazyCompileCallbackFnI Callback,
                                                            long CallbackCtx)
        Create a lazy compile callback.
      • nLLVMOrcCreateIndirectStub

        public static long nLLVMOrcCreateIndirectStub​(long JITStack,
                                                      long StubName,
                                                      long InitAddr)
        Unsafe version of: OrcCreateIndirectStub
      • LLVMOrcCreateIndirectStub

        public static long LLVMOrcCreateIndirectStub​(long JITStack,
                                                     java.nio.ByteBuffer StubName,
                                                     long InitAddr)
        
        public static long LLVMOrcCreateIndirectStub​(long JITStack,
                                                     java.lang.CharSequence StubName,
                                                     long InitAddr)
        
        Create a named indirect call stub.
      • nLLVMOrcSetIndirectStubPointer

        public static long nLLVMOrcSetIndirectStubPointer​(long JITStack,
                                                          long StubName,
                                                          long NewAddr)
        Unsafe version of: OrcSetIndirectStubPointer
      • LLVMOrcSetIndirectStubPointer

        public static long LLVMOrcSetIndirectStubPointer​(long JITStack,
                                                         java.nio.ByteBuffer StubName,
                                                         long NewAddr)
        
        public static long LLVMOrcSetIndirectStubPointer​(long JITStack,
                                                         java.lang.CharSequence StubName,
                                                         long NewAddr)
        
        Set the pointer for the given indirect stub.
      • nLLVMOrcAddEagerlyCompiledIR

        public static long nLLVMOrcAddEagerlyCompiledIR​(long JITStack,
                                                        long RetHandle,
                                                        long Mod,
                                                        long SymbolResolver,
                                                        long SymbolResolverCtx)
        Unsafe version of: OrcAddEagerlyCompiledIR
      • LLVMOrcAddEagerlyCompiledIR

        public static long LLVMOrcAddEagerlyCompiledIR​(long JITStack,
                                                       java.nio.LongBuffer RetHandle,
                                                       long Mod,
                                                       LLVMOrcSymbolResolverFnI SymbolResolver,
                                                       long SymbolResolverCtx)
        Add module to be eagerly compiled.
      • nLLVMOrcAddLazilyCompiledIR

        public static long nLLVMOrcAddLazilyCompiledIR​(long JITStack,
                                                       long RetHandle,
                                                       long Mod,
                                                       long SymbolResolver,
                                                       long SymbolResolverCtx)
        Unsafe version of: OrcAddLazilyCompiledIR
      • LLVMOrcAddLazilyCompiledIR

        public static long LLVMOrcAddLazilyCompiledIR​(long JITStack,
                                                      java.nio.LongBuffer RetHandle,
                                                      long Mod,
                                                      LLVMOrcSymbolResolverFnI SymbolResolver,
                                                      long SymbolResolverCtx)
        Add module to be lazily compiled one function at a time.
      • nLLVMOrcAddObjectFile

        public static long nLLVMOrcAddObjectFile​(long JITStack,
                                                 long RetHandle,
                                                 long Obj,
                                                 long SymbolResolver,
                                                 long SymbolResolverCtx)
        Unsafe version of: OrcAddObjectFile
      • LLVMOrcAddObjectFile

        public static long LLVMOrcAddObjectFile​(long JITStack,
                                                java.nio.LongBuffer RetHandle,
                                                long Obj,
                                                LLVMOrcSymbolResolverFnI SymbolResolver,
                                                long SymbolResolverCtx)
        Add an object file.

        This method takes ownership of the given memory buffer and attempts to add it to the JIT as an object file. Clients should not dispose of the Obj argument: the JIT will manage it from this call onwards.

      • LLVMOrcRemoveModule

        public static long LLVMOrcRemoveModule​(long JITStack,
                                               long H)
        Remove a module set from the JIT.

        This works for all modules that can be added via OrcAdd*, including object files.

      • nLLVMOrcGetSymbolAddress

        public static long nLLVMOrcGetSymbolAddress​(long JITStack,
                                                    long RetAddr,
                                                    long SymbolName)
        Unsafe version of: OrcGetSymbolAddress
      • LLVMOrcGetSymbolAddress

        public static long LLVMOrcGetSymbolAddress​(long JITStack,
                                                   java.nio.LongBuffer RetAddr,
                                                   java.nio.ByteBuffer SymbolName)
        
        public static long LLVMOrcGetSymbolAddress​(long JITStack,
                                                   java.nio.LongBuffer RetAddr,
                                                   java.lang.CharSequence SymbolName)
        
        Get symbol address from JIT instance.
      • nLLVMOrcGetSymbolAddressIn

        public static long nLLVMOrcGetSymbolAddressIn​(long JITStack,
                                                      long RetAddr,
                                                      long H,
                                                      long SymbolName)
        Unsafe version of: OrcGetSymbolAddressIn
      • LLVMOrcGetSymbolAddressIn

        public static long LLVMOrcGetSymbolAddressIn​(long JITStack,
                                                     java.nio.LongBuffer RetAddr,
                                                     long H,
                                                     java.nio.ByteBuffer SymbolName)
        
        public static long LLVMOrcGetSymbolAddressIn​(long JITStack,
                                                     java.nio.LongBuffer RetAddr,
                                                     long H,
                                                     java.lang.CharSequence SymbolName)
        
        Get symbol address from JIT instance, searching only the specified handle.
      • LLVMOrcDisposeInstance

        public static long LLVMOrcDisposeInstance​(long JITStack)
        Dispose of an ORC JIT stack.
      • LLVMOrcRegisterJITEventListener

        public static void LLVMOrcRegisterJITEventListener​(long JITStack,
                                                           long L)
        Register a JIT Event Listener.

        A NULL listener is ignored.

      • LLVMOrcUnregisterJITEventListener

        public static void LLVMOrcUnregisterJITEventListener​(long JITStack,
                                                             long L)
        Unegister a JIT Event Listener.

        A NULL listener is ignored.