Top Description Inners Constructors Methods
org.lwjgl.llvm

public Class LLVMOrcEE

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

Requires LLVM 12 or higher.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
LLVMOrcEE.Functions

Contains the function pointers loaded from LLVMCore.getLibrary().

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static long
LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(long ES, long CreateContextCtx, LLVMMemoryManagerCreateContextCallbackI CreateContext, LLVMMemoryManagerNotifyTerminatingCallbackI NotifyTerminating, LLVMMemoryManagerAllocateCodeSectionCallbackI AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallbackI AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallbackI FinalizeMemory, LLVMMemoryManagerDestroyCallbackI Destroy)

Create a RTDyldObjectLinkingLayer instance using MCJIT-memory-manager-like callbacks.

public static long
LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(long ES)

Create a RTDyldObjectLinkingLayer instance using the standard SectionMemoryManager for memory management.

public static void
LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(long RTDyldObjLinkingLayer, long Listener)

Add the given listener to the given RTDyldObjectLinkingLayer.

public static long
nLLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(long ES, long CreateContextCtx, long CreateContext, long NotifyTerminating, long AllocateCodeSection, long AllocateDataSection, long FinalizeMemory, long Destroy)

Unsafe version of: OrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

LLVMOrcEEback to summary
protected LLVMOrcEE()

Method Detail

LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacksback to summary
public static long LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(long ES, long CreateContextCtx, LLVMMemoryManagerCreateContextCallbackI CreateContext, LLVMMemoryManagerNotifyTerminatingCallbackI NotifyTerminating, LLVMMemoryManagerAllocateCodeSectionCallbackI AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallbackI AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallbackI FinalizeMemory, LLVMMemoryManagerDestroyCallbackI Destroy)

Create a RTDyldObjectLinkingLayer instance using MCJIT-memory-manager-like callbacks.

This is intended to simplify transitions for existing MCJIT clients. The callbacks used are similar (but not identical) to the callbacks for CreateSimpleMCJITMemoryManager): Unlike MCJIT, RTDyldObjectLinkingLayer will create a new memory manager for each object linked by calling the given CreateContext callback. This allows for code removal by destroying each allocator individually. Every allocator will be destroyed (if it has not been already) at RTDyldObjectLinkingLayer destruction time, and the NotifyTerminating callback will be called to indicate that no further allocation contexts will be created.

To implement MCJIT-like behavior clients can implement CreateContext, NotifyTerminating, and Destroy as:


void *CreateContext(void *CtxCtx) { return CtxCtx; }
void NotifyTerminating(void *CtxCtx) { MyOriginalDestroy(CtxCtx); }
void Destroy(void *Ctx) { }

This scheme simply reuses the CreateContextCtx pointer as the one-and-only allocation context.

Annotations
@NativeType:LLVMOrcObjectLayerRef
LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManagerback to summary
public static long LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(long ES)

Create a RTDyldObjectLinkingLayer instance using the standard SectionMemoryManager for memory management.

Annotations
@NativeType:LLVMOrcObjectLayerRef
LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListenerback to summary
public static void LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(long RTDyldObjLinkingLayer, long Listener)

Add the given listener to the given RTDyldObjectLinkingLayer.

Note

Layer must be an RTDyldObjectLinkingLayer instance or behavior is undefined.

nLLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacksback to summary
public static long nLLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(long ES, long CreateContextCtx, long CreateContext, long NotifyTerminating, long AllocateCodeSection, long AllocateDataSection, long FinalizeMemory, long Destroy)

Unsafe version of: OrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks

org.lwjgl.llvm back to summary

public final Class LLVMOrcEE.Functions

extends Object
Class Inheritance

Contains the function pointers loaded from LLVMCore.getLibrary().

Field Summary

Modifier and TypeField and Description
public static final long
public static final long
public static final long

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

OrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacksback to summary
public static final long OrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks

Function address.

OrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManagerback to summary
public static final long OrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager

Function address.

OrcRTDyldObjectLinkingLayerRegisterJITEventListenerback to summary
public static final long OrcRTDyldObjectLinkingLayerRegisterJITEventListener

Function address.

Constructor Detail

Functionsback to summary
private Functions()