Browse Source

Renamed ASTDebugger to ASTSteppingInterpreter

Nicolas Petton 11 years ago
parent
commit
f0b6c725e9
3 changed files with 22 additions and 22 deletions
  1. 4 4
      js/Compiler-Interpreter.deploy.js
  2. 5 5
      js/Compiler-Interpreter.js
  3. 13 13
      st/Compiler-Interpreter.st

+ 4 - 4
js/Compiler-Interpreter.deploy.js

@@ -568,7 +568,7 @@ smalltalk.ASTInterpreter);
 
 
 
-smalltalk.addClass('ASTDebugger', smalltalk.ASTInterpreter, ['continuation'], 'Compiler-Interpreter');
+smalltalk.addClass('ASTSteppingInterpreter', smalltalk.ASTInterpreter, ['continuation'], 'Compiler-Interpreter');
 smalltalk.addMethod(
 "_initialize",
 smalltalk.method({
@@ -580,7 +580,7 @@ self["@continuation"]=(function(){
 return smalltalk.withContext(function($ctx2) {
}, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{}, smalltalk.ASTDebugger)})}
 }),
-smalltalk.ASTDebugger);
+smalltalk.ASTSteppingInterpreter);
 
 smalltalk.addMethod(
 "_interpret_continue_",
@@ -593,7 +593,7 @@ return smalltalk.withContext(function($ctx2) {
return smalltalk.ASTInterpreter.f
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})});
 return self}, function($ctx1) {$ctx1.fill(self,"interpret:continue:",{aNode:aNode,aBlock:aBlock}, smalltalk.ASTDebugger)})}
 }),
-smalltalk.ASTDebugger);
+smalltalk.ASTSteppingInterpreter);
 
 smalltalk.addMethod(
 "_step",
@@ -604,7 +604,7 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
_st(self["@continuation"])._value();
 return self}, function($ctx1) {$ctx1.fill(self,"step",{}, smalltalk.ASTDebugger)})}
 }),
-smalltalk.ASTDebugger);
+smalltalk.ASTSteppingInterpreter);
 
 
 

+ 5 - 5
js/Compiler-Interpreter.js

@@ -755,8 +755,8 @@ smalltalk.ASTInterpreter);
 
 
 
-smalltalk.addClass('ASTDebugger', smalltalk.ASTInterpreter, ['continuation'], 'Compiler-Interpreter');
-smalltalk.ASTDebugger.comment="ASTDebugger is an interpreter with stepping capabilities.\x0aUse `#stepOver` to actually interpret the next node.\x0a\x0aUsage example:\x0a\x0a    | ast debugger |\x0a    ast := Smalltalk current parse: 'foo 1+2+4'.\x0a    (SemanticAnalyzer on: Object) visit: ast.\x0a\x0a    debugger := ASTDebugger new\x0a        interpret: ast nodes first;\x0a        yourself.\x0a        \x0a    debugger stepOver; stepOver.\x0a    debugger stepOver; stepOver.\x0a    debugger result.\x22Answers 1\x22\x0a    debugger stepOver.\x0a    debugger result. \x22Answers 3\x22\x0a    debugger stepOver.\x0a    debugger result. \x22Answers 7\x22\x0a    "
+smalltalk.addClass('ASTSteppingInterpreter', smalltalk.ASTInterpreter, ['continuation'], 'Compiler-Interpreter');
+smalltalk.ASTSteppingInterpreter.comment="ASTSteppingInterpreter is an interpreter with stepping capabilities.\x0aUse `#step` to actually interpret the next node.\x0a\x0aUsage example:\x0a\x0a    | ast interpreter |\x0a    ast := Smalltalk current parse: 'foo 1+2+4'.\x0a    (SemanticAnalyzer on: Object) visit: ast.\x0a\x0a    interpreter := ASTSteppingInterpreter new\x0a        interpret: ast nodes first;\x0a        yourself.\x0a        \x0a    debugger step; step.\x0a    debugger step; step.\x0a    debugger result.\x22Answers 1\x22\x0a    debugger step.\x0a    debugger result. \x22Answers 3\x22\x0a    debugger step.\x0a    debugger result. \x22Answers 7\x22\x0a    "
 smalltalk.addMethod(
 "_initialize",
 smalltalk.method({
@@ -773,7 +773,7 @@ source: "initialize\x0a\x09super initialize.\x0a    continuation := [  ]",
 messageSends: ["initialize"],
 referencedClasses: []
 }),
-smalltalk.ASTDebugger);
+smalltalk.ASTSteppingInterpreter);
 
 smalltalk.addMethod(
 "_interpret_continue_",
@@ -791,7 +791,7 @@ source: "interpret: aNode continue: aBlock\x0a\x09continuation := [ super interp
 messageSends: ["interpret:continue:"],
 referencedClasses: []
 }),
-smalltalk.ASTDebugger);
+smalltalk.ASTSteppingInterpreter);
 
 smalltalk.addMethod(
 "_step",
@@ -807,7 +807,7 @@ source: "step\x0a\x09continuation value",
 messageSends: ["value"],
 referencedClasses: []
 }),
-smalltalk.ASTDebugger);
+smalltalk.ASTSteppingInterpreter);
 
 
 

+ 13 - 13
st/Compiler-Interpreter.st

@@ -277,45 +277,45 @@ messageFromSendNode: aSendNode do: aBlock
         	yourself) ]
 ! !
 
-ASTInterpreter subclass: #ASTDebugger
+ASTInterpreter subclass: #ASTSteppingInterpreter
 	instanceVariableNames: 'continuation'
 	package: 'Compiler-Interpreter'!
-!ASTDebugger commentStamp!
-ASTDebugger is an interpreter with stepping capabilities.
-Use `#stepOver` to actually interpret the next node.
+!ASTSteppingInterpreter commentStamp!
+ASTSteppingInterpreter is an interpreter with stepping capabilities.
+Use `#step` to actually interpret the next node.
 
 Usage example:
 
-    | ast debugger |
+    | ast interpreter |
     ast := Smalltalk current parse: 'foo 1+2+4'.
     (SemanticAnalyzer on: Object) visit: ast.
 
-    debugger := ASTDebugger new
+    interpreter := ASTSteppingInterpreter new
         interpret: ast nodes first;
         yourself.
         
-    debugger stepOver; stepOver.
-    debugger stepOver; stepOver.
+    debugger step; step.
+    debugger step; step.
     debugger result."Answers 1"
-    debugger stepOver.
+    debugger step.
     debugger result. "Answers 3"
-    debugger stepOver.
+    debugger step.
     debugger result. "Answers 7"!
 
-!ASTDebugger methodsFor: 'initialization'!
+!ASTSteppingInterpreter methodsFor: 'initialization'!
 
 initialize
 	super initialize.
     continuation := [  ]
 ! !
 
-!ASTDebugger methodsFor: 'interpreting'!
+!ASTSteppingInterpreter methodsFor: 'interpreting'!
 
 interpret: aNode continue: aBlock
 	continuation := [ super interpret: aNode continue: aBlock ]
 ! !
 
-!ASTDebugger methodsFor: 'stepping'!
+!ASTSteppingInterpreter methodsFor: 'stepping'!
 
 step
 	continuation value