Mercurial > hg > truffle
diff truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLContext.java @ 22003:5bc7f7b867ab
Making debugger always on for each TruffleVM execution. Introducing EventConsumer to process such debugger events. Requesting each RootNode to be associated with a TruffleLanguage, so debugger can find out proper context for each Node where executions gets suspended.
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Sat, 18 Jul 2015 18:03:36 +0200 |
parents | c07e64ecb528 |
children | e7c2d36daf72 |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLContext.java Thu Jul 16 19:11:31 2015 +0200 +++ b/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLContext.java Sat Jul 18 18:03:36 2015 +0200 @@ -48,6 +48,7 @@ import com.oracle.truffle.api.nodes.*; import com.oracle.truffle.api.object.*; import com.oracle.truffle.api.source.*; +import com.oracle.truffle.sl.SLLanguage; import com.oracle.truffle.sl.builtins.*; import com.oracle.truffle.sl.nodes.*; import com.oracle.truffle.sl.nodes.local.*; @@ -66,12 +67,14 @@ public final class SLContext extends ExecutionContext { private static final Layout LAYOUT = Layout.createLayout(); + private final SLLanguage language; private final BufferedReader input; private final PrintWriter output; private final SLFunctionRegistry functionRegistry; private final Shape emptyShape; - public SLContext(BufferedReader input, PrintWriter output) { + public SLContext(SLLanguage language, BufferedReader input, PrintWriter output) { + this.language = language; this.input = input; this.output = output; this.functionRegistry = new SLFunctionRegistry(); @@ -103,6 +106,10 @@ return functionRegistry; } + public SLLanguage getLanguage() { + return language; + } + /** * Adds all builtin functions to the {@link SLFunctionRegistry}. This method lists all * {@link SLBuiltinNode builtin implementation classes}.