use of com.oracle.truffle.api.nodes.ExecutableNode in project graal by oracle.
the class TruffleLanguageSnippets method parseInline.
ExecutableNode parseInline(Source source, Node context, MaterializedFrame frame) {
assert context != null;
InlineParsingRequest request = new InlineParsingRequest(source, context, frame);
ExecutableNode snippet;
try {
snippet = request.parse(this);
} catch (RuntimeException ex) {
throw ex;
} catch (Exception ex) {
throw new RuntimeException(ex);
} finally {
request.dispose();
}
return snippet;
}
use of com.oracle.truffle.api.nodes.ExecutableNode in project graal by oracle.
the class Context method parse.
@Override
protected ExecutableNode parse(InlineParsingRequest request) throws Exception {
Source code = request.getSource();
Node location = request.getLocation();
if (location == null) {
throw new IllegalArgumentException("Location must not be null.");
}
BaseNode node;
try {
node = parse(code);
} catch (LanguageError e) {
throw new IOException(e);
}
return new InlineExecutableNode(this, node);
}
Aggregations