Search in sources :

Example 1 with LazyFunctionParser

use of com.oracle.truffle.llvm.parser.model.functions.LazyFunctionParser in project sulong by graalvm.

the class Module method skip.

@Override
public void skip(Block block, LLVMScanner.LazyScanner lazyScanner) {
    if (block == Block.FUNCTION) {
        if (functionQueue.isEmpty()) {
            throw new RuntimeException("Missing Function Prototype in Bitcode File!");
        }
        final FunctionDefinition definition = functionQueue.removeFirst();
        final Function parser = new Function(scope, types, definition, mode, paramAttributes);
        module.addFunctionParser(definition, new LazyFunctionParser(lazyScanner, parser));
    } else {
        ParserListener.super.skip(block, lazyScanner);
    }
}
Also used : LazyFunctionParser(com.oracle.truffle.llvm.parser.model.functions.LazyFunctionParser) FunctionDefinition(com.oracle.truffle.llvm.parser.model.functions.FunctionDefinition)

Aggregations

FunctionDefinition (com.oracle.truffle.llvm.parser.model.functions.FunctionDefinition)1 LazyFunctionParser (com.oracle.truffle.llvm.parser.model.functions.LazyFunctionParser)1