Search in sources :

Example 6 with BitcodeID

use of com.oracle.truffle.llvm.runtime.IDGenerater.BitcodeID in project graal by oracle.

the class LLVMFunctionDescriptor method compareTo.

@Override
public int compareTo(LLVMFunctionDescriptor o) {
    int otherIndex = o.llvmFunction.getSymbolIndexIllegalOk();
    BitcodeID otherBitcodeID = o.llvmFunction.getBitcodeIDIllegalOk();
    int index = llvmFunction.getSymbolIndexIllegalOk();
    BitcodeID bitcodeID = llvmFunction.getBitcodeIDIllegalOk();
    if (bitcodeID == otherBitcodeID) {
        return Long.compare(index, otherIndex);
    }
    throw new IllegalStateException("Comparing functions from different bitcode files.");
}
Also used : BitcodeID(com.oracle.truffle.llvm.runtime.IDGenerater.BitcodeID)

Aggregations

BitcodeID (com.oracle.truffle.llvm.runtime.IDGenerater.BitcodeID)6 TruffleSafepoint (com.oracle.truffle.api.TruffleSafepoint)4 LLVMIllegalSymbolIndexException (com.oracle.truffle.llvm.runtime.except.LLVMIllegalSymbolIndexException)3 LLVMPointer (com.oracle.truffle.llvm.runtime.pointer.LLVMPointer)3 Assumption (com.oracle.truffle.api.Assumption)2 TruffleBoundary (com.oracle.truffle.api.CompilerDirectives.TruffleBoundary)2 LLVMLinkerException (com.oracle.truffle.llvm.runtime.except.LLVMLinkerException)2 CallTarget (com.oracle.truffle.api.CallTarget)1 RootCallTarget (com.oracle.truffle.api.RootCallTarget)1 Source (com.oracle.truffle.api.source.Source)1