comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLContext.java @ 21890:894f82515e38

Truffle/APIs and Debugging: Evolutionary steps to integrating debugging and tool support with TruffleVM APIs - Add a version string to language registration: Language.getShortName() produces a string with both language and version - Rename SLMain --> SLLanguage (little change current machinery) - Remove DebugEngine dependence on ExecutionContext: Visualizer access migrated to TruffleLanguage - ExecutionContext now has only one method left: getCompilerOptions() - Rename SourceExecutionProvider to DebugSupportProvider, now supplied by implementing abstract TruffleLanguage.getDebugSupport() - Revise DebugEngine and its helper classes to work with the new APIs
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Tue, 09 Jun 2015 15:20:30 -0700
parents 3286fb5fea4a
children
comparison
equal deleted inserted replaced
21889:45083be8a812 21890:894f82515e38
58 this.output = output; 58 this.output = output;
59 this.functionRegistry = new SLFunctionRegistry(); 59 this.functionRegistry = new SLFunctionRegistry();
60 installBuiltins(); 60 installBuiltins();
61 61
62 this.emptyShape = LAYOUT.createShape(new ObjectType()); 62 this.emptyShape = LAYOUT.createShape(new ObjectType());
63 }
64
65 @Override
66 public String getLanguageShortName() {
67 return "Simple";
68 } 63 }
69 64
70 /** 65 /**
71 * Returns the default input, i.e., the source for the {@link SLReadlnBuiltin}. To allow unit 66 * Returns the default input, i.e., the source for the {@link SLReadlnBuiltin}. To allow unit
72 * testing, we do not use {@link System#in} directly. 67 * testing, we do not use {@link System#in} directly.
144 return lookupNodeInfo(clazz.getSuperclass()); 139 return lookupNodeInfo(clazz.getSuperclass());
145 } 140 }
146 } 141 }
147 142
148 /** 143 /**
149 * This function will parse the given source code, parse the code using the {@link Parser}, and 144 * Evaluate a source, causing any definitions to be registered (but not executed).
150 * then execute the function named main. To use this method with instrumentation,
151 * setASTNodeProber must have been already called. There is currently no guard to check if this
152 * is the case. <br/>
153 * Due to the experimental nature of the instrumentation framework, the parse that happens in
154 * this method will remove any previously added instrumentation.
155 * 145 *
156 * @param source The {@link Source} to execute. 146 * @param source The {@link Source} to parse.
157 */ 147 */
158 public void executeMain(Source source) { 148 public void evalSource(Source source) {
159 Parser.parseSL(this, source); 149 Parser.parseSL(this, source);
160 } 150 }
161 151
162 public DynamicObject createObject() { 152 public DynamicObject createObject() {
163 return LAYOUT.newInstance(emptyShape); 153 return LAYOUT.newInstance(emptyShape);