|
@@ -1,25 +1,26 @@
|
|
|
define("amber_core/Kernel-Exceptions", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
|
|
|
-var smalltalk=$boot.vm,nil=$boot.nil,_st=$boot.asReceiver,globals=$boot.globals;
|
|
|
-smalltalk.addPackage('Kernel-Exceptions');
|
|
|
-smalltalk.packages["Kernel-Exceptions"].transport = {"type":"amd","amdNamespace":"amber_core"};
|
|
|
+var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
|
+var smalltalk=$core,_st=$recv,globals=$globals;
|
|
|
+$core.addPackage('Kernel-Exceptions');
|
|
|
+$core.packages["Kernel-Exceptions"].transport = {"type":"amd","amdNamespace":"amber_core"};
|
|
|
|
|
|
-smalltalk.addClass('Error', globals.Object, ['messageText'], 'Kernel-Exceptions');
|
|
|
+$core.addClass('Error', $globals.Object, ['messageText'], 'Kernel-Exceptions');
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
-globals.Error.comment="From the ANSI standard:\x0a\x0aThis protocol describes the behavior of instances of class `Error`.\x0aThese are used to represent error conditions that prevent the normal continuation of processing.\x0aActual error exceptions used by an application may be subclasses of this class.\x0aAs `Error` is explicitly specified to be subclassable, conforming implementations must implement its behavior in a non-fragile manner.";
|
|
|
+$globals.Error.comment="From the ANSI standard:\x0a\x0aThis protocol describes the behavior of instances of class `Error`.\x0aThese are used to represent error conditions that prevent the normal continuation of processing.\x0aActual error exceptions used by an application may be subclasses of this class.\x0aAs `Error` is explicitly specified to be subclassable, conforming implementations must implement its behavior in a non-fragile manner.";
|
|
|
//>>excludeEnd("ide");
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "beHandled",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
self.amberHandled = true;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"beHandled",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"beHandled",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -29,21 +30,21 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "beUnhandled",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
self.amberHandled = false;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"beUnhandled",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"beUnhandled",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -53,21 +54,21 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "context",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
return self.context;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"context",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"context",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -77,21 +78,21 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "initialize",
|
|
|
protocol: 'initialization',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-self._messageText_("Errorclass: ".__comma(_st(self._class())._name()));
|
|
|
+self._messageText_("Errorclass: ".__comma($recv(self._class())._name()));
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -101,21 +102,21 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["messageText:", ",", "name", "class"]
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "isSmalltalkError",
|
|
|
protocol: 'testing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
return self.smalltalkError === true;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"isSmalltalkError",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"isSmalltalkError",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -125,21 +126,21 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "jsStack",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
return self.stack;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"jsStack",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"jsStack",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -149,10 +150,10 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "messageText",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -169,10 +170,10 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "messageText:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aString){
|
|
@@ -188,16 +189,16 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "resignal",
|
|
|
protocol: 'signaling',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
|
|
|
self.amberHandled = false;
|
|
@@ -205,7 +206,7 @@ return smalltalk.withContext(function($ctx1) {
|
|
|
;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"resignal",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"resignal",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -215,50 +216,51 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "signal",
|
|
|
protocol: 'signaling',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
|
|
|
self.amberHandled = false;
|
|
|
- self.context = smalltalk.getThisContext();
|
|
|
- self.smalltalkError = true; throw(self)
|
|
|
+ self.context = $core.getThisContext();
|
|
|
+ self.smalltalkError = true;
|
|
|
+ throw self;
|
|
|
;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"signal",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"signal",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
args: [],
|
|
|
-source: "signal\x0a\x09<\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09self.context = smalltalk.getThisContext(); \x0a\x09\x09self.smalltalkError = true; throw(self)\x0a\x09>",
|
|
|
+source: "signal\x0a\x09<\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09self.context = $core.getThisContext(); \x0a\x09\x09self.smalltalkError = true;\x0a\x09\x09throw self;\x0a\x09>",
|
|
|
referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "signal:",
|
|
|
protocol: 'signaling',
|
|
|
fn: function (aString){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
self._messageText_(aString);
|
|
|
self._signal();
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -268,22 +270,22 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["messageText:", "signal"]
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "signalerContext",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
var $1;
|
|
|
$1=self._signalerContextFrom_(self._context());
|
|
|
return $1;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"signalerContext",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"signalerContext",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -293,47 +295,47 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["signalerContextFrom:", "context"]
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "signalerContextFrom:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aContext){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
var $4,$3,$2,$1;
|
|
|
-$1=_st(aContext)._findContextSuchThat_((function(context){
|
|
|
+$1=$recv(aContext)._findContextSuchThat_((function(context){
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx2) {
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-$4=_st(context)._receiver();
|
|
|
+$4=$recv(context)._receiver();
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
$ctx2.sendIdx["receiver"]=1;
|
|
|
//>>excludeEnd("ctx");
|
|
|
-$3=_st($4).__eq_eq(self);
|
|
|
+$3=$recv($4).__eq_eq(self);
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
$ctx2.sendIdx["=="]=1;
|
|
|
//>>excludeEnd("ctx");
|
|
|
-$2=_st($3)._or_((function(){
|
|
|
+$2=$recv($3)._or_((function(){
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx3) {
|
|
|
+return $core.withContext(function($ctx3) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-return _st(_st(context)._receiver()).__eq_eq(self._class());
|
|
|
+return $recv($recv(context)._receiver()).__eq_eq(self._class());
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
}));
|
|
|
-return _st($2)._not();
|
|
|
+return $recv($2)._not();
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
}, function($ctx2) {$ctx2.fillBlock({context:context},$ctx1,1)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
}));
|
|
|
return $1;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"signalerContextFrom:",{aContext:aContext},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"signalerContextFrom:",{aContext:aContext},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -343,21 +345,21 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["findContextSuchThat:", "not", "or:", "==", "receiver", "class"]
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "wasHandled",
|
|
|
protocol: 'testing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
return self.amberHandled || false;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"wasHandled",{},globals.Error)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"wasHandled",{},$globals.Error)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -367,11 +369,11 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error);
|
|
|
+$globals.Error);
|
|
|
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "heliosClass",
|
|
|
protocol: 'helios',
|
|
|
fn: function (){
|
|
@@ -386,22 +388,22 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Error.klass);
|
|
|
+$globals.Error.klass);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "signal",
|
|
|
protocol: 'instance creation',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
var $1;
|
|
|
-$1=_st(self._new())._signal();
|
|
|
+$1=$recv(self._new())._signal();
|
|
|
return $1;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"signal",{},globals.Error.klass)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"signal",{},$globals.Error.klass)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -411,22 +413,22 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["signal", "new"]
|
|
|
}),
|
|
|
-globals.Error.klass);
|
|
|
+$globals.Error.klass);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "signal:",
|
|
|
protocol: 'instance creation',
|
|
|
fn: function (aString){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
var $1;
|
|
|
-$1=_st(self._new())._signal_(aString);
|
|
|
+$1=$recv(self._new())._signal_(aString);
|
|
|
return $1;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},globals.Error.klass)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},$globals.Error.klass)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -436,15 +438,15 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["signal:", "new"]
|
|
|
}),
|
|
|
-globals.Error.klass);
|
|
|
+$globals.Error.klass);
|
|
|
|
|
|
|
|
|
-smalltalk.addClass('Halt', globals.Error, [], 'Kernel-Exceptions');
|
|
|
+$core.addClass('Halt', $globals.Error, [], 'Kernel-Exceptions');
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
-globals.Halt.comment="I am provided to support `Object>>#halt`.";
|
|
|
+$globals.Halt.comment="I am provided to support `Object>>#halt`.";
|
|
|
//>>excludeEnd("ide");
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "messageText",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -459,39 +461,39 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.Halt);
|
|
|
+$globals.Halt);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "signalerContextFrom:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aContext){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
var $4,$3,$2,$1;
|
|
|
-$1=_st(aContext)._findContextSuchThat_((function(context){
|
|
|
+$1=$recv(aContext)._findContextSuchThat_((function(context){
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx2) {
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-$4=_st(context)._receiver();
|
|
|
+$4=$recv(context)._receiver();
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
$ctx2.sendIdx["receiver"]=1;
|
|
|
//>>excludeEnd("ctx");
|
|
|
-$3=_st($4).__eq_eq(self);
|
|
|
+$3=$recv($4).__eq_eq(self);
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
$ctx2.sendIdx["=="]=1;
|
|
|
//>>excludeEnd("ctx");
|
|
|
-$2=_st($3)._or_((function(){
|
|
|
+$2=$recv($3)._or_((function(){
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx3) {
|
|
|
+return $core.withContext(function($ctx3) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-return _st(_st(_st(context)._receiver()).__eq_eq(self._class()))._or_((function(){
|
|
|
+return $recv($recv($recv(context)._receiver()).__eq_eq(self._class()))._or_((function(){
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx4) {
|
|
|
+return $core.withContext(function($ctx4) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
-return _st(_st(_st(context)._method())._selector()).__eq("halt");
|
|
|
+return $recv($recv($recv(context)._method())._selector()).__eq("halt");
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
}, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
|
|
|
//>>excludeEnd("ctx");
|
|
@@ -503,14 +505,14 @@ return _st(_st(_st(context)._method())._selector()).__eq("halt");
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
$ctx2.sendIdx["or:"]=1;
|
|
|
//>>excludeEnd("ctx");
|
|
|
-return _st($2)._not();
|
|
|
+return $recv($2)._not();
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
}, function($ctx2) {$ctx2.fillBlock({context:context},$ctx1,1)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
}));
|
|
|
return $1;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"signalerContextFrom:",{aContext:aContext},globals.Halt)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"signalerContextFrom:",{aContext:aContext},$globals.Halt)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -520,27 +522,27 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["findContextSuchThat:", "not", "or:", "==", "receiver", "class", "=", "selector", "method"]
|
|
|
}),
|
|
|
-globals.Halt);
|
|
|
+$globals.Halt);
|
|
|
|
|
|
|
|
|
|
|
|
-smalltalk.addClass('JavaScriptException', globals.Error, ['exception'], 'Kernel-Exceptions');
|
|
|
+$core.addClass('JavaScriptException', $globals.Error, ['exception'], 'Kernel-Exceptions');
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
-globals.JavaScriptException.comment="A JavaScriptException is thrown when a non-Smalltalk exception occurs while in the Smalltalk stack.\x0aSee `boot.js` `inContext()` and `BlockClosure >> on:do:`";
|
|
|
+$globals.JavaScriptException.comment="A JavaScriptException is thrown when a non-Smalltalk exception occurs while in the Smalltalk stack.\x0aSee `boot.js` `inContext()` and `BlockClosure >> on:do:`";
|
|
|
//>>excludeEnd("ide");
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "context:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aMethodContext){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
self.context = aMethodContext;
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext},globals.JavaScriptException)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"context:",{aMethodContext:aMethodContext},$globals.JavaScriptException)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -550,10 +552,10 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.JavaScriptException);
|
|
|
+$globals.JavaScriptException);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "exception",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -570,10 +572,10 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.JavaScriptException);
|
|
|
+$globals.JavaScriptException);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "exception:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (anException){
|
|
@@ -589,21 +591,21 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.JavaScriptException);
|
|
|
+$globals.JavaScriptException);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "messageText",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
return 'JavaScript exception: ' + self["@exception"].toString();
|
|
|
return self;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"messageText",{},globals.JavaScriptException)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"messageText",{},$globals.JavaScriptException)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -613,26 +615,26 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.JavaScriptException);
|
|
|
+$globals.JavaScriptException);
|
|
|
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "on:",
|
|
|
protocol: 'instance creation',
|
|
|
fn: function (anException){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
var $2,$3,$1;
|
|
|
$2=self._new();
|
|
|
-_st($2)._exception_(anException);
|
|
|
-$3=_st($2)._yourself();
|
|
|
+$recv($2)._exception_(anException);
|
|
|
+$3=$recv($2)._yourself();
|
|
|
$1=$3;
|
|
|
return $1;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"on:",{anException:anException},globals.JavaScriptException.klass)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"on:",{anException:anException},$globals.JavaScriptException.klass)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -642,26 +644,26 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["exception:", "new", "yourself"]
|
|
|
}),
|
|
|
-globals.JavaScriptException.klass);
|
|
|
+$globals.JavaScriptException.klass);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "on:context:",
|
|
|
protocol: 'instance creation',
|
|
|
fn: function (anException,aMethodContext){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
var $2,$3,$1;
|
|
|
$2=self._new();
|
|
|
-_st($2)._exception_(anException);
|
|
|
-_st($2)._context_(aMethodContext);
|
|
|
-$3=_st($2)._yourself();
|
|
|
+$recv($2)._exception_(anException);
|
|
|
+$recv($2)._context_(aMethodContext);
|
|
|
+$3=$recv($2)._yourself();
|
|
|
$1=$3;
|
|
|
return $1;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"on:context:",{anException:anException,aMethodContext:aMethodContext},globals.JavaScriptException.klass)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"on:context:",{anException:anException,aMethodContext:aMethodContext},$globals.JavaScriptException.klass)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -671,15 +673,15 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: ["exception:", "new", "context:", "yourself"]
|
|
|
}),
|
|
|
-globals.JavaScriptException.klass);
|
|
|
+$globals.JavaScriptException.klass);
|
|
|
|
|
|
|
|
|
-smalltalk.addClass('MessageNotUnderstood', globals.Error, ['message', 'receiver'], 'Kernel-Exceptions');
|
|
|
+$core.addClass('MessageNotUnderstood', $globals.Error, ['message', 'receiver'], 'Kernel-Exceptions');
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
-globals.MessageNotUnderstood.comment="This exception is provided to support `Object>>doesNotUnderstand:`.";
|
|
|
+$globals.MessageNotUnderstood.comment="This exception is provided to support `Object>>doesNotUnderstand:`.";
|
|
|
//>>excludeEnd("ide");
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "message",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -696,10 +698,10 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.MessageNotUnderstood);
|
|
|
+$globals.MessageNotUnderstood);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "message:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (aMessage){
|
|
@@ -715,25 +717,25 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.MessageNotUnderstood);
|
|
|
+$globals.MessageNotUnderstood);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "messageText",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
|
var self=this;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-return smalltalk.withContext(function($ctx1) {
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
//>>excludeEnd("ctx");
|
|
|
var $1;
|
|
|
-$1=_st(_st(_st(self._receiver())._asString()).__comma(" does not understand #")).__comma(_st(self._message())._selector());
|
|
|
+$1=$recv($recv($recv(self._receiver())._asString()).__comma(" does not understand #")).__comma($recv(self._message())._selector());
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
$ctx1.sendIdx[","]=1;
|
|
|
//>>excludeEnd("ctx");
|
|
|
return $1;
|
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"messageText",{},globals.MessageNotUnderstood)});
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"messageText",{},$globals.MessageNotUnderstood)});
|
|
|
//>>excludeEnd("ctx");
|
|
|
},
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
@@ -743,10 +745,10 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: [",", "asString", "receiver", "selector", "message"]
|
|
|
}),
|
|
|
-globals.MessageNotUnderstood);
|
|
|
+$globals.MessageNotUnderstood);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "receiver",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -763,10 +765,10 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.MessageNotUnderstood);
|
|
|
+$globals.MessageNotUnderstood);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "receiver:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (anObject){
|
|
@@ -782,16 +784,16 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.MessageNotUnderstood);
|
|
|
+$globals.MessageNotUnderstood);
|
|
|
|
|
|
|
|
|
|
|
|
-smalltalk.addClass('NonBooleanReceiver', globals.Error, ['object'], 'Kernel-Exceptions');
|
|
|
+$core.addClass('NonBooleanReceiver', $globals.Error, ['object'], 'Kernel-Exceptions');
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
-globals.NonBooleanReceiver.comment="NonBooleanReceiver exceptions may be thrown when executing inlined methods such as `#ifTrue:` with a non boolean receiver.";
|
|
|
+$globals.NonBooleanReceiver.comment="NonBooleanReceiver exceptions may be thrown when executing inlined methods such as `#ifTrue:` with a non boolean receiver.";
|
|
|
//>>excludeEnd("ide");
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "object",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (){
|
|
@@ -808,10 +810,10 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.NonBooleanReceiver);
|
|
|
+$globals.NonBooleanReceiver);
|
|
|
|
|
|
-smalltalk.addMethod(
|
|
|
-smalltalk.method({
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
selector: "object:",
|
|
|
protocol: 'accessing',
|
|
|
fn: function (anObject){
|
|
@@ -827,13 +829,13 @@ referencedClasses: [],
|
|
|
//>>excludeEnd("ide");
|
|
|
messageSends: []
|
|
|
}),
|
|
|
-globals.NonBooleanReceiver);
|
|
|
+$globals.NonBooleanReceiver);
|
|
|
|
|
|
|
|
|
|
|
|
-smalltalk.addClass('PackageCommitError', globals.Error, [], 'Kernel-Exceptions');
|
|
|
+$core.addClass('PackageCommitError', $globals.Error, [], 'Kernel-Exceptions');
|
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
-globals.PackageCommitError.comment="I get signaled when an attempt to commit a package has failed.";
|
|
|
+$globals.PackageCommitError.comment="I get signaled when an attempt to commit a package has failed.";
|
|
|
//>>excludeEnd("ide");
|
|
|
|
|
|
});
|