|
@@ -2076,7 +2076,7 @@ $globals.MessageSend);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-$core.addClass("MethodContext", $globals.Object, [], "Kernel-Methods");
|
|
+$core.addClass("MethodContext", $globals.Object, ["receiver", "evaluatedSelector", "homeContext", "index", "locals", "outerContext", "selector", "sendIdx", "supercall"], "Kernel-Methods");
|
|
|
|
|
|
$globals.MethodContext.comment="I hold all the dynamic state associated with the execution of either a method activation resulting from a message send. I am used to build the call stack while debugging.\x0a\x0aMy instances are JavaScript `SmalltalkMethodContext` objects defined in `boot.js`.";
|
|
$globals.MethodContext.comment="I hold all the dynamic state associated with the execution of either a method activation resulting from a message send. I am used to build the call stack while debugging.\x0a\x0aMy instances are JavaScript `SmalltalkMethodContext` objects defined in `boot.js`.";
|
|
|
|
|
|
@@ -2086,18 +2086,12 @@ selector: "basicReceiver",
|
|
protocol: "accessing",
|
|
protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-
|
|
+return $self.receiver;
|
|
-return $core.withContext(function($ctx1) {
|
|
+
|
|
-
|
|
|
|
-return self.receiver;
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"basicReceiver",{},$globals.MethodContext)});
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "basicReceiver\x0a\x09<inlineJS: 'return self.receiver'>",
|
|
+source: "basicReceiver\x0a\x09^ receiver",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
|
|
|
|
messageSends: []
|
|
messageSends: []
|
|
@@ -2110,18 +2104,12 @@ selector: "evaluatedSelector",
|
|
protocol: "accessing",
|
|
protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-
|
|
+return $self.evaluatedSelector;
|
|
-return $core.withContext(function($ctx1) {
|
|
+
|
|
-
|
|
|
|
-return self.evaluatedSelector;
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"evaluatedSelector",{},$globals.MethodContext)});
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "evaluatedSelector\x0a\x09<inlineJS: 'return self.evaluatedSelector'>",
|
|
+source: "evaluatedSelector\x0a\x09^ evaluatedSelector",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
|
|
|
|
messageSends: []
|
|
messageSends: []
|
|
@@ -2134,18 +2122,12 @@ selector: "home",
|
|
protocol: "accessing",
|
|
protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-
|
|
+return $self.homeContext;
|
|
-return $core.withContext(function($ctx1) {
|
|
+
|
|
-
|
|
|
|
-return self.homeContext;
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"home",{},$globals.MethodContext)});
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "home\x0a\x09<inlineJS: 'return self.homeContext'>",
|
|
+source: "home\x0a\x09^ homeContext",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
|
|
|
|
messageSends: []
|
|
messageSends: []
|
|
@@ -2161,18 +2143,23 @@ var self=this,$self=this;
|
|
|
|
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
|
|
|
|
-return self.index || 0;
|
|
+var $1,$receiver;
|
|
-return self;
|
|
+$1=$self.index;
|
|
|
|
+if(($receiver = $1) == null || $receiver.a$nil){
|
|
|
|
+return (0);
|
|
|
|
+} else {
|
|
|
|
+return $1;
|
|
|
|
+}
|
|
|
|
|
|
}, function($ctx1) {$ctx1.fill(self,"index",{},$globals.MethodContext)});
|
|
}, function($ctx1) {$ctx1.fill(self,"index",{},$globals.MethodContext)});
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "index\x0a\x09<inlineJS: 'return self.index || 0'>",
|
|
+source: "index\x0a\x09^ index ifNil: [ 0 ]",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
|
|
|
|
-messageSends: []
|
|
+messageSends: ["ifNil:"]
|
|
}),
|
|
}),
|
|
$globals.MethodContext);
|
|
$globals.MethodContext);
|
|
|
|
|
|
@@ -2182,18 +2169,12 @@ selector: "locals",
|
|
protocol: "accessing",
|
|
protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-
|
|
+return $self.locals;
|
|
-return $core.withContext(function($ctx1) {
|
|
+
|
|
-
|
|
|
|
-return self.locals || {};
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"locals",{},$globals.MethodContext)});
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "locals\x0a\x09<inlineJS: 'return self.locals || {}'>",
|
|
+source: "locals\x0a\x09^ locals",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
|
|
|
|
messageSends: []
|
|
messageSends: []
|
|
@@ -2209,18 +2190,23 @@ var self=this,$self=this;
|
|
|
|
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
|
|
|
|
-return self.outerContext || self.homeContext;
|
|
+var $1,$receiver;
|
|
-return self;
|
|
+$1=$self.outerContext;
|
|
|
|
+if(($receiver = $1) == null || $receiver.a$nil){
|
|
|
|
+return $self._home();
|
|
|
|
+} else {
|
|
|
|
+return $1;
|
|
|
|
+}
|
|
|
|
|
|
}, function($ctx1) {$ctx1.fill(self,"outerContext",{},$globals.MethodContext)});
|
|
}, function($ctx1) {$ctx1.fill(self,"outerContext",{},$globals.MethodContext)});
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "outerContext\x0a\x09<inlineJS: 'return self.outerContext || self.homeContext'>",
|
|
+source: "outerContext\x0a\x09^ outerContext ifNil: [ self home ]",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
|
|
|
|
-messageSends: []
|
|
+messageSends: ["ifNil:", "home"]
|
|
}),
|
|
}),
|
|
$globals.MethodContext);
|
|
$globals.MethodContext);
|
|
|
|
|
|
@@ -2233,24 +2219,23 @@ var self=this,$self=this;
|
|
|
|
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
|
|
|
|
-
|
|
+var $1,$receiver;
|
|
- if(self.selector) {
|
|
+$1=$self.selector;
|
|
- return $core.js2st(self.selector);
|
|
+if(($receiver = $1) == null || $receiver.a$nil){
|
|
- } else {
|
|
+return $1;
|
|
- return nil;
|
|
+} else {
|
|
- }
|
|
+return $recv($recv($globals.Smalltalk)._core())._js2st_($self.selector);
|
|
- ;
|
|
+}
|
|
-return self;
|
|
|
|
|
|
|
|
}, function($ctx1) {$ctx1.fill(self,"selector",{},$globals.MethodContext)});
|
|
}, function($ctx1) {$ctx1.fill(self,"selector",{},$globals.MethodContext)});
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "selector\x0a\x09<inlineJS: '\x0a\x09\x09if(self.selector) {\x0a\x09\x09\x09return $core.js2st(self.selector);\x0a\x09\x09} else {\x0a\x09\x09\x09return nil;\x0a\x09\x09}\x0a\x09'>",
|
|
+source: "selector\x0a\x09^ selector ifNotNil: [ Smalltalk core js2st: selector ]",
|
|
-referencedClasses: [],
|
|
+referencedClasses: ["Smalltalk"],
|
|
|
|
|
|
-messageSends: []
|
|
+messageSends: ["ifNotNil:", "js2st:", "core"]
|
|
}),
|
|
}),
|
|
$globals.MethodContext);
|
|
$globals.MethodContext);
|
|
|
|
|
|
@@ -2260,18 +2245,12 @@ selector: "sendIndexes",
|
|
protocol: "accessing",
|
|
protocol: "accessing",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this,$self=this;
|
|
var self=this,$self=this;
|
|
-
|
|
+return $self.sendIdx;
|
|
-return $core.withContext(function($ctx1) {
|
|
+
|
|
-
|
|
|
|
-return self.sendIdx;
|
|
|
|
-return self;
|
|
|
|
-
|
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"sendIndexes",{},$globals.MethodContext)});
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "sendIndexes\x0a\x09<inlineJS: 'return self.sendIdx'>",
|
|
+source: "sendIndexes\x0a\x09^ sendIdx",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
|
|
|
|
messageSends: []
|
|
messageSends: []
|
|
@@ -2287,7 +2266,7 @@ var self=this,$self=this;
|
|
|
|
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
|
|
|
|
-self.homeContext = undefined;
|
|
+$self.homeContext=$recv($globals.JSObjectProxy)._undefined();
|
|
return self;
|
|
return self;
|
|
|
|
|
|
}, function($ctx1) {$ctx1.fill(self,"stubHere",{},$globals.MethodContext)});
|
|
}, function($ctx1) {$ctx1.fill(self,"stubHere",{},$globals.MethodContext)});
|
|
@@ -2295,10 +2274,10 @@ return self;
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "stubHere\x0a\x09<inlineJS: 'self.homeContext = undefined'>",
|
|
+source: "stubHere\x0a\x09homeContext := JSObjectProxy undefined",
|
|
-referencedClasses: [],
|
|
+referencedClasses: ["JSObjectProxy"],
|
|
|
|
|
|
-messageSends: []
|
|
+messageSends: ["undefined"]
|
|
}),
|
|
}),
|
|
$globals.MethodContext);
|
|
$globals.MethodContext);
|
|
|
|
|
|
@@ -2358,18 +2337,17 @@ var self=this,$self=this;
|
|
|
|
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
|
|
|
|
-return self.supercall == true;
|
|
+return $recv($self.supercall).__eq(true);
|
|
-return self;
|
|
|
|
|
|
|
|
}, function($ctx1) {$ctx1.fill(self,"supercall",{},$globals.MethodContext)});
|
|
}, function($ctx1) {$ctx1.fill(self,"supercall",{},$globals.MethodContext)});
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
args: [],
|
|
args: [],
|
|
-source: "supercall\x0a\x09<inlineJS: 'return self.supercall == true'>",
|
|
+source: "supercall\x0a\x09^ supercall = true",
|
|
referencedClasses: [],
|
|
referencedClasses: [],
|
|
|
|
|
|
-messageSends: []
|
|
+messageSends: ["="]
|
|
}),
|
|
}),
|
|
$globals.MethodContext);
|
|
$globals.MethodContext);
|
|
|
|
|