|
@@ -111,14 +111,26 @@ protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
function $HLDebuggerCodeWidget(){return globals.HLDebuggerCodeWidget||(typeof HLDebuggerCodeWidget=="undefined"?nil:HLDebuggerCodeWidget)}
|
|
|
+function $HLDebuggerCodeModel(){return globals.HLDebuggerCodeModel||(typeof HLDebuggerCodeModel=="undefined"?nil:HLDebuggerCodeModel)}
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
-var $2,$3,$4,$1;
|
|
|
+var $2,$3,$4,$6,$7,$8,$9,$5,$10,$1;
|
|
|
$2=self["@codeWidget"];
|
|
|
if(($receiver = $2) == nil || $receiver == null){
|
|
|
$3=_st($HLDebuggerCodeWidget())._new();
|
|
|
+$ctx1.sendIdx["new"]=1;
|
|
|
+$4=$3;
|
|
|
+$6=_st($HLDebuggerCodeModel())._new();
|
|
|
+$7=$6;
|
|
|
+$8=self._model();
|
|
|
+$ctx1.sendIdx["model"]=1;
|
|
|
+_st($7)._debuggerModel_($8);
|
|
|
+$9=_st($6)._yourself();
|
|
|
+$ctx1.sendIdx["yourself"]=1;
|
|
|
+$5=$9;
|
|
|
+_st($4)._model_($5);
|
|
|
_st($3)._browserModel_(self._model());
|
|
|
-$4=_st($3)._yourself();
|
|
|
-self["@codeWidget"]=$4;
|
|
|
+$10=_st($3)._yourself();
|
|
|
+self["@codeWidget"]=$10;
|
|
|
$1=self["@codeWidget"];
|
|
|
} else {
|
|
|
$1=$2;
|
|
@@ -126,9 +138,9 @@ $1=$2;
|
|
|
return $1;
|
|
|
}, function($ctx1) {$ctx1.fill(self,"codeWidget",{},globals.HLDebugger)})},
|
|
|
args: [],
|
|
|
-source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLDebuggerCodeWidget new\x0a\x09\x09browserModel: self model;\x0a\x09\x09yourself ]",
|
|
|
-messageSends: ["ifNil:", "browserModel:", "new", "model", "yourself"],
|
|
|
-referencedClasses: ["HLDebuggerCodeWidget"]
|
|
|
+source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLDebuggerCodeWidget new\x0a\x09\x09model: (HLDebuggerCodeModel new\x0a\x09\x09\x09debuggerModel: self model;\x0a\x09\x09\x09yourself);\x0a\x09\x09browserModel: self model;\x0a\x09\x09yourself ]",
|
|
|
+messageSends: ["ifNil:", "model:", "new", "debuggerModel:", "model", "yourself", "browserModel:"],
|
|
|
+referencedClasses: ["HLDebuggerCodeWidget", "HLDebuggerCodeModel"]
|
|
|
}),
|
|
|
globals.HLDebugger);
|
|
|
|
|
@@ -398,6 +410,59 @@ referencedClasses: []
|
|
|
globals.HLDebugger.klass);
|
|
|
|
|
|
|
|
|
+smalltalk.addClass('HLDebuggerCodeModel', globals.HLCodeModel, ['debuggerModel'], 'Helios-Debugger');
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "debuggerModel",
|
|
|
+protocol: 'accessing',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+var $1;
|
|
|
+$1=self["@debuggerModel"];
|
|
|
+return $1;
|
|
|
+},
|
|
|
+args: [],
|
|
|
+source: "debuggerModel\x0a\x09^ debuggerModel",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+globals.HLDebuggerCodeModel);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "debuggerModel:",
|
|
|
+protocol: 'accessing',
|
|
|
+fn: function (anObject){
|
|
|
+var self=this;
|
|
|
+self["@debuggerModel"]=anObject;
|
|
|
+return self},
|
|
|
+args: ["anObject"],
|
|
|
+source: "debuggerModel: anObject\x0a\x09debuggerModel := anObject",
|
|
|
+messageSends: [],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+globals.HLDebuggerCodeModel);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "doIt:",
|
|
|
+protocol: 'actions',
|
|
|
+fn: function (aString){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
+$1=_st(self._debuggerModel())._evaluate_(aString);
|
|
|
+return $1;
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString},globals.HLDebuggerCodeModel)})},
|
|
|
+args: ["aString"],
|
|
|
+source: "doIt: aString\x0a\x09^ self debuggerModel evaluate: aString",
|
|
|
+messageSends: ["evaluate:", "debuggerModel"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+globals.HLDebuggerCodeModel);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
smalltalk.addClass('HLDebuggerCodeWidget', globals.HLBrowserCodeWidget, [], 'Helios-Debugger');
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
@@ -591,7 +656,7 @@ globals.HLDebuggerCodeWidget);
|
|
|
|
|
|
|
|
|
smalltalk.addClass('HLDebuggerModel', globals.HLToolModel, ['rootContext', 'currentContext', 'contexts'], 'Helios-Debugger');
|
|
|
-globals.HLDebuggerModel.comment="I am a model for Helios debugging.\x0a\x0aMy instances hold a reference to an `AIContext` instance, built from a `MethodContext`. The context should be the root of the context stack.";
|
|
|
+globals.HLDebuggerModel.comment="I am a model for debugging Amber code in Helios.\x0a\x0aMy instances hold a reference to an `AIContext` instance, built from a `MethodContext`. The context should be the root of the context stack.";
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "contexts",
|
|
@@ -660,6 +725,45 @@ referencedClasses: ["HLDebuggerContextSelected"]
|
|
|
}),
|
|
|
globals.HLDebuggerModel);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "evaluate:",
|
|
|
+protocol: 'evaluating',
|
|
|
+fn: function (aString){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
+$1=_st(self._environment())._interpret_inContext_(aString,self._currentContext());
|
|
|
+return $1;
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"evaluate:",{aString:aString},globals.HLDebuggerModel)})},
|
|
|
+args: ["aString"],
|
|
|
+source: "evaluate: aString\x0a\x09^ self environment \x0a\x09\x09interpret: aString \x0a\x09\x09inContext: self currentContext",
|
|
|
+messageSends: ["interpret:inContext:", "environment", "currentContext"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+globals.HLDebuggerModel);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "flushInnerContexts",
|
|
|
+protocol: 'private',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+var $1;
|
|
|
+$1=self._currentContext();
|
|
|
+$ctx1.sendIdx["currentContext"]=1;
|
|
|
+_st($1)._innerContext_(nil);
|
|
|
+self["@rootContext"]=self._currentContext();
|
|
|
+self._initializeContexts();
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"flushInnerContexts",{},globals.HLDebuggerModel)})},
|
|
|
+args: [],
|
|
|
+source: "flushInnerContexts\x0a\x09\x22When stepping, the inner contexts are not relevent anymore,\x0a\x09and can be flushed\x22\x0a\x09\x0a\x09self currentContext innerContext: nil.\x0a\x09rootContext := self currentContext.\x0a\x09self initializeContexts",
|
|
|
+messageSends: ["innerContext:", "currentContext", "initializeContexts"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+globals.HLDebuggerModel);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "initializeContexts",
|
|
@@ -700,7 +804,7 @@ self["@rootContext"]=_st($AIContext())._fromMethodContext_(aMethodContext);
|
|
|
self._initializeContexts();
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"initializeFromContext:",{aMethodContext:aMethodContext},globals.HLDebuggerModel)})},
|
|
|
args: ["aMethodContext"],
|
|
|
-source: "initializeFromContext: aMethodContext\x0a\x09rootContext := AIContext fromMethodContext: aMethodContext.\x0a\x09self initializeContexts",
|
|
|
+source: "initializeFromContext: aMethodContext\x0a\x09rootContext := (AIContext fromMethodContext: aMethodContext).\x0a\x09self initializeContexts",
|
|
|
messageSends: ["fromMethodContext:", "initializeContexts"],
|
|
|
referencedClasses: ["AIContext"]
|
|
|
}),
|
|
@@ -752,14 +856,15 @@ function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebugg
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
var $1,$2;
|
|
|
_st(self._interpreter())._restart();
|
|
|
+self._flushInnerContexts();
|
|
|
$1=_st($HLDebuggerStepped())._new();
|
|
|
_st($1)._context_(self._currentContext());
|
|
|
$2=_st($1)._yourself();
|
|
|
_st(self._announcer())._announce_($2);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"restart",{},globals.HLDebuggerModel)})},
|
|
|
args: [],
|
|
|
-source: "restart\x0a\x09self interpreter restart.\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
|
|
|
-messageSends: ["restart", "interpreter", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
|
|
|
+source: "restart\x0a\x09self interpreter restart.\x0a\x09self flushInnerContexts.\x0a\x09\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
|
|
|
+messageSends: ["restart", "interpreter", "flushInnerContexts", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
|
|
|
referencedClasses: ["HLDebuggerStepped"]
|
|
|
}),
|
|
|
globals.HLDebuggerModel);
|
|
@@ -791,14 +896,15 @@ function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebugg
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
var $1,$2;
|
|
|
_st(self._interpreter())._skip();
|
|
|
+self._flushInnerContexts();
|
|
|
$1=_st($HLDebuggerStepped())._new();
|
|
|
_st($1)._context_(self._currentContext());
|
|
|
$2=_st($1)._yourself();
|
|
|
_st(self._announcer())._announce_($2);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"skip",{},globals.HLDebuggerModel)})},
|
|
|
args: [],
|
|
|
-source: "skip\x0a\x09self interpreter skip.\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
|
|
|
-messageSends: ["skip", "interpreter", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
|
|
|
+source: "skip\x0a\x09self interpreter skip.\x0a\x09self flushInnerContexts.\x0a\x09\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
|
|
|
+messageSends: ["skip", "interpreter", "flushInnerContexts", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
|
|
|
referencedClasses: ["HLDebuggerStepped"]
|
|
|
}),
|
|
|
globals.HLDebuggerModel);
|
|
@@ -813,14 +919,15 @@ function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebugg
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
var $1,$2;
|
|
|
_st(self._interpreter())._stepOver();
|
|
|
+self._flushInnerContexts();
|
|
|
$1=_st($HLDebuggerStepped())._new();
|
|
|
_st($1)._context_(self._currentContext());
|
|
|
$2=_st($1)._yourself();
|
|
|
_st(self._announcer())._announce_($2);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},globals.HLDebuggerModel)})},
|
|
|
args: [],
|
|
|
-source: "stepOver\x0a\x09self interpreter stepOver.\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
|
|
|
-messageSends: ["stepOver", "interpreter", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
|
|
|
+source: "stepOver\x0a\x09self interpreter stepOver.\x0a\x09self flushInnerContexts.\x0a\x09\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
|
|
|
+messageSends: ["stepOver", "interpreter", "flushInnerContexts", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
|
|
|
referencedClasses: ["HLDebuggerStepped"]
|
|
|
}),
|
|
|
globals.HLDebuggerModel);
|
|
@@ -954,6 +1061,41 @@ referencedClasses: []
|
|
|
}),
|
|
|
globals.HLStackListWidget);
|
|
|
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "observeModel",
|
|
|
+protocol: 'actions',
|
|
|
+fn: function (){
|
|
|
+var self=this;
|
|
|
+function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+globals.HLStackListWidget.superclass.fn.prototype._observeModel.apply(_st(self), []);
|
|
|
+_st(_st(self._model())._announcer())._on_send_to_($HLDebuggerStepped(),"onDebuggerStepped:",self);
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLStackListWidget)})},
|
|
|
+args: [],
|
|
|
+source: "observeModel\x0a\x09super observeModel.\x0a\x09\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onDebuggerStepped:\x0a\x09\x09to: self",
|
|
|
+messageSends: ["observeModel", "on:send:to:", "announcer", "model"],
|
|
|
+referencedClasses: ["HLDebuggerStepped"]
|
|
|
+}),
|
|
|
+globals.HLStackListWidget);
|
|
|
+
|
|
|
+smalltalk.addMethod(
|
|
|
+smalltalk.method({
|
|
|
+selector: "onDebuggerStepped:",
|
|
|
+protocol: 'reactions',
|
|
|
+fn: function (anAnnouncement){
|
|
|
+var self=this;
|
|
|
+return smalltalk.withContext(function($ctx1) {
|
|
|
+self["@items"]=nil;
|
|
|
+self._refresh();
|
|
|
+return self}, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement},globals.HLStackListWidget)})},
|
|
|
+args: ["anAnnouncement"],
|
|
|
+source: "onDebuggerStepped: anAnnouncement\x0a\x09items := nil.\x0a\x09self refresh",
|
|
|
+messageSends: ["refresh"],
|
|
|
+referencedClasses: []
|
|
|
+}),
|
|
|
+globals.HLStackListWidget);
|
|
|
+
|
|
|
smalltalk.addMethod(
|
|
|
smalltalk.method({
|
|
|
selector: "renderButtonsOn:",
|
|
@@ -1045,10 +1187,11 @@ fn: function (aContext){
|
|
|
var self=this;
|
|
|
return smalltalk.withContext(function($ctx1) {
|
|
|
_st(self._model())._currentContext_(aContext);
|
|
|
+globals.HLStackListWidget.superclass.fn.prototype._selectItem_.apply(_st(self), [aContext]);
|
|
|
return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aContext:aContext},globals.HLStackListWidget)})},
|
|
|
args: ["aContext"],
|
|
|
-source: "selectItem: aContext\x0a \x09self model currentContext: aContext",
|
|
|
-messageSends: ["currentContext:", "model"],
|
|
|
+source: "selectItem: aContext\x0a \x09self model currentContext: aContext.\x0a\x09super selectItem: aContext",
|
|
|
+messageSends: ["currentContext:", "model", "selectItem:"],
|
|
|
referencedClasses: []
|
|
|
}),
|
|
|
globals.HLStackListWidget);
|