瀏覽代碼

Compile both self and $self into method.

'self' meant to be used for the value.
'$self' meant to be used as a receiver.
ATM, both are defined as 'this'.
Herbert Vojčík 7 年之前
父節點
當前提交
e23f53c0e0

+ 3 - 0
API-CHANGES.txt

@@ -12,6 +12,9 @@
 + PseudoVar >>
   + isSelf
   + isSuper
++UndefinedObject >>
+  + identityHash
+  + value
 
 - IRSend >>
   - isSuperSend

+ 2 - 0
CHANGELOG

@@ -4,6 +4,8 @@
 * Removed `.allowJavaScriptCalls` flag.
 * Internal `.isNil` deprecated in favour of `.a$nil`.
 * Internal `.klass` deprecated in favour of `.a$cls`.
+* Both 'self' and '$self' compiled in method code.
+  * '$self' used as receiver, 'self' used to pass a value.
 
 Breaks fw compat, uses `a$nil` and `a$cls` when compiling / saving code.
 

File diff suppressed because it is too large
+ 134 - 134
external/amber-cli/src/AmberCli.js


+ 5 - 5
external/amber-dev/lib/NodeTestRunner.js

@@ -13,11 +13,11 @@ $core.method({
 selector: "main",
 protocol: "not yet classified",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._runTestSuite();
+$self._runTestSuite();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"main",{},$globals.NodeTestRunner.a$cls)});
@@ -37,7 +37,7 @@ $core.method({
 selector: "runTestSuite",
 protocol: "not yet classified",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 var suite,worker;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -176,7 +176,7 @@ $20=$recv($21).__comma(" is failing!");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx[","]=6;
 //>>excludeEnd("ctx");
-self._throw_($20);
+$self._throw_($20);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["throw:"]=1;
 //>>excludeEnd("ctx");
@@ -215,7 +215,7 @@ $33=$recv($34).__comma(" has errors!");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx[","]=9;
 //>>excludeEnd("ctx");
-return self._throw_($33);
+return $self._throw_($33);
 }
 }
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);

+ 1 - 1
internal/index.html

@@ -30,7 +30,7 @@
     startHelios.parentNode.removeChild(startHelios);
     var loadHelpers = new Promise(function (resolve, reject) {
         setTimeout(function () {
-            require(["amber/legacy/IDE", "amber/web/Web", "amber/legacy/Benchfib", "helios/all", "amber_cli/AmberCli"], resolve, reject);
+            require(["amber/legacy/IDE", "amber/web/Web", "amber/web/Web-Snippets", "my/silk/devel", "helios/all", "amber_cli/AmberCli"], resolve, reject);
         }, 250);
     });
     require(["amber/devel"], function (amber) {

File diff suppressed because it is too large
+ 150 - 150
src/Compiler-AST.js


+ 93 - 93
src/Compiler-Core.js

@@ -15,11 +15,11 @@ $core.method({
 selector: "compileNode:",
 protocol: "compiling",
 fn: function (aNode){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._transformers())._inject_into_(aNode,(function(input,transformer){
+return $recv($self._transformers())._inject_into_(aNode,(function(input,transformer){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
@@ -46,8 +46,8 @@ $core.method({
 selector: "currentClass",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@currentClass"];
+var self=this,$self=this;
+return $self["@currentClass"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -64,8 +64,8 @@ $core.method({
 selector: "currentClass:",
 protocol: "accessing",
 fn: function (aClass){
-var self=this;
-self["@currentClass"]=aClass;
+var self=this,$self=this;
+$self["@currentClass"]=aClass;
 return self;
 
 },
@@ -83,8 +83,8 @@ $core.method({
 selector: "currentPackage",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@currentPackage"];
+var self=this,$self=this;
+return $self["@currentPackage"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -101,8 +101,8 @@ $core.method({
 selector: "currentPackage:",
 protocol: "accessing",
 fn: function (anObject){
-var self=this;
-self["@currentPackage"]=anObject;
+var self=this,$self=this;
+$self["@currentPackage"]=anObject;
 return self;
 
 },
@@ -120,7 +120,7 @@ $core.method({
 selector: "pseudoVariables",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -143,12 +143,12 @@ $core.method({
 selector: "source",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$receiver;
-$1=self["@source"];
+$1=$self["@source"];
 if(($receiver = $1) == null || $receiver.a$nil){
 return "";
 } else {
@@ -172,8 +172,8 @@ $core.method({
 selector: "source:",
 protocol: "accessing",
 fn: function (aString){
-var self=this;
-self["@source"]=aString;
+var self=this,$self=this;
+$self["@source"]=aString;
 return self;
 
 },
@@ -191,12 +191,12 @@ $core.method({
 selector: "transformers",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 var dict;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-dict=self._transformersDictionary();
+dict=$self._transformersDictionary();
 return $recv($recv($recv($recv(dict)._keys())._asArray())._sort())._collect_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
@@ -224,11 +224,11 @@ $core.method({
 selector: "transformersDictionary",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._subclassResponsibility();
+$self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"transformersDictionary",{},$globals.AbstractCodeGenerator)});
@@ -254,13 +254,13 @@ $core.method({
 selector: "irTranslator",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=$recv(self._irTranslatorClass())._new();
-$recv($1)._currentClass_(self._currentClass());
+$1=$recv($self._irTranslatorClass())._new();
+$recv($1)._currentClass_($self._currentClass());
 return $recv($1)._yourself();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"irTranslator",{},$globals.CodeGenerator)});
@@ -280,7 +280,7 @@ $core.method({
 selector: "irTranslatorClass",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return $globals.IRJSTranslator;
 
 },
@@ -298,13 +298,13 @@ $core.method({
 selector: "semanticAnalyzer",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=$recv($globals.SemanticAnalyzer)._on_(self._currentClass());
-$recv($1)._thePackage_(self._currentPackage());
+$1=$recv($globals.SemanticAnalyzer)._on_($self._currentClass());
+$recv($1)._thePackage_($self._currentPackage());
 return $recv($1)._yourself();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"semanticAnalyzer",{},$globals.CodeGenerator)});
@@ -324,25 +324,25 @@ $core.method({
 selector: "transformersDictionary",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$2,$receiver;
-$1=self["@transformersDictionary"];
+$1=$self["@transformersDictionary"];
 if(($receiver = $1) == null || $receiver.a$nil){
 $2=$recv($globals.Dictionary)._new();
-$recv($2)._at_put_("2000-semantic",self._semanticAnalyzer());
+$recv($2)._at_put_("2000-semantic",$self._semanticAnalyzer());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["at:put:"]=1;
 //>>excludeEnd("ctx");
-$recv($2)._at_put_("5000-astToIr",self._translator());
+$recv($2)._at_put_("5000-astToIr",$self._translator());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["at:put:"]=2;
 //>>excludeEnd("ctx");
-$recv($2)._at_put_("8000-irToJs",self._irTranslator());
-self["@transformersDictionary"]=$recv($2)._yourself();
-return self["@transformersDictionary"];
+$recv($2)._at_put_("8000-irToJs",$self._irTranslator());
+$self["@transformersDictionary"]=$recv($2)._yourself();
+return $self["@transformersDictionary"];
 } else {
 return $1;
 }
@@ -364,14 +364,14 @@ $core.method({
 selector: "translator",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
 $1=$recv($globals.IRASTTranslator)._new();
-$recv($1)._source_(self._source());
-$recv($1)._theClass_(self._currentClass());
+$recv($1)._source_($self._source());
+$recv($1)._theClass_($self._currentClass());
 return $recv($1)._yourself();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"translator",{},$globals.CodeGenerator)});
@@ -397,12 +397,12 @@ $core.method({
 selector: "codeGeneratorClass",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$receiver;
-$1=self["@codeGeneratorClass"];
+$1=$self["@codeGeneratorClass"];
 if(($receiver = $1) == null || $receiver.a$nil){
 return $globals.InliningCodeGenerator;
 } else {
@@ -426,8 +426,8 @@ $core.method({
 selector: "codeGeneratorClass:",
 protocol: "accessing",
 fn: function (aClass){
-var self=this;
-self["@codeGeneratorClass"]=aClass;
+var self=this,$self=this;
+$self["@codeGeneratorClass"]=aClass;
 return self;
 
 },
@@ -445,12 +445,12 @@ $core.method({
 selector: "compile:forClass:protocol:",
 protocol: "compiling",
 fn: function (aString,aClass,anotherString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._source_(aString);
-return self._compileNode_forClass_package_(self._parse_(aString),aClass,$recv(aClass)._packageOfProtocol_(anotherString));
+$self._source_(aString);
+return $self._compileNode_forClass_package_($self._parse_(aString),aClass,$recv(aClass)._packageOfProtocol_(anotherString));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"compile:forClass:protocol:",{aString:aString,aClass:aClass,anotherString:anotherString},$globals.Compiler)});
 //>>excludeEnd("ctx");
@@ -469,7 +469,7 @@ $core.method({
 selector: "compileExpression:on:",
 protocol: "compiling",
 fn: function (aString,anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -478,7 +478,7 @@ $1=$recv("xxxDoIt ^ [ ".__comma(aString)).__comma(" ] value");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx[","]=1;
 //>>excludeEnd("ctx");
-return self._compile_forClass_protocol_($1,$recv(anObject)._class(),"**xxxDoIt");
+return $self._compile_forClass_protocol_($1,$recv(anObject)._class(),"**xxxDoIt");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"compileExpression:on:",{aString:aString,anObject:anObject},$globals.Compiler)});
 //>>excludeEnd("ctx");
@@ -497,17 +497,17 @@ $core.method({
 selector: "compileNode:",
 protocol: "compiling",
 fn: function (aNode){
-var self=this;
+var self=this,$self=this;
 var generator,result;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-generator=$recv(self._codeGeneratorClass())._new();
+generator=$recv($self._codeGeneratorClass())._new();
 $1=generator;
-$recv($1)._source_(self._source());
-$recv($1)._currentClass_(self._currentClass());
-$recv($1)._currentPackage_(self._currentPackage());
+$recv($1)._source_($self._source());
+$recv($1)._currentClass_($self._currentClass());
+$recv($1)._currentPackage_($self._currentPackage());
 result=$recv(generator)._compileNode_(aNode);
 return result;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -528,13 +528,13 @@ $core.method({
 selector: "compileNode:forClass:package:",
 protocol: "compiling",
 fn: function (aNode,aClass,aPackage){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._currentClass_(aClass);
-self._currentPackage_(aPackage);
-return self._compileNode_(aNode);
+$self._currentClass_(aClass);
+$self._currentPackage_(aPackage);
+return $self._compileNode_(aNode);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"compileNode:forClass:package:",{aNode:aNode,aClass:aClass,aPackage:aPackage},$globals.Compiler)});
 //>>excludeEnd("ctx");
@@ -553,8 +553,8 @@ $core.method({
 selector: "currentClass",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@currentClass"];
+var self=this,$self=this;
+return $self["@currentClass"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -571,8 +571,8 @@ $core.method({
 selector: "currentClass:",
 protocol: "accessing",
 fn: function (aClass){
-var self=this;
-self["@currentClass"]=aClass;
+var self=this,$self=this;
+$self["@currentClass"]=aClass;
 return self;
 
 },
@@ -590,8 +590,8 @@ $core.method({
 selector: "currentPackage",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@currentPackage"];
+var self=this,$self=this;
+return $self["@currentPackage"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -608,8 +608,8 @@ $core.method({
 selector: "currentPackage:",
 protocol: "accessing",
 fn: function (anObject){
-var self=this;
-self["@currentPackage"]=anObject;
+var self=this,$self=this;
+$self["@currentPackage"]=anObject;
 return self;
 
 },
@@ -627,7 +627,7 @@ $core.method({
 selector: "eval:",
 protocol: "compiling",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -651,7 +651,7 @@ $core.method({
 selector: "eval:forPackage:",
 protocol: "compiling",
 fn: function (aString,aPackage){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -677,11 +677,11 @@ $core.method({
 selector: "evaluateExpression:",
 protocol: "compiling",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self._evaluateExpression_on_(aString,$recv($globals.DoIt)._new());
+return $self._evaluateExpression_on_(aString,$recv($globals.DoIt)._new());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"evaluateExpression:",{aString:aString},$globals.Compiler)});
 //>>excludeEnd("ctx");
@@ -700,13 +700,13 @@ $core.method({
 selector: "evaluateExpression:on:",
 protocol: "compiling",
 fn: function (aString,anObject){
-var self=this;
+var self=this,$self=this;
 var result,method;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-method=self._eval_(self._compileExpression_on_(aString,anObject));
+method=$self._eval_($self._compileExpression_on_(aString,anObject));
 $recv(method)._protocol_("**xxxDoIt");
 $1=$recv(anObject)._class();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -734,12 +734,12 @@ $core.method({
 selector: "install:forClass:protocol:",
 protocol: "compiling",
 fn: function (aString,aBehavior,anotherString){
-var self=this;
+var self=this,$self=this;
 var compiledMethod;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-compiledMethod=self._eval_forPackage_(self._compile_forClass_protocol_(aString,aBehavior,anotherString),$recv(aBehavior)._packageOfProtocol_(anotherString));
+compiledMethod=$self._eval_forPackage_($self._compile_forClass_protocol_(aString,aBehavior,anotherString),$recv(aBehavior)._packageOfProtocol_(anotherString));
 return $recv($recv($globals.ClassBuilder)._new())._installMethod_forClass_protocol_(compiledMethod,aBehavior,anotherString);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"install:forClass:protocol:",{aString:aString,aBehavior:aBehavior,anotherString:anotherString,compiledMethod:compiledMethod},$globals.Compiler)});
@@ -759,7 +759,7 @@ $core.method({
 selector: "parse:",
 protocol: "compiling",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -782,7 +782,7 @@ $core.method({
 selector: "parseExpression:",
 protocol: "compiling",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -791,7 +791,7 @@ $1=$recv("doIt ^ [ ".__comma(aString)).__comma(" ] value");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx[","]=1;
 //>>excludeEnd("ctx");
-return self._parse_($1);
+return $self._parse_($1);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"parseExpression:",{aString:aString},$globals.Compiler)});
 //>>excludeEnd("ctx");
@@ -810,7 +810,7 @@ $core.method({
 selector: "recompile:",
 protocol: "compiling",
 fn: function (aClass){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -824,7 +824,7 @@ $1=$recv($recv(each)._methodClass()).__eq(aClass);
 $ctx2.sendIdx["="]=1;
 //>>excludeEnd("ctx");
 if($core.assert($1)){
-return self._install_forClass_protocol_($recv(each)._source(),aClass,$recv(each)._protocol());
+return $self._install_forClass_protocol_($recv(each)._source(),aClass,$recv(each)._protocol());
 }
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
@@ -838,7 +838,7 @@ var meta;
 meta=$receiver;
 $3=$recv(meta).__eq(aClass);
 if(!$core.assert($3)){
-self._recompile_(meta);
+$self._recompile_(meta);
 }
 }
 return self;
@@ -860,7 +860,7 @@ $core.method({
 selector: "recompileAll",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -868,7 +868,7 @@ $recv($recv($globals.Smalltalk)._classes())._do_displayingProgress_((function(ea
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._recompile_(each);
+return $self._recompile_(each);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -892,12 +892,12 @@ $core.method({
 selector: "source",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$receiver;
-$1=self["@source"];
+$1=$self["@source"];
 if(($receiver = $1) == null || $receiver.a$nil){
 return "";
 } else {
@@ -921,8 +921,8 @@ $core.method({
 selector: "source:",
 protocol: "accessing",
 fn: function (aString){
-var self=this;
-self["@source"]=aString;
+var self=this,$self=this;
+$self["@source"]=aString;
 return self;
 
 },
@@ -941,11 +941,11 @@ $core.method({
 selector: "recompile:",
 protocol: "compiling",
 fn: function (aClass){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(self._new())._recompile_(aClass);
+$recv($self._new())._recompile_(aClass);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"recompile:",{aClass:aClass},$globals.Compiler.a$cls)});
@@ -965,7 +965,7 @@ $core.method({
 selector: "recompileAll",
 protocol: "compiling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -973,7 +973,7 @@ $recv($recv($globals.Smalltalk)._classes())._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._recompile_(each);
+return $self._recompile_(each);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -1014,7 +1014,7 @@ $core.method({
 selector: "evaluate:context:",
 protocol: "evaluating",
 fn: function (aString,aContext){
-var self=this;
+var self=this,$self=this;
 var compiler,ast;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -1065,7 +1065,7 @@ $core.method({
 selector: "evaluate:for:",
 protocol: "evaluating",
 fn: function (aString,anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -1088,7 +1088,7 @@ $core.method({
 selector: "evaluate:receiver:",
 protocol: "evaluating",
 fn: function (aString,anObject){
-var self=this;
+var self=this,$self=this;
 var compiler;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -1135,11 +1135,11 @@ $core.method({
 selector: "evaluate:for:",
 protocol: "instance creation",
 fn: function (aString,anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._new())._evaluate_for_(aString,anObject);
+return $recv($self._new())._evaluate_for_(aString,anObject);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"evaluate:for:",{aString:aString,anObject:anObject},$globals.Evaluator.a$cls)});
 //>>excludeEnd("ctx");
@@ -1158,14 +1158,14 @@ $core.method({
 selector: "asVariableName",
 protocol: "*Compiler-Core",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
 $1=$recv($recv($globals.Smalltalk)._reservedWords())._includes_(self);
 if($core.assert($1)){
-return self.__comma("_");
+return $self.__comma("_");
 } else {
 return self;
 }

File diff suppressed because it is too large
+ 140 - 140
src/Compiler-IR.js


+ 5 - 2
src/Compiler-IR.st

@@ -1006,6 +1006,9 @@ visitInstructionList: anArray enclosedBetween: aString and: anotherString
 !
 
 visitReceiver: anIRInstruction
+	"Ugly hack, mutation"
+	anIRInstruction isSelf ifTrue: [ anIRInstruction variable: (anIRInstruction variable copy name: '$self'; yourself) ].
+	
 	anIRInstruction needsBoxingAsReceiver ifFalse: [ ^ self visit: anIRInstruction ].
 	
 	self stream nextPutAll: '$recv('.
@@ -1030,7 +1033,7 @@ visitSuperSend: anIRSend
 		nextPutAll: '(', self currentClass asJavaScriptSource;
 		nextPutAll: '.superclass||$boot.nilAsClass).fn.prototype.';
 		nextPutAll: anIRSend selector asJavaScriptMethodName, '.apply(';
-		nextPutAll: '$recv(self), '.
+		nextPutAll: '$self, '.
 	self
 		visitInstructionList: anIRSend arguments
 		enclosedBetween: '[' and: ']'.
@@ -1170,7 +1173,7 @@ nextPutFunctionWith: aBlock arguments: anArray
 		do: [ :each | stream nextPutAll: each asVariableName ]
 		separatedBy: [ stream nextPut: ',' ].
 	stream nextPutAll: '){'; lf.
-	stream nextPutAll: 'var self=this;'; lf.
+	stream nextPutAll: 'var self=this,$self=this;'; lf.
 	aBlock value.
 	stream lf; nextPutAll: '}'
 !

File diff suppressed because it is too large
+ 133 - 133
src/Compiler-Inlining.js


File diff suppressed because it is too large
+ 156 - 156
src/Compiler-Interpreter.js


File diff suppressed because it is too large
+ 148 - 148
src/Compiler-Semantic.js


+ 1 - 1
src/Compiler-Semantic.st

@@ -362,7 +362,7 @@ I am an instance variable of a method or block.!
 !InstanceVar methodsFor: 'testing'!
 
 alias
-	^ 'self["@', self name, '"]'
+	^ '$self["@', self name, '"]'
 !
 
 isInstanceVar

File diff suppressed because it is too large
+ 162 - 162
src/Compiler-Tests.js


+ 90 - 90
src/Kernel-Announcements.js

@@ -15,8 +15,8 @@ $core.method({
 selector: "announcementClass",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@announcementClass"];
+var self=this,$self=this;
+return $self["@announcementClass"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -33,8 +33,8 @@ $core.method({
 selector: "announcementClass:",
 protocol: "accessing",
 fn: function (aClass){
-var self=this;
-self["@announcementClass"]=aClass;
+var self=this,$self=this;
+$self["@announcementClass"]=aClass;
 return self;
 
 },
@@ -52,14 +52,14 @@ $core.method({
 selector: "deliver:",
 protocol: "announcing",
 fn: function (anAnnouncement){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=self._handlesAnnouncement_(anAnnouncement);
+$1=$self._handlesAnnouncement_(anAnnouncement);
 if($core.assert($1)){
-$recv(self._valuable())._value_(anAnnouncement);
+$recv($self._valuable())._value_(anAnnouncement);
 }
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -80,7 +80,7 @@ $core.method({
 selector: "handlesAnnouncement:",
 protocol: "announcing",
 fn: function (anAnnouncement){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -89,7 +89,7 @@ $2=$recv($globals.Smalltalk)._globals();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["globals"]=1;
 //>>excludeEnd("ctx");
-$3=$recv(self._announcementClass())._name();
+$3=$recv($self._announcementClass())._name();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["name"]=1;
 //>>excludeEnd("ctx");
@@ -122,11 +122,11 @@ $core.method({
 selector: "receiver",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._valuable())._receiver();
+return $recv($self._valuable())._receiver();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.AnnouncementSubscription)});
 //>>excludeEnd("ctx");
@@ -145,8 +145,8 @@ $core.method({
 selector: "valuable",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@valuable"];
+var self=this,$self=this;
+return $self["@valuable"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -163,8 +163,8 @@ $core.method({
 selector: "valuable:",
 protocol: "accessing",
 fn: function (aValuable){
-var self=this;
-self["@valuable"]=aValuable;
+var self=this,$self=this;
+$self["@valuable"]=aValuable;
 return self;
 
 },
@@ -188,8 +188,8 @@ $core.method({
 selector: "receiver",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@receiver"];
+var self=this,$self=this;
+return $self["@receiver"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -206,8 +206,8 @@ $core.method({
 selector: "receiver:",
 protocol: "accessing",
 fn: function (anObject){
-var self=this;
-self["@receiver"]=anObject;
+var self=this,$self=this;
+$self["@receiver"]=anObject;
 return self;
 
 },
@@ -225,8 +225,8 @@ $core.method({
 selector: "valuable",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@valuable"];
+var self=this,$self=this;
+return $self["@valuable"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -243,8 +243,8 @@ $core.method({
 selector: "valuable:",
 protocol: "accessing",
 fn: function (anObject){
-var self=this;
-self["@valuable"]=anObject;
+var self=this,$self=this;
+$self["@valuable"]=anObject;
 return self;
 
 },
@@ -262,11 +262,11 @@ $core.method({
 selector: "value",
 protocol: "evaluating",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._valuable())._value();
+return $recv($self._valuable())._value();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"value",{},$globals.AnnouncementValuable)});
 //>>excludeEnd("ctx");
@@ -285,11 +285,11 @@ $core.method({
 selector: "value:",
 protocol: "evaluating",
 fn: function (anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._valuable())._value_(anObject);
+return $recv($self._valuable())._value_(anObject);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},$globals.AnnouncementValuable)});
 //>>excludeEnd("ctx");
@@ -314,11 +314,11 @@ $core.method({
 selector: "announce:",
 protocol: "announcing",
 fn: function (anAnnouncement){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(self["@subscriptions"])._do_((function(each){
+$recv($self["@subscriptions"])._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
@@ -346,7 +346,7 @@ $core.method({
 selector: "initialize",
 protocol: "initialization",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -354,11 +354,11 @@ return $core.withContext(function($ctx1) {
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = true,
 //>>excludeEnd("ctx");
-($globals.Announcer.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
+($globals.Announcer.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = false;
 //>>excludeEnd("ctx");;
-self["@subscriptions"]=$recv($globals.OrderedCollection)._new();
+$self["@subscriptions"]=$recv($globals.OrderedCollection)._new();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Announcer)});
@@ -378,11 +378,11 @@ $core.method({
 selector: "on:do:",
 protocol: "subscribing",
 fn: function (aClass,aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._on_do_for_(aClass,aBlock,nil);
+$self._on_do_for_(aClass,aBlock,nil);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"on:do:",{aClass:aClass,aBlock:aBlock},$globals.Announcer)});
@@ -402,12 +402,12 @@ $core.method({
 selector: "on:do:for:",
 protocol: "subscribing",
 fn: function (aClass,aBlock,aReceiver){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$3,$5,$6,$4,$2;
-$1=self["@subscriptions"];
+$1=$self["@subscriptions"];
 $3=$recv($globals.AnnouncementSubscription)._new();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["new"]=1;
@@ -446,7 +446,7 @@ $core.method({
 selector: "on:doOnce:",
 protocol: "subscribing",
 fn: function (aClass,aBlock){
-var self=this;
+var self=this,$self=this;
 var subscription;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -459,13 +459,13 @@ $recv(subscription)._valuable_((function(ann){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$recv(self["@subscriptions"])._remove_(subscription);
+$recv($self["@subscriptions"])._remove_(subscription);
 return $recv(aBlock)._value_(ann);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)});
 //>>excludeEnd("ctx");
 }));
-$recv(self["@subscriptions"])._add_(subscription);
+$recv($self["@subscriptions"])._add_(subscription);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"on:doOnce:",{aClass:aClass,aBlock:aBlock,subscription:subscription},$globals.Announcer)});
@@ -485,12 +485,12 @@ $core.method({
 selector: "on:send:to:",
 protocol: "subscribing",
 fn: function (aClass,aSelector,anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$3,$5,$6,$4,$2;
-$1=self["@subscriptions"];
+$1=$self["@subscriptions"];
 $3=$recv($globals.AnnouncementSubscription)._new();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["new"]=1;
@@ -526,11 +526,11 @@ $core.method({
 selector: "unsubscribe:",
 protocol: "subscribing",
 fn: function (anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self["@subscriptions"]=$recv(self["@subscriptions"])._reject_((function(each){
+$self["@subscriptions"]=$recv($self["@subscriptions"])._reject_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
@@ -566,22 +566,22 @@ $core.method({
 selector: "current",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$receiver;
-$1=self["@current"];
+$1=$self["@current"];
 if(($receiver = $1) == null || $receiver.a$nil){
-self["@current"]=(
+$self["@current"]=(
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = true,
 //>>excludeEnd("ctx");
-($globals.SystemAnnouncer.a$cls.superclass||$boot.nilAsClass).fn.prototype._new.apply($recv(self), []));
+($globals.SystemAnnouncer.a$cls.superclass||$boot.nilAsClass).fn.prototype._new.apply($self, []));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = false;
 //>>excludeEnd("ctx");;
-return self["@current"];
+return $self["@current"];
 } else {
 return $1;
 }
@@ -603,11 +603,11 @@ $core.method({
 selector: "new",
 protocol: "instance creation",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._shouldNotImplement();
+$self._shouldNotImplement();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.SystemAnnouncer.a$cls)});
@@ -633,7 +633,7 @@ $core.method({
 selector: "classTag",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return "announcement";
 
 },
@@ -656,8 +656,8 @@ $core.method({
 selector: "theClass",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@theClass"];
+var self=this,$self=this;
+return $self["@theClass"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -674,8 +674,8 @@ $core.method({
 selector: "theClass:",
 protocol: "accessing",
 fn: function (aClass){
-var self=this;
-self["@theClass"]=aClass;
+var self=this,$self=this;
+$self["@theClass"]=aClass;
 return self;
 
 },
@@ -717,8 +717,8 @@ $core.method({
 selector: "oldClass",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@oldClass"];
+var self=this,$self=this;
+return $self["@oldClass"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -735,8 +735,8 @@ $core.method({
 selector: "oldClass:",
 protocol: "accessing",
 fn: function (aClass){
-var self=this;
-self["@oldClass"]=aClass;
+var self=this,$self=this;
+$self["@oldClass"]=aClass;
 return self;
 
 },
@@ -760,8 +760,8 @@ $core.method({
 selector: "oldPackage",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@oldPackage"];
+var self=this,$self=this;
+return $self["@oldPackage"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -778,8 +778,8 @@ $core.method({
 selector: "oldPackage:",
 protocol: "accessing",
 fn: function (aPackage){
-var self=this;
-self["@oldPackage"]=aPackage;
+var self=this,$self=this;
+$self["@oldPackage"]=aPackage;
 return self;
 
 },
@@ -815,8 +815,8 @@ $core.method({
 selector: "method",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@method"];
+var self=this,$self=this;
+return $self["@method"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -833,8 +833,8 @@ $core.method({
 selector: "method:",
 protocol: "accessing",
 fn: function (aCompiledMethod){
-var self=this;
-self["@method"]=aCompiledMethod;
+var self=this,$self=this;
+$self["@method"]=aCompiledMethod;
 return self;
 
 },
@@ -864,8 +864,8 @@ $core.method({
 selector: "oldMethod",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@oldMethod"];
+var self=this,$self=this;
+return $self["@oldMethod"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -882,8 +882,8 @@ $core.method({
 selector: "oldMethod:",
 protocol: "accessing",
 fn: function (aMethod){
-var self=this;
-self["@oldMethod"]=aMethod;
+var self=this,$self=this;
+$self["@oldMethod"]=aMethod;
 return self;
 
 },
@@ -907,8 +907,8 @@ $core.method({
 selector: "oldProtocol",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@oldProtocol"];
+var self=this,$self=this;
+return $self["@oldProtocol"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -925,8 +925,8 @@ $core.method({
 selector: "oldProtocol:",
 protocol: "accessing",
 fn: function (aString){
-var self=this;
-self["@oldProtocol"]=aString;
+var self=this,$self=this;
+$self["@oldProtocol"]=aString;
 return self;
 
 },
@@ -956,8 +956,8 @@ $core.method({
 selector: "package",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@package"];
+var self=this,$self=this;
+return $self["@package"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -974,8 +974,8 @@ $core.method({
 selector: "package:",
 protocol: "accessing",
 fn: function (aPackage){
-var self=this;
-self["@package"]=aPackage;
+var self=this,$self=this;
+$self["@package"]=aPackage;
 return self;
 
 },
@@ -1023,18 +1023,18 @@ $core.method({
 selector: "package",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$receiver;
-$1=self._theClass();
+$1=$self._theClass();
 if(($receiver = $1) == null || $receiver.a$nil){
 return $1;
 } else {
 var class_;
 class_=$receiver;
-return $recv(class_)._packageOfProtocol_(self._protocol());
+return $recv(class_)._packageOfProtocol_($self._protocol());
 }
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"package",{},$globals.ProtocolAnnouncement)});
@@ -1054,8 +1054,8 @@ $core.method({
 selector: "protocol",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@protocol"];
+var self=this,$self=this;
+return $self["@protocol"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -1072,8 +1072,8 @@ $core.method({
 selector: "protocol:",
 protocol: "accessing",
 fn: function (aString){
-var self=this;
-self["@protocol"]=aString;
+var self=this,$self=this;
+$self["@protocol"]=aString;
 return self;
 
 },
@@ -1091,8 +1091,8 @@ $core.method({
 selector: "theClass",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@theClass"];
+var self=this,$self=this;
+return $self["@theClass"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -1109,8 +1109,8 @@ $core.method({
 selector: "theClass:",
 protocol: "accessing",
 fn: function (aClass){
-var self=this;
-self["@theClass"]=aClass;
+var self=this,$self=this;
+$self["@theClass"]=aClass;
 return self;
 
 },

File diff suppressed because it is too large
+ 133 - 133
src/Kernel-Classes.js


File diff suppressed because it is too large
+ 141 - 141
src/Kernel-Collections.js


+ 51 - 51
src/Kernel-Collections.st

@@ -76,11 +76,11 @@ Types of buckets are the responsibility of subclasses via `#newBucket`.!
 
 bucketOfElement: anObject
 	<inlineJS: '
-		var hash = self[''@hashBlock''](anObject);
+		var hash = $self[''@hashBlock''](anObject);
 		if (!!hash) return null;
-		var buckets = self[''@buckets''],
+		var buckets = $self[''@buckets''],
 			bucket = buckets[hash];
-		if (!!bucket) { bucket = buckets[hash] = self._newBucket(); }
+		if (!!bucket) { bucket = buckets[hash] = $self._newBucket(); }
 		return bucket;
 	'>
 !
@@ -92,14 +92,14 @@ hashBlock: aBlock
 !BucketStore methodsFor: 'adding/removing'!
 
 removeAll
-	<inlineJS: 'self[''@buckets''] = Object.create(null);'>
+	<inlineJS: '$self[''@buckets''] = Object.create(null);'>
 ! !
 
 !BucketStore methodsFor: 'enumerating'!
 
 do: aBlock
 	<inlineJS: '
-		var buckets = self[''@buckets''];
+		var buckets = $self[''@buckets''];
 		var keys = Object.keys(buckets);
 		for (var i = 0; i < keys.length; ++i) { buckets[keys[i]]._do_(aBlock); }
 	'>
@@ -789,21 +789,21 @@ The external name is referred to as the key.!
 
 at: aKey ifAbsent: aBlock
 	<inlineJS: '
-		var index = self._positionOfKey_(aKey);
-		return index >=0 ? self[''@values''][index] : aBlock._value();
+		var index = $self._positionOfKey_(aKey);
+		return index >=0 ? $self[''@values''][index] : aBlock._value();
 	'>
 !
 
 at: aKey put: aValue
 	<inlineJS: '
-		var index = self._positionOfKey_(aKey);
+		var index = $self._positionOfKey_(aKey);
 		if(index === -1) {
-			var keys = self[''@keys''];
+			var keys = $self[''@keys''];
 			index = keys.length;
 			keys.push(aKey);
 		}
 
-		return self[''@values''][index] = aValue;
+		return $self[''@values''][index] = aValue;
 	'>
 !
 
@@ -834,11 +834,11 @@ removeAll
 
 removeKey: aKey ifAbsent: aBlock
 	<inlineJS: '
-		var index = self._positionOfKey_(aKey);
+		var index = $self._positionOfKey_(aKey);
 		if(index === -1) {
 			return aBlock._value()
 		} else {
-			var keys = self[''@keys''], values = self[''@values''];
+			var keys = $self[''@keys''], values = $self[''@values''];
 			var value = values[index], l = keys.length;
 			keys[index] = keys[l-1];
 			keys.pop();
@@ -875,7 +875,7 @@ initialize
 
 positionOfKey: anObject
 	<inlineJS: '
-		var keys = self[''@keys''];
+		var keys = $self[''@keys''];
 		for(var i=0;i<keys.length;i++){
 			if(keys[i].__eq(anObject)) { return i;}
 		}
@@ -886,7 +886,7 @@ positionOfKey: anObject
 !Dictionary methodsFor: 'testing'!
 
 includesKey: aKey
-	<inlineJS: 'return self._positionOfKey_(aKey) >= 0;'>
+	<inlineJS: 'return $self._positionOfKey_(aKey) >= 0;'>
 ! !
 
 AssociativeCollection subclass: #HashedCollection
@@ -915,8 +915,8 @@ keys
 
 values
 	<inlineJS: '
-		return self._keys().map(function(key){
-			return self._at_(key);
+		return $self._keys().map(function(key){
+			return $self._at_(key);
 		});
 	'>
 ! !
@@ -990,9 +990,9 @@ fourth
 
 indexOf: anObject ifAbsent: aBlock
 	<inlineJS: '
-		self = self._numericallyIndexable();
-		for(var i=0; i < self.length; i++) {
-			if($recv(self[i]).__eq(anObject)) {return i+1}
+		var nself = $self._numericallyIndexable();
+		for(var i=0; i < nself.length; i++) {
+			if($recv(nself[i]).__eq(anObject)) {return i+1}
 		};
 		return aBlock._value();
 	'>
@@ -1007,9 +1007,9 @@ indexOf: anObject startingAt: start
 
 indexOf: anObject startingAt: start ifAbsent: aBlock
 	<inlineJS: '
-		self = self._numericallyIndexable();
-		for(var i=start - 1; i < self.length; i++){
-			if($recv(self[i]).__eq(anObject)) {return i+1}
+		var nself = $self._numericallyIndexable();
+		for(var i=start - 1; i < nself.length; i++){
+			if($recv(nself[i]).__eq(anObject)) {return i+1}
 		}
 		return aBlock._value();
 	'>
@@ -1036,7 +1036,7 @@ single
 <inlineJS: '
 	if (self.length == 0) throw new Error("Collection is empty");
 	if (self.length > 1) throw new Error("Collection holds more than one element.");
-	return self[0];
+	return $self._numericallyIndexable()[0];
 '>
 !
 
@@ -1080,19 +1080,19 @@ copyFrom: anIndex to: anotherIndex
 
 detect: aBlock ifNone: anotherBlock
 	<inlineJS: '
-		self = self._numericallyIndexable();
-		for(var i = 0; i < self.length; i++)
-			if(aBlock._value_(self[i]))
-				return self[i];
+		var nself = $self._numericallyIndexable();
+		for(var i = 0; i < nself.length; i++)
+			if(aBlock._value_(nself[i]))
+				return nself[i];
 		return anotherBlock._value();
 	'>
 !
 
 do: aBlock
 	<inlineJS: '
-		self = self._numericallyIndexable();
-		for(var i=0; i < self.length; i++) {
-			aBlock._value_(self[i]);
+		var nself = $self._numericallyIndexable();
+		for(var i=0; i < nself.length; i++) {
+			aBlock._value_(nself[i]);
 		}
 	'>
 !
@@ -1103,19 +1103,19 @@ reverseDo: aBlock
 
 with: anotherCollection do: aBlock
 	<inlineJS: '
-		self = self._numericallyIndexable();
+		var nself = $self._numericallyIndexable();
 		anotherCollection = anotherCollection._numericallyIndexable();
-		for(var i=0; i<self.length; i++) {
-			aBlock._value_value_(self[i], anotherCollection[i]);
+		for(var i=0; i<nself.length; i++) {
+			aBlock._value_value_(nself[i], anotherCollection[i]);
 		}
 	'>
 !
 
 withIndexDo: aBlock
 	<inlineJS: '
-		self = self._numericallyIndexable();
-		for(var i=0; i < self.length; i++) {
-			aBlock._value_value_(self[i], i+1);
+		var nself = $self._numericallyIndexable();
+		for(var i=0; i < nself.length; i++) {
+			aBlock._value_value_(nself[i], i+1);
 		}
 	'>
 ! !
@@ -1236,7 +1236,7 @@ add: anObject
 addAll: aCollection
 <inlineJS: '
 	if (Array.isArray(aCollection) && aCollection.length < 65000) self.push.apply(self, aCollection);
-	else $globals.Array.superclass.fn.prototype._addAll_.call(self, aCollection);
+	else $globals.Array.superclass.fn.prototype._addAll_.call($self, aCollection);
 	return aCollection;
 '>
 !
@@ -1938,14 +1938,14 @@ remove: anObject ifAbsent: aBlock
 
 removeAll
 	<inlineJS: '
-		self[''@fastBuckets''] = {
+		$self[''@fastBuckets''] = {
 			"boolean": { store: Object.create(null), fn: function (x) { return {"true": true, "false": false, "null": null}[x]; } },
 			"number": { store: Object.create(null), fn: Number },
 			"string": { store: Object.create(null) }
 		};
-		self[''@slowBucketStores''].forEach(function (x) { x._removeAll(); });
-		self[''@defaultBucket'']._removeAll();
-		self[''@size''] = 0;
+		$self[''@slowBucketStores''].forEach(function (x) { x._removeAll(); });
+		$self[''@defaultBucket'']._removeAll();
+		$self[''@size''] = 0;
 	'>
 ! !
 
@@ -1975,16 +1975,16 @@ detect: aBlock ifNone: anotherBlock
 do: aBlock
 	<inlineJS: '
 		var el, keys, i;
-		el = self[''@fastBuckets''];
+		el = $self[''@fastBuckets''];
 		keys = Object.keys(el);
 		for (i = 0; i < keys.length; ++i) {
 			var fastBucket = el[keys[i]], fn = fastBucket.fn, store = Object.keys(fastBucket.store);
 			if (fn) { for (var j = 0; j < store.length; ++j) { aBlock._value_(fn(store[j])); } }
 			else { store._do_(aBlock); }
 		}
-		el = self[''@slowBucketStores''];
+		el = $self[''@slowBucketStores''];
 		for (i = 0; i < el.length; ++i) { el[i]._do_(aBlock); }
-		self[''@defaultBucket'']._do_(aBlock);
+		$self[''@defaultBucket'']._do_(aBlock);
 	'>
 !
 
@@ -2041,7 +2041,7 @@ printOn: aStream
 add: anObject in: anotherObject
 	<inlineJS: '
 		if (anObject in anotherObject.store) { return false; }
-		self[''@size'']++;
+		$self[''@size'']++;
 		anotherObject.store[anObject] = true;
 		return anObject;
 	'>
@@ -2056,17 +2056,17 @@ bucketsOfElement: anObject
 	
 	<inlineJS: '
 		// include nil to well-known objects under "boolean" fastBucket
-		if (anObject == null || anObject.a$nil) return [ null, self[''@fastBuckets''].boolean ];
+		if (anObject == null || anObject.a$nil) return [ null, $self[''@fastBuckets''].boolean ];
 		
 		var prim = anObject.valueOf();
-		if (typeof prim === "object" || typeof prim === "function" || !!self[''@fastBuckets''][typeof prim]) {
+		if (typeof prim === "object" || typeof prim === "function" || !!$self[''@fastBuckets''][typeof prim]) {
 			var bucket = null;
-			self[''@slowBucketStores''].some(function (store) {
+			$self[''@slowBucketStores''].some(function (store) {
 				return bucket = store._bucketOfElement_(anObject);
 			});
-			return [ anObject, null, bucket || self[''@defaultBucket''] ];
+			return [ anObject, null, bucket || $self[''@defaultBucket''] ];
 		}
-		return [ prim, self[''@fastBuckets''][typeof prim] ];
+		return [ prim, $self[''@fastBuckets''][typeof prim] ];
 	'>
 !
 
@@ -2086,7 +2086,7 @@ jsConstructorNameOf: anObject
 !
 
 remove: anObject in: anotherObject
-	<inlineJS: 'if (delete anotherObject.store[anObject]) self[''@size'']--'>
+	<inlineJS: 'if (delete anotherObject.store[anObject]) $self[''@size'']--'>
 ! !
 
 !Set methodsFor: 'testing'!

+ 49 - 49
src/Kernel-Dag.js

@@ -15,11 +15,11 @@ $core.method({
 selector: "value:",
 protocol: "evaluating",
 fn: function (anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self._visit_(anObject);
+return $self._visit_(anObject);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"value:",{anObject:anObject},$globals.AbstractDagVisitor)});
 //>>excludeEnd("ctx");
@@ -38,7 +38,7 @@ $core.method({
 selector: "visit:",
 protocol: "visiting",
 fn: function (aNode){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -61,7 +61,7 @@ $core.method({
 selector: "visitAll:",
 protocol: "visiting",
 fn: function (aCollection){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -69,7 +69,7 @@ return $recv(aCollection)._collect_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._visit_(each);
+return $self._visit_(each);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -92,11 +92,11 @@ $core.method({
 selector: "visitAllChildren:",
 protocol: "visiting",
 fn: function (aDagNode){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self._visitAll_($recv(aDagNode)._dagChildren());
+return $self._visitAll_($recv(aDagNode)._dagChildren());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"visitAllChildren:",{aDagNode:aDagNode},$globals.AbstractDagVisitor)});
 //>>excludeEnd("ctx");
@@ -115,11 +115,11 @@ $core.method({
 selector: "visitDagNode:",
 protocol: "visiting",
 fn: function (aNode){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._subclassResponsibility();
+$self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"visitDagNode:",{aNode:aNode},$globals.AbstractDagVisitor)});
@@ -139,7 +139,7 @@ $core.method({
 selector: "visitDagNodeVariantRedux:",
 protocol: "visiting",
 fn: function (aNode){
-var self=this;
+var self=this,$self=this;
 var newChildren,oldChildren;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -148,7 +148,7 @@ var $2,$3,$1,$4,$5;
 var $early={};
 try {
 oldChildren=$recv(aNode)._dagChildren();
-newChildren=self._visitAllChildren_(aNode);
+newChildren=$self._visitAllChildren_(aNode);
 $2=$recv(oldChildren)._size();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["size"]=1;
@@ -199,11 +199,11 @@ $core.method({
 selector: "visitDagNodeVariantSimple:",
 protocol: "visiting",
 fn: function (aNode){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._visitAllChildren_(aNode);
+$self._visitAllChildren_(aNode);
 return aNode;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"visitDagNodeVariantSimple:",{aNode:aNode},$globals.AbstractDagVisitor)});
@@ -229,7 +229,7 @@ $core.method({
 selector: "initialize",
 protocol: "initialization",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -237,11 +237,11 @@ return $core.withContext(function($ctx1) {
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = true,
 //>>excludeEnd("ctx");
-($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
+($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = false;
 //>>excludeEnd("ctx");;
-self["@path"]=[];
+$self["@path"]=[];
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.PathDagVisitor)});
@@ -261,8 +261,8 @@ $core.method({
 selector: "path",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@path"];
+var self=this,$self=this;
+return $self["@path"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -279,24 +279,24 @@ $core.method({
 selector: "visit:",
 protocol: "visiting",
 fn: function (aNode){
-var self=this;
+var self=this,$self=this;
 var oldPath,result;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 result=aNode;
-oldPath=self["@path"];
+oldPath=$self["@path"];
 $recv((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-self["@path"]=$recv(self["@path"]).__comma([aNode]);
-self["@path"];
+$self["@path"]=$recv($self["@path"]).__comma([aNode]);
+$self["@path"];
 result=(
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.supercall = true,
 //>>excludeEnd("ctx");
-($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._visit_.apply($recv(self), [aNode]));
+($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._visit_.apply($self, [aNode]));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.supercall = false;
 //>>excludeEnd("ctx");;
@@ -305,8 +305,8 @@ return result;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
 }))._ensure_((function(){
-self["@path"]=oldPath;
-return self["@path"];
+$self["@path"]=oldPath;
+return $self["@path"];
 
 }));
 return result;
@@ -328,7 +328,7 @@ $core.method({
 selector: "visitDagNodeVariantRedux:",
 protocol: "visiting",
 fn: function (aNode){
-var self=this;
+var self=this,$self=this;
 var newNode;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -338,13 +338,13 @@ newNode=(
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = true,
 //>>excludeEnd("ctx");
-($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._visitDagNodeVariantRedux_.apply($recv(self), [aNode]));
+($globals.PathDagVisitor.superclass||$boot.nilAsClass).fn.prototype._visitDagNodeVariantRedux_.apply($self, [aNode]));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = false;
 //>>excludeEnd("ctx");;
 $1=$recv(aNode).__eq_eq(newNode);
 if(!$core.assert($1)){
-$recv(self["@path"])._at_put_($recv(self["@path"])._size(),newNode);
+$recv($self["@path"])._at_put_($recv($self["@path"])._size(),newNode);
 }
 return newNode;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -371,7 +371,7 @@ $core.method({
 selector: "acceptDagVisitor:",
 protocol: "visiting",
 fn: function (aVisitor){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -394,18 +394,18 @@ $core.method({
 selector: "allDagChildren",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 var allNodes;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=self._dagChildren();
+$1=$self._dagChildren();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["dagChildren"]=1;
 //>>excludeEnd("ctx");
 allNodes=$recv($1)._asSet();
-$recv(self._dagChildren())._do_((function(each){
+$recv($self._dagChildren())._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
@@ -433,11 +433,11 @@ $core.method({
 selector: "dagChildren",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._subclassResponsibility();
+$self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"dagChildren",{},$globals.DagNode)});
@@ -457,11 +457,11 @@ $core.method({
 selector: "dagChildren:",
 protocol: "accessing",
 fn: function (aCollection){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._subclassResponsibility();
+$self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"dagChildren:",{aCollection:aCollection},$globals.DagNode)});
@@ -481,7 +481,7 @@ $core.method({
 selector: "isDagNode",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return true;
 
 },
@@ -505,11 +505,11 @@ $core.method({
 selector: "addDagChild:",
 protocol: "accessing",
 fn: function (aDagNode){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(self._dagChildren())._add_(aDagNode);
+$recv($self._dagChildren())._add_(aDagNode);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"addDagChild:",{aDagNode:aDagNode},$globals.DagParentNode)});
@@ -529,15 +529,15 @@ $core.method({
 selector: "dagChildren",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$receiver;
-$1=self["@nodes"];
+$1=$self["@nodes"];
 if(($receiver = $1) == null || $receiver.a$nil){
-self["@nodes"]=$recv($globals.Array)._new();
-return self["@nodes"];
+$self["@nodes"]=$recv($globals.Array)._new();
+return $self["@nodes"];
 } else {
 return $1;
 }
@@ -559,8 +559,8 @@ $core.method({
 selector: "dagChildren:",
 protocol: "accessing",
 fn: function (aCollection){
-var self=this;
-self["@nodes"]=aCollection;
+var self=this,$self=this;
+$self["@nodes"]=aCollection;
 return self;
 
 },
@@ -584,7 +584,7 @@ $core.method({
 selector: "dagChildren",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return [];
 
 },
@@ -602,7 +602,7 @@ $core.method({
 selector: "dagChildren:",
 protocol: "accessing",
 fn: function (aCollection){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -610,7 +610,7 @@ $recv(aCollection)._ifNotEmpty_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._error_("A DagSink cannot have children.");
+return $self._error_("A DagSink cannot have children.");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -635,7 +635,7 @@ $core.method({
 selector: "isDagNode",
 protocol: "*Kernel-Dag",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return false;
 
 },

+ 55 - 55
src/Kernel-Exceptions.js

@@ -15,7 +15,7 @@ $core.method({
 selector: "beHandled",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -39,7 +39,7 @@ $core.method({
 selector: "beUnhandled",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -63,7 +63,7 @@ $core.method({
 selector: "context",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -87,11 +87,11 @@ $core.method({
 selector: "initialize",
 protocol: "initialization",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._messageText_("Errorclass: ".__comma($recv(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)});
@@ -111,7 +111,7 @@ $core.method({
 selector: "isSmalltalkError",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -135,7 +135,7 @@ $core.method({
 selector: "jsStack",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -159,8 +159,8 @@ $core.method({
 selector: "messageText",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@messageText"];
+var self=this,$self=this;
+return $self["@messageText"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -177,8 +177,8 @@ $core.method({
 selector: "messageText:",
 protocol: "accessing",
 fn: function (aString){
-var self=this;
-self["@messageText"]=aString;
+var self=this,$self=this;
+$self["@messageText"]=aString;
 return self;
 
 },
@@ -196,7 +196,7 @@ $core.method({
 selector: "resignal",
 protocol: "signaling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -223,7 +223,7 @@ $core.method({
 selector: "signal",
 protocol: "signaling",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -252,12 +252,12 @@ $core.method({
 selector: "signal:",
 protocol: "signaling",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._messageText_(aString);
-self._signal();
+$self._messageText_(aString);
+$self._signal();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},$globals.Error)});
@@ -277,11 +277,11 @@ $core.method({
 selector: "signalerContext",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self._signalerContextFrom_(self._context());
+return $self._signalerContextFrom_($self._context());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"signalerContext",{},$globals.Error)});
 //>>excludeEnd("ctx");
@@ -300,7 +300,7 @@ $core.method({
 selector: "signalerContextFrom:",
 protocol: "accessing",
 fn: function (aContext){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -321,7 +321,7 @@ $1=$recv($2)._or_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return $recv($recv(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");
@@ -349,7 +349,7 @@ $core.method({
 selector: "wasHandled",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -374,7 +374,7 @@ $core.method({
 selector: "classTag",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return "exception";
 
 },
@@ -392,11 +392,11 @@ $core.method({
 selector: "signal",
 protocol: "instance creation",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._new())._signal();
+return $recv($self._new())._signal();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"signal",{},$globals.Error.a$cls)});
 //>>excludeEnd("ctx");
@@ -415,11 +415,11 @@ $core.method({
 selector: "signal:",
 protocol: "instance creation",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._new())._signal_(aString);
+return $recv($self._new())._signal_(aString);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},$globals.Error.a$cls)});
 //>>excludeEnd("ctx");
@@ -443,7 +443,7 @@ $core.method({
 selector: "messageText",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return "Halt encountered";
 
 },
@@ -461,7 +461,7 @@ $core.method({
 selector: "signalerContextFrom:",
 protocol: "accessing",
 fn: function (aContext){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -482,7 +482,7 @@ $1=$recv($2)._or_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return $recv($recv($recv(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 $core.withContext(function($ctx4) {
 //>>excludeEnd("ctx");
@@ -527,7 +527,7 @@ $core.method({
 selector: "context:",
 protocol: "accessing",
 fn: function (aMethodContext){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -551,8 +551,8 @@ $core.method({
 selector: "exception",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@exception"];
+var self=this,$self=this;
+return $self["@exception"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -569,8 +569,8 @@ $core.method({
 selector: "exception:",
 protocol: "accessing",
 fn: function (anException){
-var self=this;
-self["@exception"]=anException;
+var self=this,$self=this;
+$self["@exception"]=anException;
 return self;
 
 },
@@ -588,11 +588,11 @@ $core.method({
 selector: "messageText",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return "JavaScript exception: " + self["@exception"].toString();
+return "JavaScript exception: " + $self["@exception"].toString();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},$globals.JavaScriptException)});
@@ -600,7 +600,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "messageText\x0a\x09<inlineJS: 'return \x22JavaScript exception: \x22 + self[\x22@exception\x22].toString()'>",
+source: "messageText\x0a\x09<inlineJS: 'return \x22JavaScript exception: \x22 + $self[\x22@exception\x22].toString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -613,12 +613,12 @@ $core.method({
 selector: "on:",
 protocol: "instance creation",
 fn: function (anException){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=self._new();
+$1=$self._new();
 $recv($1)._exception_(anException);
 return $recv($1)._yourself();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -639,12 +639,12 @@ $core.method({
 selector: "on:context:",
 protocol: "instance creation",
 fn: function (anException,aMethodContext){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=self._new();
+$1=$self._new();
 $recv($1)._exception_(anException);
 $recv($1)._context_(aMethodContext);
 return $recv($1)._yourself();
@@ -671,8 +671,8 @@ $core.method({
 selector: "message",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@message"];
+var self=this,$self=this;
+return $self["@message"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -689,8 +689,8 @@ $core.method({
 selector: "message:",
 protocol: "accessing",
 fn: function (aMessage){
-var self=this;
-self["@message"]=aMessage;
+var self=this,$self=this;
+$self["@message"]=aMessage;
 return self;
 
 },
@@ -708,12 +708,12 @@ $core.method({
 selector: "messageText",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=$recv($recv($recv(self._receiver())._asString()).__comma(" does not understand #")).__comma($recv(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");
@@ -736,8 +736,8 @@ $core.method({
 selector: "receiver",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@receiver"];
+var self=this,$self=this;
+return $self["@receiver"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -754,8 +754,8 @@ $core.method({
 selector: "receiver:",
 protocol: "accessing",
 fn: function (anObject){
-var self=this;
-self["@receiver"]=anObject;
+var self=this,$self=this;
+$self["@receiver"]=anObject;
 return self;
 
 },
@@ -779,8 +779,8 @@ $core.method({
 selector: "object",
 protocol: "accessing",
 fn: function (){
-var self=this;
-return self["@object"];
+var self=this,$self=this;
+return $self["@object"];
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -797,8 +797,8 @@ $core.method({
 selector: "object:",
 protocol: "accessing",
 fn: function (anObject){
-var self=this;
-self["@object"]=anObject;
+var self=this,$self=this;
+$self["@object"]=anObject;
 return self;
 
 },

+ 1 - 1
src/Kernel-Exceptions.st

@@ -161,7 +161,7 @@ exception: anException
 !
 
 messageText
-	<inlineJS: 'return "JavaScript exception: " + self["@exception"].toString()'>
+	<inlineJS: 'return "JavaScript exception: " + $self["@exception"].toString()'>
 ! !
 
 !JavaScriptException class methodsFor: 'instance creation'!

File diff suppressed because it is too large
+ 132 - 132
src/Kernel-Infrastructure.js


+ 7 - 7
src/Kernel-Infrastructure.st

@@ -30,13 +30,13 @@ __Note:__ For keyword-based messages, only the first keyword is kept: `window fo
 !JSObjectProxy methodsFor: 'accessing'!
 
 at: aString
-	<inlineJS: 'return self[''@jsObject''][aString]'>
+	<inlineJS: 'return $self[''@jsObject''][aString]'>
 !
 
 at: aString ifAbsent: aBlock
 	"return the aString property or evaluate aBlock if the property is not defined on the object"
 	<inlineJS: '
-		var obj = self[''@jsObject''];
+		var obj = $self[''@jsObject''];
 		return aString in obj ? obj[aString] : aBlock._value();
 	'>
 !
@@ -44,7 +44,7 @@ at: aString ifAbsent: aBlock
 at: aString ifPresent: aBlock
 	"return the evaluation of aBlock with the value if the property is defined or return nil"
 	<inlineJS: '
-		var obj = self[''@jsObject''];
+		var obj = $self[''@jsObject''];
 		return aString in obj ? aBlock._value_(obj[aString]) : nil;
 	'>
 !
@@ -53,13 +53,13 @@ at: aString ifPresent: aBlock ifAbsent: anotherBlock
 	"return the evaluation of aBlock with the value if the property is defined
 	or return value of anotherBlock"
 	<inlineJS: '
-		var obj = self[''@jsObject''];
+		var obj = $self[''@jsObject''];
 		return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
 	'>
 !
 
 at: aString put: anObject
-	<inlineJS: 'return self[''@jsObject''][aString] = anObject'>
+	<inlineJS: 'return $self[''@jsObject''][aString] = anObject'>
 !
 
 in: aValuable
@@ -89,7 +89,7 @@ asJavaScriptObject
 
 keysAndValuesDo: aBlock
 	<inlineJS: '
-		var o = self[''@jsObject''];
+		var o = $self[''@jsObject''];
 		for(var i in o) {
 			aBlock._value_value_(i, o[i]);
 		}
@@ -104,7 +104,7 @@ printOn: aStream
 
 printString
 	<inlineJS: '
-		var js = self[''@jsObject''];
+		var js = $self[''@jsObject''];
 		return js.toString
 			? js.toString()
 			: Object.prototype.toString.call(js)

File diff suppressed because it is too large
+ 142 - 142
src/Kernel-Methods.js


+ 6 - 6
src/Kernel-Methods.st

@@ -47,7 +47,7 @@ whileFalse
 !
 
 whileFalse: aBlock
-	<inlineJS: 'while(!!$core.assert(self._value())) {aBlock._value()}'>
+	<inlineJS: 'while(!!$core.assert($self._value())) {aBlock._value()}'>
 !
 
 whileTrue
@@ -55,7 +55,7 @@ whileTrue
 !
 
 whileTrue: aBlock
-	<inlineJS: 'while($core.assert(self._value())) {aBlock._value()}'>
+	<inlineJS: 'while($core.assert($self._value())) {aBlock._value()}'>
 ! !
 
 !BlockClosure methodsFor: 'converting'!
@@ -95,7 +95,7 @@ on: anErrorClass do: aBlock
 tryCatch: aBlock
 	<inlineJS: '
 		try {
-			return self._value();
+			return $self._value();
 		} catch(error) {
 			// pass non-local returns undetected
 			if (Array.isArray(error) && error.length === 1) throw error;
@@ -111,7 +111,7 @@ applyTo: anObject arguments: aCollection
 !
 
 ensure: aBlock
-	<inlineJS: 'try{return self._value()}finally{aBlock._value()}'>
+	<inlineJS: 'try{return $self._value()}finally{aBlock._value()}'>
 !
 
 new
@@ -876,14 +876,14 @@ rawTimeout: anObject
 
 clearInterval
 	<inlineJS: '
-		var interval = self["@rawTimeout"];
+		var interval = $self["@rawTimeout"];
 		clearInterval(interval);
 	'>
 !
 
 clearTimeout
 	<inlineJS: '
-		var timeout = self["@rawTimeout"];
+		var timeout = $self["@rawTimeout"];
 		clearTimeout(timeout);
 	'>
 ! !

File diff suppressed because it is too large
+ 126 - 126
src/Kernel-Objects.js


+ 17 - 5
src/Kernel-Objects.st

@@ -10,7 +10,7 @@ In most cases, subclassing `ProtoObject` is wrong and `Object` should be used in
 !ProtoObject methodsFor: 'accessing'!
 
 class
-	<inlineJS: 'return self.a$cls'>
+	<inlineJS: 'return $self.a$cls'>
 !
 
 identityHash
@@ -24,11 +24,11 @@ identityHash
 !
 
 instVarAt: aString
-	<inlineJS: 'return self[''@''+aString]'>
+	<inlineJS: 'return $self[''@''+aString]'>
 !
 
 instVarAt: aString put: anObject
-	<inlineJS: 'self[''@'' + aString] = anObject'>
+	<inlineJS: '$self[''@'' + aString] = anObject'>
 !
 
 yourself
@@ -43,7 +43,7 @@ yourself
 
 == anObject
 <inlineJS:
-	'return self._class() === $recv(anObject)._class() && self._isSameInstanceAs_(anObject)'>
+	'return $self._class() === $recv(anObject)._class() && $self._isSameInstanceAs_(anObject)'>
 !
 
 isSameInstanceAs: anObject
@@ -265,7 +265,7 @@ deepCopy
 		var copy = self.a$cls._new();
 		Object.keys(self).forEach(function (i) {
 		if(/^@.+/.test(i)) {
-			copy[i] = self[i]._deepCopy();
+			copy[i] = $recv(self[i])._deepCopy();
 		}
 		});
 		return copy;
@@ -1310,6 +1310,12 @@ I describe the behavior of my sole instance, `nil`. `nil` represents a prior val
 
 __note:__ When sending messages to the `undefined` JavaScript object, it will be replaced by `nil`.!
 
+!UndefinedObject methodsFor: 'accessing'!
+
+identityHash
+	^ 'NIL'
+! !
+
 !UndefinedObject methodsFor: 'converting'!
 
 asJavaScriptObject
@@ -1326,6 +1332,12 @@ shallowCopy
 	^ self
 ! !
 
+!UndefinedObject methodsFor: 'evaluating'!
+
+value
+	<inlineJS: 'return null'>
+! !
+
 !UndefinedObject methodsFor: 'printing'!
 
 printOn: aStream

+ 39 - 39
src/Kernel-Promises.js

@@ -15,7 +15,7 @@ $core.method({
 selector: "catch:",
 protocol: "promises",
 fn: function (aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -41,7 +41,7 @@ $core.method({
 selector: "on:do:",
 protocol: "promises",
 fn: function (aClass,aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -68,7 +68,7 @@ $core.method({
 selector: "on:do:catch:",
 protocol: "promises",
 fn: function (aClass,aBlock,anotherBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -95,7 +95,7 @@ $core.method({
 selector: "then:",
 protocol: "promises",
 fn: function (aBlockOrArray){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -134,11 +134,11 @@ $core.method({
 selector: "then:catch:",
 protocol: "promises",
 fn: function (aBlockOrArray,anotherBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._then_(aBlockOrArray))._catch_(anotherBlock);
+return $recv($self._then_(aBlockOrArray))._catch_(anotherBlock);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"then:catch:",{aBlockOrArray:aBlockOrArray,anotherBlock:anotherBlock},$globals.Thenable)});
 //>>excludeEnd("ctx");
@@ -157,11 +157,11 @@ $core.method({
 selector: "then:on:do:",
 protocol: "promises",
 fn: function (aBlockOrArray,aClass,aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._then_(aBlockOrArray))._on_do_(aClass,aBlock);
+return $recv($self._then_(aBlockOrArray))._on_do_(aClass,aBlock);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"then:on:do:",{aBlockOrArray:aBlockOrArray,aClass:aClass,aBlock:aBlock},$globals.Thenable)});
 //>>excludeEnd("ctx");
@@ -180,11 +180,11 @@ $core.method({
 selector: "then:on:do:catch:",
 protocol: "promises",
 fn: function (aBlockOrArray,aClass,aBlock,anotherBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($recv(self._then_(aBlockOrArray))._on_do_(aClass,aBlock))._catch_(anotherBlock);
+return $recv($recv($self._then_(aBlockOrArray))._on_do_(aClass,aBlock))._catch_(anotherBlock);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"then:on:do:catch:",{aBlockOrArray:aBlockOrArray,aClass:aClass,aBlock:aBlock,anotherBlock:anotherBlock},$globals.Thenable)});
 //>>excludeEnd("ctx");
@@ -207,7 +207,7 @@ $core.method({
 selector: "all:",
 protocol: "composites",
 fn: function (aCollection){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -231,7 +231,7 @@ $core.method({
 selector: "any:",
 protocol: "composites",
 fn: function (aCollection){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -255,11 +255,11 @@ $core.method({
 selector: "forBlock:",
 protocol: "instance creation",
 fn: function (aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(self._new())._then_(aBlock);
+return $recv($self._new())._then_(aBlock);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"forBlock:",{aBlock:aBlock},$globals.Promise.a$cls)});
 //>>excludeEnd("ctx");
@@ -278,7 +278,7 @@ $core.method({
 selector: "new",
 protocol: "instance creation",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -302,7 +302,7 @@ $core.method({
 selector: "new:",
 protocol: "instance creation",
 fn: function (aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -329,7 +329,7 @@ $core.method({
 selector: "signal:",
 protocol: "instance creation",
 fn: function (anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -353,7 +353,7 @@ $core.method({
 selector: "value:",
 protocol: "instance creation",
 fn: function (anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -377,11 +377,11 @@ $core.method({
 selector: "catch:",
 protocol: "*Kernel-Promises",
 fn: function (aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var js = self["@jsObject"];
+var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._catch_.call(js, aBlock);
 else
@@ -397,7 +397,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "catch: aBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._catch_.call(js, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22catch:\x22)\x0a            ._arguments_([aBlock])\x0a    )'>",
+source: "catch: aBlock\x0a<inlineJS: 'var js = $self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._catch_.call(js, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22catch:\x22)\x0a            ._arguments_([aBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -409,11 +409,11 @@ $core.method({
 selector: "on:do:",
 protocol: "*Kernel-Promises",
 fn: function (aClass,aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var js = self["@jsObject"];
+var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._on_do_.call(js, aClass, aBlock);
 else
@@ -429,7 +429,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aBlock"],
-source: "on: aClass do: aBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._on_do_.call(js, aClass, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22on:do:\x22)\x0a            ._arguments_([aClass, aBlock])\x0a    )'>",
+source: "on: aClass do: aBlock\x0a<inlineJS: 'var js = $self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._on_do_.call(js, aClass, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22on:do:\x22)\x0a            ._arguments_([aClass, aBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -441,11 +441,11 @@ $core.method({
 selector: "on:do:catch:",
 protocol: "*Kernel-Promises",
 fn: function (aClass,aBlock,anotherBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var js = self["@jsObject"];
+var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._on_do_catch_.call(js, aClass, aBlock, anotherBlock);
 else
@@ -461,7 +461,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aBlock", "anotherBlock"],
-source: "on: aClass do: aBlock catch: anotherBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._on_do_catch_.call(js, aClass, aBlock, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22on:do:catch:\x22)\x0a            ._arguments_([aClass, aBlock, anotherBlock])\x0a    )'>",
+source: "on: aClass do: aBlock catch: anotherBlock\x0a<inlineJS: 'var js = $self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._on_do_catch_.call(js, aClass, aBlock, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22on:do:catch:\x22)\x0a            ._arguments_([aClass, aBlock, anotherBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -473,11 +473,11 @@ $core.method({
 selector: "then:",
 protocol: "*Kernel-Promises",
 fn: function (aBlockOrArray){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var js = self["@jsObject"];
+var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_.call(js, aBlockOrArray);
 else
@@ -493,7 +493,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray"],
-source: "then: aBlockOrArray\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_.call(js, aBlockOrArray);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:\x22)\x0a            ._arguments_([aBlockOrArray])\x0a    )'>",
+source: "then: aBlockOrArray\x0a<inlineJS: 'var js = $self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_.call(js, aBlockOrArray);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:\x22)\x0a            ._arguments_([aBlockOrArray])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -505,11 +505,11 @@ $core.method({
 selector: "then:catch:",
 protocol: "*Kernel-Promises",
 fn: function (aBlockOrArray,anotherBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var js = self["@jsObject"];
+var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_catch_.call(js, aBlockOrArray, anotherBlock);
 else
@@ -525,7 +525,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray", "anotherBlock"],
-source: "then: aBlockOrArray catch: anotherBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_catch_.call(js, aBlockOrArray, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:catch:\x22)\x0a            ._arguments_([aBlockOrArray, anotherBlock])\x0a    )'>",
+source: "then: aBlockOrArray catch: anotherBlock\x0a<inlineJS: 'var js = $self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_catch_.call(js, aBlockOrArray, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:catch:\x22)\x0a            ._arguments_([aBlockOrArray, anotherBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -537,11 +537,11 @@ $core.method({
 selector: "then:on:do:",
 protocol: "*Kernel-Promises",
 fn: function (aBlockOrArray,aClass,aBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var js = self["@jsObject"];
+var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_on_do_.call(js, aBlockOrArray, aClass, aBlock);
 else
@@ -557,7 +557,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray", "aClass", "aBlock"],
-source: "then: aBlockOrArray on: aClass do: aBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_on_do_.call(js, aBlockOrArray, aClass, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:on:do:\x22)\x0a            ._arguments_([aBlockOrArray, aClass, aBlock])\x0a    )'>",
+source: "then: aBlockOrArray on: aClass do: aBlock\x0a<inlineJS: 'var js = $self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_on_do_.call(js, aBlockOrArray, aClass, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:on:do:\x22)\x0a            ._arguments_([aBlockOrArray, aClass, aBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -569,11 +569,11 @@ $core.method({
 selector: "then:on:do:catch:",
 protocol: "*Kernel-Promises",
 fn: function (aBlockOrArray,aClass,aBlock,anotherBlock){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var js = self["@jsObject"];
+var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_on_do_catch_.call(js, aBlockOrArray, aClass, aBlock, anotherBlock);
 else
@@ -589,7 +589,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray", "aClass", "aBlock", "anotherBlock"],
-source: "then: aBlockOrArray on: aClass do: aBlock catch: anotherBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_on_do_catch_.call(js, aBlockOrArray, aClass, aBlock, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:on:do:catch:\x22)\x0a            ._arguments_([aBlockOrArray, aClass, aBlock, anotherBlock])\x0a    )'>",
+source: "then: aBlockOrArray on: aClass do: aBlock catch: anotherBlock\x0a<inlineJS: 'var js = $self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_on_do_catch_.call(js, aBlockOrArray, aClass, aBlock, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:on:do:catch:\x22)\x0a            ._arguments_([aBlockOrArray, aClass, aBlock, anotherBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 7 - 7
src/Kernel-Promises.st

@@ -125,7 +125,7 @@ value: anObject
 !JSObjectProxy methodsFor: '*Kernel-Promises'!
 
 catch: aBlock
-<inlineJS: 'var js = self["@jsObject"];
+<inlineJS: 'var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._catch_.call(js, aBlock);
 else
@@ -137,7 +137,7 @@ else
 !
 
 on: aClass do: aBlock
-<inlineJS: 'var js = self["@jsObject"];
+<inlineJS: 'var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._on_do_.call(js, aClass, aBlock);
 else
@@ -149,7 +149,7 @@ else
 !
 
 on: aClass do: aBlock catch: anotherBlock
-<inlineJS: 'var js = self["@jsObject"];
+<inlineJS: 'var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._on_do_catch_.call(js, aClass, aBlock, anotherBlock);
 else
@@ -161,7 +161,7 @@ else
 !
 
 then: aBlockOrArray
-<inlineJS: 'var js = self["@jsObject"];
+<inlineJS: 'var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_.call(js, aBlockOrArray);
 else
@@ -173,7 +173,7 @@ else
 !
 
 then: aBlockOrArray catch: anotherBlock
-<inlineJS: 'var js = self["@jsObject"];
+<inlineJS: 'var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_catch_.call(js, aBlockOrArray, anotherBlock);
 else
@@ -185,7 +185,7 @@ else
 !
 
 then: aBlockOrArray on: aClass do: aBlock
-<inlineJS: 'var js = self["@jsObject"];
+<inlineJS: 'var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_on_do_.call(js, aBlockOrArray, aClass, aBlock);
 else
@@ -197,7 +197,7 @@ else
 !
 
 then: aBlockOrArray on: aClass do: aBlock catch: anotherBlock
-<inlineJS: 'var js = self["@jsObject"];
+<inlineJS: 'var js = $self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_on_do_catch_.call(js, aBlockOrArray, aClass, aBlock, anotherBlock);
 else

File diff suppressed because it is too large
+ 124 - 124
src/Kernel-Tests.js


+ 3 - 3
src/Kernel-Tests.st

@@ -163,11 +163,11 @@ testNewWithValues
 
 	var wrappedConstructor = $recv(TestConstructor);
 	var result = wrappedConstructor._newWithValues_([1, 2, 3]);
-	self._assert_(result instanceof TestConstructor);
-	self._assert_equals_(result.name, "theTestPrototype");
+	$self._assert_(result instanceof TestConstructor);
+	$self._assert_equals_(result.name, "theTestPrototype");
 
 	/* newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made. */
-	self._should_raise_(function () {wrappedConstructor._newWithValues_("single argument");}, $globals.Error);
+	$self._should_raise_(function () {wrappedConstructor._newWithValues_("single argument");}, $globals.Error);
 '>
 !
 

+ 18 - 18
src/Platform-Browser.js

@@ -15,7 +15,7 @@ $core.method({
 selector: "globals",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return window;
 
 },
@@ -33,13 +33,13 @@ $core.method({
 selector: "newXhr",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $receiver;
 if(($receiver = $globals.XMLHttpRequest) == null || $receiver.a$nil){
-self._error_("XMLHttpRequest not available.");
+$self._error_("XMLHttpRequest not available.");
 } else {
 return $recv($globals.NativeFunction)._constructorOf_($globals.XMLHttpRequest);
 }
@@ -63,14 +63,14 @@ $core.method({
 selector: "initialize",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=self._isFeasible();
+$1=$self._isFeasible();
 if($core.assert($1)){
-$recv($globals.Platform)._registerIfNone_(self._new());
+$recv($globals.Platform)._registerIfNone_($self._new());
 }
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -91,7 +91,7 @@ $core.method({
 selector: "isFeasible",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -120,7 +120,7 @@ $core.method({
 selector: "alert:",
 protocol: "actions",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -143,7 +143,7 @@ $core.method({
 selector: "confirm:",
 protocol: "actions",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -166,7 +166,7 @@ $core.method({
 selector: "prompt:",
 protocol: "actions",
 fn: function (aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -189,7 +189,7 @@ $core.method({
 selector: "prompt:default:",
 protocol: "actions",
 fn: function (aString,defaultString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -213,14 +213,14 @@ $core.method({
 selector: "initialize",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=self._isFeasible();
+$1=$self._isFeasible();
 if($core.assert($1)){
-$recv($globals.Terminal)._registerIfNone_(self._new());
+$recv($globals.Terminal)._registerIfNone_($self._new());
 }
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -241,7 +241,7 @@ $core.method({
 selector: "isFeasible",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -265,11 +265,11 @@ $core.method({
 selector: "postMessageTo:",
 protocol: "*Platform-Browser",
 fn: function (aFrame){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self._postMessageTo_origin_(aFrame,"*");
+return $self._postMessageTo_origin_(aFrame,"*");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"postMessageTo:",{aFrame:aFrame},$globals.Object)});
 //>>excludeEnd("ctx");
@@ -288,7 +288,7 @@ $core.method({
 selector: "postMessageTo:origin:",
 protocol: "*Platform-Browser",
 fn: function (aFrame,aString){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");

+ 4 - 4
src/Platform-DOM-Tests.js

@@ -12,14 +12,14 @@ $core.method({
 selector: "testEntityConversion",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
 $1=$recv($globals.PlatformDom)._isFeasible();
 if($core.assert($1)){
-self._assert_equals_("&copy;"._htmlTextContent(),"©");
+$self._assert_equals_("&copy;"._htmlTextContent(),"©");
 }
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -40,14 +40,14 @@ $core.method({
 selector: "testTextContentDoesNotRunScript",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
 $1=$recv($globals.PlatformDom)._isFeasible();
 if($core.assert($1)){
-self._shouldnt_raise_((function(){
+$self._shouldnt_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");

+ 13 - 13
src/Platform-DOM.js

@@ -13,7 +13,7 @@ $core.method({
 selector: "isDomNode:",
 protocol: "testing",
 fn: function (anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -39,7 +39,7 @@ $core.method({
 selector: "isFeasible",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -74,7 +74,7 @@ $core.method({
 selector: "newCustomEvent:detail:",
 protocol: "creation",
 fn: function (aString,anObject){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -98,7 +98,7 @@ $core.method({
 selector: "toArray:",
 protocol: "converting",
 fn: function (aDomList){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -122,11 +122,11 @@ $core.method({
 selector: "asDomNode",
 protocol: "*Platform-DOM",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv(document)._createTextNode_(self._asString());
+return $recv(document)._createTextNode_($self._asString());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"asDomNode",{},$globals.CharacterArray)});
 //>>excludeEnd("ctx");
@@ -145,13 +145,13 @@ $core.method({
 selector: "asDomNode",
 protocol: "*Platform-DOM",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 var fragment;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 fragment=$recv(document)._createDocumentFragment();
-self._do_((function(each){
+$self._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
@@ -179,20 +179,20 @@ $core.method({
 selector: "asDomNode",
 protocol: "*Platform-DOM",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$2;
-$1=$recv($globals.PlatformDom)._isDomNode_(self["@jsObject"]);
+$1=$recv($globals.PlatformDom)._isDomNode_($self["@jsObject"]);
 if($core.assert($1)){
-return self["@jsObject"];
+return $self["@jsObject"];
 } else {
 $2=(
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = true,
 //>>excludeEnd("ctx");
-($globals.JSObjectProxy.superclass||$boot.nilAsClass).fn.prototype._asDomNode.apply($recv(self), []));
+($globals.JSObjectProxy.superclass||$boot.nilAsClass).fn.prototype._asDomNode.apply($self, []));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.supercall = false;
 //>>excludeEnd("ctx");;
@@ -217,7 +217,7 @@ $core.method({
 selector: "htmlTextContent",
 protocol: "*Platform-DOM",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");

File diff suppressed because it is too large
+ 138 - 138
src/Platform-ImportExport.js


+ 7 - 7
src/Platform-Node.js

@@ -15,7 +15,7 @@ $core.method({
 selector: "globals",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 return global;
 
 },
@@ -33,13 +33,13 @@ $core.method({
 selector: "newXhr",
 protocol: "accessing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $receiver;
 if(($receiver = $globals.XMLHttpRequest) == null || $receiver.a$nil){
-self._error_("XMLHttpRequest not available.");
+$self._error_("XMLHttpRequest not available.");
 } else {
 return $recv($globals.XMLHttpRequest)._new();
 }
@@ -63,14 +63,14 @@ $core.method({
 selector: "initialize",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=self._isFeasible();
+$1=$self._isFeasible();
 if($core.assert($1)){
-$recv($globals.Platform)._registerIfNone_(self._new());
+$recv($globals.Platform)._registerIfNone_($self._new());
 }
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -91,7 +91,7 @@ $core.method({
 selector: "isFeasible",
 protocol: "testing",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");

File diff suppressed because it is too large
+ 131 - 131
src/Platform-Services.js


+ 129 - 129
src/SUnit-Tests.js

@@ -15,12 +15,12 @@ $core.method({
 selector: "setUp",
 protocol: "running",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self["@empty"]=$recv($globals.Set)._new();
-self["@full"]=$recv($globals.Set)._with_with_((5),"abc");
+$self["@empty"]=$recv($globals.Set)._new();
+$self["@full"]=$recv($globals.Set)._with_with_((5),"abc");
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"setUp",{},$globals.ExampleSetTest)});
@@ -40,12 +40,12 @@ $core.method({
 selector: "testAdd",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(self["@empty"])._add_((5));
-self._assert_($recv(self["@empty"])._includes_((5)));
+$recv($self["@empty"])._add_((5));
+$self._assert_($recv($self["@empty"])._includes_((5)));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testAdd",{},$globals.ExampleSetTest)});
@@ -65,12 +65,12 @@ $core.method({
 selector: "testGrow",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(self["@empty"])._addAll_((1)._to_((100)));
-self._assert_equals_($recv(self["@empty"])._size(),(100));
+$recv($self["@empty"])._addAll_((1)._to_((100)));
+$self._assert_equals_($recv($self["@empty"])._size(),(100));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testGrow",{},$globals.ExampleSetTest)});
@@ -90,15 +90,15 @@ $core.method({
 selector: "testIllegal",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._should_raise_((function(){
+$self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv(self["@empty"])._at_((5));
+return $recv($self["@empty"])._at_((5));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -106,11 +106,11 @@ return $recv(self["@empty"])._at_((5));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["should:raise:"]=1;
 //>>excludeEnd("ctx");
-self._should_raise_((function(){
+$self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv(self["@empty"])._at_put_((5),"abc");
+return $recv($self["@empty"])._at_put_((5),"abc");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
 //>>excludeEnd("ctx");
@@ -134,20 +134,20 @@ $core.method({
 selector: "testIncludes",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=$recv(self["@full"])._includes_((5));
+$1=$recv($self["@full"])._includes_((5));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["includes:"]=1;
 //>>excludeEnd("ctx");
-self._assert_($1);
+$self._assert_($1);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["assert:"]=1;
 //>>excludeEnd("ctx");
-self._assert_($recv(self["@full"])._includes_("abc"));
+$self._assert_($recv($self["@full"])._includes_("abc"));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testIncludes",{},$globals.ExampleSetTest)});
@@ -167,29 +167,29 @@ $core.method({
 selector: "testOccurrences",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$2;
-$1=$recv(self["@empty"])._occurrencesOf_((0));
+$1=$recv($self["@empty"])._occurrencesOf_((0));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["occurrencesOf:"]=1;
 //>>excludeEnd("ctx");
-self._assert_equals_($1,(0));
+$self._assert_equals_($1,(0));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["assert:equals:"]=1;
 //>>excludeEnd("ctx");
-$2=$recv(self["@full"])._occurrencesOf_((5));
+$2=$recv($self["@full"])._occurrencesOf_((5));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["occurrencesOf:"]=2;
 //>>excludeEnd("ctx");
-self._assert_equals_($2,(1));
+$self._assert_equals_($2,(1));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["assert:equals:"]=2;
 //>>excludeEnd("ctx");
-$recv(self["@full"])._add_((5));
-self._assert_equals_($recv(self["@full"])._occurrencesOf_((5)),(1));
+$recv($self["@full"])._add_((5));
+$self._assert_equals_($recv($self["@full"])._occurrencesOf_((5)),(1));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testOccurrences",{},$globals.ExampleSetTest)});
@@ -209,18 +209,18 @@ $core.method({
 selector: "testRemove",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$recv(self["@full"])._remove_((5));
-$1=$recv(self["@full"])._includes_("abc");
+$recv($self["@full"])._remove_((5));
+$1=$recv($self["@full"])._includes_("abc");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["includes:"]=1;
 //>>excludeEnd("ctx");
-self._assert_($1);
-self._deny_($recv(self["@full"])._includes_((5)));
+$self._assert_($1);
+$self._deny_($recv($self["@full"])._includes_((5)));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testRemove",{},$globals.ExampleSetTest)});
@@ -243,19 +243,19 @@ $core.method({
 selector: "fakeError",
 protocol: "helpers",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self["@flag"]="bad";
-self._timeout_((30));
-self["@flag"]=$recv(self._async_((function(){
+$self["@flag"]="bad";
+$self._timeout_((30));
+$self["@flag"]=$recv($self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-self["@flag"]="ok";
-self["@flag"];
-return self._error_("Intentional");
+$self["@flag"]="ok";
+$self["@flag"];
+return $self._error_("Intentional");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -279,17 +279,17 @@ $core.method({
 selector: "fakeErrorFailingInTearDown",
 protocol: "helpers",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self["@flag"]="bad";
-self._timeout_((30));
-self["@flag"]=$recv(self._async_((function(){
+$self["@flag"]="bad";
+$self._timeout_((30));
+$self["@flag"]=$recv($self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._error_("Intentional");
+return $self._error_("Intentional");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -313,19 +313,19 @@ $core.method({
 selector: "fakeFailure",
 protocol: "helpers",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self["@flag"]="bad";
-self._timeout_((30));
-self["@flag"]=$recv(self._async_((function(){
+$self["@flag"]="bad";
+$self._timeout_((30));
+$self["@flag"]=$recv($self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-self["@flag"]="ok";
-self["@flag"];
-return self._assert_(false);
+$self["@flag"]="ok";
+$self["@flag"];
+return $self._assert_(false);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -349,25 +349,25 @@ $core.method({
 selector: "fakeMultipleTimeoutFailing",
 protocol: "helpers",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-self._timeout_((100));
+$self._timeout_((100));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["timeout:"]=1;
 //>>excludeEnd("ctx");
-$1=self._async_((function(){
+$1=$self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-self._timeout_((20));
-return $recv(self._async_((function(){
+$self._timeout_((20));
+return $recv($self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return self._finished();
+return $self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
 //>>excludeEnd("ctx");
@@ -402,25 +402,25 @@ $core.method({
 selector: "fakeMultipleTimeoutPassing",
 protocol: "helpers",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-self._timeout_((20));
+$self._timeout_((20));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["timeout:"]=1;
 //>>excludeEnd("ctx");
-$1=self._async_((function(){
+$1=$self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-self._timeout_((40));
-return $recv(self._async_((function(){
+$self._timeout_((40));
+return $recv($self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return self._finished();
+return $self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
 //>>excludeEnd("ctx");
@@ -455,16 +455,16 @@ $core.method({
 selector: "fakeTimeout",
 protocol: "helpers",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._timeout_((10));
-$recv(self._async_((function(){
+$self._timeout_((10));
+$recv($self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._finished();
+return $self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -488,7 +488,7 @@ $core.method({
 selector: "selectorSetOf:",
 protocol: "private",
 fn: function (aCollection){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
@@ -519,8 +519,8 @@ $core.method({
 selector: "setUp",
 protocol: "running",
 fn: function (){
-var self=this;
-self["@flag"]="ok";
+var self=this,$self=this;
+$self["@flag"]="ok";
 return self;
 
 },
@@ -538,11 +538,11 @@ $core.method({
 selector: "tearDown",
 protocol: "running",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._assert_equals_("ok",self["@flag"]);
+$self._assert_equals_("ok",$self["@flag"]);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"tearDown",{},$globals.SUnitAsyncTest)});
@@ -562,7 +562,7 @@ $core.method({
 selector: "testAsyncErrorsAndFailures",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 var suite,runner,result,assertBlock;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -572,22 +572,22 @@ suite=["fakeError", "fakeErrorFailingInTearDown", "fakeFailure", "testPass"]._co
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv(self._class())._selector_(each);
+return $recv($self._class())._selector_(each);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
 //>>excludeEnd("ctx");
 }));
 runner=$recv($globals.TestSuiteRunner)._on_(suite);
-self._timeout_((200));
+$self._timeout_((200));
 result=$recv(runner)._result();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["result"]=1;
 //>>excludeEnd("ctx");
-assertBlock=self._async_((function(){
+assertBlock=$self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$1=self._selectorSetOf_($recv(result)._errors());
+$1=$self._selectorSetOf_($recv(result)._errors());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["selectorSetOf:"]=1;
 //>>excludeEnd("ctx");
@@ -595,12 +595,12 @@ $2=["fakeError"]._asSet();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["asSet"]=1;
 //>>excludeEnd("ctx");
-self._assert_equals_($1,$2);
+$self._assert_equals_($1,$2);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["assert:equals:"]=1;
 //>>excludeEnd("ctx");
-self._assert_equals_(self._selectorSetOf_($recv(result)._failures()),["fakeErrorFailingInTearDown", "fakeFailure"]._asSet());
-return self._finished();
+$self._assert_equals_($self._selectorSetOf_($recv(result)._failures()),["fakeErrorFailingInTearDown", "fakeFailure"]._asSet());
+return $self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
 //>>excludeEnd("ctx");
@@ -638,15 +638,15 @@ $core.method({
 selector: "testAsyncNeedsTimeout",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._should_raise_((function(){
+$self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._async_((function(){
+return $self._async_((function(){
 
 }));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -656,19 +656,19 @@ $ctx2.sendIdx["async:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
 }),$globals.Error);
-self._timeout_((0));
-self._shouldnt_raise_((function(){
+$self._timeout_((0));
+$self._shouldnt_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._async_((function(){
+return $self._async_((function(){
 
 }));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
 //>>excludeEnd("ctx");
 }),$globals.Error);
-self._finished();
+$self._finished();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testAsyncNeedsTimeout",{},$globals.SUnitAsyncTest)});
@@ -688,15 +688,15 @@ $core.method({
 selector: "testFinishedNeedsTimeout",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._should_raise_((function(){
+$self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._finished();
+return $self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["finished"]=1;
 //>>excludeEnd("ctx");
@@ -704,12 +704,12 @@ $ctx2.sendIdx["finished"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
 }),$globals.Error);
-self._timeout_((0));
-self._shouldnt_raise_((function(){
+$self._timeout_((0));
+$self._shouldnt_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._finished();
+return $self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
 //>>excludeEnd("ctx");
@@ -733,27 +733,27 @@ $core.method({
 selector: "testIsAsyncReturnsCorrectValues",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$2;
-$1=self._isAsync();
+$1=$self._isAsync();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["isAsync"]=1;
 //>>excludeEnd("ctx");
-self._deny_($1);
+$self._deny_($1);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["deny:"]=1;
 //>>excludeEnd("ctx");
-self._timeout_((0));
-$2=self._isAsync();
+$self._timeout_((0));
+$2=$self._isAsync();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["isAsync"]=2;
 //>>excludeEnd("ctx");
-self._assert_($2);
-self._finished();
-self._deny_(self._isAsync());
+$self._assert_($2);
+$self._finished();
+$self._deny_($self._isAsync());
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testIsAsyncReturnsCorrectValues",{},$globals.SUnitAsyncTest)});
@@ -773,20 +773,20 @@ $core.method({
 selector: "testPass",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self["@flag"]="bad";
-self._timeout_((10));
-self["@flag"]=$recv(self._async_((function(){
+$self["@flag"]="bad";
+$self._timeout_((10));
+$self["@flag"]=$recv($self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-self._assert_(true);
-self._finished();
-self["@flag"]="ok";
-return self["@flag"];
+$self._assert_(true);
+$self._finished();
+$self["@flag"]="ok";
+return $self["@flag"];
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -810,7 +810,7 @@ $core.method({
 selector: "testTimeouts",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 var suite,runner,result,assertBlock;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -820,31 +820,31 @@ suite=["fakeTimeout", "fakeMultipleTimeoutFailing", "fakeMultipleTimeoutPassing"
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv(self._class())._selector_(each);
+return $recv($self._class())._selector_(each);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
 //>>excludeEnd("ctx");
 }));
 runner=$recv($globals.TestSuiteRunner)._on_(suite);
-self._timeout_((200));
+$self._timeout_((200));
 result=$recv(runner)._result();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["result"]=1;
 //>>excludeEnd("ctx");
-assertBlock=self._async_((function(){
+assertBlock=$self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$1=self._selectorSetOf_($recv(result)._errors());
+$1=$self._selectorSetOf_($recv(result)._errors());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["selectorSetOf:"]=1;
 //>>excludeEnd("ctx");
-self._assert_equals_($1,$recv($globals.Set)._new());
+$self._assert_equals_($1,$recv($globals.Set)._new());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["assert:equals:"]=1;
 //>>excludeEnd("ctx");
-self._assert_equals_(self._selectorSetOf_($recv(result)._failures()),["fakeMultipleTimeoutFailing", "fakeTimeout"]._asSet());
-return self._finished();
+$self._assert_equals_($self._selectorSetOf_($recv(result)._failures()),["fakeMultipleTimeoutFailing", "fakeTimeout"]._asSet());
+return $self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
 //>>excludeEnd("ctx");
@@ -882,31 +882,31 @@ $core.method({
 selector: "testTwoAsyncPassesWithFinishedOnlyOneIsRun",
 protocol: "tests",
 fn: function (){
-var self=this;
+var self=this,$self=this;
 var x;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-self["@flag"]="bad";
-self._timeout_((10));
+$self["@flag"]="bad";
+$self._timeout_((10));
 x=(0);
-$1=self._async_((function(){
+$1=$self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-self._finished();
+$self._finished();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["finished"]=1;
 //>>excludeEnd("ctx");
-self["@flag"]="ok";
-self["@flag"];
+$self["@flag"]="ok";
+$self["@flag"];
 x=$recv(x).__plus((1));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["+"]=1;
 //>>excludeEnd("ctx");
 x;
-return self._assert_equals_(x,(1));
+return $self._assert_equals_(x,(1));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["assert:equals:"]=1;
 //>>excludeEnd("ctx");
@@ -917,20 +917,20 @@ $ctx2.sendIdx["assert:equals:"]=1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["async:"]=1;
 //>>excludeEnd("ctx");
-self["@flag"]=$recv($1)._valueWithTimeout_((0));
+$self["@flag"]=$recv($1)._valueWithTimeout_((0));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["valueWithTimeout:"]=1;
 //>>excludeEnd("ctx");
-self["@flag"]=$recv(self._async_((function(){
+$self["@flag"]=$recv($self._async_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-self._finished();
-self["@flag"]="ok";
-self["@flag"];
+$self._finished();
+$self["@flag"]="ok";
+$self["@flag"];
 x=$recv(x).__plus((1));
 x;
-return self._assert_equals_(x,(1));
+return $self._assert_equals_(x,(1));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
 //>>excludeEnd("ctx");

File diff suppressed because it is too large
+ 159 - 159
src/SUnit.js


Some files were not shown because too many files changed in this diff