diff graal/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/client/SimpleREPLClient.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 3b8bbf51d320
children
line wrap: on
line diff
--- a/graal/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/client/SimpleREPLClient.java	Fri Jun 05 18:05:13 2015 -0700
+++ b/graal/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/client/SimpleREPLClient.java	Tue Jun 09 15:20:30 2015 -0700
@@ -29,7 +29,6 @@
 
 import jline.console.*;
 
-import com.oracle.truffle.api.*;
 import com.oracle.truffle.api.source.*;
 import com.oracle.truffle.tools.debug.shell.*;
 
@@ -84,7 +83,7 @@
     private static final String STACK_FRAME_FORMAT = "    %3d: at %s in %s    line =\"%s\"\n";
     private static final String STACK_FRAME_SELECTED_FORMAT = "==> %3d: at %s in %s    line =\"%s\"\n";
 
-    private final ExecutionContext executionContext;  // Language context
+    private final String languageName;
 
     // Top level commands
     private final Map<String, REPLCommand> commandMap = new HashMap<>();
@@ -139,8 +138,8 @@
      */
     private Source selectedSource = null;
 
-    public SimpleREPLClient(ExecutionContext context, REPLServer replServer) {
-        this.executionContext = context;
+    public SimpleREPLClient(String languageName, REPLServer replServer) {
+        this.languageName = languageName;
         this.replServer = replServer;
         this.writer = System.out;
         try {
@@ -211,7 +210,7 @@
         try {
             clientContext.startSession();
         } finally {
-            clientContext.displayReply("Goodbye from " + executionContext.getLanguageShortName() + "/REPL");
+            clientContext.displayReply("Goodbye from " + languageName + "/REPL");
         }
 
     }
@@ -282,8 +281,7 @@
             if (level == 0) {
                 // 0-level context; no executions halted.
                 if (selectedSource == null) {
-                    final String languageName = executionContext.getLanguageShortName();
-                    currentPrompt = languageName == null ? "() " : "(" + languageName + ") ";
+                    currentPrompt = languageName == null ? "() " : "( " + languageName + " ) ";
                 } else {
                     currentPrompt = "(" + selectedSource.getShortName() + ") ";
                 }