Interface LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI

  • All Superinterfaces:
    org.lwjgl.system.CallbackI, org.lwjgl.system.Pointer
    All Known Implementing Classes:
    LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunction
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface LLVMOrcCAPIDefinitionGeneratorTryToGenerateFunctionI
    extends org.lwjgl.system.CallbackI
    Instances of this interface may be passed to the OrcCreateCustomCAPIDefinitionGenerator method.

    Type

    
     LLVMErrorRef (*invoke(long, long, long, int, long, int, long, long)) (
         LLVMOrcDefinitionGeneratorRef GeneratorObj,
         void *Ctx,
         LLVMOrcLookupStateRef *LookupState,
         LLVMOrcLookupKind Kind,
         LLVMOrcJITDylibRef JD,
         LLVMOrcJITDylibLookupFlags JDLookupFlags,
         LLVMOrcCLookupSet LookupSet,
         size_t LookupSetSize
     )
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer

        org.lwjgl.system.Pointer.Default
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static org.lwjgl.system.libffi.FFICIF CIF  
      • Fields inherited from interface org.lwjgl.system.Pointer

        BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void callback​(long ret, long args)  
      default org.lwjgl.system.libffi.FFICIF getCallInterface()  
      long invoke​(long GeneratorObj, long Ctx, long LookupState, int Kind, long JD, int JDLookupFlags, long LookupSet, long LookupSetSize)
      A custom generator function.
      • Methods inherited from interface org.lwjgl.system.CallbackI

        address
    • Field Detail

      • CIF

        static final org.lwjgl.system.libffi.FFICIF CIF
    • Method Detail

      • getCallInterface

        default org.lwjgl.system.libffi.FFICIF getCallInterface()
        Specified by:
        getCallInterface in interface org.lwjgl.system.CallbackI
      • callback

        default void callback​(long ret,
                              long args)
        Specified by:
        callback in interface org.lwjgl.system.CallbackI
      • invoke

        long invoke​(long GeneratorObj,
                    long Ctx,
                    long LookupState,
                    int Kind,
                    long JD,
                    int JDLookupFlags,
                    long LookupSet,
                    long LookupSetSize)
        A custom generator function.

        This can be used to create a custom generator object using OrcCreateCustomCAPIDefinitionGenerator. The resulting object can be attached to a JITDylib, via OrcJITDylibAddGenerator, to receive callbacks when lookups fail to match existing definitions.

        Parameters:
        GeneratorObj - will contain the address of the custom generator object
        Ctx - will contain the context object passed to LLVMOrcCreateCustomCAPIDefinitionGenerator.
        LookupState - will contain a pointer to an LLVMOrcLookupStateRef object.

        This can optionally be modified to make the definition generation process asynchronous: If the LookupStateRef value is copied, and the original LLVMOrcLookupStateRef set to null, the lookup will be suspended. Once the asynchronous definition process has been completed clients must call LLVMOrcLookupStateContinueLookup to continue the lookup (this should be done unconditionally, even if errors have occurred in the mean time, to free the lookup state memory and notify the query object of the failures). If LookupState is captured this function must return ErrorSuccess.

        Kind - can be inspected to determine the lookup kind (e.g. as-if-during-static-link, or as-if-during-dlsym)
        JD - specifies which JITDylib the definitions should be generated into
        JDLookupFlags - can be inspected to determine whether the original lookup included non-exported symbols
        LookupSet - contains the set of symbols that could not be found in JD already (the set of generation candidates)