Search in sources :

Example 1 with BitcodeParserResult

use of com.oracle.truffle.llvm.parser.BitcodeParserResult in project sulong by graalvm.

the class Runner method parse.

private LLVMParserResult parse(LLVMLanguage language, LLVMContext context, Source source, ExternalLibrary library, ByteBuffer bytes) throws IOException {
    assert library != null;
    BitcodeParserResult bitcodeParserResult = BitcodeParserResult.getFromSource(source, bytes);
    context.addLibraryPaths(bitcodeParserResult.getLibraryPaths());
    List<String> libraries = bitcodeParserResult.getLibraries();
    if (!libraries.isEmpty()) {
        ExternalLibrary[] libs = context.addExternalLibraries(libraries);
        LLVMParserResult[] parserResults = parse(language, context, libs);
        handleParserResult(context, parserResults);
    }
    return LLVMParserRuntime.parse(source, library, bitcodeParserResult, language, context, nodeFactory);
}
Also used : ExternalLibrary(com.oracle.truffle.llvm.runtime.LLVMContext.ExternalLibrary) LLVMParserResult(com.oracle.truffle.llvm.parser.LLVMParserResult) BitcodeParserResult(com.oracle.truffle.llvm.parser.BitcodeParserResult)

Aggregations

BitcodeParserResult (com.oracle.truffle.llvm.parser.BitcodeParserResult)1 LLVMParserResult (com.oracle.truffle.llvm.parser.LLVMParserResult)1 ExternalLibrary (com.oracle.truffle.llvm.runtime.LLVMContext.ExternalLibrary)1