Browse Source

Fixes issue with non aliased receivers of inlined sends as shown by
@Herby here: https://github.com/amber-smalltalk/amber/commit/7211ee840888d7925ccaee97ea6d6b422c1e06e0#diff-0d0ec181feb528922777f798621b1aa2L1173

Nicolas Petton 10 years ago
parent
commit
6f3a1c1d42

+ 14 - 12
js/Benchfib.js

@@ -29,18 +29,19 @@ category: '*Benchfib',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$6,$5,$2,$1;
-if(smalltalk.assert(self.__lt((2)))){
+var $2,$5,$4,$7,$6,$3,$1;
+$2=self.__lt((2));
+if(smalltalk.assert($2)){
 $1=(1);
 } else {
-$4=self.__minus((1));
+$5=self.__minus((1));
 $ctx1.sendIdx["-"]=1;
-$3=_st($4)._benchFib();
+$4=_st($5)._benchFib();
 $ctx1.sendIdx["benchFib"]=1;
-$6=self.__minus((2));
-$5=_st($6)._benchFib();
-$2=_st($3).__plus($5);
-$1=_st($2).__plus((1));
+$7=self.__minus((2));
+$6=_st($7)._benchFib();
+$3=_st($4).__plus($6);
+$1=_st($3).__plus((1));
 $ctx1.sendIdx["+"]=1;
 };
 return $1;
@@ -61,7 +62,7 @@ var self=this;
 var size,flags,prime,k,count;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 size=(8190);
 (1)._to_do_(self,(function(iter){
 return smalltalk.withContext(function($ctx2) {
@@ -75,7 +76,8 @@ return _st(flags)._add_(true);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 return (1)._to_do_(size,(function(i){
 return smalltalk.withContext(function($ctx3) {
-if(smalltalk.assert(_st(flags)._at_(i))){
+$1=_st(flags)._at_(i);
+if(smalltalk.assert($1)){
 prime=_st(i).__plus((1));
 $ctx3.sendIdx["+"]=1;
 prime;
@@ -98,8 +100,8 @@ return count;
 }, function($ctx3) {$ctx3.fillBlock({i:i},$ctx2,3)})}));
 }, function($ctx2) {$ctx2.fillBlock({iter:iter},$ctx1,1)})}));
 $ctx1.sendIdx["to:do:"]=1;
-$1=count;
-return $1;
+$2=count;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"benchmark",{size:size,flags:flags,prime:prime,k:k,count:count},smalltalk.Number)})},
 args: [],
 source: "benchmark\x0a\x09\x22Handy bytecode-heavy benchmark\x22\x0a\x09\x22(500000 // time to run) = approx bytecodes per second\x22\x0a\x09\x225000000 // (Time millisecondsToRun: [10 benchmark]) * 1000\x22\x0a\x09\x223059000 on a Mac 8100/100\x22\x0a\x09| size flags prime k count |\x0a\x09size := 8190.\x0a\x091 to: self do:\x0a\x09\x09[:iter |\x0a\x09\x09count := 0.\x0a\x09\x09flags := Array new.\x0a\x09\x09size timesRepeat: [ flags add: true].\x0a\x09\x091 to: size do:\x0a\x09\x09\x09[:i | (flags at: i) ifTrue:\x0a\x09\x09\x09\x09[prime := i+1.\x0a\x09\x09\x09\x09k := i + prime.\x0a\x09\x09\x09\x09[k <= size] whileTrue:\x0a\x09\x09\x09\x09\x09[flags at: k put: false.\x0a\x09\x09\x09\x09\x09k := k + prime].\x0a\x09\x09\x09\x09count := count + 1]]].\x0a\x09^ count",

+ 37 - 24
js/Canvas.js

@@ -627,7 +627,7 @@ fn: function (aString){
 var self=this;
 var result;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$1,$5;
+var $2,$4,$3,$1,$5,$6;
 $2="<span />"._asJQuery();
 $4="&".__comma(aString);
 $ctx1.sendIdx[","]=2;
@@ -635,9 +635,10 @@ $3=_st($4).__comma(";");
 $ctx1.sendIdx[","]=1;
 $1=_st($2)._html_($3);
 result=_st($1)._text();
-if(! smalltalk.assert(_st(_st(result)._size()).__eq((1)))){
-$5="Not an HTML entity: ".__comma(aString);
-self._error_($5);
+$5=_st(_st(result)._size()).__eq((1));
+if(! smalltalk.assert($5)){
+$6="Not an HTML entity: ".__comma(aString);
+self._error_($6);
 };
 self._with_(result);
 return self}, function($ctx1) {$ctx1.fill(self,"entity:",{aString:aString,result:result},smalltalk.HTMLCanvas)})},
@@ -1124,12 +1125,14 @@ fn: function (){
 var self=this;
 function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 smalltalk.HTMLCanvas.superclass.fn.prototype._initialize.apply(_st(self), []);
-if(($receiver = self["@root"]) == nil || $receiver == null){
+$1=self["@root"];
+if(($receiver = $1) == nil || $receiver == null){
 self["@root"]=_st($TagBrush())._fromString_canvas_("div",self);
 self["@root"];
 } else {
-self["@root"];
+$1;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HTMLCanvas)})},
 args: [],
@@ -1704,18 +1707,19 @@ var self=this;
 var clone,caret;
 function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3;
 clone=_st(_st(anElement)._asJQuery())._clone();
 $1=_st($TagBrush())._fromJQuery_canvas_(clone,self);
 $ctx1.sendIdx["fromJQuery:canvas:"]=1;
 self._with_($1);
 caret=_st(clone)._find_("[data-snippet=\x22*\x22]");
-if(smalltalk.assert(_st(_st(caret)._toArray())._isEmpty())){
+$2=_st(_st(caret)._toArray())._isEmpty();
+if(smalltalk.assert($2)){
 caret=clone;
 caret;
 };
-$2=_st($TagBrush())._fromJQuery_canvas_(_st(caret)._removeAttr_("data-snippet"),self);
-return $2;
+$3=_st($TagBrush())._fromJQuery_canvas_(_st(caret)._removeAttr_("data-snippet"),self);
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"snippet:",{anElement:anElement,clone:clone,caret:caret},smalltalk.HTMLCanvas)})},
 args: ["anElement"],
 source: "snippet: anElement\x0a\x09\x22Adds clone of anElement, finds [data-snippet=\x22\x22*\x22\x22] subelement\x0a\x09and returns TagBrush as if that subelement was just added.\x0a\x09\x0a\x09Rarely needed to use directly, use `html foo` dynamically installed method\x0a\x09for a snippet named foo.\x22\x0a\x09\x0a\x09| clone caret |\x0a\x09\x0a\x09clone := anElement asJQuery clone.\x0a\x09self with: (TagBrush fromJQuery: clone canvas: self).\x0a\x09caret := clone find: '[data-snippet=\x22*\x22]'.\x0a\x09caret toArray isEmpty ifTrue: [ caret := clone ].\x0a\x09^TagBrush fromJQuery: (caret removeAttr: 'data-snippet') canvas: self",
@@ -2333,9 +2337,12 @@ fn: function (element){
 var self=this;
 var name;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 name=_st(element)._attr_("data-snippet");
-if(! smalltalk.assert(_st(name).__eq("*"))){
-if(smalltalk.assert(_st("^\x5c*"._asRegexp())._test_(name))){
+$1=_st(name).__eq("*");
+if(! smalltalk.assert($1)){
+$2=_st("^\x5c*"._asRegexp())._test_(name);
+if(smalltalk.assert($2)){
 name=_st(name)._allButFirst();
 name;
 _st(element)._attr_put_("data-snippet","*");
@@ -2415,12 +2422,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@snippets"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@snippets"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@snippets"]=smalltalk.HashedCollection._from_([]);
 $1=self["@snippets"];
 } else {
-$1=self["@snippets"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"snippets",{},smalltalk.HTMLSnippet)})},
@@ -2476,15 +2484,16 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-if(($receiver = self["@current"]) == nil || $receiver == null){
-$1=smalltalk.HTMLSnippet.klass.superclass.fn.prototype._new.apply(_st(self), []);
-_st($1)._initializeFromJQuery_(_st(document)._asJQuery());
-$2=_st($1)._yourself();
-self["@current"]=$2;
+var $1,$2,$3;
+$1=self["@current"];
+if(($receiver = $1) == nil || $receiver == null){
+$2=smalltalk.HTMLSnippet.klass.superclass.fn.prototype._new.apply(_st(self), []);
+_st($2)._initializeFromJQuery_(_st(document)._asJQuery());
+$3=_st($2)._yourself();
+self["@current"]=$3;
 self["@current"];
 } else {
-self["@current"];
+$1;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"ensureCurrent",{},smalltalk.HTMLSnippet.klass)})},
 args: [],
@@ -2501,8 +2510,10 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 smalltalk.HTMLSnippet.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
-if(smalltalk.assert(self._isDOMAvailable())){
+$1=self._isDOMAvailable();
+if(smalltalk.assert($1)){
 self._ensureCurrent();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HTMLSnippet.klass)})},
@@ -3766,7 +3777,9 @@ fn: function (aString){
 var self=this;
 function $HTMLCanvas(){return smalltalk.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st($HTMLCanvas())._isMSIE())){
+var $1;
+$1=_st($HTMLCanvas())._isMSIE();
+if(smalltalk.assert($1)){
 _st(_st(self._element())._styleSheet())._cssText_(aString);
 } else {
 smalltalk.StyleTag.superclass.fn.prototype._with_.apply(_st(self), [aString]);

+ 58 - 42
js/Compiler-AST.js

@@ -282,9 +282,10 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._parent()) == nil || $receiver == null){
-$1=self._parent();
+var $2,$1;
+$2=self._parent();
+if(($receiver = $2) == nil || $receiver == null){
+$1=$2;
 } else {
 var node;
 node=$receiver;
@@ -333,9 +334,10 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._parent()) == nil || $receiver == null){
-$1=self._parent();
+var $2,$1;
+$2=self._parent();
+if(($receiver = $2) == nil || $receiver == null){
+$1=$2;
 } else {
 var node;
 node=$receiver;
@@ -390,12 +392,13 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@nodes"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@nodes"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@nodes"]=_st($Array())._new();
 $1=self["@nodes"];
 } else {
-$1=self["@nodes"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.Node)})},
@@ -467,17 +470,19 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@position"]) == nil || $receiver == null){
-if(($receiver = self._parent()) == nil || $receiver == null){
-$1=self._parent();
+var $2,$3,$1;
+$2=self["@position"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=self._parent();
+if(($receiver = $3) == nil || $receiver == null){
+$1=$3;
 } else {
 var node;
 node=$receiver;
 $1=_st(node)._position();
 };
 } else {
-$1=self["@position"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"position",{},smalltalk.Node)})},
@@ -531,11 +536,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@shouldBeAliased"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@shouldBeAliased"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@shouldBeAliased"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},smalltalk.Node)})},
@@ -569,11 +575,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@shouldBeInlined"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@shouldBeInlined"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@shouldBeInlined"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shouldBeInlined",{},smalltalk.Node)})},
@@ -853,12 +860,13 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@parameters"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@parameters"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@parameters"]=_st($Array())._new();
 $1=self["@parameters"];
 } else {
-$1=self["@parameters"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parameters",{},smalltalk.BlockNode)})},
@@ -1101,11 +1109,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@source"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@source"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self["@source"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.JSStatementNode)})},
@@ -1161,11 +1170,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@arguments"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@arguments"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=[];
 } else {
-$1=self["@arguments"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.MethodNode)})},
@@ -1578,12 +1588,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@arguments"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@arguments"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@arguments"]=[];
 $1=self["@arguments"];
 } else {
-$1=self["@arguments"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.SendNode)})},
@@ -1775,8 +1786,10 @@ category: 'accessing',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 self["@receiver"]=aNode;
-if(smalltalk.assert(_st(aNode)._isNode())){
+$1=_st(aNode)._isNode();
+if(smalltalk.assert($1)){
 _st(aNode)._parent_(self);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{aNode:aNode},smalltalk.SendNode)})},
@@ -1868,11 +1881,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@superSend"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@superSend"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@superSend"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"superSend",{},smalltalk.SendNode)})},
@@ -2036,11 +2050,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@temps"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@temps"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=[];
 } else {
-$1=self["@temps"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"temps",{},smalltalk.SequenceNode)})},
@@ -2263,11 +2278,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@assigned"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@assigned"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@assigned"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"assigned",{},smalltalk.VariableNode)})},

+ 25 - 17
js/Compiler-Core.js

@@ -11,13 +11,15 @@ category: 'accessing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-if(smalltalk.assert(_st(aClass)._isMetaclass())){
-$2=_st(_st(aClass)._instanceClass())._name();
+var $2,$3,$4,$1;
+$2=_st(aClass)._isMetaclass();
+if(smalltalk.assert($2)){
+$3=_st(_st(aClass)._instanceClass())._name();
 $ctx1.sendIdx["name"]=1;
-$1=_st($2).__comma(".klass");
+$1=_st($3).__comma(".klass");
 } else {
-if(smalltalk.assert(_st(aClass)._isNil())){
+$4=_st(aClass)._isNil();
+if(smalltalk.assert($4)){
 $1="nil";
 } else {
 $1=_st(aClass)._name();
@@ -109,8 +111,9 @@ fn: function (aString){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(_st(_st(_st($Smalltalk())._current())._reservedWords())._includes_(aString))){
+var $2,$1;
+$2=_st(_st(_st($Smalltalk())._current())._reservedWords())._includes_(aString);
+if(smalltalk.assert($2)){
 $1=_st(aString).__comma("_");
 } else {
 $1=aString;
@@ -131,11 +134,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@source"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@source"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self["@source"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.AbstractCodeGenerator)})},
@@ -266,11 +270,12 @@ fn: function (){
 var self=this;
 function $InliningCodeGenerator(){return smalltalk.InliningCodeGenerator||(typeof InliningCodeGenerator=="undefined"?nil:InliningCodeGenerator)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@codeGeneratorClass"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@codeGeneratorClass"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=$InliningCodeGenerator();
 } else {
-$1=self["@codeGeneratorClass"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass",{},smalltalk.Compiler)})},
@@ -569,11 +574,13 @@ category: 'compiling',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 _st(_st(_st(aClass)._methodDictionary())._values())._do_displayingProgress_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._install_forClass_category_(_st(each)._source(),aClass,_st(each)._category());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),"Recompiling ".__comma(_st(aClass)._name()));
-if(! smalltalk.assert(_st(aClass)._isMetaclass())){
+$1=_st(aClass)._isMetaclass();
+if(! smalltalk.assert($1)){
 self._recompile_(_st(aClass)._class());
 };
 return self}, function($ctx1) {$ctx1.fill(self,"recompile:",{aClass:aClass},smalltalk.Compiler)})},
@@ -611,11 +618,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@source"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@source"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self["@source"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Compiler)})},

+ 99 - 80
js/Compiler-IR.js

@@ -15,37 +15,38 @@ function $IRVariable(){return smalltalk.IRVariable||(typeof IRVariable=="undefin
 function $AliasVar(){return smalltalk.AliasVar||(typeof AliasVar=="undefined"?nil:AliasVar)}
 function $IRAssignment(){return smalltalk.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$4,$6,$7,$9,$10,$11,$12,$8,$13;
-if(smalltalk.assert(_st(aNode)._isImmutable())){
-$1=self._visit_(aNode);
+var $1,$2,$3,$4,$6,$5,$7,$8,$10,$11,$12,$13,$9,$14;
+$1=_st(aNode)._isImmutable();
+if(smalltalk.assert($1)){
+$2=self._visit_(aNode);
 $ctx1.sendIdx["visit:"]=1;
-return $1;
+return $2;
 };
-$2=_st($IRVariable())._new();
+$3=_st($IRVariable())._new();
 $ctx1.sendIdx["new"]=1;
-$3=$2;
-$5=_st($AliasVar())._new();
+$4=$3;
+$6=_st($AliasVar())._new();
 $ctx1.sendIdx["new"]=2;
-$4=_st($5)._name_("$".__comma(self._nextAlias()));
-_st($3)._variable_($4);
-$6=_st($2)._yourself();
+$5=_st($6)._name_("$".__comma(self._nextAlias()));
+_st($4)._variable_($5);
+$7=_st($3)._yourself();
 $ctx1.sendIdx["yourself"]=1;
-variable=$6;
-$7=self._sequence();
-$9=_st($IRAssignment())._new();
-_st($9)._add_(variable);
+variable=$7;
+$8=self._sequence();
+$10=_st($IRAssignment())._new();
+_st($10)._add_(variable);
 $ctx1.sendIdx["add:"]=2;
-$10=$9;
-$11=self._visit_(aNode);
-_st($10)._add_($11);
+$11=$10;
+$12=self._visit_(aNode);
+_st($11)._add_($12);
 $ctx1.sendIdx["add:"]=3;
-$12=_st($9)._yourself();
-$8=$12;
-_st($7)._add_($8);
+$13=_st($10)._yourself();
+$9=$13;
+_st($8)._add_($9);
 $ctx1.sendIdx["add:"]=1;
 _st(_st(self._method())._internalVariables())._add_(variable);
-$13=variable;
-return $13;
+$14=variable;
+return $14;
 }, function($ctx1) {$ctx1.fill(self,"alias:",{aNode:aNode,variable:variable},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "alias: aNode\x0a\x09| variable |\x0a\x0a\x09aNode isImmutable ifTrue: [ ^ self visit: aNode ].\x0a\x0a\x09variable := IRVariable new\x0a\x09\x09variable: (AliasVar new name: '$', self nextAlias);\x0a\x09\x09yourself.\x0a\x0a\x09self sequence add: (IRAssignment new\x0a\x09\x09add: variable;\x0a\x09\x09add: (self visit: aNode);\x0a\x09\x09yourself).\x0a\x0a\x09self method internalVariables add: variable.\x0a\x0a\x09^ variable",
@@ -63,11 +64,12 @@ var self=this;
 var threshold,result;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$4,$3,$5;
 threshold=(0);
 _st(aCollection)._withIndexDo_((function(each,i){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(each)._subtreeNeedsAliasing())){
+$1=_st(each)._subtreeNeedsAliasing();
+if(smalltalk.assert($1)){
 threshold=i;
 return threshold;
 };
@@ -76,16 +78,17 @@ $ctx1.sendIdx["withIndexDo:"]=1;
 result=_st($OrderedCollection())._new();
 _st(aCollection)._withIndexDo_((function(each,i){
 return smalltalk.withContext(function($ctx2) {
-$1=result;
-if(smalltalk.assert(_st(i).__lt_eq(threshold))){
-$2=self._alias_(each);
+$2=result;
+$4=_st(i).__lt_eq(threshold);
+if(smalltalk.assert($4)){
+$3=self._alias_(each);
 } else {
-$2=self._visit_(each);
+$3=self._visit_(each);
 };
-return _st($1)._add_($2);
+return _st($2)._add_($3);
 }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,3)})}));
-$3=result;
-return $3;
+$5=result;
+return $5;
 }, function($ctx1) {$ctx1.fill(self,"aliasTemporally:",{aCollection:aCollection,threshold:threshold,result:result},smalltalk.IRASTTranslator)})},
 args: ["aCollection"],
 source: "aliasTemporally: aCollection\x0a\x09\x22https://github.com/NicolasPetton/amber/issues/296\x0a\x09\x0a\x09If a node is aliased, all preceding ones are aliased as well.\x0a\x09The tree is iterated twice. First we get the aliasing dependency,\x0a\x09then the aliasing itself is done\x22\x0a\x0a\x09| threshold result |\x0a\x09threshold := 0.\x0a\x09\x0a\x09aCollection withIndexDo: [ :each :i |\x0a\x09\x09each subtreeNeedsAliasing\x0a\x09\x09\x09ifTrue: [ threshold := i ]].\x0a\x0a\x09result := OrderedCollection new.\x0a\x09aCollection withIndexDo: [ :each :i |\x0a\x09\x09result add: (i <= threshold\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ])].\x0a\x0a\x09^result",
@@ -135,16 +138,17 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@nextAlias"]) == nil || $receiver == null){
+var $1,$2;
+$1=self["@nextAlias"];
+if(($receiver = $1) == nil || $receiver == null){
 self["@nextAlias"]=(0);
 self["@nextAlias"];
 } else {
-self["@nextAlias"];
+$1;
 };
 self["@nextAlias"]=_st(self["@nextAlias"]).__plus((1));
-$1=_st(self["@nextAlias"])._asString();
-return $1;
+$2=_st(self["@nextAlias"])._asString();
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"nextAlias",{},smalltalk.IRASTTranslator)})},
 args: [],
 source: "nextAlias\x0a\x09nextAlias ifNil: [ nextAlias := 0 ].\x0a\x09nextAlias := nextAlias + 1.\x0a\x09^ nextAlias asString",
@@ -628,8 +632,9 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(_st(aNode)._shouldBeAliased())){
+var $2,$1;
+$2=_st(aNode)._shouldBeAliased();
+if(smalltalk.assert($2)){
 $1=self._alias_(aNode);
 } else {
 $1=self._visit_(aNode);
@@ -653,8 +658,9 @@ var return_;
 function $IRNonLocalReturn(){return smalltalk.IRNonLocalReturn||(typeof IRNonLocalReturn=="undefined"?nil:IRNonLocalReturn)}
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(_st(aNode)._nonLocalReturn())){
+var $1,$2;
+$1=_st(aNode)._nonLocalReturn();
+if(smalltalk.assert($1)){
 return_=_st($IRNonLocalReturn())._new();
 $ctx1.sendIdx["new"]=1;
 } else {
@@ -665,8 +671,8 @@ _st(_st(aNode)._nodes())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(return_)._add_(self._alias_(each));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
-$1=return_;
-return $1;
+$2=return_;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"visitReturnNode:",{aNode:aNode,return_:return_},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "visitReturnNode: aNode\x0a\x09| return |\x0a\x09return := aNode nonLocalReturn\x0a\x09\x09ifTrue: [ IRNonLocalReturn new ]\x0a\x09\x09ifFalse: [ IRReturn new ].\x0a\x09return scope: aNode scope.\x0a\x09aNode nodes do: [ :each |\x0a\x09\x09return add: (self alias: each) ].\x0a\x09^ return",
@@ -684,12 +690,13 @@ var self=this;
 var send,all,receiver,arguments;
 function $IRSend(){return smalltalk.IRSend||(typeof IRSend=="undefined"?nil:IRSend)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$3,$4;
 send=_st($IRSend())._new();
 $1=send;
 _st($1)._selector_(_st(aNode)._selector());
 $2=_st($1)._index_(_st(aNode)._index());
-if(smalltalk.assert(_st(aNode)._superSend())){
+$3=_st(aNode)._superSend();
+if(smalltalk.assert($3)){
 _st(send)._classSend_(_st(self._theClass())._superclass());
 };
 all=self._aliasTemporally_(_st([_st(aNode)._receiver()]).__comma(_st(aNode)._arguments()));
@@ -701,8 +708,8 @@ _st(arguments)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(send)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$3=send;
-return $3;
+$4=send;
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode,send:send,all:all,receiver:receiver,arguments:arguments},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "visitSendNode: aNode\x0a\x09| send all receiver arguments |\x0a\x09send := IRSend new.\x0a\x09send\x0a\x09\x09selector: aNode selector;\x0a\x09\x09index: aNode index.\x0a\x09aNode superSend ifTrue: [ send classSend: self theClass superclass ].\x0a\x09\x0a\x09all := self aliasTemporally: { aNode receiver }, aNode arguments.\x0a\x09receiver := all first.\x0a\x09arguments := all allButFirst.\x0a\x0a\x09send add: receiver.\x0a\x09arguments do: [ :each | send add: each ].\x0a\x0a\x09^ send",
@@ -719,7 +726,7 @@ fn: function (aNode){
 var self=this;
 function $IRSequence(){return smalltalk.IRSequence||(typeof IRSequence=="undefined"?nil:IRSequence)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 $1=self._withSequence_do_(_st($IRSequence())._new(),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(aNode)._nodes())._do_((function(each){
@@ -727,7 +734,8 @@ var instruction;
 return smalltalk.withContext(function($ctx3) {
 instruction=self._visitOrAlias_(each);
 instruction;
-if(! smalltalk.assert(_st(instruction)._isVariable())){
+$2=_st(instruction)._isVariable();
+if(! smalltalk.assert($2)){
 return _st(self._sequence())._add_(instruction);
 };
 }, function($ctx3) {$ctx3.fillBlock({each:each,instruction:instruction},$ctx2,2)})}));
@@ -872,12 +880,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@instructions"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@instructions"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@instructions"]=_st($OrderedCollection())._new();
 $1=self["@instructions"];
 } else {
-$1=self["@instructions"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"instructions",{},smalltalk.IRInstruction)})},
@@ -1177,9 +1186,10 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._parent()) == nil || $receiver == null){
-$1=self._parent();
+var $2,$1;
+$2=self._parent();
+if(($receiver = $2) == nil || $receiver == null){
+$1=$2;
 } else {
 var node;
 node=$receiver;
@@ -1325,11 +1335,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@arguments"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@arguments"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=[];
 } else {
-$1=self["@arguments"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.IRClosureInstruction)})},
@@ -1537,12 +1548,13 @@ fn: function (){
 var self=this;
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@internalVariables"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@internalVariables"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@internalVariables"]=_st($Set())._new();
 $1=self["@internalVariables"];
 } else {
-$1=self["@internalVariables"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"internalVariables",{},smalltalk.IRMethod)})},
@@ -1884,11 +1896,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@scope"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@scope"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=_st(self._parent())._scope();
 } else {
-$1=self["@scope"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"scope",{},smalltalk.IRReturn)})},
@@ -3059,7 +3072,7 @@ category: 'visiting',
 fn: function (anIRMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$8,$7,$9,$12,$11,$10,$13;
+var $1,$2,$3,$4,$5,$6,$8,$7,$9,$12,$11,$10,$13,$14;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutMethodDeclaration_with_(anIRMethod,(function(){
@@ -3101,9 +3114,10 @@ return _st(_st(each)._variable())._alias();
 }, function($ctx5) {$ctx5.fillBlock({each:each},$ctx4,7)})}));
 _st($9)._nextPutVars_($10);
 };
-if(smalltalk.assert(_st(_st(anIRMethod)._scope())._hasNonLocalReturn())){
-$13=self._stream();
-return _st($13)._nextPutNonLocalReturnHandlingWith_((function(){
+$13=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
+if(smalltalk.assert($13)){
+$14=self._stream();
+return _st($14)._nextPutNonLocalReturnHandlingWith_((function(){
 return smalltalk.withContext(function($ctx5) {
 return smalltalk.IRJSTranslator.superclass.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
 $ctx5.sendIdx["visitIRMethod:"]=1;
@@ -3168,16 +3182,19 @@ fn: function (anIRSend){
 var self=this;
 var sends;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 sends=_st(_st(_st(_st(anIRSend)._method())._sendIndexes())._at_(_st(anIRSend)._selector()))._size();
-if(($receiver = _st(anIRSend)._classSend()) == nil || $receiver == null){
+$1=_st(anIRSend)._classSend();
+if(($receiver = $1) == nil || $receiver == null){
 self._visitSend_(anIRSend);
 } else {
 self._visitSuperSend_(anIRSend);
 };
-if(smalltalk.assert(_st(_st(sends).__gt((1)))._and_((function(){
+$2=_st(_st(sends).__gt((1)))._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(anIRSend)._index()).__lt(sends);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})})))){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
+if(smalltalk.assert($2)){
 _st(self._stream())._nextPutSendIndexFor_(anIRSend);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRSend:",{anIRSend:anIRSend,sends:sends},smalltalk.IRJSTranslator)})},
@@ -3306,19 +3323,20 @@ category: 'visiting',
 fn: function (anIRInstruction){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
-if(! smalltalk.assert(_st(anIRInstruction)._needsBoxingAsReceiver())){
-$1=self._visit_(anIRInstruction);
+var $1,$2,$3,$4;
+$1=_st(anIRInstruction)._needsBoxingAsReceiver();
+if(! smalltalk.assert($1)){
+$2=self._visit_(anIRInstruction);
 $ctx1.sendIdx["visit:"]=1;
-return $1;
+return $2;
 };
-$2=self._stream();
+$3=self._stream();
 $ctx1.sendIdx["stream"]=1;
-_st($2)._nextPutAll_("_st(");
+_st($3)._nextPutAll_("_st(");
 $ctx1.sendIdx["nextPutAll:"]=1;
 self._visit_(anIRInstruction);
-$3=self._stream();
-_st($3)._nextPutAll_(")");
+$4=self._stream();
+_st($4)._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"visitReceiver:",{anIRInstruction:anIRInstruction},smalltalk.IRJSTranslator)})},
 args: ["anIRInstruction"],
 source: "visitReceiver: anIRInstruction\x0a\x09anIRInstruction needsBoxingAsReceiver ifFalse: [ ^ self visit: anIRInstruction ].\x0a\x09\x0a\x09self stream nextPutAll: '_st('.\x0a\x09self visit: anIRInstruction.\x0a\x09self stream nextPutAll: ')'",
@@ -4141,8 +4159,9 @@ fn: function (){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(_st(_st(_st($Smalltalk())._current())._reservedWords())._includes_(self))){
+var $2,$1;
+$2=_st(_st(_st($Smalltalk())._current())._reservedWords())._includes_(self);
+if(smalltalk.assert($2)){
 $1=self.__comma("_");
 } else {
 $1=self;

+ 26 - 18
js/Compiler-Inlining.js

@@ -472,8 +472,9 @@ category: 'visiting',
 fn: function (anIRAssignment){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._shouldInlineAssignment_(anIRAssignment))){
+var $2,$1;
+$2=self._shouldInlineAssignment_(anIRAssignment);
+if(smalltalk.assert($2)){
 $1=_st(self._assignmentInliner())._inlineAssignment_(anIRAssignment);
 } else {
 $1=smalltalk.IRInliner.superclass.fn.prototype._visitIRAssignment_.apply(_st(self), [anIRAssignment]);
@@ -512,8 +513,9 @@ category: 'visiting',
 fn: function (anIRReturn){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._shouldInlineReturn_(anIRReturn))){
+var $2,$1;
+$2=self._shouldInlineReturn_(anIRReturn);
+if(smalltalk.assert($2)){
 $1=_st(self._returnInliner())._inlineReturn_(anIRReturn);
 } else {
 $1=smalltalk.IRInliner.superclass.fn.prototype._visitIRReturn_.apply(_st(self), [anIRReturn]);
@@ -534,8 +536,9 @@ category: 'visiting',
 fn: function (anIRSend){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._shouldInlineSend_(anIRSend))){
+var $2,$1;
+$2=self._shouldInlineSend_(anIRSend);
+if(smalltalk.assert($2)){
 $1=_st(self._sendInliner())._inlineSend_(anIRSend);
 } else {
 $1=smalltalk.IRInliner.superclass.fn.prototype._visitIRSend_.apply(_st(self), [anIRSend]);
@@ -1224,24 +1227,26 @@ fn: function (inlinedSend,anIRInstruction){
 var self=this;
 var inlinedClosure;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$5;
-if(! smalltalk.assert(_st(anIRInstruction)._isClosure())){
+var $1,$2,$5,$4,$3,$6,$7;
+$1=_st(anIRInstruction)._isClosure();
+if(! smalltalk.assert($1)){
 self._inliningError_("Message argument should be a block");
 $ctx1.sendIdx["inliningError:"]=1;
 };
-if(! smalltalk.assert(_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0)))){
+$2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
+if(! smalltalk.assert($2)){
 self._inliningError_("Inlined block should have zero argument");
 };
 inlinedClosure=_st(self._translator())._visit_(self._inlineClosure_(anIRInstruction));
-$3=self._send();
+$5=self._send();
 $ctx1.sendIdx["send"]=1;
-$2=_st($3)._instructions();
-$1=_st($2)._first();
-_st(inlinedSend)._add_($1);
+$4=_st($5)._instructions();
+$3=_st($4)._first();
+_st(inlinedSend)._add_($3);
 $ctx1.sendIdx["add:"]=1;
-$4=_st(inlinedSend)._add_(inlinedClosure);
-$5=self._send();
-_st($5)._replaceWith_(inlinedSend);
+$6=_st(inlinedSend)._add_(inlinedClosure);
+$7=self._send();
+_st($7)._replaceWith_(inlinedSend);
 return inlinedSend;
 }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,inlinedClosure:inlinedClosure},smalltalk.IRSendInliner)})},
 args: ["inlinedSend", "anIRInstruction"],
@@ -1429,14 +1434,17 @@ category: 'accessing',
 fn: function (anIRInstruction){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 var $early={};
 try {
-if(! smalltalk.assert(_st(self._inlinedSelectors())._includes_(_st(anIRInstruction)._selector()))){
+$1=_st(self._inlinedSelectors())._includes_(_st(anIRInstruction)._selector());
+if(! smalltalk.assert($1)){
 return false;
 };
 _st(_st(_st(anIRInstruction)._instructions())._allButFirst())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(! smalltalk.assert(_st(each)._isClosure())){
+$2=_st(each)._isClosure();
+if(! smalltalk.assert($2)){
 throw $early=[false];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));

+ 147 - 102
js/Compiler-Interpreter.js

@@ -238,7 +238,7 @@ referencedClasses: []
 smalltalk.AIBlockClosure.klass);
 
 
-smalltalk.addClass('AIContext', smalltalk.MethodContext, ['outerContext', 'innerContext', 'pc', 'locals', 'selector', 'index', 'sendIndexes', 'ast', 'interpreter'], 'Compiler-Interpreter');
+smalltalk.addClass('AIContext', smalltalk.MethodContext, ['outerContext', 'innerContext', 'pc', 'locals', 'selector', 'index', 'sendIndexes', 'evaluatedSelector', 'ast', 'interpreter'], 'Compiler-Interpreter');
 smalltalk.AIContext.comment="I am like a `MethodContext`, used by the `ASTInterpreter`.\x0aUnlike a `MethodContext`, my instances are not read-only.\x0a\x0aWhen debugging, my instances are created by copying the current `MethodContext` (thisContext)";
 smalltalk.addMethod(
 smalltalk.method({
@@ -268,24 +268,27 @@ category: 'interpreting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-if(smalltalk.assert(self._isBlockContext())){
-if(($receiver = self._outerContext()) == nil || $receiver == null){
-$1=self._outerContext();
+var $1,$3,$2,$4,$5;
+$1=self._isBlockContext();
+if(smalltalk.assert($1)){
+$3=self._outerContext();
+if(($receiver = $3) == nil || $receiver == null){
+$2=$3;
 } else {
 var context;
 context=$receiver;
-$1=_st(context)._ast();
+$2=_st(context)._ast();
 };
-return $1;
+return $2;
 };
-if(($receiver = self["@ast"]) == nil || $receiver == null){
+$4=self["@ast"];
+if(($receiver = $4) == nil || $receiver == null){
 self._initializeAST();
 } else {
-self["@ast"];
+$4;
 };
-$2=self["@ast"];
-return $2;
+$5=self["@ast"];
+return $5;
 }, function($ctx1) {$ctx1.fill(self,"ast",{},smalltalk.AIContext)})},
 args: [],
 source: "ast\x0a\x09self isBlockContext ifTrue: [ \x0a\x09\x09^ self outerContext ifNotNil: [ :context | context ast ] ].\x0a\x0a\x09ast ifNil: [ self initializeAST ].\x0a\x09^ ast",
@@ -296,16 +299,51 @@ smalltalk.AIContext);
 
 smalltalk.addMethod(
 smalltalk.method({
-selector: "index",
+selector: "evaluatedSelector",
 category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
-if(($receiver = self["@index"]) == nil || $receiver == null){
+$1=self["@evaluatedSelector"];
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"evaluatedSelector",{},smalltalk.AIContext)})},
+args: [],
+source: "evaluatedSelector\x0a\x09^ evaluatedSelector",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.AIContext);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "evaluatedSelector:",
+category: 'accessing',
+fn: function (aString){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+self["@evaluatedSelector"]=aString;
+return self}, function($ctx1) {$ctx1.fill(self,"evaluatedSelector:",{aString:aString},smalltalk.AIContext)})},
+args: ["aString"],
+source: "evaluatedSelector: aString\x0a\x09evaluatedSelector := aString",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.AIContext);
+
+smalltalk.addMethod(
+smalltalk.method({
+selector: "index",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $2,$1;
+$2=self["@index"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=(0);
 } else {
-$1=self["@index"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.AIContext)})},
@@ -363,7 +401,8 @@ category: 'initialization',
 fn: function (aMethodContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$3,$6,$7;
+var $1,$2,$3,$5,$6,$4,$7,$8;
+self._evaluatedSelector_(_st(aMethodContext)._evaluatedSelector());
 self._index_(_st(aMethodContext)._index());
 self._sendIndexes_(_st(aMethodContext)._sendIndexes());
 self._receiver_(_st(aMethodContext)._receiver());
@@ -375,26 +414,27 @@ $2;
 } else {
 var outer;
 outer=$receiver;
-if(($receiver = _st(outer)._methodContext()) == nil || $receiver == null){
-_st(outer)._methodContext();
+$3=_st(outer)._methodContext();
+if(($receiver = $3) == nil || $receiver == null){
+$3;
 } else {
-$4=self._class();
-$5=_st(aMethodContext)._outerContext();
-$3=_st($4)._fromMethodContext_($5);
-self._outerContext_($3);
+$5=self._class();
+$6=_st(aMethodContext)._outerContext();
+$4=_st($5)._fromMethodContext_($6);
+self._outerContext_($4);
 };
-$6=_st(aMethodContext)._locals();
+$7=_st(aMethodContext)._locals();
 $ctx1.sendIdx["locals"]=1;
-_st($6)._keysAndValuesDo_((function(key,value){
+_st($7)._keysAndValuesDo_((function(key,value){
 return smalltalk.withContext(function($ctx2) {
-$7=self._locals();
-return _st($7)._at_put_(key,value);
+$8=self._locals();
+return _st($8)._at_put_(key,value);
 }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,3)})}));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethodContext:",{aMethodContext:aMethodContext},smalltalk.AIContext)})},
 args: ["aMethodContext"],
-source: "initializeFromMethodContext: aMethodContext\x0a\x0a\x09self\x0a\x09\x09index: aMethodContext index;\x0a\x09\x09sendIndexes: aMethodContext sendIndexes;\x0a\x09\x09receiver: aMethodContext receiver;\x0a\x09\x09selector: aMethodContext selector.\x0a\x09\x09\x0a\x09aMethodContext outerContext ifNotNil: [ :outer |\x0a\x09\x09\x22If the method context is nil, the block was defined in JS, so ignore it\x22\x0a\x09\x09outer methodContext ifNotNil: [\x0a\x09\x09\x09self outerContext: (self class fromMethodContext: aMethodContext outerContext) ].\x0a\x09\x09\x09aMethodContext locals keysAndValuesDo: [ :key :value |\x0a\x09\x09\x09\x09self locals at: key put: value ] ]",
-messageSends: ["index:", "index", "sendIndexes:", "sendIndexes", "receiver:", "receiver", "selector:", "selector", "ifNotNil:", "outerContext", "methodContext", "outerContext:", "fromMethodContext:", "class", "keysAndValuesDo:", "locals", "at:put:"],
+source: "initializeFromMethodContext: aMethodContext\x0a\x0a\x09self\x0a\x09\x09evaluatedSelector: aMethodContext evaluatedSelector;\x0a\x09\x09index: aMethodContext index;\x0a\x09\x09sendIndexes: aMethodContext sendIndexes;\x0a\x09\x09receiver: aMethodContext receiver;\x0a\x09\x09selector: aMethodContext selector.\x0a\x09\x09\x0a\x09aMethodContext outerContext ifNotNil: [ :outer |\x0a\x09\x09\x22If the method context is nil, the block was defined in JS, so ignore it\x22\x0a\x09\x09outer methodContext ifNotNil: [\x0a\x09\x09\x09self outerContext: (self class fromMethodContext: aMethodContext outerContext) ].\x0a\x09\x09\x09aMethodContext locals keysAndValuesDo: [ :key :value |\x0a\x09\x09\x09\x09self locals at: key put: value ] ]",
+messageSends: ["evaluatedSelector:", "evaluatedSelector", "index:", "index", "sendIndexes:", "sendIndexes", "receiver:", "receiver", "selector:", "selector", "ifNotNil:", "outerContext", "methodContext", "outerContext:", "fromMethodContext:", "class", "keysAndValuesDo:", "locals", "at:put:"],
 referencedClasses: []
 }),
 smalltalk.AIContext);
@@ -407,27 +447,21 @@ fn: function (){
 var self=this;
 function $ASTInterpreter(){return smalltalk.ASTInterpreter||(typeof ASTInterpreter=="undefined"?nil:ASTInterpreter)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$7,$6,$3;
+var $1,$2,$3;
 $1=_st($ASTInterpreter())._new();
 _st($1)._context_(self);
 $2=_st($1)._yourself();
 self["@interpreter"]=$2;
-$5=self._innerContext();
-$ctx1.sendIdx["innerContext"]=1;
-$4=_st($5)._notNil();
-$3=_st($4)._and_((function(){
-return smalltalk.withContext(function($ctx2) {
-$7=self._innerContext();
-$6=_st($7)._isBlockContext();
-return _st($6)._not();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-if(smalltalk.assert($3)){
+$3=self._innerContext();
+if(($receiver = $3) == nil || $receiver == null){
+$3;
+} else {
 self._setupInterpreter_(self["@interpreter"]);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"initializeInterpreter",{},smalltalk.AIContext)})},
 args: [],
-source: "initializeInterpreter\x0a\x09interpreter := ASTInterpreter new\x0a\x09\x09context: self;\x0a\x09\x09yourself.\x0a\x09\x0a\x09(self innerContext notNil and: [ \x0a\x09\x09self innerContext isBlockContext not ]) ifTrue: [\x0a\x09\x09\x09self setupInterpreter: interpreter ]",
-messageSends: ["context:", "new", "yourself", "ifTrue:", "and:", "notNil", "innerContext", "not", "isBlockContext", "setupInterpreter:"],
+source: "initializeInterpreter\x0a\x09interpreter := ASTInterpreter new\x0a\x09\x09context: self;\x0a\x09\x09yourself.\x0a\x09\x0a\x09self innerContext ifNotNil: [\x0a\x09\x09self setupInterpreter: interpreter ]",
+messageSends: ["context:", "new", "yourself", "ifNotNil:", "innerContext", "setupInterpreter:"],
 referencedClasses: ["ASTInterpreter"]
 }),
 smalltalk.AIContext);
@@ -491,14 +525,15 @@ category: 'interpreting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@interpreter"]) == nil || $receiver == null){
+var $1,$2;
+$1=self["@interpreter"];
+if(($receiver = $1) == nil || $receiver == null){
 self._initializeInterpreter();
 } else {
-self["@interpreter"];
+$1;
 };
-$1=self["@interpreter"];
-return $1;
+$2=self["@interpreter"];
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"interpreter",{},smalltalk.AIContext)})},
 args: [],
 source: "interpreter\x0a\x09interpreter ifNil: [ self initializeInterpreter ].\x0a\x09^ interpreter",
@@ -530,11 +565,12 @@ category: 'accessing',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 $1=_st(self._locals())._at_ifAbsent_(aString,(function(){
 return smalltalk.withContext(function($ctx2) {
-if(($receiver = self._outerContext()) == nil || $receiver == null){
-return self._outerContext();
+$2=self._outerContext();
+if(($receiver = $2) == nil || $receiver == null){
+return $2;
 } else {
 var context;
 context=$receiver;
@@ -557,10 +593,11 @@ category: 'accessing',
 fn: function (aString,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 $1=_st(self._locals())._at_ifAbsent_(aString,(function(){
 return smalltalk.withContext(function($ctx2) {
-if(($receiver = self._outerContext()) == nil || $receiver == null){
+$2=self._outerContext();
+if(($receiver = $2) == nil || $receiver == null){
 return _st(aBlock)._value();
 } else {
 var context;
@@ -600,14 +637,15 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@locals"]) == nil || $receiver == null){
+var $1,$2;
+$1=self["@locals"];
+if(($receiver = $1) == nil || $receiver == null){
 self._initializeLocals();
 } else {
-self["@locals"];
+$1;
 };
-$1=self["@locals"];
-return $1;
+$2=self["@locals"];
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"locals",{},smalltalk.AIContext)})},
 args: [],
 source: "locals\x0a\x09locals ifNil: [ self initializeLocals ].\x0a\x09\x0a\x09^ locals",
@@ -799,11 +837,12 @@ fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@sendIndexes"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@sendIndexes"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=_st($Dictionary())._new();
 } else {
-$1=self["@sendIndexes"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"sendIndexes",{},smalltalk.AIContext)})},
@@ -839,34 +878,30 @@ var self=this;
 var currentNode;
 function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$8,$7,$6,$10,$9;
+var $1,$2,$5,$4,$3,$7,$6;
 $1=_st($ASTPCNodeVisitor())._new();
-$2=$1;
-$4=self._innerContext();
-$ctx1.sendIdx["innerContext"]=1;
-$3=_st($4)._selector();
-_st($2)._selector_($3);
+_st($1)._selector_(self._evaluatedSelector());
 _st($1)._context_(self);
 _st($1)._visit_(self._ast());
-$5=_st($1)._currentNode();
-currentNode=$5;
+$2=_st($1)._currentNode();
+currentNode=$2;
 _st(anInterpreter)._node_(currentNode);
-$8=self._innerContext();
-$ctx1.sendIdx["innerContext"]=2;
-$7=_st($8)._arguments();
-$6=_st($7)._reversed();
-_st($6)._do_((function(each){
+$5=self._innerContext();
+$ctx1.sendIdx["innerContext"]=1;
+$4=_st($5)._arguments();
+$3=_st($4)._reversed();
+_st($3)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(anInterpreter)._push_(each);
 $ctx2.sendIdx["push:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$10=self._innerContext();
-$9=_st($10)._receiver();
-_st(anInterpreter)._push_($9);
+$7=self._innerContext();
+$6=_st($7)._receiver();
+_st(anInterpreter)._push_($6);
 return self}, function($ctx1) {$ctx1.fill(self,"setupInterpreter:",{anInterpreter:anInterpreter,currentNode:currentNode},smalltalk.AIContext)})},
 args: ["anInterpreter"],
-source: "setupInterpreter: anInterpreter\x0a\x09| currentNode |\x0a\x09\x0a\x09\x22Retrieve the current node\x22\x0a\x09currentNode := ASTPCNodeVisitor new\x0a\x09\x09\x09selector: self innerContext selector;\x0a\x09\x09\x09context: self;\x0a\x09\x09\x09visit: self ast;\x0a\x09\x09\x09currentNode.\x0a\x09\x0a\x09anInterpreter node: currentNode.\x0a\x0a\x09\x22Push the send args and receiver to the interpreter stack\x22\x09\x0a\x09self innerContext arguments reversed do: [ :each | \x0a\x09\x09anInterpreter push: each ].\x0a\x09\x09\x0a\x09anInterpreter push: (self innerContext receiver)",
-messageSends: ["selector:", "new", "selector", "innerContext", "context:", "visit:", "ast", "currentNode", "node:", "do:", "reversed", "arguments", "push:", "receiver"],
+source: "setupInterpreter: anInterpreter\x0a\x09| currentNode |\x0a\x09\x0a\x09\x22Retrieve the current node\x22\x0a\x09currentNode := ASTPCNodeVisitor new\x0a\x09\x09\x09selector: self evaluatedSelector;\x0a\x09\x09\x09context: self;\x0a\x09\x09\x09visit: self ast;\x0a\x09\x09\x09currentNode.\x0a\x09\x0a\x09anInterpreter node: currentNode.\x0a\x0a\x09\x22Push the send args and receiver to the interpreter stack\x22\x09\x0a\x09self innerContext arguments reversed do: [ :each | \x0a\x09\x09anInterpreter push: each ].\x0a\x09\x09\x0a\x09anInterpreter push: (self innerContext receiver)",
+messageSends: ["selector:", "new", "evaluatedSelector", "context:", "visit:", "ast", "currentNode", "node:", "do:", "reversed", "arguments", "innerContext", "push:", "receiver"],
 referencedClasses: ["ASTPCNodeVisitor"]
 }),
 smalltalk.AIContext);
@@ -1037,12 +1072,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@interpreter"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@interpreter"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@interpreter"]=_st(self._defaultInterpreterClass())._new();
 $1=self["@interpreter"];
 } else {
-$1=self["@interpreter"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"interpreter",{},smalltalk.ASTDebugger)})},
@@ -1201,18 +1237,19 @@ category: 'private',
 fn: function (aNode,anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$5;
-if(smalltalk.assert(_st(_st(aNode)._binding())._isInstanceVar())){
-$2=self._context();
+var $1,$3,$2,$4,$5,$6;
+$1=_st(_st(aNode)._binding())._isInstanceVar();
+if(smalltalk.assert($1)){
+$3=self._context();
 $ctx1.sendIdx["context"]=1;
-$1=_st($2)._receiver();
-$3=_st(aNode)._value();
+$2=_st($3)._receiver();
+$4=_st(aNode)._value();
 $ctx1.sendIdx["value"]=1;
-_st($1)._instVarAt_put_($3,anObject);
+_st($2)._instVarAt_put_($4,anObject);
 } else {
-$4=self._context();
-$5=_st(aNode)._value();
-_st($4)._localAt_put_($5,anObject);
+$5=self._context();
+$6=_st(aNode)._value();
+_st($5)._localAt_put_($6,anObject);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject},smalltalk.ASTInterpreter)})},
 args: ["aNode", "anObject"],
@@ -1335,11 +1372,12 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@returned"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@returned"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@returned"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"hasReturned",{},smalltalk.ASTInterpreter)})},
@@ -1590,8 +1628,9 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._hasReturned())){
+var $2,$1;
+$2=self._hasReturned();
+if(smalltalk.assert($2)){
 $1=self._returnValue();
 } else {
 $1=_st(self._context())._receiver();
@@ -1735,12 +1774,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@stack"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@stack"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@stack"]=_st($OrderedCollection())._new();
 $1=self["@stack"];
 } else {
-$1=self["@stack"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"stack",{},smalltalk.ASTInterpreter)})},
@@ -1800,7 +1840,9 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(self._hasReturned())){
+var $1;
+$1=self._hasReturned();
+if(! smalltalk.assert($1)){
 smalltalk.ASTInterpreter.superclass.fn.prototype._visit_.apply(_st(self), [aNode]);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"visit:",{aNode:aNode},smalltalk.ASTInterpreter)})},
@@ -1962,6 +2004,7 @@ fn: function (aNode){
 var self=this;
 var receiver,args,message,result;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 args=_st(_st(aNode)._arguments())._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._pop();
@@ -1970,10 +2013,11 @@ $ctx2.sendIdx["pop"]=1;
 receiver=self._pop();
 message=self._messageFromSendNode_arguments_(aNode,_st(args)._reversed());
 result=self._sendMessage_to_superSend_(message,receiver,_st(aNode)._superSend());
-if(smalltalk.assert(_st(_st(aNode)._isCascadeSendNode())._and_((function(){
+$1=_st(_st(aNode)._isCascadeSendNode())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(aNode)._isLastChild())._not();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})})))){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
+if(smalltalk.assert($1)){
 self._push_(receiver);
 $ctx1.sendIdx["push:"]=1;
 } else {
@@ -2153,12 +2197,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@index"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@index"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@index"]=(0);
 $1=self["@index"];
 } else {
-$1=self["@index"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"index",{},smalltalk.ASTPCNodeVisitor)})},

+ 153 - 126
js/Compiler-Semantic.js

@@ -97,12 +97,13 @@ fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@args"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@args"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@args"]=_st($Dictionary())._new();
 $1=self["@args"];
 } else {
-$1=self["@args"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"args",{},smalltalk.LexicalScope)})},
@@ -157,11 +158,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@blockIndex"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@blockIndex"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=(0);
 } else {
-$1=self["@blockIndex"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"blockIndex",{},smalltalk.LexicalScope)})},
@@ -310,23 +312,24 @@ fn: function (aNode){
 var self=this;
 var lookup;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$3,$4;
 lookup=self._bindingFor_(aNode);
-if(($receiver = lookup) == nil || $receiver == null){
-$1=self._outerScope();
-$ctx1.sendIdx["outerScope"]=1;
+$1=lookup;
 if(($receiver = $1) == nil || $receiver == null){
-lookup=$1;
-} else {
 $2=self._outerScope();
-lookup=_st($2)._lookupVariable_(aNode);
+$ctx1.sendIdx["outerScope"]=1;
+if(($receiver = $2) == nil || $receiver == null){
+lookup=$2;
+} else {
+$3=self._outerScope();
+lookup=_st($3)._lookupVariable_(aNode);
 };
 lookup;
 } else {
-lookup;
+$1;
 };
-$3=lookup;
-return $3;
+$4=lookup;
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"lookupVariable:",{aNode:aNode,lookup:lookup},smalltalk.LexicalScope)})},
 args: ["aNode"],
 source: "lookupVariable: aNode\x0a\x09| lookup |\x0a\x09lookup := (self bindingFor: aNode).\x0a\x09lookup ifNil: [\x0a\x09\x09lookup := self outerScope ifNotNil: [\x0a\x09\x09\x09(self outerScope lookupVariable: aNode) ]].\x0a\x09^ lookup",
@@ -453,7 +456,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$6,$5,$4;
+var $1,$2,$4,$3,$7,$6,$5;
 $1=self._outerScope();
 $ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -461,17 +464,18 @@ return (1);
 } else {
 $1;
 };
-if(smalltalk.assert(self._isInlined())){
-$3=self._outerScope();
+$2=self._isInlined();
+if(smalltalk.assert($2)){
+$4=self._outerScope();
 $ctx1.sendIdx["outerScope"]=2;
-$2=_st($3)._scopeLevel();
+$3=_st($4)._scopeLevel();
 $ctx1.sendIdx["scopeLevel"]=1;
-return $2;
+return $3;
 };
-$6=self._outerScope();
-$5=_st($6)._scopeLevel();
-$4=_st($5).__plus((1));
-return $4;
+$7=self._outerScope();
+$6=_st($7)._scopeLevel();
+$5=_st($6).__plus((1));
+return $5;
 }, function($ctx1) {$ctx1.fill(self,"scopeLevel",{},smalltalk.LexicalScope)})},
 args: [],
 source: "scopeLevel\x0a\x09self outerScope ifNil: [ ^ 1 ].\x0a\x09self isInlined ifTrue: [ ^ self outerScope scopeLevel ].\x0a\x09\x0a\x09^ self outerScope scopeLevel + 1",
@@ -488,12 +492,13 @@ fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@temps"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@temps"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@temps"]=_st($Dictionary())._new();
 $1=self["@temps"];
 } else {
-$1=self["@temps"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"temps",{},smalltalk.LexicalScope)})},
@@ -572,14 +577,15 @@ category: 'accessing',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = smalltalk.MethodLexicalScope.superclass.fn.prototype._bindingFor_.apply(_st(self), [aNode])) == nil || $receiver == null){
+var $2,$1;
+$2=smalltalk.MethodLexicalScope.superclass.fn.prototype._bindingFor_.apply(_st(self), [aNode]);
+if(($receiver = $2) == nil || $receiver == null){
 $1=_st(self._iVars())._at_ifAbsent_(_st(aNode)._value(),(function(){
 return smalltalk.withContext(function($ctx2) {
 return nil;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 } else {
-$1=smalltalk.MethodLexicalScope.superclass.fn.prototype._bindingFor_.apply(_st(self), [aNode]);
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"bindingFor:",{aNode:aNode},smalltalk.MethodLexicalScope)})},
@@ -650,12 +656,13 @@ fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@iVars"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@iVars"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@iVars"]=_st($Dictionary())._new();
 $1=self["@iVars"];
 } else {
-$1=self["@iVars"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"iVars",{},smalltalk.MethodLexicalScope)})},
@@ -689,11 +696,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@localReturn"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@localReturn"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@localReturn"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"localReturn",{},smalltalk.MethodLexicalScope)})},
@@ -744,12 +752,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@nonLocalReturns"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@nonLocalReturns"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@nonLocalReturns"]=_st($OrderedCollection())._new();
 $1=self["@nonLocalReturns"];
 } else {
-$1=self["@nonLocalReturns"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nonLocalReturns",{},smalltalk.MethodLexicalScope)})},
@@ -770,22 +779,23 @@ function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefin
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $PseudoVar(){return smalltalk.PseudoVar||(typeof PseudoVar=="undefined"?nil:PseudoVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
-if(($receiver = self["@pseudoVars"]) == nil || $receiver == null){
+var $1,$2,$3,$4;
+$1=self["@pseudoVars"];
+if(($receiver = $1) == nil || $receiver == null){
 self["@pseudoVars"]=_st($Dictionary())._new();
 self["@pseudoVars"];
 _st(_st(_st($Smalltalk())._current())._pseudoVariableNames())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$1=_st($PseudoVar())._on_(each);
-_st($1)._scope_(self._methodScope());
-$2=_st($1)._yourself();
-return _st(self["@pseudoVars"])._at_put_(each,$2);
+$2=_st($PseudoVar())._on_(each);
+_st($2)._scope_(self._methodScope());
+$3=_st($2)._yourself();
+return _st(self["@pseudoVars"])._at_put_(each,$3);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 } else {
-self["@pseudoVars"];
+$1;
 };
-$3=self["@pseudoVars"];
-return $3;
+$4=self["@pseudoVars"];
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"pseudoVars",{},smalltalk.MethodLexicalScope)})},
 args: [],
 source: "pseudoVars\x0a\x09pseudoVars ifNil: [\x0a\x09\x09pseudoVars := Dictionary new.\x0a\x09\x09Smalltalk current pseudoVariableNames do: [ :each |\x0a\x09\x09\x09pseudoVars at: each put: ((PseudoVar on: each)\x0a\x09\x09\x09\x09scope: self methodScope;\x0a\x09\x09\x09\x09yourself) ]].\x0a\x09^ pseudoVars",
@@ -820,12 +830,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@unknownVariables"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@unknownVariables"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@unknownVariables"]=_st($OrderedCollection())._new();
 $1=self["@unknownVariables"];
 } else {
-$1=self["@unknownVariables"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"unknownVariables",{},smalltalk.MethodLexicalScope)})},
@@ -1046,15 +1057,16 @@ fn: function (){
 var self=this;
 function $InvalidAssignmentError(){return smalltalk.InvalidAssignmentError||(typeof InvalidAssignmentError=="undefined"?nil:InvalidAssignmentError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-if(smalltalk.assert(_st(self._isArgVar())._or_((function(){
+var $1,$2,$3;
+$1=_st(self._isArgVar())._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._isPseudoVar();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))){
-$1=_st($InvalidAssignmentError())._new();
-_st($1)._variableName_(self._name());
-$2=_st($1)._signal();
-$2;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+if(smalltalk.assert($1)){
+$2=_st($InvalidAssignmentError())._new();
+_st($2)._variableName_(self._name());
+$3=_st($2)._signal();
+$3;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"validateAssignment",{},smalltalk.ScopeVar)})},
 args: [],
@@ -1361,12 +1373,13 @@ fn: function (){
 var self=this;
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@classReferences"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@classReferences"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@classReferences"]=_st($Set())._new();
 $1=self["@classReferences"];
 } else {
-$1=self["@classReferences"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"classReferences",{},smalltalk.SemanticAnalyzer)})},
@@ -1407,24 +1420,25 @@ var identifier;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $UnknownVariableError(){return smalltalk.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6;
+var $1,$2,$3,$4,$5,$6,$7;
 identifier=_st(aNode)._value();
 $ctx1.sendIdx["value"]=1;
-if(smalltalk.assert(_st(_st(_st(_st(_st($Smalltalk())._current())._globalJsVariables())._includes_(identifier))._not())._and_((function(){
+$1=_st(_st(_st(_st(_st($Smalltalk())._current())._globalJsVariables())._includes_(identifier))._not())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._isVariableGloballyUndefined_(identifier);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))){
-$1=_st($UnknownVariableError())._new();
-$2=$1;
-$3=_st(aNode)._value();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+if(smalltalk.assert($1)){
+$2=_st($UnknownVariableError())._new();
+$3=$2;
+$4=_st(aNode)._value();
 $ctx1.sendIdx["value"]=2;
-_st($2)._variableName_($3);
-$4=_st($1)._signal();
-$4;
+_st($3)._variableName_($4);
+$5=_st($2)._signal();
+$5;
 } else {
-$5=_st(_st(self["@currentScope"])._methodScope())._unknownVariables();
-$6=_st(aNode)._value();
-_st($5)._add_($6);
+$6=_st(_st(self["@currentScope"])._methodScope())._unknownVariables();
+$7=_st(aNode)._value();
+_st($6)._add_($7);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"errorUnknownVariable:",{aNode:aNode,identifier:identifier},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
@@ -1458,12 +1472,13 @@ fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@messageSends"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@messageSends"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@messageSends"]=_st($Dictionary())._new();
 $1=self["@messageSends"];
 } else {
-$1=self["@messageSends"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageSends",{},smalltalk.SemanticAnalyzer)})},
@@ -1540,16 +1555,17 @@ category: 'private',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@blockIndex"]) == nil || $receiver == null){
+var $1,$2;
+$1=self["@blockIndex"];
+if(($receiver = $1) == nil || $receiver == null){
 self["@blockIndex"]=(0);
 self["@blockIndex"];
 } else {
-self["@blockIndex"];
+$1;
 };
 self["@blockIndex"]=_st(self["@blockIndex"]).__plus((1));
-$1=self["@blockIndex"];
-return $1;
+$2=self["@blockIndex"];
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"nextBlockIndex",{},smalltalk.SemanticAnalyzer)})},
 args: [],
 source: "nextBlockIndex\x0a\x09blockIndex ifNil: [ blockIndex := 0 ].\x0a\x09\x0a\x09blockIndex := blockIndex + 1.\x0a\x09^ blockIndex",
@@ -1565,8 +1581,10 @@ category: 'scope',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = self["@currentScope"]) == nil || $receiver == null){
-self["@currentScope"];
+var $1;
+$1=self["@currentScope"];
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 self["@currentScope"]=_st(self["@currentScope"])._outerScope();
 self["@currentScope"];
@@ -1604,12 +1622,13 @@ fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@superSends"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@superSends"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@superSends"]=_st($Dictionary())._new();
 $1=self["@superSends"];
 } else {
-$1=self["@superSends"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"superSends",{},smalltalk.SemanticAnalyzer)})},
@@ -1661,8 +1680,10 @@ category: 'scope',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = _st(self["@currentScope"])._lookupVariable_(aString)) == nil || $receiver == null){
-_st(self["@currentScope"])._lookupVariable_(aString);
+var $1;
+$1=_st(self["@currentScope"])._lookupVariable_(aString);
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 self._errorShadowingVariable_(aString);
 };
@@ -1786,8 +1807,10 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 _st(aNode)._scope_(self["@currentScope"]);
-if(smalltalk.assert(_st(self["@currentScope"])._isMethodScope())){
+$1=_st(self["@currentScope"])._isMethodScope();
+if(smalltalk.assert($1)){
 _st(self["@currentScope"])._localReturn_(true);
 } else {
 _st(_st(self["@currentScope"])._methodScope())._addNonLocalReturn_(self["@currentScope"]);
@@ -1810,7 +1833,7 @@ var self=this;
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
 function $IRSendInliner(){return smalltalk.IRSendInliner||(typeof IRSendInliner=="undefined"?nil:IRSendInliner)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$5,$6,$8,$9,$7,$11,$12,$10,$13,$14,$16,$17,$15,$20,$21,$19,$18;
+var $3,$2,$1,$4,$5,$6,$8,$9,$7,$11,$12,$10,$13,$14,$15,$17,$18,$16,$21,$22,$20,$19;
 $3=_st(aNode)._receiver();
 $ctx1.sendIdx["receiver"]=1;
 $2=_st($3)._value();
@@ -1818,6 +1841,7 @@ $1=_st($2).__eq("super");
 if(smalltalk.assert($1)){
 _st(aNode)._superSend_(true);
 $4=_st(aNode)._receiver();
+$ctx1.sendIdx["receiver"]=2;
 _st($4)._value_("self");
 $5=self._superSends();
 $ctx1.sendIdx["superSends"]=1;
@@ -1843,33 +1867,35 @@ $ctx1.sendIdx["selector"]=3;
 $10=_st($11)._includes_($12);
 if(smalltalk.assert($10)){
 _st(aNode)._shouldBeInlined_(true);
+$13=_st(aNode)._receiver();
+_st($13)._shouldBeAliased_(true);
 };
 };
-$13=self._messageSends();
+$14=self._messageSends();
 $ctx1.sendIdx["messageSends"]=1;
-$14=_st(aNode)._selector();
+$15=_st(aNode)._selector();
 $ctx1.sendIdx["selector"]=4;
-_st($13)._at_ifAbsentPut_($14,(function(){
+_st($14)._at_ifAbsentPut_($15,(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st($Set())._new();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
-$16=self._messageSends();
+$17=self._messageSends();
 $ctx1.sendIdx["messageSends"]=2;
-$17=_st(aNode)._selector();
+$18=_st(aNode)._selector();
 $ctx1.sendIdx["selector"]=5;
-$15=_st($16)._at_($17);
+$16=_st($17)._at_($18);
 $ctx1.sendIdx["at:"]=2;
-_st($15)._add_(aNode);
-$20=self._messageSends();
-$21=_st(aNode)._selector();
-$19=_st($20)._at_($21);
-$18=_st($19)._size();
-_st(aNode)._index_($18);
+_st($16)._add_(aNode);
+$21=self._messageSends();
+$22=_st(aNode)._selector();
+$20=_st($21)._at_($22);
+$19=_st($20)._size();
+_st(aNode)._index_($19);
 smalltalk.SemanticAnalyzer.superclass.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
 return self}, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
-source: "visitSendNode: aNode\x0a\x0a\x09aNode receiver value = 'super'\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09aNode superSend: true.\x0a\x09\x09\x09aNode receiver value: 'self'.\x0a\x09\x09\x09self superSends at: aNode selector ifAbsentPut: [ Set new ].\x0a\x09\x09\x09(self superSends at: aNode selector) add: aNode ]\x0a\x09\x09\x0a\x09\x09ifFalse: [ (IRSendInliner inlinedSelectors includes: aNode selector) ifTrue: [\x0a\x09\x09\x09aNode shouldBeInlined: true ] ].\x0a\x0a\x09self messageSends at: aNode selector ifAbsentPut: [ Set new ].\x0a\x09(self messageSends at: aNode selector) add: aNode.\x0a\x0a\x09aNode index: (self messageSends at: aNode selector) size.\x0a\x0a\x09super visitSendNode: aNode",
-messageSends: ["ifTrue:ifFalse:", "=", "value", "receiver", "superSend:", "value:", "at:ifAbsentPut:", "superSends", "selector", "new", "add:", "at:", "ifTrue:", "includes:", "inlinedSelectors", "shouldBeInlined:", "messageSends", "index:", "size", "visitSendNode:"],
+source: "visitSendNode: aNode\x0a\x0a\x09aNode receiver value = 'super'\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09aNode superSend: true.\x0a\x09\x09\x09aNode receiver value: 'self'.\x0a\x09\x09\x09self superSends at: aNode selector ifAbsentPut: [ Set new ].\x0a\x09\x09\x09(self superSends at: aNode selector) add: aNode ]\x0a\x09\x09\x0a\x09\x09ifFalse: [ (IRSendInliner inlinedSelectors includes: aNode selector) ifTrue: [\x0a\x09\x09\x09aNode shouldBeInlined: true.\x0a\x09\x09\x09aNode receiver shouldBeAliased: true ] ].\x0a\x0a\x09self messageSends at: aNode selector ifAbsentPut: [ Set new ].\x0a\x09(self messageSends at: aNode selector) add: aNode.\x0a\x0a\x09aNode index: (self messageSends at: aNode selector) size.\x0a\x0a\x09super visitSendNode: aNode",
+messageSends: ["ifTrue:ifFalse:", "=", "value", "receiver", "superSend:", "value:", "at:ifAbsentPut:", "superSends", "selector", "new", "add:", "at:", "ifTrue:", "includes:", "inlinedSelectors", "shouldBeInlined:", "shouldBeAliased:", "messageSends", "index:", "size", "visitSendNode:"],
 referencedClasses: ["Set", "IRSendInliner"]
 }),
 smalltalk.SemanticAnalyzer);
@@ -1905,40 +1931,41 @@ var binding;
 function $ClassRefVar(){return smalltalk.ClassRefVar||(typeof ClassRefVar=="undefined"?nil:ClassRefVar)}
 function $UnknownVar(){return smalltalk.UnknownVar||(typeof UnknownVar=="undefined"?nil:UnknownVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12;
+var $1,$3,$2,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13;
 binding=_st(self["@currentScope"])._lookupVariable_(aNode);
-if(($receiver = binding) == nil || $receiver == null){
-$2=_st(aNode)._value();
+$1=binding;
+if(($receiver = $1) == nil || $receiver == null){
+$3=_st(aNode)._value();
 $ctx1.sendIdx["value"]=1;
-$1=_st($2)._isCapitalized();
-if(smalltalk.assert($1)){
-$3=_st($ClassRefVar())._new();
+$2=_st($3)._isCapitalized();
+if(smalltalk.assert($2)){
+$4=_st($ClassRefVar())._new();
 $ctx1.sendIdx["new"]=1;
-$4=$3;
-$5=_st(aNode)._value();
+$5=$4;
+$6=_st(aNode)._value();
 $ctx1.sendIdx["value"]=2;
-_st($4)._name_($5);
+_st($5)._name_($6);
 $ctx1.sendIdx["name:"]=1;
-$6=_st($3)._yourself();
+$7=_st($4)._yourself();
 $ctx1.sendIdx["yourself"]=1;
-binding=$6;
+binding=$7;
 binding;
-$7=self._classReferences();
-$8=_st(aNode)._value();
+$8=self._classReferences();
+$9=_st(aNode)._value();
 $ctx1.sendIdx["value"]=3;
-_st($7)._add_($8);
+_st($8)._add_($9);
 } else {
 self._errorUnknownVariable_(aNode);
-$9=_st($UnknownVar())._new();
-$10=$9;
-$11=_st(aNode)._value();
-_st($10)._name_($11);
-$12=_st($9)._yourself();
-binding=$12;
+$10=_st($UnknownVar())._new();
+$11=$10;
+$12=_st(aNode)._value();
+_st($11)._name_($12);
+$13=_st($10)._yourself();
+binding=$13;
 binding;
 };
 } else {
-binding;
+$1;
 };
 _st(aNode)._binding_(binding);
 return self}, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode,binding:binding},smalltalk.SemanticAnalyzer)})},

+ 229 - 172
js/Helios-Browser.js

@@ -28,13 +28,14 @@ fn: function (){
 var self=this;
 function $HLClassesListWidget(){return smalltalk.HLClassesListWidget||(typeof HLClassesListWidget=="undefined"?nil:HLClassesListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@classesListWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@classesListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@classesListWidget"]=_st($HLClassesListWidget())._on_(self._model());
 self["@classesListWidget"];
 $1=_st(self["@classesListWidget"])._next_(self._protocolsListWidget());
 } else {
-$1=self["@classesListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"classesListWidget",{},smalltalk.HLBrowser)})},
@@ -89,13 +90,14 @@ fn: function (){
 var self=this;
 function $HLMethodsListWidget(){return smalltalk.HLMethodsListWidget||(typeof HLMethodsListWidget=="undefined"?nil:HLMethodsListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@methodsListWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@methodsListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@methodsListWidget"]=_st($HLMethodsListWidget())._on_(self._model());
 self["@methodsListWidget"];
 $1=_st(self["@methodsListWidget"])._next_(self._sourceWidget());
 } else {
-$1=self["@methodsListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methodsListWidget",{},smalltalk.HLBrowser)})},
@@ -114,12 +116,13 @@ fn: function (){
 var self=this;
 function $HLBrowserModel(){return smalltalk.HLBrowserModel||(typeof HLBrowserModel=="undefined"?nil:HLBrowserModel)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@model"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@model"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@model"]=_st($HLBrowserModel())._new();
 $1=self["@model"];
 } else {
-$1=self["@model"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLBrowser)})},
@@ -154,13 +157,14 @@ fn: function (){
 var self=this;
 function $HLPackagesListWidget(){return smalltalk.HLPackagesListWidget||(typeof HLPackagesListWidget=="undefined"?nil:HLPackagesListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@packagesListWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@packagesListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@packagesListWidget"]=_st($HLPackagesListWidget())._on_(self._model());
 self["@packagesListWidget"];
 $1=_st(self["@packagesListWidget"])._next_(self._classesListWidget());
 } else {
-$1=self["@packagesListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"packagesListWidget",{},smalltalk.HLBrowser)})},
@@ -179,13 +183,14 @@ fn: function (){
 var self=this;
 function $HLProtocolsListWidget(){return smalltalk.HLProtocolsListWidget||(typeof HLProtocolsListWidget=="undefined"?nil:HLProtocolsListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@protocolsListWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@protocolsListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@protocolsListWidget"]=_st($HLProtocolsListWidget())._on_(self._model());
 self["@protocolsListWidget"];
 $1=_st(self["@protocolsListWidget"])._next_(self._methodsListWidget());
 } else {
-$1=self["@protocolsListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"protocolsListWidget",{},smalltalk.HLBrowser)})},
@@ -254,15 +259,16 @@ fn: function (){
 var self=this;
 function $HLBrowserBottomWidget(){return smalltalk.HLBrowserBottomWidget||(typeof HLBrowserBottomWidget=="undefined"?nil:HLBrowserBottomWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@sourceWidget"]) == nil || $receiver == null){
-$2=_st($HLBrowserBottomWidget())._new();
-_st($2)._model_(self._model());
-$3=_st($2)._yourself();
-self["@sourceWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@sourceWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLBrowserBottomWidget())._new();
+_st($3)._model_(self._model());
+$4=_st($3)._yourself();
+self["@sourceWidget"]=$4;
 $1=self["@sourceWidget"];
 } else {
-$1=self["@sourceWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"sourceWidget",{},smalltalk.HLBrowser)})},
@@ -319,15 +325,16 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@nextId"]) == nil || $receiver == null){
+var $1,$2;
+$1=self["@nextId"];
+if(($receiver = $1) == nil || $receiver == null){
 self["@nextId"]=(0);
 self["@nextId"];
 } else {
-self["@nextId"];
+$1;
 };
-$1="browser_".__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
-return $1;
+$2="browser_".__comma(_st(_st(self["@nextId"]).__plus((1)))._asString());
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"nextId",{},smalltalk.HLBrowser.klass)})},
 args: [],
 source: "nextId\x0a\x09nextId ifNil: [ nextId := 0 ].\x0a    ^ 'browser_', (nextId + 1) asString",
@@ -411,15 +418,16 @@ fn: function (){
 var self=this;
 function $HLBrowserCodeWidget(){return smalltalk.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@codeWidget"]) == nil || $receiver == null){
-$2=_st($HLBrowserCodeWidget())._new();
-_st($2)._browserModel_(self._model());
-$3=_st($2)._yourself();
-self["@codeWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@codeWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLBrowserCodeWidget())._new();
+_st($3)._browserModel_(self._model());
+$4=_st($3)._yourself();
+self["@codeWidget"]=$4;
 $1=self["@codeWidget"];
 } else {
-$1=self["@codeWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLBrowserBottomWidget)})},
@@ -438,15 +446,16 @@ fn: function (){
 var self=this;
 function $HLDocumentationWidget(){return smalltalk.HLDocumentationWidget||(typeof HLDocumentationWidget=="undefined"?nil:HLDocumentationWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@documentationWidget"]) == nil || $receiver == null){
-$2=_st($HLDocumentationWidget())._new();
-_st($2)._model_(self._model());
-$3=_st($2)._yourself();
-self["@documentationWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@documentationWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLDocumentationWidget())._new();
+_st($3)._model_(self._model());
+$4=_st($3)._yourself();
+self["@documentationWidget"]=$4;
 $1=self["@documentationWidget"];
 } else {
-$1=self["@documentationWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"documentationWidget",{},smalltalk.HLBrowserBottomWidget)})},
@@ -599,7 +608,9 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(self._model())._showComment())){
+var $1;
+$1=_st(self._model())._showComment();
+if(smalltalk.assert($1)){
 self._renderPanesOn_(html);
 } else {
 _st(html)._with_(self._codeWidget());
@@ -773,11 +784,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@showComment"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@showComment"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@showComment"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"showComment",{},smalltalk.HLBrowserModel)})},
@@ -817,11 +829,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@showInstance"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@showInstance"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=true;
 } else {
-$1=self["@showInstance"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"showInstance",{},smalltalk.HLBrowserModel)})},
@@ -1017,12 +1030,13 @@ fn: function (){
 var self=this;
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@overriddenCache"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@overriddenCache"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@overriddenCache"]=_st($HashedCollection())._new();
 $1=self["@overriddenCache"];
 } else {
-$1=self["@overriddenCache"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"overriddenCache",{},smalltalk.HLClassCache)})},
@@ -1041,12 +1055,13 @@ fn: function (){
 var self=this;
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@overrideCache"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@overrideCache"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@overrideCache"]=_st($HashedCollection())._new();
 $1=self["@overrideCache"];
 } else {
-$1=self["@overrideCache"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"overrideCache",{},smalltalk.HLClassCache)})},
@@ -1364,11 +1379,13 @@ fn: function (anAnnouncement){
 var self=this;
 var class_;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 class_=_st(anAnnouncement)._theClass();
-if(! smalltalk.assert(_st(_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage()))._or_((function(){
+$1=_st(_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage()))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._items())._includes_(class_);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+if(! smalltalk.assert($1)){
 return self;
 };
 self._setItemsForSelectedPackage();
@@ -1389,8 +1406,10 @@ fn: function (anAnnouncement){
 var self=this;
 var class_;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 class_=_st(anAnnouncement)._theClass();
-if(! smalltalk.assert(_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage()))){
+$1=_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage());
+if(! smalltalk.assert($1)){
 return self;
 };
 self._refresh();
@@ -1410,19 +1429,20 @@ fn: function (anAnnouncement){
 var self=this;
 var class_,oldClass;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4;
+var $1,$4,$3,$2,$5;
 class_=_st(anAnnouncement)._theClass();
 oldClass=_st(anAnnouncement)._oldClass();
-if(! smalltalk.assert(_st(self._items())._includes_(oldClass))){
+$1=_st(self._items())._includes_(oldClass);
+if(! smalltalk.assert($1)){
 return self;
 };
-$3=self._model();
-$ctx1.sendIdx["model"]=1;
-$2=_st($3)._selectedClass();
-$1=_st($2).__eq(oldClass);
-if(smalltalk.assert($1)){
 $4=self._model();
-_st($4)._selectedClass_(class_);
+$ctx1.sendIdx["model"]=1;
+$3=_st($4)._selectedClass();
+$2=_st($3).__eq(oldClass);
+if(smalltalk.assert($2)){
+$5=self._model();
+_st($5)._selectedClass_(class_);
 };
 self._setItemsForSelectedPackage();
 self._refresh();
@@ -1492,8 +1512,10 @@ fn: function (anAnnouncement){
 var self=this;
 var class_;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 class_=_st(anAnnouncement)._theClass();
-if(! smalltalk.assert(_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage()))){
+$1=_st(_st(class_)._package()).__eq(_st(self._model())._selectedPackage());
+if(! smalltalk.assert($1)){
 return self;
 };
 self._setItemsForSelectedPackage();
@@ -1513,7 +1535,9 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(_st(_st(_st(anAnnouncement)._theClass())._package()).__eq(_st(self._model())._selectedPackage()))){
+var $1;
+$1=_st(_st(_st(anAnnouncement)._theClass())._package()).__eq(_st(self._model())._selectedPackage());
+if(! smalltalk.assert($1)){
 return self;
 };
 self._setItemsForSelectedPackage();
@@ -1534,7 +1558,7 @@ fn: function (anAnnouncement){
 var self=this;
 var selectedClass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$3,$4;
 $1=_st(anAnnouncement)._item();
 $ctx1.sendIdx["item"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -1545,10 +1569,11 @@ $1;
 $2=_st(anAnnouncement)._item();
 selectedClass=_st($2)._theNonMetaClass();
 self._selectedItem_(selectedClass);
-if(! smalltalk.assert(self._hasFocus())){
+$3=self._hasFocus();
+if(! smalltalk.assert($3)){
 self._activateItem_(selectedClass);
-$3=self._focus();
-$3;
+$4=self._focus();
+$4;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,selectedClass:selectedClass},smalltalk.HLClassesListWidget)})},
 args: ["anAnnouncement"],
@@ -1633,7 +1658,7 @@ var self=this;
 var checkbox;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$5,$6,$7,$8,$9,$10,$2,$11,$13,$14,$12;
+var $1,$3,$4,$6,$5,$7,$8,$9,$11,$10,$12,$2,$13,$15,$16,$14,$17;
 $1=_st(html)._div();
 _st($1)._class_("btn-group");
 $ctx1.sendIdx["class:"]=1;
@@ -1646,7 +1671,8 @@ $5=_st($String())._streamContents_((function(str){
 return smalltalk.withContext(function($ctx3) {
 _st(str)._nextPutAll_("btn");
 $ctx3.sendIdx["nextPutAll:"]=1;
-if(smalltalk.assert(self._showInstance())){
+$6=self._showInstance();
+if(smalltalk.assert($6)){
 return _st(str)._nextPutAll_(" active");
 $ctx3.sendIdx["nextPutAll:"]=2;
 };
@@ -1656,51 +1682,53 @@ _st($4)._class_($5);
 $ctx2.sendIdx["class:"]=2;
 _st($3)._with_("Instance");
 $ctx2.sendIdx["with:"]=2;
-$6=_st($3)._onClick_((function(){
+$7=_st($3)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._showInstance_(true);
 $ctx3.sendIdx["showInstance:"]=1;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
 $ctx2.sendIdx["onClick:"]=1;
-$6;
-$7=_st(html)._button();
-$8=$7;
-$9=_st($String())._streamContents_((function(str){
+$7;
+$8=_st(html)._button();
+$9=$8;
+$10=_st($String())._streamContents_((function(str){
 return smalltalk.withContext(function($ctx3) {
 _st(str)._nextPutAll_("btn");
 $ctx3.sendIdx["nextPutAll:"]=3;
-if(smalltalk.assert(self._showClass())){
+$11=self._showClass();
+if(smalltalk.assert($11)){
 return _st(str)._nextPutAll_(" active");
 };
 }, function($ctx3) {$ctx3.fillBlock({str:str},$ctx2,5)})}));
-_st($8)._class_($9);
+_st($9)._class_($10);
 $ctx2.sendIdx["class:"]=3;
-_st($7)._with_("Class");
+_st($8)._with_("Class");
 $ctx2.sendIdx["with:"]=3;
-$10=_st($7)._onClick_((function(){
+$12=_st($8)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._showInstance_(false);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
 $ctx2.sendIdx["onClick:"]=2;
-return $10;
+return $12;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["with:"]=1;
-$11=_st(html)._label();
-_st($11)._class_("checkbox");
-$12=_st($11)._with_((function(){
+$13=_st(html)._label();
+_st($13)._class_("checkbox");
+$14=_st($13)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-$13=_st(html)._input();
-_st($13)._type_("checkbox");
-$14=_st($13)._onClick_((function(){
+$15=_st(html)._input();
+_st($15)._type_("checkbox");
+$16=_st($15)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._toggleShowComment();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
-checkbox=$14;
+checkbox=$16;
 checkbox;
 return _st(html)._with_("Doc");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,8)})}));
 $ctx1.sendIdx["with:"]=4;
-if(smalltalk.assert(self._showComment())){
+$17=self._showComment();
+if(smalltalk.assert($17)){
 _st(checkbox)._at_put_("checked","checked");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,checkbox:checkbox},smalltalk.HLClassesListWidget)})},
@@ -2041,8 +2069,9 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._selectedItem()) == nil || $receiver == null){
+var $2,$1;
+$2=self._selectedItem();
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
 var item;
@@ -2084,8 +2113,9 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._selectedItem()) == nil || $receiver == null){
+var $2,$1;
+$2=self._selectedItem();
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._defaultHead();
 } else {
 var item;
@@ -2184,7 +2214,9 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(_st(anAnnouncement)._theClass()).__eq(_st(_st(self._model())._selectedClass())._theNonMetaClass()))){
+var $1;
+$1=_st(_st(anAnnouncement)._theClass()).__eq(_st(_st(self._model())._selectedClass())._theNonMetaClass());
+if(smalltalk.assert($1)){
 self._refresh();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onClassCommentChanged:",{anAnnouncement:anAnnouncement},smalltalk.HLDocumentationWidget)})},
@@ -2275,33 +2307,34 @@ fn: function (html){
 var self=this;
 function $Showdown(){return smalltalk.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2,$6,$7,$5;
-if(($receiver = self._selectedItem()) == nil || $receiver == null){
-self._selectedItem();
+var $1,$2,$4,$5,$3,$7,$8,$6;
+$1=self._selectedItem();
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 self._renderInheritanceOn_(html);
-$1=_st(html)._h1();
-_st($1)._with_("Overview");
+$2=_st(html)._h1();
+_st($2)._with_("Overview");
 $ctx1.sendIdx["with:"]=1;
-$2=_st($1)._with_((function(){
+$3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-$3=_st(html)._button();
-_st($3)._class_("button default");
+$4=_st(html)._button();
+_st($4)._class_("button default");
 $ctx2.sendIdx["class:"]=1;
-_st($3)._with_("Edit");
-$4=_st($3)._onClick_((function(){
+_st($4)._with_("Edit");
+$5=_st($4)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._editDocumentation();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
-return $4;
+return $5;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 $ctx1.sendIdx["with:"]=2;
-$2;
-$6=_st(html)._div();
-_st($6)._class_("markdown");
-$7=_st($6)._asJQuery();
-$5=$7;
-_st($5)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(self._documentation()));
+$3;
+$7=_st(html)._div();
+_st($7)._class_("markdown");
+$8=_st($7)._asJQuery();
+$6=$8;
+_st($6)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(self._documentation()));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html},smalltalk.HLDocumentationWidget)})},
 args: ["html"],
@@ -2401,9 +2434,10 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = _st(self._model())._selectedClass()) == nil || $receiver == null){
-$1=_st(self._model())._selectedClass();
+var $2,$1;
+$2=_st(self._model())._selectedClass();
+if(($receiver = $2) == nil || $receiver == null){
+$1=$2;
 } else {
 var class_;
 class_=$receiver;
@@ -2481,18 +2515,21 @@ fn: function (aSelector){
 var self=this;
 var override,overriden,method;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$3,$4,$1;
 method=self._methodForSelector_(aSelector);
 override=self._isOverride_(method);
 overriden=self._isOverridden_(method);
-if(smalltalk.assert(override)){
-if(smalltalk.assert(overriden)){
+$2=override;
+if(smalltalk.assert($2)){
+$3=overriden;
+if(smalltalk.assert($3)){
 $1="override-overridden";
 } else {
 $1="override";
 };
 } else {
-if(smalltalk.assert(overriden)){
+$4=overriden;
+if(smalltalk.assert($4)){
 $1="overridden";
 } else {
 $1="";
@@ -2584,7 +2621,7 @@ category: 'accessing',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$6,$5,$8,$7,$4;
+var $2,$1,$3,$5,$7,$6,$9,$8,$4;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._selectedClass();
@@ -2595,16 +2632,17 @@ return $3;
 } else {
 $1;
 };
-if(smalltalk.assert(_st(aString).__eq(self._allProtocol()))){
-$6=self._model();
+$5=_st(aString).__eq(self._allProtocol());
+if(smalltalk.assert($5)){
+$7=self._model();
 $ctx1.sendIdx["model"]=2;
-$5=_st($6)._selectedClass();
+$6=_st($7)._selectedClass();
 $ctx1.sendIdx["selectedClass"]=2;
-$4=_st($5)._methods();
+$4=_st($6)._methods();
 } else {
-$8=self._model();
-$7=_st($8)._selectedClass();
-$4=_st($7)._methodsInProtocol_(aString);
+$9=self._model();
+$8=_st($9)._selectedClass();
+$4=_st($8)._methodsInProtocol_(aString);
 };
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
@@ -2681,7 +2719,9 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(_st(_st(self._model())._selectedClass()).__eq(_st(_st(anAnnouncement)._method())._methodClass()))){
+var $1;
+$1=_st(_st(self._model())._selectedClass()).__eq(_st(_st(anAnnouncement)._method())._methodClass());
+if(! smalltalk.assert($1)){
 return self;
 };
 self._setItemsForSelectedProtocol();
@@ -2792,15 +2832,16 @@ fn: function (anAnnouncement){
 var self=this;
 var selector,method;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 method=_st(anAnnouncement)._item();
-if(smalltalk.assert(_st(method)._isCompiledMethod())){
+$1=_st(method)._isCompiledMethod();
+if(smalltalk.assert($1)){
 selector=_st(method)._selector();
 } else {
 selector=nil;
 };
 self._selectedItem_(selector);
-$1=self._activateItem_(selector);
+$2=self._activateItem_(selector);
 return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,selector:selector,method:method},smalltalk.HLMethodsListWidget)})},
 args: ["anAnnouncement"],
 source: "onMethodSelected: anAnnouncement\x0a\x09| selector method |\x0a\x09\x0a\x09method := anAnnouncement item.\x0a\x09\x0a\x09selector := method isCompiledMethod \x0a\x09\x09ifTrue: [ method selector ]\x0a\x09\x09ifFalse: [ nil ].\x0a\x09\x09\x0a\x09self \x0a\x09\x09selectedItem: selector;\x0a\x09\x09activateItem: selector",
@@ -2832,7 +2873,9 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(_st(_st(self._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass()))){
+var $1;
+$1=_st(_st(self._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass());
+if(! smalltalk.assert($1)){
 return self;
 };
 self._setItemsForSelectedProtocol();
@@ -2853,7 +2896,9 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(_st(_st(self._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass()))){
+var $1;
+$1=_st(_st(self._model())._selectedClass()).__eq(_st(anAnnouncement)._theClass());
+if(! smalltalk.assert($1)){
 return self;
 };
 self._setItemsForSelectedProtocol();
@@ -2962,18 +3007,19 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-if(smalltalk.assert(_st(self._model())._showInstance())){
+var $1,$2,$3;
+$1=_st(self._model())._showInstance();
+if(smalltalk.assert($1)){
 smalltalk.HLMethodsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
 } else {
-$1=_st(html)._div();
-_st($1)._class_("class_side");
-$2=_st($1)._with_((function(){
+$2=_st(html)._div();
+_st($2)._class_("class_side");
+$3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 return smalltalk.HLMethodsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
 $ctx2.sendIdx["renderContentOn:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$2;
+$3;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLMethodsListWidget)})},
 args: ["html"],
@@ -3209,11 +3255,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@items"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@items"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._initializeItems();
 } else {
-$1=self["@items"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLPackagesListWidget)})},
@@ -3296,11 +3343,12 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(! smalltalk.assert(_st(self._items())._includes_(_st(_st(anAnnouncement)._theClass())._package()))){
+var $1,$2;
+$1=_st(self._items())._includes_(_st(_st(anAnnouncement)._theClass())._package());
+if(! smalltalk.assert($1)){
 self._initializeItems();
-$1=self._refresh();
-$1;
+$2=self._refresh();
+$2;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onClassAdded:",{anAnnouncement:anAnnouncement},smalltalk.HLPackagesListWidget)})},
 args: ["anAnnouncement"],
@@ -3336,13 +3384,14 @@ fn: function (anAnnouncement){
 var self=this;
 var package_;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 package_=_st(anAnnouncement)._item();
 self._selectedItem_(package_);
-if(! smalltalk.assert(self._hasFocus())){
+$1=self._hasFocus();
+if(! smalltalk.assert($1)){
 self._activateItem_(package_);
-$1=self._focus();
-$1;
+$2=self._focus();
+$2;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement,package_:package_},smalltalk.HLPackagesListWidget)})},
 args: ["anAnnouncement"],
@@ -3429,7 +3478,7 @@ category: 'accessing',
 fn: function (anItem){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$3,$4;
 $1=_st(anItem).__eq(self._allProtocol());
 $ctx1.sendIdx["="]=1;
 if(smalltalk.assert($1)){
@@ -3444,7 +3493,8 @@ $3=_st(anItem).__eq("initialization");
 if(smalltalk.assert($3)){
 return "initialization";
 };
-if(smalltalk.assert(_st(anItem)._match_("^\x5c*"))){
+$4=_st(anItem)._match_("^\x5c*");
+if(smalltalk.assert($4)){
 return "extension";
 };
 return "";
@@ -3548,8 +3598,10 @@ fn: function (anAnnouncement){
 var self=this;
 var class_;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 class_=_st(anAnnouncement)._theClass();
-if(! smalltalk.assert(_st(class_).__eq(_st(self._model())._selectedClass()))){
+$1=_st(class_).__eq(_st(self._model())._selectedClass());
+if(! smalltalk.assert($1)){
 return self;
 };
 self._setItemsForSelectedClass();
@@ -3608,18 +3660,20 @@ fn: function (anAnnouncement){
 var self=this;
 var protocol;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2,$3;
 protocol=_st(anAnnouncement)._item();
 self._selectedItem_(protocol);
-if(($receiver = protocol) == nil || $receiver == null){
+$1=protocol;
+if(($receiver = $1) == nil || $receiver == null){
 return self;
 } else {
-protocol;
+$1;
 };
-if(! smalltalk.assert(self._hasFocus())){
+$2=self._hasFocus();
+if(! smalltalk.assert($2)){
 self._activateItem_(protocol);
-$1=self._focus();
-$1;
+$3=self._focus();
+$3;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement,protocol:protocol},smalltalk.HLProtocolsListWidget)})},
 args: ["anAnnouncement"],
@@ -3652,18 +3706,19 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-if(smalltalk.assert(_st(self._model())._showInstance())){
+var $1,$2,$3;
+$1=_st(self._model())._showInstance();
+if(smalltalk.assert($1)){
 smalltalk.HLProtocolsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
 } else {
-$1=_st(html)._div();
-_st($1)._class_("class_side");
-$2=_st($1)._with_((function(){
+$2=_st(html)._div();
+_st($2)._class_("class_side");
+$3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 return smalltalk.HLProtocolsListWidget.superclass.fn.prototype._renderContentOn_.apply(_st(self), [html]);
 $ctx2.sendIdx["renderContentOn:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$2;
+$3;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLProtocolsListWidget)})},
 args: ["html"],
@@ -3790,12 +3845,13 @@ fn: function (){
 var self=this;
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@classesCache"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@classesCache"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@classesCache"]=_st($HashedCollection())._new();
 $1=self["@classesCache"];
 } else {
-$1=self["@classesCache"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"classesCache",{},smalltalk.HLSelectorsCache)})},
@@ -3958,12 +4014,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@current"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@current"]=smalltalk.HLSelectorsCache.klass.superclass.fn.prototype._new.apply(_st(self), []);
 $1=self["@current"];
 } else {
-$1=self["@current"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLSelectorsCache.klass)})},

+ 15 - 9
js/Helios-Commands-Core.js

@@ -32,8 +32,9 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._isBindingGroup())){
+var $2,$1;
+$2=self._isBindingGroup();
+if(smalltalk.assert($2)){
 $1=self._asGroupBinding();
 } else {
 $1=self._asActionBinding();
@@ -372,17 +373,18 @@ var self=this;
 var classes;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 classes=_st($OrderedCollection())._new();
-if(smalltalk.assert(self._isConcrete())){
+$1=self._isConcrete();
+if(smalltalk.assert($1)){
 _st(classes)._add_(self);
 };
 _st(self._subclasses())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(classes)._addAll_(_st(each)._concreteClasses());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$1=classes;
-return $1;
+$2=classes;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"concreteClasses",{classes:classes},smalltalk.HLCommand.klass)})},
 args: [],
 source: "concreteClasses\x0a\x09| classes |\x0a\x09\x0a\x09classes := OrderedCollection new.\x0a\x09\x0a\x09self isConcrete\x0a\x09\x09ifTrue: [ classes add: self ].\x0a\x09\x09\x0a\x09self subclasses do: [ :each | \x0a\x09\x09classes addAll: each concreteClasses ].\x0a\x09\x09\x0a\x09^ classes",
@@ -499,7 +501,9 @@ fn: function (aBinding){
 var self=this;
 var newBinding;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(self._isConcrete())){
+var $1;
+$1=self._isConcrete();
+if(smalltalk.assert($1)){
 newBinding=self._registerOn_(aBinding);
 newBinding;
 } else {
@@ -651,10 +655,12 @@ fn: function (aBinding,aModel){
 var self=this;
 var newBinding;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(self._isConcrete())._and_((function(){
+var $1;
+$1=_st(self._isConcrete())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._isValidFor_(aModel);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+if(smalltalk.assert($1)){
 newBinding=self._registerOn_for_(aBinding,aModel);
 newBinding;
 } else {

+ 234 - 171
js/Helios-Core.js

@@ -12,12 +12,13 @@ fn: function (){
 var self=this;
 function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@announcer"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@announcer"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@announcer"]=_st($Announcer())._new();
 $1=self["@announcer"];
 } else {
-$1=self["@announcer"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLModel)})},
@@ -35,11 +36,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@environment"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@environment"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=_st(self._manager())._environment();
 } else {
-$1=self["@environment"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLModel)})},
@@ -339,30 +341,32 @@ fn: function (){
 var self=this;
 var currentProtocol;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$3,$5,$4;
 currentProtocol=self._selectedProtocol();
-if(($receiver = currentProtocol) == nil || $receiver == null){
+$1=currentProtocol;
+if(($receiver = $1) == nil || $receiver == null){
 currentProtocol=self._unclassifiedProtocol();
 $ctx1.sendIdx["unclassifiedProtocol"]=1;
 currentProtocol;
 } else {
-currentProtocol;
+$1;
 };
-$1=self._selectedMethod();
+$2=self._selectedMethod();
 $ctx1.sendIdx["selectedMethod"]=1;
-if(($receiver = $1) == nil || $receiver == null){
-$1;
+if(($receiver = $2) == nil || $receiver == null){
+$2;
 } else {
-$2=self._selectedMethod();
-currentProtocol=_st($2)._protocol();
+$3=self._selectedMethod();
+currentProtocol=_st($3)._protocol();
 currentProtocol;
 };
-if(smalltalk.assert(_st(currentProtocol).__eq(self._allProtocol()))){
-$3=self._unclassifiedProtocol();
+$5=_st(currentProtocol).__eq(self._allProtocol());
+if(smalltalk.assert($5)){
+$4=self._unclassifiedProtocol();
 } else {
-$3=currentProtocol;
+$4=currentProtocol;
 };
-return $3;
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},smalltalk.HLToolModel)})},
 args: [],
 source: "compilationProtocol\x0a\x09| currentProtocol |\x0a\x09\x0a\x09currentProtocol := self selectedProtocol.\x0a\x09currentProtocol ifNil: [ currentProtocol := self unclassifiedProtocol ].\x0a\x09self selectedMethod ifNotNil: [ currentProtocol := self selectedMethod protocol ].\x0a\x0a\x09^ currentProtocol = self allProtocol\x0a\x09\x09ifTrue: [ self unclassifiedProtocol ]\x0a\x09\x09ifFalse: [ currentProtocol ]",
@@ -788,8 +792,10 @@ fn: function (aString){
 var self=this;
 function $HLSourceCodeSaved(){return smalltalk.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 _st(self._announcer())._announce_(_st($HLSourceCodeSaved())._new());
-if(smalltalk.assert(self._shouldCompileClassDefinition_(aString))){
+$1=self._shouldCompileClassDefinition_(aString);
+if(smalltalk.assert($1)){
 self._compileClassDefinition_(aString);
 } else {
 self._compileMethod_(aString);
@@ -845,7 +851,7 @@ fn: function (aClass){
 var self=this;
 function $HLClassSelected(){return smalltalk.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$6,$5,$7,$9,$8;
+var $3,$2,$1,$4,$6,$5,$7,$8,$10,$9;
 $3=self._selectedClass();
 $ctx1.sendIdx["selectedClass"]=1;
 $2=_st($3).__eq(aClass);
@@ -872,7 +878,8 @@ $6=_st(aClass)._theNonMetaClass();
 $ctx2.sendIdx["theNonMetaClass"]=1;
 $5=_st($6)._package();
 self._selectedPackage_($5);
-if(smalltalk.assert(self._showInstance())){
+$7=self._showInstance();
+if(smalltalk.assert($7)){
 self["@selectedClass"]=_st(aClass)._theNonMetaClass();
 self["@selectedClass"];
 } else {
@@ -881,10 +888,10 @@ self["@selectedClass"];
 };
 };
 self._selectedProtocol_(nil);
-$7=self._announcer();
-$9=self._selectedClass();
-$8=_st($HLClassSelected())._on_($9);
-return _st($7)._announce_($8);
+$8=self._announcer();
+$10=self._selectedClass();
+$9=_st($HLClassSelected())._on_($10);
+return _st($8)._announce_($9);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},smalltalk.HLToolModel)})},
 args: ["aClass"],
@@ -931,7 +938,9 @@ fn: function (aCompiledMethod){
 var self=this;
 function $HLMethodSelected(){return smalltalk.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(self["@selectedSelector"]).__eq(aCompiledMethod))){
+var $1;
+$1=_st(self["@selectedSelector"]).__eq(aCompiledMethod);
+if(smalltalk.assert($1)){
 return self;
 };
 self._withChangesDo_((function(){
@@ -983,7 +992,9 @@ fn: function (aPackage){
 var self=this;
 function $HLPackageSelected(){return smalltalk.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(self["@selectedPackage"]).__eq(aPackage))){
+var $1;
+$1=_st(self["@selectedPackage"]).__eq(aPackage);
+if(smalltalk.assert($1)){
 return self;
 };
 self._withChangesDo_((function(){
@@ -1027,7 +1038,9 @@ fn: function (aString){
 var self=this;
 function $HLProtocolSelected(){return smalltalk.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(self["@selectedProtocol"]).__eq(aString))){
+var $1;
+$1=_st(self["@selectedProtocol"]).__eq(aString);
+if(smalltalk.assert($1)){
 return self;
 };
 self._withChangesDo_((function(){
@@ -1315,8 +1328,10 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = self["@root"]) == nil || $receiver == null){
-self["@root"];
+var $1;
+$1=self["@root"];
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 _st(_st(self["@root"])._asJQuery())._css_put_("visibility","hidden");
 };
@@ -1353,11 +1368,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@label"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@label"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self["@label"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLTabWidget)})},
@@ -1426,9 +1442,11 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 _st(self._widget())._unregister();
-if(($receiver = self["@root"]) == nil || $receiver == null){
-self["@root"];
+$1=self["@root"];
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 _st(_st(self["@root"])._asJQuery())._remove();
 };
@@ -1494,14 +1512,15 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-if(($receiver = self["@root"]) == nil || $receiver == null){
-$1="body"._asJQuery();
+var $1,$2,$3;
+$1=self["@root"];
+if(($receiver = $1) == nil || $receiver == null){
+$2="body"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
-self._appendToJQuery_($1);
+self._appendToJQuery_($2);
 } else {
-$2=_st(self["@root"])._asJQuery();
-_st($2)._css_put_("visibility","visible");
+$3=_st(self["@root"])._asJQuery();
+_st($3)._css_put_("visibility","visible");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLTabWidget)})},
 args: [],
@@ -2167,16 +2186,19 @@ fn: function (aListItem){
 var self=this;
 var item;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = _st(aListItem)._get_((0))) == nil || $receiver == null){
+var $1,$2;
+$1=_st(aListItem)._get_((0));
+if(($receiver = $1) == nil || $receiver == null){
 return self;
 } else {
-_st(aListItem)._get_((0));
+$1;
 };
 _st(_st(_st(aListItem)._parent())._children())._removeClass_("active");
 _st(aListItem)._addClass_("active");
 self._ensureVisible_(aListItem);
 item=_st(self._items())._at_(_st(_st(aListItem)._attr_("list-data"))._asNumber());
-if(! smalltalk.assert(_st(self._selectedItem()).__eq_eq(item))){
+$2=_st(self._selectedItem()).__eq_eq(item);
+if(! smalltalk.assert($2)){
 self._selectItem_(item);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},smalltalk.HLListWidget)})},
@@ -2347,12 +2369,15 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 smalltalk.HLListWidget.superclass.fn.prototype._focus.apply(_st(self), []);
-if(! smalltalk.assert(_st(self._items())._isEmpty())){
-if(($receiver = self._selectedItem()) == nil || $receiver == null){
+$1=_st(self._items())._isEmpty();
+if(! smalltalk.assert($1)){
+$2=self._selectedItem();
+if(($receiver = $2) == nil || $receiver == null){
 self._activateFirstListItem();
 } else {
-self._selectedItem();
+$2;
 };
 };
 return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLListWidget)})},
@@ -2388,12 +2413,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@items"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@items"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@items"]=self._defaultItems();
 $1=self["@items"];
 } else {
-$1=self["@items"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLListWidget)})},
@@ -2427,8 +2453,9 @@ category: 'accessing',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(_st(self._selectedItem()).__eq(anObject))){
+var $2,$1;
+$2=_st(self._selectedItem()).__eq(anObject);
+if(smalltalk.assert($2)){
 $1="active";
 } else {
 $1="inactive";
@@ -2727,8 +2754,10 @@ category: 'accessing',
 fn: function (aWidget){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 self["@next"]=aWidget;
-if(! smalltalk.assert(_st(_st(aWidget)._previous()).__eq(self))){
+$1=_st(_st(aWidget)._previous()).__eq(self);
+if(! smalltalk.assert($1)){
 _st(aWidget)._previous_(self);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
@@ -2788,8 +2817,10 @@ category: 'accessing',
 fn: function (aWidget){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 self["@previous"]=aWidget;
-if(! smalltalk.assert(_st(_st(aWidget)._next()).__eq(self))){
+$1=_st(_st(aWidget)._next()).__eq(self);
+if(! smalltalk.assert($1)){
 _st(aWidget)._next_(self);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},smalltalk.HLNavigationListWidget)})},
@@ -3107,51 +3138,52 @@ fn: function (html){
 var self=this;
 var commands;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$5,$7,$8,$9,$6,$2;
+var $1,$2,$4,$5,$6,$8,$9,$10,$7,$3;
 commands=self._menuCommands();
 $ctx1.sendIdx["menuCommands"]=1;
-if(smalltalk.assert(_st(commands)._isEmpty())){
+$1=_st(commands)._isEmpty();
+if(smalltalk.assert($1)){
 return self;
 };
-$1=_st(html)._div();
-_st($1)._class_("btn-group cog");
+$2=_st(html)._div();
+_st($2)._class_("btn-group cog");
 $ctx1.sendIdx["class:"]=1;
-$2=_st($1)._with_((function(){
+$3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-$3=_st(html)._a();
+$4=_st(html)._a();
 $ctx2.sendIdx["a"]=1;
-_st($3)._class_("btn dropdown-toggle");
+_st($4)._class_("btn dropdown-toggle");
 $ctx2.sendIdx["class:"]=2;
-_st($3)._at_put_("data-toggle","dropdown");
-$4=_st($3)._with_((function(){
+_st($4)._at_put_("data-toggle","dropdown");
+$5=_st($4)._with_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(_st(html)._tag_("i"))._class_("icon-cog");
 $ctx3.sendIdx["class:"]=3;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
 $ctx2.sendIdx["with:"]=2;
-$4;
-$5=_st(html)._ul();
-_st($5)._class_("dropdown-menu pull-right");
-$6=_st($5)._with_((function(){
+$5;
+$6=_st(html)._ul();
+_st($6)._class_("dropdown-menu pull-right");
+$7=_st($6)._with_((function(){
 return smalltalk.withContext(function($ctx3) {
-$7=self._menuCommands();
-return _st($7)._do_((function(each){
+$8=self._menuCommands();
+return _st($8)._do_((function(each){
 return smalltalk.withContext(function($ctx4) {
 return _st(_st(html)._li())._with_((function(){
 return smalltalk.withContext(function($ctx5) {
-$8=_st(html)._a();
-_st($8)._with_(_st(each)._menuLabel());
-$9=_st($8)._onClick_((function(){
+$9=_st(html)._a();
+_st($9)._with_(_st(each)._menuLabel());
+$10=_st($9)._onClick_((function(){
 return smalltalk.withContext(function($ctx6) {
 return self._execute_(each);
 }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)})}));
-return $9;
+return $10;
 }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)})}));
 $ctx4.sendIdx["with:"]=4;
 }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,5)})}));
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
 $ctx2.sendIdx["with:"]=3;
-return $6;
+return $7;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 $ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},smalltalk.HLToolListWidget)})},
@@ -3267,13 +3299,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@callback"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@callback"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})});
 } else {
-$1=self["@callback"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"callback",{},smalltalk.HLTabListWidget)})},
@@ -3464,32 +3497,35 @@ var self=this;
 var parent,parentSmalltalk;
 function $Environment(){return smalltalk.Environment||(typeof Environment=="undefined"?nil:Environment)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$4;
-if(($receiver = _st(window)._opener()) == nil || $receiver == null){
+var $1,$2,$3,$4,$5,$6,$8,$7;
+$1=_st(window)._opener();
+if(($receiver = $1) == nil || $receiver == null){
 parent=_st(window)._parent();
 } else {
-parent=_st(window)._opener();
+parent=$1;
 };
-if(($receiver = parent) == nil || $receiver == null){
-$1=_st($Environment())._new();
+$2=parent;
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($Environment())._new();
 $ctx1.sendIdx["new"]=1;
-return $1;
+return $3;
 } else {
-parent;
+$2;
 };
-$2=_st(parent)._at_("requirejs");
+$4=_st(parent)._at_("requirejs");
 $ctx1.sendIdx["at:"]=1;
-parentSmalltalk=_st($2)._value_("amber_vm/smalltalk");
-if(($receiver = parentSmalltalk) == nil || $receiver == null){
-$3=_st($Environment())._new();
+parentSmalltalk=_st($4)._value_("amber_vm/smalltalk");
+$5=parentSmalltalk;
+if(($receiver = $5) == nil || $receiver == null){
+$6=_st($Environment())._new();
 $ctx1.sendIdx["new"]=2;
-return $3;
+return $6;
 } else {
-parentSmalltalk;
+$5;
 };
-$5=_st(parentSmalltalk)._at_("Environment");
-$4=_st($5)._new();
-return $4;
+$8=_st(parentSmalltalk)._at_("Environment");
+$7=_st($8)._new();
+return $7;
 }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent,parentSmalltalk:parentSmalltalk},smalltalk.HLManager)})},
 args: [],
 source: "defaultEnvironment\x0a\x09\x22If helios is loaded from within a frame, answer the parent window environment\x22\x0a\x09\x0a\x09| parent parentSmalltalk |\x0a\x09\x0a\x09parent := window opener ifNil: [ window parent ].\x0a\x09parent ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09parentSmalltalk := (parent at: 'requirejs') value: 'amber_vm/smalltalk'.\x0a\x09parentSmalltalk ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09^ (parentSmalltalk at: 'Environment') new",
@@ -3505,12 +3541,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@environment"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@environment"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@environment"]=self._defaultEnvironment();
 $1=self["@environment"];
 } else {
-$1=self["@environment"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLManager)})},
@@ -3545,12 +3582,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@history"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@history"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@history"]=_st($OrderedCollection())._new();
 $1=self["@history"];
 } else {
-$1=self["@history"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"history",{},smalltalk.HLManager)})},
@@ -3876,7 +3914,7 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$5,$7,$8,$9,$10,$11,$6,$2;
+var $1,$3,$4,$6,$5,$8,$9,$10,$11,$12,$7,$2;
 $1=_st(html)._ul();
 _st($1)._class_("nav");
 $ctx1.sendIdx["class:"]=1;
@@ -3886,39 +3924,40 @@ _st(self._tabs())._do_((function(each){
 return smalltalk.withContext(function($ctx3) {
 $3=_st(html)._li();
 $4=$3;
-if(smalltalk.assert(_st(each)._isActive())){
+$6=_st(each)._isActive();
+if(smalltalk.assert($6)){
 $5="active";
 } else {
 $5="inactive";
 };
 _st($4)._class_($5);
 $ctx3.sendIdx["class:"]=2;
-$6=_st($3)._with_((function(){
+$7=_st($3)._with_((function(){
 return smalltalk.withContext(function($ctx4) {
-$7=_st(html)._a();
-_st($7)._with_((function(){
+$8=_st(html)._a();
+_st($8)._with_((function(){
 return smalltalk.withContext(function($ctx5) {
-$8=_st(_st(html)._tag_("i"))._class_("close");
+$9=_st(_st(html)._tag_("i"))._class_("close");
 $ctx5.sendIdx["class:"]=3;
-_st($8)._onClick_((function(){
+_st($9)._onClick_((function(){
 return smalltalk.withContext(function($ctx6) {
 return self._removeTab_(each);
 }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)})}));
 $ctx5.sendIdx["onClick:"]=1;
-$9=_st(html)._span();
-_st($9)._class_(_st(each)._cssClass());
-$10=_st($9)._with_(_st(each)._displayLabel());
-return $10;
+$10=_st(html)._span();
+_st($10)._class_(_st(each)._cssClass());
+$11=_st($10)._with_(_st(each)._displayLabel());
+return $11;
 }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)})}));
 $ctx4.sendIdx["with:"]=3;
-$11=_st($7)._onClick_((function(){
+$12=_st($8)._onClick_((function(){
 return smalltalk.withContext(function($ctx5) {
 return _st(each)._activate();
 }, function($ctx5) {$ctx5.fillBlock({},$ctx4,8)})}));
-return $11;
+return $12;
 }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
 $ctx3.sendIdx["with:"]=2;
-return $6;
+return $7;
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
 return self._renderAddOn_(html);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -3999,12 +4038,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@tabs"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@tabs"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@tabs"]=_st($OrderedCollection())._new();
 $1=self["@tabs"];
 } else {
-$1=self["@tabs"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLManager)})},
@@ -4024,12 +4064,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@current"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@current"]=_st(self._basicNew())._initialize();
 $1=self["@current"];
 } else {
-$1=self["@current"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLManager.klass)})},
@@ -4221,7 +4262,7 @@ fn: function (html){
 var self=this;
 var confirmButton;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$4,$3;
 $1=_st(html)._div();
 $ctx1.sendIdx["div"]=1;
 _st($1)._id_("overlay");
@@ -4230,7 +4271,8 @@ _st($2)._class_("dialog ".__comma(self._cssClass()));
 $3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._renderMainOn_(html);
-if(smalltalk.assert(self._hasButtons())){
+$4=self._hasButtons();
+if(smalltalk.assert($4)){
 return self._renderButtonsOn_(html);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -4267,9 +4309,11 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 _st(".dialog"._asJQuery())._keyup_((function(e){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(_st(e)._keyCode()).__eq(_st(_st($String())._esc())._asciiValue()))){
+$1=_st(_st(e)._keyCode()).__eq(_st(_st($String())._esc())._asciiValue());
+if(smalltalk.assert($1)){
 return self._cancel();
 };
 }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
@@ -4308,13 +4352,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@actionBlock"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@actionBlock"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})});
 } else {
-$1=self["@actionBlock"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},smalltalk.HLConfirmationWidget)})},
@@ -4365,13 +4410,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@cancelBlock"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@cancelBlock"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})});
 } else {
-$1=self["@cancelBlock"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},smalltalk.HLConfirmationWidget)})},
@@ -4422,11 +4468,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@confirmationString"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@confirmationString"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="Confirm";
 } else {
-$1=self["@confirmationString"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},smalltalk.HLConfirmationWidget)})},
@@ -4531,11 +4578,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@value"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@value"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self["@value"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.HLRequestWidget)})},
@@ -4653,11 +4701,12 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@visible"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@visible"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@visible"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isVisible",{},smalltalk.HLProgressWidget)})},
@@ -4676,12 +4725,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@progressBars"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@progressBars"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@progressBars"]=_st($OrderedCollection())._new();
 $1=self["@progressBars"];
 } else {
-$1=self["@progressBars"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"progressBars",{},smalltalk.HLProgressWidget)})},
@@ -4699,7 +4749,9 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(self._isVisible())){
+var $1;
+$1=self._isVisible();
+if(smalltalk.assert($1)){
 self["@visible"]=false;
 self["@visible"];
 smalltalk.HLProgressWidget.superclass.fn.prototype._remove.apply(_st(self), []);
@@ -4766,7 +4818,9 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(self._isVisible())){
+var $1;
+$1=self._isVisible();
+if(! smalltalk.assert($1)){
 self["@visible"]=true;
 self["@visible"];
 smalltalk.HLProgressWidget.superclass.fn.prototype._show.apply(_st(self), []);
@@ -4788,12 +4842,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@default"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@default"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@default"]=self._new();
 $1=self["@default"];
 } else {
-$1=self["@default"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.HLProgressWidget.klass)})},
@@ -4831,13 +4886,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@cancelCallback"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@cancelCallback"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})});
 } else {
-$1=self["@cancelCallback"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"cancelCallback",{},smalltalk.HLTabSelectionWidget)})},
@@ -4888,13 +4944,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@confirmCallback"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@confirmCallback"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})});
 } else {
-$1=self["@confirmCallback"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"confirmCallback",{},smalltalk.HLTabSelectionWidget)})},
@@ -5018,13 +5075,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@selectCallback"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@selectCallback"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})});
 } else {
-$1=self["@selectCallback"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selectCallback",{},smalltalk.HLTabSelectionWidget)})},
@@ -5110,10 +5168,12 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 smalltalk.HLTabSelectionWidget.superclass.fn.prototype._setupKeyBindings.apply(_st(self), []);
 _st(".dialog"._asJQuery())._keyup_((function(e){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(_st(e)._keyCode()).__eq(_st(_st($String())._cr())._asciiValue()))){
+$1=_st(_st(e)._keyCode()).__eq(_st(_st($String())._cr())._asciiValue());
+if(smalltalk.assert($1)){
 return self._confirm();
 };
 }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)})}));
@@ -5133,24 +5193,25 @@ fn: function (){
 var self=this;
 function $HLTabListWidget(){return smalltalk.HLTabListWidget||(typeof HLTabListWidget=="undefined"?nil:HLTabListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
-if(($receiver = self["@tabList"]) == nil || $receiver == null){
+var $1,$2,$3,$4;
+$1=self["@tabList"];
+if(($receiver = $1) == nil || $receiver == null){
 self["@tabList"]=_st($HLTabListWidget())._new();
 self["@tabList"];
-$1=self["@tabList"];
-_st($1)._callback_((function(tab){
+$2=self["@tabList"];
+_st($2)._callback_((function(tab){
 return smalltalk.withContext(function($ctx2) {
 self._selectTab_(tab);
 return _st(self["@tabList"])._focus();
 }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)})}));
-_st($1)._selectedItem_(self._selectedTab());
-$2=_st($1)._items_(self._tabs());
-$2;
+_st($2)._selectedItem_(self._selectedTab());
+$3=_st($2)._items_(self._tabs());
+$3;
 } else {
-self["@tabList"];
+$1;
 };
-$3=self["@tabList"];
-return $3;
+$4=self["@tabList"];
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"tabList",{},smalltalk.HLTabSelectionWidget)})},
 args: [],
 source: "tabList\x0a\x09tabList ifNil: [ \x0a\x09\x09tabList := HLTabListWidget new.\x0a\x09\x09tabList\x0a\x09\x09\x09callback: [ :tab | self selectTab: tab. tabList focus ];\x0a\x09\x09\x09selectedItem: self selectedTab;\x0a\x09\x09\x09items: self tabs ].\x0a\x09\x0a\x09^ tabList",
@@ -5166,11 +5227,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@tabs"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@tabs"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=[];
 } else {
-$1=self["@tabs"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.HLTabSelectionWidget)})},
@@ -5467,12 +5529,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@default"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@default"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@default"]=self._new();
 $1=self["@default"];
 } else {
-$1=self["@default"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.HLProgressBarWidget.klass)})},

+ 42 - 35
js/Helios-Debugger.js

@@ -46,7 +46,7 @@ var self=this;
 var variables,inspectedContext;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5;
+var $1,$2,$3,$4,$5,$6;
 variables=_st($Dictionary())._new();
 inspectedContext=self._context();
 $1=variables;
@@ -64,16 +64,17 @@ return _st(inspectedContext)._isBlockContext();
 return smalltalk.withContext(function($ctx2) {
 inspectedContext=_st(inspectedContext)._outerContext();
 inspectedContext;
-if(($receiver = inspectedContext) == nil || $receiver == null){
-return inspectedContext;
+$3=inspectedContext;
+if(($receiver = $3) == nil || $receiver == null){
+return $3;
 } else {
-$3=variables;
-$4=_st(inspectedContext)._locals();
-return _st($3)._addAll_($4);
+$4=variables;
+$5=_st(inspectedContext)._locals();
+return _st($4)._addAll_($5);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 _st(anInspector)._setLabel_("Context");
-$5=_st(anInspector)._setVariables_(variables);
+$6=_st(anInspector)._setVariables_(variables);
 return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,inspectedContext:inspectedContext},smalltalk.HLContextInspectorDecorator)})},
 args: ["anInspector"],
 source: "inspectOn: anInspector\x0a\x09| variables inspectedContext |\x0a\x09\x0a\x09variables := Dictionary new.\x0a\x09inspectedContext := self context.\x0a\x09\x0a\x09variables addAll: inspectedContext locals.\x0a\x09\x0a\x09[ inspectedContext notNil and: [ inspectedContext isBlockContext ] ] whileTrue: [\x0a\x09\x09inspectedContext := inspectedContext outerContext.\x0a\x09\x09inspectedContext ifNotNil: [\x0a\x09\x09\x09variables addAll: inspectedContext locals ] ].\x0a\x09\x0a\x09anInspector\x0a\x09\x09setLabel: 'Context';\x0a\x09\x09setVariables: variables",
@@ -115,15 +116,16 @@ fn: function (){
 var self=this;
 function $HLDebuggerCodeWidget(){return smalltalk.HLDebuggerCodeWidget||(typeof HLDebuggerCodeWidget=="undefined"?nil:HLDebuggerCodeWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@codeWidget"]) == nil || $receiver == null){
-$2=_st($HLDebuggerCodeWidget())._new();
-_st($2)._browserModel_(self._model());
-$3=_st($2)._yourself();
-self["@codeWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@codeWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLDebuggerCodeWidget())._new();
+_st($3)._browserModel_(self._model());
+$4=_st($3)._yourself();
+self["@codeWidget"]=$4;
 $1=self["@codeWidget"];
 } else {
-$1=self["@codeWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLDebugger)})},
@@ -176,12 +178,13 @@ fn: function (){
 var self=this;
 function $HLInspectorWidget(){return smalltalk.HLInspectorWidget||(typeof HLInspectorWidget=="undefined"?nil:HLInspectorWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@inspectorWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@inspectorWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@inspectorWidget"]=_st($HLInspectorWidget())._new();
 $1=self["@inspectorWidget"];
 } else {
-$1=self["@inspectorWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inspectorWidget",{},smalltalk.HLDebugger)})},
@@ -200,12 +203,13 @@ fn: function (){
 var self=this;
 function $HLDebuggerModel(){return smalltalk.HLDebuggerModel||(typeof HLDebuggerModel=="undefined"?nil:HLDebuggerModel)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@model"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@model"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@model"]=_st($HLDebuggerModel())._new();
 $1=self["@model"];
 } else {
-$1=self["@model"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLDebugger)})},
@@ -311,15 +315,16 @@ fn: function (){
 var self=this;
 function $HLStackListWidget(){return smalltalk.HLStackListWidget||(typeof HLStackListWidget=="undefined"?nil:HLStackListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@stackListWidget"]) == nil || $receiver == null){
-$2=_st($HLStackListWidget())._on_(self._model());
-_st($2)._next_(self._codeWidget());
-$3=_st($2)._yourself();
-self["@stackListWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@stackListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLStackListWidget())._on_(self._model());
+_st($3)._next_(self._codeWidget());
+$4=_st($3)._yourself();
+self["@stackListWidget"]=$4;
 $1=self["@stackListWidget"];
 } else {
-$1=self["@stackListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"stackListWidget",{},smalltalk.HLDebugger)})},
@@ -638,14 +643,15 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@currentContext"]) == nil || $receiver == null){
+var $1,$2;
+$1=self["@currentContext"];
+if(($receiver = $1) == nil || $receiver == null){
 self._currentContext_(self._rootContext());
 } else {
-self["@currentContext"];
+$1;
 };
-$1=self["@currentContext"];
-return $1;
+$2=self["@currentContext"];
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"currentContext",{},smalltalk.HLDebuggerModel)})},
 args: [],
 source: "currentContext\x0a\x09currentContext ifNil: [ self currentContext: self rootContext ].\x0a\x09^ currentContext",
@@ -940,12 +946,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@items"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@items"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@items"]=_st(self._model())._contexts();
 $1=self["@items"];
 } else {
-$1=self["@items"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLStackListWidget)})},

+ 67 - 52
js/Helios-Inspector.js

@@ -61,9 +61,10 @@ fn: function (){
 var self=this;
 var selection;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 selection=_st(self["@model"])._selection();
-if(smalltalk.assert(_st(_st(_st(self["@model"])._variables())._keys())._includes_(selection))){
+$2=_st(_st(_st(self["@model"])._variables())._keys())._includes_(selection);
+if(smalltalk.assert($2)){
 $1=_st(_st(self["@model"])._instVarObjectAt_(selection))._printString();
 } else {
 $1="";
@@ -88,12 +89,13 @@ fn: function (){
 var self=this;
 function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@announcer"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@announcer"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@announcer"]=_st($Announcer())._new();
 $1=self["@announcer"];
 } else {
-$1=self["@announcer"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorModel)})},
@@ -112,12 +114,13 @@ fn: function (){
 var self=this;
 function $HLCodeModel(){return smalltalk.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@code"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@code"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@code"]=_st($HLCodeModel())._on_(self._environment());
 $1=self["@code"];
 } else {
-$1=self["@code"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"code",{},smalltalk.HLInspectorModel)})},
@@ -136,11 +139,12 @@ fn: function (){
 var self=this;
 function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@environment"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@environment"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=_st(_st($HLManager())._current())._environment();
 } else {
-$1=self["@environment"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLInspectorModel)})},
@@ -244,11 +248,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@label"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@label"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=_st(self._inspectee())._printString();
 } else {
-$1=self["@label"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLInspectorModel)})},
@@ -348,11 +353,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@selection"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@selection"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self["@selection"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.HLInspectorModel)})},
@@ -405,11 +411,12 @@ fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@variables"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@variables"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=_st($Dictionary())._new();
 } else {
-$1=self["@variables"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.HLInspectorModel)})},
@@ -468,12 +475,13 @@ fn: function (){
 var self=this;
 function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@announcer"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@announcer"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@announcer"]=_st($Announcer())._new();
 $1=self["@announcer"];
 } else {
-$1=self["@announcer"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorVariablesWidget)})},
@@ -561,7 +569,9 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(_st(self._variables()).__eq(self._items()))){
+var $1;
+$1=_st(self._variables()).__eq(self._items());
+if(! smalltalk.assert($1)){
 self._resetItems();
 smalltalk.HLInspectorVariablesWidget.superclass.fn.prototype._refresh.apply(_st(self), []);
 };
@@ -714,16 +724,17 @@ fn: function (){
 var self=this;
 function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@codeWidget"]) == nil || $receiver == null){
-$2=_st($HLCodeWidget())._new();
-_st($2)._model_(_st(self["@model"])._code());
-_st($2)._receiver_(_st(self["@model"])._inspectee());
-$3=_st($2)._yourself();
-self["@codeWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@codeWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLCodeWidget())._new();
+_st($3)._model_(_st(self["@model"])._code());
+_st($3)._receiver_(_st(self["@model"])._inspectee());
+$4=_st($3)._yourself();
+self["@codeWidget"]=$4;
 $1=self["@codeWidget"];
 } else {
-$1=self["@codeWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLInspectorWidget)})},
@@ -742,15 +753,16 @@ fn: function (){
 var self=this;
 function $HLInspectorDisplayWidget(){return smalltalk.HLInspectorDisplayWidget||(typeof HLInspectorDisplayWidget=="undefined"?nil:HLInspectorDisplayWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@displayWidget"]) == nil || $receiver == null){
-$2=_st($HLInspectorDisplayWidget())._new();
-_st($2)._model_(self._model());
-$3=_st($2)._yourself();
-self["@displayWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@displayWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLInspectorDisplayWidget())._new();
+_st($3)._model_(self._model());
+$4=_st($3)._yourself();
+self["@displayWidget"]=$4;
 $1=self["@displayWidget"];
 } else {
-$1=self["@displayWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"displayWidget",{},smalltalk.HLInspectorWidget)})},
@@ -857,12 +869,13 @@ fn: function (){
 var self=this;
 function $HLInspectorModel(){return smalltalk.HLInspectorModel||(typeof HLInspectorModel=="undefined"?nil:HLInspectorModel)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@model"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@model"];
+if(($receiver = $2) == nil || $receiver == null){
 self._model_(_st($HLInspectorModel())._new());
 $1=self["@model"];
 } else {
-$1=self["@model"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLInspectorWidget)})},
@@ -1195,15 +1208,16 @@ fn: function (){
 var self=this;
 function $HLInspectorVariablesWidget(){return smalltalk.HLInspectorVariablesWidget||(typeof HLInspectorVariablesWidget=="undefined"?nil:HLInspectorVariablesWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@variablesWidget"]) == nil || $receiver == null){
-$2=_st($HLInspectorVariablesWidget())._new();
-_st($2)._model_(self._model());
-$3=_st($2)._yourself();
-self["@variablesWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@variablesWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLInspectorVariablesWidget())._new();
+_st($3)._model_(self._model());
+$4=_st($3)._yourself();
+self["@variablesWidget"]=$4;
 $1=self["@variablesWidget"];
 } else {
-$1=self["@variablesWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"variablesWidget",{},smalltalk.HLInspectorWidget)})},
@@ -1308,12 +1322,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@inspectors"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@inspectors"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@inspectors"]=_st($OrderedCollection())._new();
 $1=self["@inspectors"];
 } else {
-$1=self["@inspectors"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inspectors",{},smalltalk.HLInspector.klass)})},

+ 132 - 90
js/Helios-KeyBindings.js

@@ -222,7 +222,9 @@ fn: function (){
 var self=this;
 function $HLKeyBinder(){return smalltalk.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(self._command())._isInputRequired())){
+var $1;
+$1=_st(self._command())._isInputRequired();
+if(smalltalk.assert($1)){
 _st(_st(_st($HLKeyBinder())._current())._helper())._showWidget_(self._inputWidget());
 } else {
 self._executeCommand();
@@ -523,11 +525,13 @@ fn: function (aString,aBinding){
 var self=this;
 var binding;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 binding=self._at_(aString);
-if(($receiver = binding) == nil || $receiver == null){
+$1=binding;
+if(($receiver = $1) == nil || $receiver == null){
 return self;
 } else {
-binding;
+$1;
 };
 _st(binding)._add_(aBinding);
 return self}, function($ctx1) {$ctx1.fill(self,"at:add:",{aString:aString,aBinding:aBinding,binding:binding},smalltalk.HLBindingGroup)})},
@@ -570,12 +574,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@bindings"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@bindings"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@bindings"]=_st($OrderedCollection())._new();
 $1=self["@bindings"];
 } else {
-$1=self["@bindings"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"bindings",{},smalltalk.HLBindingGroup)})},
@@ -648,7 +653,9 @@ category: 'rendering',
 fn: function (aBindingHelper,html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(self._isActive())){
+var $1;
+$1=self._isActive();
+if(smalltalk.assert($1)){
 _st(aBindingHelper)._renderBindingGroup_on_(self,html);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:html:",{aBindingHelper:aBindingHelper,html:html},smalltalk.HLBindingGroup)})},
@@ -670,14 +677,15 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@callback"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@callback"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@callback"]=(function(value){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,2)})});
 $1=self["@callback"];
 } else {
-$1=self["@callback"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"callback",{},smalltalk.HLBindingActionInputWidget)})},
@@ -729,11 +737,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@defaultValue"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@defaultValue"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self["@defaultValue"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"defaultValue",{},smalltalk.HLBindingActionInputWidget)})},
@@ -864,11 +873,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@inputCompletion"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@inputCompletion"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=[];
 } else {
-$1=self["@inputCompletion"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},smalltalk.HLBindingActionInputWidget)})},
@@ -902,12 +912,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@message"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@message"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@message"]="";
 $1=self["@message"];
 } else {
-$1=self["@message"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"message",{},smalltalk.HLBindingActionInputWidget)})},
@@ -941,10 +952,12 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = self["@wrapper"]) == nil || $receiver == null){
+var $1;
+$1=self["@wrapper"];
+if(($receiver = $1) == nil || $receiver == null){
 return self;
 } else {
-self["@wrapper"];
+$1;
 };
 _st(self["@wrapper"])._class_(self._status());
 _st(self["@messageTag"])._contents_(self._message());
@@ -963,51 +976,53 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$5,$8,$7,$6,$4,$9,$10,$11,$2,$12;
-if(($receiver = self["@wrapper"]) == nil || $receiver == null){
+var $1,$2,$4,$6,$8,$10,$9,$7,$5,$11,$12,$13,$3,$14;
+$1=self["@wrapper"];
+if(($receiver = $1) == nil || $receiver == null){
 self["@wrapper"]=_st(html)._span();
 $ctx1.sendIdx["span"]=1;
 self["@wrapper"];
 } else {
-self["@wrapper"];
+$1;
 };
-$1=self["@wrapper"];
-_st($1)._class_(self._status());
+$2=self["@wrapper"];
+_st($2)._class_(self._status());
 $ctx1.sendIdx["class:"]=1;
-$2=_st($1)._with_((function(){
+$3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-$3=_st(html)._input();
-_st($3)._placeholder_(self._ghostText());
-_st($3)._value_(self._defaultValue());
-$5=$3;
-$6=_st((function(event){
+$4=_st(html)._input();
+_st($4)._placeholder_(self._ghostText());
+_st($4)._value_(self._defaultValue());
+$6=$4;
+$7=_st((function(event){
 return smalltalk.withContext(function($ctx3) {
-if(smalltalk.assert(_st(_st(event)._which()).__eq((13)))){
-$8=_st(self["@input"])._asJQuery();
+$8=_st(_st(event)._which()).__eq((13));
+if(smalltalk.assert($8)){
+$10=_st(self["@input"])._asJQuery();
 $ctx3.sendIdx["asJQuery"]=1;
-$7=_st($8)._val();
-return self._evaluate_($7);
+$9=_st($10)._val();
+return self._evaluate_($9);
 };
 }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,3)})}))._yourself();
 $ctx2.sendIdx["yourself"]=1;
-$4=_st($5)._onKeyDown_($6);
-self["@input"]=$4;
+$5=_st($6)._onKeyDown_($7);
+self["@input"]=$5;
 self["@input"];
-$9=_st(self["@input"])._asJQuery();
+$11=_st(self["@input"])._asJQuery();
 $ctx2.sendIdx["asJQuery"]=2;
-_st($9)._typeahead_(smalltalk.HashedCollection._from_(["source".__minus_gt(self._inputCompletion())]));
-$10=_st(html)._span();
-_st($10)._class_("help-inline");
-_st($10)._with_(self._message());
-$11=_st($10)._yourself();
-self["@messageTag"]=$11;
+_st($11)._typeahead_(smalltalk.HashedCollection._from_(["source".__minus_gt(self._inputCompletion())]));
+$12=_st(html)._span();
+_st($12)._class_("help-inline");
+_st($12)._with_(self._message());
+$13=_st($12)._yourself();
+self["@messageTag"]=$13;
 return self["@messageTag"];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 $ctx1.sendIdx["with:"]=1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-$12=_st(self["@input"])._asJQuery();
-return _st($12)._focus();
+$14=_st(self["@input"])._asJQuery();
+return _st($14)._focus();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLBindingActionInputWidget)})},
 args: ["html"],
@@ -1024,12 +1039,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@status"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@status"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@status"]="info";
 $1=self["@status"];
 } else {
-$1=self["@status"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"status",{},smalltalk.HLBindingActionInputWidget)})},
@@ -1115,7 +1131,9 @@ category: 'actions',
 fn: function (aBinding){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(_st(aBinding)._isActive())){
+var $1;
+$1=_st(aBinding)._isActive();
+if(! smalltalk.assert($1)){
 return self;
 };
 self._selectBinding_(aBinding);
@@ -1135,12 +1153,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@bindings"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@bindings"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@bindings"]=self._defaultBindings();
 $1=self["@bindings"];
 } else {
-$1=self["@bindings"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"bindings",{},smalltalk.HLKeyBinder)})},
@@ -1158,8 +1177,10 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = self["@selectedBinding"]) == nil || $receiver == null){
-self["@selectedBinding"];
+var $1;
+$1=self["@selectedBinding"];
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 _st(self["@selectedBinding"])._release();
 };
@@ -1288,9 +1309,11 @@ fn: function (anEvent){
 var self=this;
 var binding;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 binding=_st(self._selectedBinding())._atKey_(_st(anEvent)._which());
-if(($receiver = binding) == nil || $receiver == null){
-binding;
+$1=binding;
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 self._applyBinding_(binding);
 _st(anEvent)._preventDefault();
@@ -1311,8 +1334,11 @@ category: 'events',
 fn: function (event){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(_st(event)._which()).__eq(self._activationKey()))){
-if(smalltalk.assert(_st(event)._ctrlKey())){
+var $1,$2;
+$1=_st(_st(event)._which()).__eq(self._activationKey());
+if(smalltalk.assert($1)){
+$2=_st(event)._ctrlKey();
+if(smalltalk.assert($2)){
 self._activate();
 _st(event)._preventDefault();
 return false;
@@ -1333,8 +1359,9 @@ category: 'events',
 fn: function (event){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._isActive())){
+var $2,$1;
+$2=self._isActive();
+if(smalltalk.assert($2)){
 $1=self._handleActiveKeyDown_(event);
 } else {
 $1=self._handleInactiveKeyDown_(event);
@@ -1413,7 +1440,9 @@ category: 'actions',
 fn: function (aBinding){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(aBinding).__eq(self["@selectedBinding"]))){
+var $1;
+$1=_st(aBinding).__eq(self["@selectedBinding"]);
+if(smalltalk.assert($1)){
 return self;
 };
 self["@selectedBinding"]=aBinding;
@@ -1433,11 +1462,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@selectedBinding"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@selectedBinding"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._bindings();
 } else {
-$1=self["@selectedBinding"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selectedBinding",{},smalltalk.HLKeyBinder)})},
@@ -1494,12 +1524,13 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@current"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@current"]=smalltalk.HLKeyBinder.klass.superclass.fn.prototype._new.apply(_st(self), []);
 $1=self["@current"];
 } else {
-$1=self["@current"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.HLKeyBinder.klass)})},
@@ -1794,14 +1825,15 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2;
+var $1,$3,$5,$4,$2;
 $1=_st(html)._span();
 _st($1)._class_("selected");
 $3=$1;
-if(($receiver = _st(self._selectedBinding())._label()) == nil || $receiver == null){
+$5=_st(self._selectedBinding())._label();
+if(($receiver = $5) == nil || $receiver == null){
 $4="Action";
 } else {
-$4=_st(self._selectedBinding())._label();
+$4=$5;
 };
 $2=_st($3)._with_($4);
 return self}, function($ctx1) {$ctx1.fill(self,"renderLabelOn:",{html:html},smalltalk.HLKeyBinderHelperWidget)})},
@@ -2014,10 +2046,12 @@ category: 'events handling',
 fn: function (anEvent,anInteger,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(_st(_st(anEvent)._which()).__eq(anInteger))._and_((function(){
+var $1;
+$1=_st(_st(_st(anEvent)._which()).__eq(anInteger))._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._isKeyDown())._not();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+if(smalltalk.assert($1)){
 self._whileKeyDownDo_(aBlock);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"handleEvent:forKey:action:",{anEvent:anEvent,anInteger:anInteger,aBlock:aBlock},smalltalk.HLRepeatedKeyDownHandler)})},
@@ -2054,16 +2088,20 @@ category: 'events handling',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(self._isKeyDown())){
+var $1,$2,$3;
+$1=self._isKeyDown();
+if(smalltalk.assert($1)){
 self["@keyDown"]=false;
 self["@keyDown"];
-if(($receiver = self["@interval"]) == nil || $receiver == null){
-self["@interval"];
+$2=self["@interval"];
+if(($receiver = $2) == nil || $receiver == null){
+$2;
 } else {
 _st(self["@interval"])._clearInterval();
 };
-if(($receiver = self["@delay"]) == nil || $receiver == null){
-self["@delay"];
+$3=self["@delay"];
+if(($receiver = $3) == nil || $receiver == null){
+$3;
 } else {
 _st(self["@delay"])._clearTimeout();
 };
@@ -2083,11 +2121,12 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@keyDown"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@keyDown"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=false;
 } else {
-$1=self["@keyDown"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isKeyDown",{},smalltalk.HLRepeatedKeyDownHandler)})},
@@ -2106,12 +2145,13 @@ fn: function (){
 var self=this;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@keyBindings"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@keyBindings"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@keyBindings"]=_st($Dictionary())._new();
 $1=self["@keyBindings"];
 } else {
-$1=self["@keyBindings"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"keyBindings",{},smalltalk.HLRepeatedKeyDownHandler)})},
@@ -2147,11 +2187,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@repeatInterval"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@repeatInterval"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._defaultRepeatInterval();
 } else {
-$1=self["@repeatInterval"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"repeatInterval",{},smalltalk.HLRepeatedKeyDownHandler)})},
@@ -2185,10 +2226,11 @@ category: 'actions',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 $1=_st((function(){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(self._widget())._hasFocus())){
+$2=_st(self._widget())._hasFocus();
+if(smalltalk.assert($2)){
 return _st(aBlock)._value();
 } else {
 return self._handleKeyUp();

+ 49 - 40
js/Helios-References.js

@@ -157,13 +157,14 @@ fn: function (){
 var self=this;
 function $HLClassReferencesListWidget(){return smalltalk.HLClassReferencesListWidget||(typeof HLClassReferencesListWidget=="undefined"?nil:HLClassReferencesListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@classReferencesListWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@classReferencesListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@classReferencesListWidget"]=_st($HLClassReferencesListWidget())._on_(self._model());
 self["@classReferencesListWidget"];
 $1=_st(self["@classReferencesListWidget"])._next_(self._regexpListWidget());
 } else {
-$1=self["@classReferencesListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"classReferencesListWidget",{},smalltalk.HLReferences)})},
@@ -182,13 +183,14 @@ fn: function (){
 var self=this;
 function $HLImplementorsListWidget(){return smalltalk.HLImplementorsListWidget||(typeof HLImplementorsListWidget=="undefined"?nil:HLImplementorsListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@implementorsListWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@implementorsListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@implementorsListWidget"]=_st($HLImplementorsListWidget())._on_(self._model());
 self["@implementorsListWidget"];
 $1=_st(self["@implementorsListWidget"])._next_(self._classReferencesListWidget());
 } else {
-$1=self["@implementorsListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"implementorsListWidget",{},smalltalk.HLReferences)})},
@@ -207,15 +209,16 @@ fn: function (){
 var self=this;
 function $HLReferencesModel(){return smalltalk.HLReferencesModel||(typeof HLReferencesModel=="undefined"?nil:HLReferencesModel)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@model"]) == nil || $receiver == null){
-$2=_st($HLReferencesModel())._new();
-_st($2)._environment_(_st(self._manager())._environment());
-$3=_st($2)._yourself();
-self["@model"]=$3;
+var $2,$3,$4,$1;
+$2=self["@model"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLReferencesModel())._new();
+_st($3)._environment_(_st(self._manager())._environment());
+$4=_st($3)._yourself();
+self["@model"]=$4;
 $1=self["@model"];
 } else {
-$1=self["@model"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLReferences)})},
@@ -250,13 +253,14 @@ fn: function (){
 var self=this;
 function $HLRegexpListWidget(){return smalltalk.HLRegexpListWidget||(typeof HLRegexpListWidget=="undefined"?nil:HLRegexpListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@regexpListWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@regexpListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@regexpListWidget"]=_st($HLRegexpListWidget())._on_(self._model());
 self["@regexpListWidget"];
 $1=_st(self["@regexpListWidget"])._next_(self._sourceCodeWidget());
 } else {
-$1=self["@regexpListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"regexpListWidget",{},smalltalk.HLReferences)})},
@@ -341,13 +345,14 @@ fn: function (){
 var self=this;
 function $HLSendersListWidget(){return smalltalk.HLSendersListWidget||(typeof HLSendersListWidget=="undefined"?nil:HLSendersListWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@sendersListWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@sendersListWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@sendersListWidget"]=_st($HLSendersListWidget())._on_(self._model());
 self["@sendersListWidget"];
 $1=_st(self["@sendersListWidget"])._next_(self._implementorsListWidget());
 } else {
-$1=self["@sendersListWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"sendersListWidget",{},smalltalk.HLReferences)})},
@@ -366,15 +371,16 @@ fn: function (){
 var self=this;
 function $HLBrowserCodeWidget(){return smalltalk.HLBrowserCodeWidget||(typeof HLBrowserCodeWidget=="undefined"?nil:HLBrowserCodeWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@sourceCodeWidget"]) == nil || $receiver == null){
-$2=_st($HLBrowserCodeWidget())._new();
-_st($2)._browserModel_(self._model());
-$3=_st($2)._yourself();
-self["@sourceCodeWidget"]=$3;
+var $2,$3,$4,$1;
+$2=self["@sourceCodeWidget"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($HLBrowserCodeWidget())._new();
+_st($3)._browserModel_(self._model());
+$4=_st($3)._yourself();
+self["@sourceCodeWidget"]=$4;
 $1=self["@sourceCodeWidget"];
 } else {
-$1=self["@sourceCodeWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"sourceCodeWidget",{},smalltalk.HLReferences)})},
@@ -842,20 +848,21 @@ var self=this;
 var references;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 references=_st($OrderedCollection())._new();
 _st(self._classesAndMetaclasses())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(_st(each)._methodDictionary())._values())._do_((function(method){
 return smalltalk.withContext(function($ctx3) {
-if(smalltalk.assert(_st(_st(method)._referencedClasses())._includes_(aString))){
+$1=_st(_st(method)._referencedClasses())._includes_(aString);
+if(smalltalk.assert($1)){
 return _st(references)._add_(method);
 };
 }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 $ctx1.sendIdx["do:"]=1;
-$1=references;
-return $1;
+$2=references;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
 args: ["aString"],
 source: "classReferencesOf: aString\x0a\x09\x22Answer all methods referencing the class named aString\x22\x0a\x09\x0a\x09| references |\x0a\x09\x0a\x09references := OrderedCollection new.\x0a\x09\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary values do: [ :method |\x0a\x09\x09\x09(method referencedClasses includes: aString) ifTrue: [\x0a\x09\x09\x09\x09references add: method ] ] ].\x0a\x09\x09\x09\x09\x0a\x09^ references",
@@ -889,14 +896,15 @@ category: 'cache',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@classesAndMetaclassesCache"]) == nil || $receiver == null){
+var $1,$2;
+$1=self["@classesAndMetaclassesCache"];
+if(($receiver = $1) == nil || $receiver == null){
 self._updateClassesAndMetaclassesCache();
 } else {
-self["@classesAndMetaclassesCache"];
+$1;
 };
-$1=self["@classesAndMetaclassesCache"];
-return $1;
+$2=self["@classesAndMetaclassesCache"];
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
 args: [],
 source: "classesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache ifNil: [ self updateClassesAndMetaclassesCache ].\x0a\x09\x0a\x09^ classesAndMetaclassesCache",
@@ -971,14 +979,15 @@ category: 'cache',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@methodsCache"]) == nil || $receiver == null){
+var $1,$2;
+$1=self["@methodsCache"];
+if(($receiver = $1) == nil || $receiver == null){
 self._updateMethodsCache();
 } else {
-self["@methodsCache"];
+$1;
 };
-$1=self["@methodsCache"];
-return $1;
+$2=self["@methodsCache"];
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"methodsCache",{},smalltalk.HLReferencesModel)})},
 args: [],
 source: "methodsCache\x0a\x09methodsCache ifNil: [ self updateMethodsCache ].\x0a\x09\x0a\x09^ methodsCache",

+ 8 - 5
js/Helios-Transcript.js

@@ -84,8 +84,10 @@ category: 'actions',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = self["@textarea"]) == nil || $receiver == null){
-self["@textarea"];
+var $1;
+$1=self["@textarea"];
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 _st(_st(self["@textarea"])._asJQuery())._append_(_st(aString)._asString());
 };
@@ -200,12 +202,13 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@transcripts"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@transcripts"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@transcripts"]=_st($OrderedCollection())._new();
 $1=self["@transcripts"];
 } else {
-$1=self["@transcripts"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"transcripts",{},smalltalk.HLTranscriptHandler.klass)})},

+ 96 - 74
js/Helios-Workspace.js

@@ -11,12 +11,13 @@ fn: function (){
 var self=this;
 function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@announcer"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@announcer"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@announcer"]=_st($Announcer())._new();
 $1=self["@announcer"];
 } else {
-$1=self["@announcer"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLCodeModel)})},
@@ -71,11 +72,12 @@ fn: function (){
 var self=this;
 function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@environment"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@environment"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=_st(_st($HLManager())._current())._environment();
 } else {
-$1=self["@environment"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"environment",{},smalltalk.HLCodeModel)})},
@@ -125,12 +127,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@receiver"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@receiver"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@receiver"]=self._defaultReceiver();
 $1=self["@receiver"];
 } else {
-$1=self["@receiver"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.HLCodeModel)})},
@@ -280,9 +283,11 @@ category: 'accessing',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 _st(self["@editor"])._setValue_(aString);
-if(($receiver = self["@state"]) == nil || $receiver == null){
-self["@state"];
+$1=self["@state"];
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 self._updateState();
 };
@@ -319,8 +324,9 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(_st(self["@editor"])._somethingSelected())){
+var $2,$1;
+$2=_st(self["@editor"])._somethingSelected();
+if(smalltalk.assert($2)){
 $1=self._selection();
 } else {
 $1=self._currentLine();
@@ -534,12 +540,13 @@ fn: function (){
 var self=this;
 function $HLCodeModel(){return smalltalk.HLCodeModel||(typeof HLCodeModel=="undefined"?nil:HLCodeModel)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@model"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@model"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@model"]=_st($HLCodeModel())._new();
 $1=self["@model"];
 } else {
-$1=self["@model"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLCodeWidget)})},
@@ -978,14 +985,15 @@ category: 'updating',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-if(smalltalk.assert(self._hasModification())){
-$1=_st(self["@state"])._asJQuery();
+var $1,$2,$3;
+$1=self._hasModification();
+if(smalltalk.assert($1)){
+$2=_st(self["@state"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
-_st($1)._addClass_("modified");
+_st($2)._addClass_("modified");
 } else {
-$2=_st(self["@state"])._asJQuery();
-_st($2)._removeClass_("modified");
+$3=_st(self["@state"])._asJQuery();
+_st($3)._removeClass_("modified");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"updateState",{},smalltalk.HLCodeWidget)})},
 args: [],
@@ -1060,7 +1068,7 @@ var cursor,token,completions;
 function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
 function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2,$6,$9,$10,$8,$7,$13,$14,$12,$11,$5;
+var $1,$4,$3,$2,$5,$7,$10,$11,$9,$8,$14,$15,$13,$12,$6;
 cursor=_st(anEditor)._getCursor();
 token=_st(anEditor)._getTokenAt_(cursor);
 $1=token;
@@ -1070,27 +1078,28 @@ $3=_st($4)._value_value_(_st(anEditor)._getMode(),_st(token)._at_("state"));
 $ctx1.sendIdx["value:value:"]=1;
 $2=_st($3)._state();
 _st($1)._at_put_("state",$2);
-if(smalltalk.assert(_st(_st(token)._type()).__eq("variable"))){
+$5=_st(_st(token)._type()).__eq("variable");
+if(smalltalk.assert($5)){
 completions=_st($HLCodeWidget())._variableHintFor_token_(anEditor,token);
 } else {
 completions=_st($HLCodeWidget())._messageHintFor_token_(anEditor,token);
 };
-$6="list".__minus_gt(completions);
+$7="list".__minus_gt(completions);
 $ctx1.sendIdx["->"]=1;
-$9=_st($CodeMirror())._basicAt_("Pos");
+$10=_st($CodeMirror())._basicAt_("Pos");
 $ctx1.sendIdx["basicAt:"]=2;
-$10=_st(cursor)._line();
+$11=_st(cursor)._line();
 $ctx1.sendIdx["line"]=1;
-$8=_st($9)._value_value_($10,_st(token)._end());
+$9=_st($10)._value_value_($11,_st(token)._end());
 $ctx1.sendIdx["value:value:"]=2;
-$7="from".__minus_gt($8);
+$8="from".__minus_gt($9);
 $ctx1.sendIdx["->"]=2;
-$13=_st($CodeMirror())._basicAt_("Pos");
-$14=_st(cursor)._line();
-$12=_st($13)._value_value_($14,_st(token)._start());
-$11="to".__minus_gt($12);
-$5=smalltalk.HashedCollection._from_([$6,$7,$11]);
-return $5;
+$14=_st($CodeMirror())._basicAt_("Pos");
+$15=_st(cursor)._line();
+$13=_st($14)._value_value_($15,_st(token)._start());
+$12="to".__minus_gt($13);
+$6=smalltalk.HashedCollection._from_([$7,$8,$12]);
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"hintFor:options:",{anEditor:anEditor,options:options,cursor:cursor,token:token,completions:completions},smalltalk.HLCodeWidget.klass)})},
 args: ["anEditor", "options"],
 source: "hintFor: anEditor options: options\x0a\x09| cursor token completions |\x0a\x09\x0a\x09cursor := anEditor getCursor.\x0a\x09token := anEditor getTokenAt: cursor.\x0a\x09token at: 'state' put: ((CodeMirror basicAt: 'innerMode')\x0a\x09\x09value: anEditor getMode value: (token at: 'state')) state.\x0a\x09\x0a\x09completions := token type = 'variable' \x0a\x09\x09ifTrue: [ HLCodeWidget variableHintFor: anEditor token: token ]\x0a\x09\x09ifFalse: [ HLCodeWidget messageHintFor: anEditor token: token ].\x0a\x09\x0a\x09^ #{\x0a\x09\x09'list' -> completions.\x0a\x09\x09'from' -> ((CodeMirror basicAt: 'Pos') value: cursor line value: token end).\x0a\x09\x09'to' -> ((CodeMirror basicAt: 'Pos') value: cursor line value: token start)\x0a\x09}",
@@ -1127,8 +1136,9 @@ fn: function (){
 var self=this;
 function $HLManager(){return smalltalk.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(_st(_st(_st($HLManager())._current())._keyBinder())._systemIsMac())){
+var $2,$1;
+$2=_st(_st(_st($HLManager())._current())._keyBinder())._systemIsMac();
+if(smalltalk.assert($2)){
 $1=self._macKeyMap();
 } else {
 $1=self._pcKeyMap();
@@ -1458,11 +1468,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@methodContents"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@methodContents"];
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self["@methodContents"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methodContents",{},smalltalk.HLNavigationCodeWidget)})},
@@ -1680,8 +1691,10 @@ var self=this;
 var block;
 function $HLChangeForbidden(){return smalltalk.HLChangeForbidden||(typeof HLChangeForbidden=="undefined"?nil:HLChangeForbidden)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 block=_st(anAnnouncement)._actionBlock();
-if(smalltalk.assert(self._hasModification())){
+$1=self._hasModification();
+if(smalltalk.assert($1)){
 self._confirm_ifTrue_("Changes have not been saved. Do you want to discard these changes?",(function(){
 return smalltalk.withContext(function($ctx2) {
 self._methodContents_(self._contents());
@@ -1705,14 +1718,15 @@ fn: function (anAnnouncement){
 var self=this;
 var class_;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 class_=_st(anAnnouncement)._item();
-if(($receiver = class_) == nil || $receiver == null){
-$1=self._contents_("");
+$1=class_;
+if(($receiver = $1) == nil || $receiver == null){
+$2=self._contents_("");
 $ctx1.sendIdx["contents:"]=1;
-return $1;
+return $2;
 } else {
-class_;
+$1;
 };
 self._contents_(_st(class_)._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLBrowserCodeWidget)})},
@@ -1808,14 +1822,15 @@ fn: function (anAnnouncement){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 method=_st(anAnnouncement)._item();
-if(($receiver = method) == nil || $receiver == null){
-$1=self._contents_("");
+$1=method;
+if(($receiver = $1) == nil || $receiver == null){
+$2=self._contents_("");
 $ctx1.sendIdx["contents:"]=1;
-return $1;
+return $2;
 } else {
-method;
+$1;
 };
 self._contents_(_st(method)._source());
 return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
@@ -1834,14 +1849,15 @@ fn: function (anAnnouncement){
 var self=this;
 var package_;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 package_=_st(anAnnouncement)._item();
-if(($receiver = package_) == nil || $receiver == null){
-$1=self._contents_("");
+$1=package_;
+if(($receiver = $1) == nil || $receiver == null){
+$2=self._contents_("");
 $ctx1.sendIdx["contents:"]=1;
-return $1;
+return $2;
 } else {
-package_;
+$1;
 };
 self._contents_(_st(package_)._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement,package_:package_},smalltalk.HLBrowserCodeWidget)})},
@@ -1861,18 +1877,19 @@ var self=this;
 var lineIndex,newContents;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$6,$5,$4,$3;
+var $1,$3,$2,$7,$6,$5,$4;
 lineIndex=(1);
 self._contents_(_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._contents())._linesDo_((function(each){
 return smalltalk.withContext(function($ctx3) {
-if(smalltalk.assert(_st(lineIndex).__eq(_st(anAnnouncement)._line()))){
-$2=_st(anAnnouncement)._column();
+$1=_st(lineIndex).__eq(_st(anAnnouncement)._line());
+if(smalltalk.assert($1)){
+$3=_st(anAnnouncement)._column();
 $ctx3.sendIdx["column"]=1;
-$1=_st(each)._copyFrom_to_((1),$2);
+$2=_st(each)._copyFrom_to_((1),$3);
 $ctx3.sendIdx["copyFrom:to:"]=1;
-_st(stream)._nextPutAll_($1);
+_st(stream)._nextPutAll_($2);
 $ctx3.sendIdx["nextPutAll:"]=1;
 _st(stream)._nextPutAll_("<- ");
 $ctx3.sendIdx["nextPutAll:"]=2;
@@ -1880,13 +1897,13 @@ _st(stream)._nextPutAll_(_st(anAnnouncement)._message());
 $ctx3.sendIdx["nextPutAll:"]=3;
 _st(stream)._nextPutAll_(" ");
 $ctx3.sendIdx["nextPutAll:"]=4;
-$6=_st(anAnnouncement)._column();
-$5=_st($6).__plus((1));
+$7=_st(anAnnouncement)._column();
+$6=_st($7).__plus((1));
 $ctx3.sendIdx["+"]=1;
-$4=_st(each)._copyFrom_to_($5,_st(each)._size());
-$3=_st(stream)._nextPutAll_($4);
+$5=_st(each)._copyFrom_to_($6,_st(each)._size());
+$4=_st(stream)._nextPutAll_($5);
 $ctx3.sendIdx["nextPutAll:"]=5;
-$3;
+$4;
 } else {
 _st(stream)._nextPutAll_(each);
 $ctx3.sendIdx["nextPutAll:"]=6;
@@ -2053,10 +2070,13 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(self._hasModification())){
+var $1,$2;
+$1=self._hasModification();
+if(smalltalk.assert($1)){
 return self;
 };
-if(smalltalk.assert(self._hasFocus())){
+$2=self._hasFocus();
+if(smalltalk.assert($2)){
 return self;
 };
 self._contents_(_st(_st(self._browserModel())._selectedMethod())._source());
@@ -2197,12 +2217,13 @@ fn: function (){
 var self=this;
 function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@codeWidget"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@codeWidget"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@codeWidget"]=_st($HLCodeWidget())._new();
 $1=self["@codeWidget"];
 } else {
-$1=self["@codeWidget"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLWorkspace)})},
@@ -2292,12 +2313,13 @@ fn: function (){
 var self=this;
 function $HLTranscript(){return smalltalk.HLTranscript||(typeof HLTranscript=="undefined"?nil:HLTranscript)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@transcript"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@transcript"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@transcript"]=_st($HLTranscript())._new();
 $1=self["@transcript"];
 } else {
-$1=self["@transcript"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"transcript",{},smalltalk.HLWorkspace)})},

File diff suppressed because it is too large
+ 285 - 227
js/IDE.js


+ 41 - 29
js/Importer-Exporter.js

@@ -29,13 +29,15 @@ category: 'convenience',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-if(smalltalk.assert(_st(aClass)._isMetaclass())){
-$2=_st(_st(aClass)._instanceClass())._name();
+var $2,$3,$4,$1;
+$2=_st(aClass)._isMetaclass();
+if(smalltalk.assert($2)){
+$3=_st(_st(aClass)._instanceClass())._name();
 $ctx1.sendIdx["name"]=1;
-$1=_st($2).__comma(" class");
+$1=_st($3).__comma(" class");
 } else {
-if(smalltalk.assert(_st(aClass)._isNil())){
+$4=_st(aClass)._isNil();
+if(smalltalk.assert($4)){
 $1="nil";
 } else {
 $1=_st(aClass)._name();
@@ -102,21 +104,22 @@ function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof Ordere
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ExportMethodProtocol(){return smalltalk.ExportMethodProtocol||(typeof ExportMethodProtocol=="undefined"?nil:ExportMethodProtocol)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 extensionName="*".__comma(_st(aPackage)._name());
 result=_st($OrderedCollection())._new();
 _st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st([each,_st(each)._class()])._do_((function(behavior){
 return smalltalk.withContext(function($ctx3) {
-if(smalltalk.assert(_st(_st(behavior)._protocols())._includes_(extensionName))){
+$1=_st(_st(behavior)._protocols())._includes_(extensionName);
+if(smalltalk.assert($1)){
 return _st(result)._add_(_st($ExportMethodProtocol())._name_theClass_(extensionName,behavior));
 };
 }, function($ctx3) {$ctx3.fillBlock({behavior:behavior},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 $ctx1.sendIdx["do:"]=1;
-$1=result;
-return $1;
+$2=result;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"extensionProtocolsOfPackage:",{aPackage:aPackage,extensionName:extensionName,result:result},smalltalk.AbstractExporter)})},
 args: ["aPackage"],
 source: "extensionProtocolsOfPackage: aPackage\x0a\x09| extensionName result |\x0a\x09\x0a\x09extensionName := '*', aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09\x0a\x09\x22The classes must be loaded since it is extensions only.\x0a\x09Therefore sorting (dependency resolution) does not matter here.\x0a\x09Not sorting improves the speed by a number of magnitude.\x22\x0a\x09\x0a\x09Smalltalk current classes do: [ :each |\x0a\x09\x09{each. each class} do: [ :behavior |\x0a\x09\x09\x09(behavior protocols includes: extensionName) ifTrue: [\x0a\x09\x09\x09\x09result add: (ExportMethodProtocol name: extensionName theClass: behavior) ] ] ].\x0a\x0a\x09^result",
@@ -468,7 +471,7 @@ function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 function $MethodCategory(){return smalltalk.MethodCategory||(typeof MethodCategory=="undefined"?nil:MethodCategory)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 name=_st(aPackage)._name();
 result=_st($OrderedCollection())._new();
 $ctx1.sendIdx["new"]=1;
@@ -480,7 +483,8 @@ map=_st($Dictionary())._new();
 map;
 _st(aClass)._protocolsDo_((function(category,methods){
 return smalltalk.withContext(function($ctx4) {
-if(smalltalk.assert(_st(category).__eq("*".__comma(name)))){
+$1=_st(category).__eq("*".__comma(name));
+if(smalltalk.assert($1)){
 return _st(map)._at_put_(category,methods);
 };
 }, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx3,3)})}));
@@ -494,8 +498,8 @@ return _st($MethodCategory())._name_theClass_methods_(category,aClass,_st(map)._
 }, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 $ctx1.sendIdx["do:"]=1;
-$1=result;
-return $1;
+$2=result;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"extensionCategoriesOfPackage:",{aPackage:aPackage,name:name,map:map,result:result},smalltalk.ChunkExporter)})},
 args: ["aPackage"],
 source: "extensionCategoriesOfPackage: aPackage\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| name map result |\x0a\x09name := aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [ :each |\x0a\x09\x09{each. each class} do: [ :aClass |\x0a\x09\x09\x09map := Dictionary new.\x0a\x09\x09\x09aClass protocolsDo: [ :category :methods |\x0a\x09\x09\x09\x09category = ('*', name) ifTrue: [ map at: category put: methods ] ].\x0a\x09\x09\x09result addAll: ((map keys sorted: [:a :b | a <= b ]) collect: [ :category |\x0a\x09\x09\x09\x09MethodCategory name: category theClass: aClass methods: (map at: category) ]) ] ].\x0a\x09^result",
@@ -514,22 +518,23 @@ var map;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 function $MethodCategory(){return smalltalk.MethodCategory||(typeof MethodCategory=="undefined"?nil:MethodCategory)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 map=_st($Dictionary())._new();
 _st(aClass)._protocolsDo_((function(each,methods){
 return smalltalk.withContext(function($ctx2) {
-if(! smalltalk.assert(_st(each)._match_("^\x5c*"))){
+$1=_st(each)._match_("^\x5c*");
+if(! smalltalk.assert($1)){
 return _st(map)._at_put_(each,methods);
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each,methods:methods},$ctx1,1)})}));
-$1=_st(_st(_st(map)._keys())._sorted_((function(a,b){
+$2=_st(_st(_st(map)._keys())._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 return _st(a).__lt_eq(b);
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,3)})})))._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st($MethodCategory())._name_theClass_methods_(each,aClass,_st(map)._at_(each));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
-return $1;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"ownCategoriesOfClass:",{aClass:aClass,map:map},smalltalk.ChunkExporter)})},
 args: ["aClass"],
 source: "ownCategoriesOfClass: aClass\x0a\x09\x22Answer the protocols of aClass that are not package extensions\x22\x0a\x09\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| map |\x0a\x09map := Dictionary new.\x0a\x09aClass protocolsDo: [ :each :methods |\x0a\x09\x09(each match: '^\x5c*') ifFalse: [ map at: each put: methods ] ].\x0a\x09^(map keys sorted: [:a :b | a <= b ]) collect: [ :each |\x0a\x09\x09MethodCategory name: each theClass: aClass methods: (map at: each) ]",
@@ -589,13 +594,15 @@ category: 'convenience',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-if(smalltalk.assert(_st(aClass)._isMetaclass())){
-$2=_st(_st(aClass)._instanceClass())._name();
+var $2,$3,$4,$1;
+$2=_st(aClass)._isMetaclass();
+if(smalltalk.assert($2)){
+$3=_st(_st(aClass)._instanceClass())._name();
 $ctx1.sendIdx["name"]=1;
-$1=_st($2).__comma(".klass");
+$1=_st($3).__comma(".klass");
 } else {
-if(smalltalk.assert(_st(aClass)._isNil())){
+$4=_st(aClass)._isNil();
+if(smalltalk.assert($4)){
 $1="nil";
 } else {
 $1=_st(aClass)._name();
@@ -1336,6 +1343,7 @@ var chunk,result,parser,lastEmpty;
 function $ChunkParser(){return smalltalk.ChunkParser||(typeof ChunkParser=="undefined"?nil:ChunkParser)}
 function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 parser=_st($ChunkParser())._on_(aStream);
 lastEmpty=false;
 _st((function(){
@@ -1345,13 +1353,15 @@ chunk;
 return _st(chunk)._isNil();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(chunk)._isEmpty())){
+$1=_st(chunk)._isEmpty();
+if(smalltalk.assert($1)){
 lastEmpty=true;
 return lastEmpty;
 } else {
 result=_st(_st($Compiler())._new())._evaluateExpression_(chunk);
 result;
-if(smalltalk.assert(lastEmpty)){
+$2=lastEmpty;
+if(smalltalk.assert($2)){
 lastEmpty=false;
 lastEmpty;
 return _st(result)._scanFrom_(parser);
@@ -1705,8 +1715,9 @@ fn: function (aString){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = _st(_st($Smalltalk())._current())._amdRequire()) == nil || $receiver == null){
+var $2,$1;
+$2=_st(_st($Smalltalk())._current())._amdRequire();
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._error_("AMD loader not present");
 } else {
 var require;
@@ -2171,11 +2182,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@namespace"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@namespace"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._defaultNamespace();
 } else {
-$1=self["@namespace"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"namespace",{},smalltalk.AmdPackageTransport)})},

+ 7 - 4
js/Kernel-Announcements.js

@@ -81,7 +81,9 @@ category: 'announcing',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(self._handlesAnnouncement_(anAnnouncement))){
+var $1;
+$1=self._handlesAnnouncement_(anAnnouncement);
+if(smalltalk.assert($1)){
 _st(self._valuable())._value_(anAnnouncement);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"deliver:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
@@ -306,12 +308,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@current"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@current"]=smalltalk.SystemAnnouncer.klass.superclass.fn.prototype._new.apply(_st(self), []);
 $1=self["@current"];
 } else {
-$1=self["@current"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.SystemAnnouncer.klass)})},

+ 40 - 29
js/Kernel-Classes.js

@@ -33,7 +33,7 @@ function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="unde
 function $MethodModified(){return smalltalk.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$4,$5,$6,$7,$8,$9;
+var $2,$3,$1,$4,$5,$6,$7,$8,$9,$10;
 oldMethod=_st(self._methodDictionary())._at_ifAbsent_(_st(aMethod)._selector(),(function(){
 return smalltalk.withContext(function($ctx2) {
 return nil;
@@ -48,20 +48,21 @@ $5=_st(aMethod)._protocol();
 _st($4)._addElement_($5);
 };
 self._basicAddCompiledMethod_(aMethod);
-if(($receiver = oldMethod) == nil || $receiver == null){
-$6=_st($MethodAdded())._new();
+$6=oldMethod;
+if(($receiver = $6) == nil || $receiver == null){
+$7=_st($MethodAdded())._new();
 $ctx1.sendIdx["new"]=1;
-_st($6)._method_(aMethod);
+_st($7)._method_(aMethod);
 $ctx1.sendIdx["method:"]=1;
-$7=_st($6)._yourself();
+$8=_st($7)._yourself();
 $ctx1.sendIdx["yourself"]=1;
-announcement=$7;
+announcement=$8;
 } else {
-$8=_st($MethodModified())._new();
-_st($8)._oldMethod_(oldMethod);
-_st($8)._method_(aMethod);
-$9=_st($8)._yourself();
-announcement=$9;
+$9=_st($MethodModified())._new();
+_st($9)._oldMethod_(oldMethod);
+_st($9)._method_(aMethod);
+$10=_st($9)._yourself();
+announcement=$10;
 };
 _st(_st($SystemAnnouncer())._current())._announce_(announcement);
 return self}, function($ctx1) {$ctx1.fill(self,"addCompiledMethod:",{aMethod:aMethod,oldMethod:oldMethod,announcement:announcement},smalltalk.Behavior)})},
@@ -299,11 +300,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._basicAt_("comment")) == nil || $receiver == null){
+var $2,$1;
+$2=self._basicAt_("comment");
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self._basicAt_("comment");
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"comment",{},smalltalk.Behavior)})},
@@ -573,7 +575,7 @@ fn: function (selector){
 var self=this;
 var lookupClass;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 var $early={};
 try {
 lookupClass=self;
@@ -582,9 +584,10 @@ return smalltalk.withContext(function($ctx2) {
 return _st(lookupClass).__eq(nil);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(lookupClass)._includesSelector_(selector))){
-$1=_st(lookupClass)._methodAt_(selector);
-throw $early=[$1];
+$1=_st(lookupClass)._includesSelector_(selector);
+if(smalltalk.assert($1)){
+$2=_st(lookupClass)._methodAt_(selector);
+throw $early=[$2];
 };
 lookupClass=_st(lookupClass)._superclass();
 return lookupClass;
@@ -1548,20 +1551,22 @@ var self=this;
 var theClass,thePackage;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3,$4;
 theClass=_st(_st($Smalltalk())._current())._at_(className);
 thePackage=self._createPackageNamed_(packageName);
-if(($receiver = theClass) == nil || $receiver == null){
-theClass;
+$1=theClass;
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 _st(theClass)._package_(thePackage);
-if(! smalltalk.assert(_st(_st(theClass)._superclass()).__eq_eq(aClass))){
-$1=self._migrateClassNamed_superclass_instanceVariableNames_package_(className,aClass,aCollection,packageName);
-return $1;
+$2=_st(_st(theClass)._superclass()).__eq_eq(aClass);
+if(! smalltalk.assert($2)){
+$3=self._migrateClassNamed_superclass_instanceVariableNames_package_(className,aClass,aCollection,packageName);
+return $3;
 };
 };
-$2=self._basicAddSubclassOf_named_instanceVariableNames_package_(aClass,className,aCollection,packageName);
-return $2;
+$4=self._basicAddSubclassOf_named_instanceVariableNames_package_(aClass,className,aCollection,packageName);
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"addSubclassOf:named:instanceVariableNames:package:",{aClass:aClass,className:className,aCollection:aCollection,packageName:packageName,theClass:theClass,thePackage:thePackage},smalltalk.ClassBuilder)})},
 args: ["aClass", "className", "aCollection", "packageName"],
 source: "addSubclassOf: aClass named: className instanceVariableNames: aCollection package: packageName\x0a\x09| theClass thePackage |\x0a\x09\x0a\x09theClass := Smalltalk current at: className.\x0a\x09thePackage := self createPackageNamed: packageName.\x0a\x09\x0a\x09theClass ifNotNil: [\x0a\x09\x09theClass package: thePackage.\x0a\x09\x09theClass superclass == aClass ifFalse: [\x0a\x09\x09\x09^ self\x0a\x09\x09\x09\x09migrateClassNamed: className\x0a\x09\x09\x09\x09superclass: aClass\x0a\x09\x09\x09\x09instanceVariableNames: aCollection\x0a\x09\x09\x09\x09package: packageName ] ].\x0a\x09\x09\x0a\x09^ self\x0a\x09\x09basicAddSubclassOf: aClass\x0a\x09\x09named: className\x0a\x09\x09instanceVariableNames: aCollection\x0a\x09\x09package: packageName",
@@ -1612,7 +1617,9 @@ category: 'private',
 fn: function (aClass,aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(_st(aClass)._isMetaclass())){
+var $1;
+$1=_st(aClass)._isMetaclass();
+if(! smalltalk.assert($1)){
 self._error_(_st(_st(aClass)._name()).__comma(" is not a metaclass"));
 };
 _st(aClass)._basicAt_put_("iVarNames",aCollection);
@@ -2164,8 +2171,10 @@ fn: function (aChunkParser){
 var self=this;
 var chunk;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 chunk=_st(aChunkParser)._nextChunk();
-if(! smalltalk.assert(_st(chunk)._isEmpty())){
+$1=_st(chunk)._isEmpty();
+if(! smalltalk.assert($1)){
 self._setComment_(chunk);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},smalltalk.ClassCommentReader)})},
@@ -2205,11 +2214,13 @@ var self=this;
 var children,others;
 function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 children=[];
 others=[];
 _st(aCollection)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(_st(each)._superclass()).__eq(self._theClass()))){
+$1=_st(_st(each)._superclass()).__eq(self._theClass());
+if(smalltalk.assert($1)){
 return _st(children)._add_(each);
 $ctx2.sendIdx["add:"]=1;
 } else {

+ 120 - 95
js/Kernel-Collections.js

@@ -320,11 +320,13 @@ category: 'testing',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 var $early={};
 try {
 self._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(aBlock)._value_(each))){
+$1=_st(aBlock)._value_(each);
+if(smalltalk.assert($1)){
 throw $early=[true];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
@@ -504,8 +506,9 @@ category: 'testing',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._isEmpty())){
+var $2,$1;
+$2=self._isEmpty();
+if(smalltalk.assert($2)){
 $1=_st(aBlock)._value();
 } else {
 $1=self;
@@ -526,7 +529,9 @@ category: 'testing',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._notEmpty())._ifTrue_(aBlock);
+var $1;
+$1=self._notEmpty();
+_st($1)._ifTrue_(aBlock);
 return self}, function($ctx1) {$ctx1.fill(self,"ifNotEmpty:",{aBlock:aBlock},smalltalk.Collection)})},
 args: ["aBlock"],
 source: "ifNotEmpty: aBlock\x0a\x09self notEmpty ifTrue: aBlock.",
@@ -666,17 +671,18 @@ fn: function (anObject){
 var self=this;
 var tally;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 tally=(0);
 self._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(anObject).__eq(each))){
+$1=_st(anObject).__eq(each);
+if(smalltalk.assert($1)){
 tally=_st(tally).__plus((1));
 return tally;
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$1=tally;
-return $1;
+$2=tally;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"occurrencesOf:",{anObject:anObject,tally:tally},smalltalk.Collection)})},
 args: ["anObject"],
 source: "occurrencesOf: anObject\x0a\x09\x22Answer how many of the receiver's elements are equal to anObject.\x22\x0a\x0a\x09| tally |\x0a\x09tally := 0.\x0a\x09self do: [:each | anObject = each ifTrue: [tally := tally + 1]].\x0a\x09^tally",
@@ -770,16 +776,17 @@ fn: function (aBlock){
 var self=this;
 var stream;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 stream=_st(_st(self._class())._new())._writeStream();
 self._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(aBlock)._value_(each))){
+$1=_st(aBlock)._value_(each);
+if(smalltalk.assert($1)){
 return _st(stream)._nextPut_(each);
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$1=_st(stream)._contents();
-return $1;
+$2=_st(stream)._contents();
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,stream:stream},smalltalk.Collection)})},
 args: ["aBlock"],
 source: "select: aBlock\x0a\x09| stream |\x0a\x09stream := self class new writeStream.\x0a\x09self do: [:each |\x0a\x09\x09(aBlock value: each) ifTrue: [\x0a\x09\x09stream nextPut: each]].\x0a\x09^stream contents",
@@ -1308,8 +1315,9 @@ category: 'accessing',
 fn: function (aKey,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._includesKey_(aKey))._ifTrue_ifFalse_((function(){
+var $2,$1;
+$2=self._includesKey_(aKey);
+$1=_st($2)._ifTrue_ifFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._basicAt_(aKey);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),aBlock);
@@ -1350,8 +1358,9 @@ category: 'accessing',
 fn: function (aKey,aBlock,anotherBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._includesKey_(aKey))._ifTrue_ifFalse_((function(){
+var $2,$1;
+$2=self._includesKey_(aKey);
+$1=_st($2)._ifTrue_ifFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aBlock)._value_(self._at_(aKey));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),anotherBlock);
@@ -1689,8 +1698,9 @@ category: 'adding/removing',
 fn: function (aKey,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._includesKey_(aKey))){
+var $2,$1;
+$2=self._includesKey_(aKey);
+if(smalltalk.assert($2)){
 $1=self._basicDelete_(aKey);
 } else {
 $1=_st(aBlock)._value();
@@ -1712,16 +1722,17 @@ fn: function (aBlock){
 var self=this;
 var newDict;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 newDict=_st(self._class())._new();
 self._keysAndValuesDo_((function(key,value){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(aBlock)._value_(value))){
+$1=_st(aBlock)._value_(value);
+if(smalltalk.assert($1)){
 return _st(newDict)._at_put_(key,value);
 };
 }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)})}));
-$1=newDict;
-return $1;
+$2=newDict;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,newDict:newDict},smalltalk.HashedCollection)})},
 args: ["aBlock"],
 source: "select: aBlock\x0a\x09| newDict |\x0a\x09newDict := self class new.\x0a\x09self keysAndValuesDo: [:key :value |\x0a\x09\x09(aBlock value: value) ifTrue: [newDict at: key put: value]].\x0a\x09^newDict",
@@ -2017,12 +2028,13 @@ fn: function (anObject,aBlock){
 var self=this;
 var index;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 index=_st(self["@values"])._indexOf_ifAbsent_(anObject,(function(){
 return smalltalk.withContext(function($ctx2) {
 return (0);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-if(smalltalk.assert(_st(index).__eq((0)))){
+$2=_st(index).__eq((0));
+if(smalltalk.assert($2)){
 $1=_st(aBlock)._value();
 } else {
 $1=_st(self["@keys"])._at_(index);
@@ -3704,10 +3716,11 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(! smalltalk.assert(_st(self._last()).__eq(":"))){
-$1=self.__comma(":");
-return $1;
+var $1,$2;
+$1=_st(self._last()).__eq(":");
+if(! smalltalk.assert($1)){
+$2=self.__comma(":");
+return $2;
 };
 return self;
 }, function($ctx1) {$ctx1.fill(self,"asMutator",{},smalltalk.String)})},
@@ -3875,8 +3888,9 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._isEmpty())){
+var $2,$1;
+$2=self._isEmpty();
+if(smalltalk.assert($2)){
 $1=self;
 } else {
 $1=_st(_st(self._first())._asUppercase()).__comma(self._allButFirst());
@@ -4238,16 +4252,17 @@ fn: function (anIndex){
 var self=this;
 var lineCount;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 var $early={};
 try {
 lineCount=(0);
 self._lineIndicesDo_((function(start,endWithoutDelimiters,end){
 return smalltalk.withContext(function($ctx2) {
 lineCount=_st(lineCount).__plus((1));
-if(smalltalk.assert(_st(lineCount).__eq(anIndex))){
-$1=self._copyFrom_to_(start,endWithoutDelimiters);
-throw $early=[$1];
+$1=_st(lineCount).__eq(anIndex);
+if(smalltalk.assert($1)){
+$2=self._copyFrom_to_(start,endWithoutDelimiters);
+throw $early=[$2];
 };
 }, function($ctx2) {$ctx2.fillBlock({start:start,endWithoutDelimiters:endWithoutDelimiters,end:end},$ctx1,1)})}));
 return nil;
@@ -4858,7 +4873,7 @@ category: 'comparing',
 fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$5,$6,$4;
+var $2,$3,$1,$5,$6,$4,$7;
 var $early={};
 try {
 $2=self._class();
@@ -4878,7 +4893,8 @@ return false;
 };
 self._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(! smalltalk.assert(_st(aCollection)._includes_(each))){
+$7=_st(aCollection)._includes_(each);
+if(! smalltalk.assert($7)){
 throw $early=[false];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
@@ -5091,16 +5107,17 @@ fn: function (aBlock){
 var self=this;
 var collection;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 collection=_st(self._class())._new();
 self._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(aBlock)._value_(each))){
+$1=_st(aBlock)._value_(each);
+if(smalltalk.assert($1)){
 return _st(collection)._add_(each);
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$1=collection;
-return $1;
+$2=collection;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:",{aBlock:aBlock,collection:collection},smalltalk.Set)})},
 args: ["aBlock"],
 source: "select: aBlock\x0a\x09| collection |\x0a\x09collection := self class new.\x0a\x09self do: [:each |\x0a\x09\x09(aBlock value: each) ifTrue: [\x0a\x09\x09\x09collection add: each]].\x0a\x09^collection",
@@ -5182,20 +5199,22 @@ var self=this;
 var result;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3,$4;
 var $early={};
 try {
 result=_st(self["@read"])._at_ifAbsent_(self["@readIndex"],(function(){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(self["@write"])._isEmpty())){
-if(smalltalk.assert(_st(self["@readIndex"]).__gt((1)))){
+$1=_st(self["@write"])._isEmpty();
+if(smalltalk.assert($1)){
+$2=_st(self["@readIndex"]).__gt((1));
+if(smalltalk.assert($2)){
 self["@read"]=[];
 self["@read"];
 self["@readIndex"]=(1);
 self["@readIndex"];
 };
-$1=_st(aBlock)._value();
-throw $early=[$1];
+$3=_st(aBlock)._value();
+throw $early=[$3];
 };
 self["@read"]=self["@write"];
 self["@read"];
@@ -5207,8 +5226,8 @@ return _st(self["@read"])._first();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 _st(self["@read"])._at_put_(self["@readIndex"],nil);
 self["@readIndex"]=_st(self["@readIndex"]).__plus((1));
-$2=result;
-return $2;
+$4=result;
+return $4;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"nextIfAbsent:",{aBlock:aBlock,result:result},smalltalk.Queue)})},
@@ -5490,17 +5509,18 @@ category: 'reading',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$4,$5,$1;
-if(smalltalk.assert(self._atEnd())){
+var $2,$4,$3,$5,$6,$1;
+$2=self._atEnd();
+if(smalltalk.assert($2)){
 $1=nil;
 } else {
-$3=self._position();
+$4=self._position();
 $ctx1.sendIdx["position"]=1;
-$2=_st($3).__plus((1));
-self._position_($2);
-$4=self["@collection"];
-$5=self._position();
-$1=_st($4)._at_($5);
+$3=_st($4).__plus((1));
+self._position_($3);
+$5=self["@collection"];
+$6=self._position();
+$1=_st($5)._at_($6);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Stream)})},
@@ -5519,16 +5539,17 @@ fn: function (anInteger){
 var self=this;
 var tempCollection;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 tempCollection=_st(_st(self._collection())._class())._new();
 _st(anInteger)._timesRepeat_((function(){
 return smalltalk.withContext(function($ctx2) {
-if(! smalltalk.assert(self._atEnd())){
+$1=self._atEnd();
+if(! smalltalk.assert($1)){
 return _st(tempCollection)._add_(self._next());
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$1=tempCollection;
-return $1;
+$2=tempCollection;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection},smalltalk.Stream)})},
 args: ["anInteger"],
 source: "next: anInteger\x0a\x09| tempCollection |\x0a\x09tempCollection := self collection class new.\x0a\x09anInteger timesRepeat: [\x0a\x09\x09self atEnd ifFalse: [\x0a\x09\x09tempCollection add: self next]].\x0a\x09^tempCollection",
@@ -5607,8 +5628,9 @@ category: 'reading',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(! smalltalk.assert(self._atEnd())){
+var $2,$1;
+$2=self._atEnd();
+if(! smalltalk.assert($2)){
 $1=_st(self._collection())._at_(_st(self._position()).__plus((1)));
 };
 return $1;
@@ -5627,12 +5649,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@position"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@position"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@position"]=(0);
 $1=self["@position"];
 } else {
-$1=self["@position"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"position",{},smalltalk.Stream)})},
@@ -5899,17 +5922,18 @@ fn: function (anInteger){
 var self=this;
 var tempCollection;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 tempCollection=_st(_st(self._collection())._class())._new();
 _st(anInteger)._timesRepeat_((function(){
 return smalltalk.withContext(function($ctx2) {
-if(! smalltalk.assert(self._atEnd())){
+$1=self._atEnd();
+if(! smalltalk.assert($1)){
 tempCollection=_st(tempCollection).__comma(self._next());
 return tempCollection;
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$1=tempCollection;
-return $1;
+$2=tempCollection;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger,tempCollection:tempCollection},smalltalk.StringStream)})},
 args: ["anInteger"],
 source: "next: anInteger\x0a\x09| tempCollection |\x0a\x09tempCollection := self collection class new.\x0a\x09anInteger timesRepeat: [\x0a\x09\x09self atEnd ifFalse: [\x0a\x09\x09tempCollection := tempCollection, self next]].\x0a\x09^tempCollection",
@@ -5942,51 +5966,52 @@ fn: function (aString){
 var self=this;
 var pre,post;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$5,$8,$7,$9,$6,$11,$10,$13,$12,$15,$16,$14,$18,$19,$17;
-if(smalltalk.assert(self._atEnd())){
-$2=self._collection();
+var $1,$3,$2,$4,$5,$6,$9,$8,$10,$7,$12,$11,$14,$13,$16,$17,$15,$19,$20,$18;
+$1=self._atEnd();
+if(smalltalk.assert($1)){
+$3=self._collection();
 $ctx1.sendIdx["collection"]=1;
-$1=_st($2).__comma(aString);
+$2=_st($3).__comma(aString);
 $ctx1.sendIdx[","]=1;
-self._setCollection_($1);
+self._setCollection_($2);
 $ctx1.sendIdx["setCollection:"]=1;
 } else {
-$3=self._collection();
+$4=self._collection();
 $ctx1.sendIdx["collection"]=2;
-$4=self._position();
+$5=self._position();
 $ctx1.sendIdx["position"]=1;
-pre=_st($3)._copyFrom_to_((1),$4);
+pre=_st($4)._copyFrom_to_((1),$5);
 $ctx1.sendIdx["copyFrom:to:"]=1;
 pre;
-$5=self._collection();
+$6=self._collection();
 $ctx1.sendIdx["collection"]=3;
-$8=self._position();
+$9=self._position();
 $ctx1.sendIdx["position"]=2;
-$7=_st($8).__plus((1));
+$8=_st($9).__plus((1));
 $ctx1.sendIdx["+"]=2;
-$9=_st(aString)._size();
+$10=_st(aString)._size();
 $ctx1.sendIdx["size"]=1;
-$6=_st($7).__plus($9);
+$7=_st($8).__plus($10);
 $ctx1.sendIdx["+"]=1;
-$11=self._collection();
-$10=_st($11)._size();
+$12=self._collection();
+$11=_st($12)._size();
 $ctx1.sendIdx["size"]=2;
-post=_st($5)._copyFrom_to_($6,$10);
+post=_st($6)._copyFrom_to_($7,$11);
 post;
-$13=_st(pre).__comma(aString);
-$12=_st($13).__comma(post);
+$14=_st(pre).__comma(aString);
+$13=_st($14).__comma(post);
 $ctx1.sendIdx[","]=2;
-self._setCollection_($12);
+self._setCollection_($13);
 };
-$15=self._position();
+$16=self._position();
 $ctx1.sendIdx["position"]=3;
-$16=_st(aString)._size();
-$14=_st($15).__plus($16);
-self._position_($14);
-$18=self._streamSize();
-$19=self._position();
-$17=_st($18)._max_($19);
-self._setStreamSize_($17);
+$17=_st(aString)._size();
+$15=_st($16).__plus($17);
+self._position_($15);
+$19=self._streamSize();
+$20=self._position();
+$18=_st($19)._max_($20);
+self._setStreamSize_($18);
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aString:aString,pre:pre,post:post},smalltalk.StringStream)})},
 args: ["aString"],
 source: "nextPutAll: aString\x0a\x09| pre post |\x0a\x09self atEnd ifTrue: [ self setCollection: self collection, aString ] ifFalse: [\x0a\x09\x09pre := self collection copyFrom: 1 to: self position.\x0a\x09\x09post := self collection copyFrom: (self position + 1 + aString size) to: self collection size.\x0a\x09\x09self setCollection: pre, aString, post\x0a\x09].\x0a\x09self position: self position + aString size.\x0a\x09self setStreamSize: (self streamSize max: self position)",

+ 4 - 3
js/Kernel-Exceptions.js

@@ -569,12 +569,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@current"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@current"]=self._new();
 $1=self["@current"];
 } else {
-$1=self["@current"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ErrorHandler.klass)})},

+ 109 - 83
js/Kernel-Infrastructure.js

@@ -32,12 +32,13 @@ fn: function (){
 var self=this;
 function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@inspector"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@inspector"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@inspector"]=$Transcript();
 $1=self["@inspector"];
 } else {
-$1=self["@inspector"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inspector",{},smalltalk.InspectorHandler.klass)})},
@@ -293,11 +294,12 @@ fn: function (aString){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = _st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol())) == nil || $receiver == null){
+var $2,$1;
+$2=_st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol());
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._error_("Invalid class name");
 } else {
-$1=_st(_st($Smalltalk())._current())._at_(_st(aString)._asSymbol());
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},smalltalk.Environment)})},
@@ -403,14 +405,15 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-if(($receiver = _st(_st($Smalltalk())._current())._at_(aClassName)) == nil || $receiver == null){
-_st(_st($Smalltalk())._current())._at_(aClassName);
+var $1,$3,$2;
+$1=_st(_st($Smalltalk())._current())._at_(aClassName);
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
-$2="A class named ".__comma(aClassName);
-$1=_st($2).__comma(" already exists");
+$3="A class named ".__comma(aClassName);
+$2=_st($3).__comma(" already exists");
 $ctx1.sendIdx[","]=1;
-self._error_($1);
+self._error_($2);
 };
 _st(_st($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
 return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
@@ -481,9 +484,11 @@ category: 'error handling',
 fn: function (aBlock,anErrorClass,exceptionBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 self._try_catch_(aBlock,(function(exception){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(exception)._isKindOf_(self._classNamed_(_st(anErrorClass)._name())))){
+$1=_st(exception)._isKindOf_(self._classNamed_(_st(anErrorClass)._name()));
+if(smalltalk.assert($1)){
 return _st(exceptionBlock)._value_(exception);
 } else {
 return _st(exception)._signal();
@@ -523,13 +528,16 @@ var self=this;
 var package_;
 function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 package_=_st($Package())._named_(aPackageName);
-if(($receiver = package_) == nil || $receiver == null){
+$1=package_;
+if(($receiver = $1) == nil || $receiver == null){
 self._error_("Invalid package name");
 } else {
-package_;
+$1;
 };
-if(smalltalk.assert(_st(package_).__eq_eq(_st(aClass)._package()))){
+$2=_st(package_).__eq_eq(_st(aClass)._package());
+if(smalltalk.assert($2)){
 return self;
 };
 _st(aClass)._package_(package_);
@@ -550,23 +558,24 @@ var self=this;
 var destinationClass;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$4;
+var $1,$3,$4,$2,$5;
 destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
-if(($receiver = destinationClass) == nil || $receiver == null){
+$1=destinationClass;
+if(($receiver = $1) == nil || $receiver == null){
 self._error_("Invalid class name");
 } else {
-destinationClass;
+$1;
 };
-$2=destinationClass;
-$3=_st(aMethod)._methodClass();
+$3=destinationClass;
+$4=_st(aMethod)._methodClass();
 $ctx1.sendIdx["methodClass"]=1;
-$1=_st($2).__eq_eq($3);
-if(smalltalk.assert($1)){
+$2=_st($3).__eq_eq($4);
+if(smalltalk.assert($2)){
 return self;
 };
 _st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
-$4=_st(aMethod)._methodClass();
-_st($4)._removeCompiledMethod_(aMethod);
+$5=_st(aMethod)._methodClass();
+_st($5)._removeCompiledMethod_(aMethod);
 return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
 args: ["aMethod", "aClassName"],
 source: "moveMethod: aMethod toClass: aClassName\x0a\x09| destinationClass |\x0a\x09\x0a\x09destinationClass := Smalltalk current at: aClassName asSymbol.\x0a\x09destinationClass ifNil: [ self error: 'Invalid class name' ].\x0a\x09destinationClass == aMethod methodClass ifTrue: [ ^ self ].\x0a\x09\x0a\x09destinationClass \x0a\x09\x09compile: aMethod source\x0a\x09\x09category: aMethod protocol.\x0a\x09aMethod methodClass \x0a\x09\x09removeCompiledMethod: aMethod",
@@ -725,14 +734,15 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-if(($receiver = _st(_st($Smalltalk())._current())._at_(aClassName)) == nil || $receiver == null){
-_st(_st($Smalltalk())._current())._at_(aClassName);
+var $1,$3,$2;
+$1=_st(_st($Smalltalk())._current())._at_(aClassName);
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
-$2="A class named ".__comma(aClassName);
-$1=_st($2).__comma(" already exists");
+$3="A class named ".__comma(aClassName);
+$2=_st($3).__comma(" already exists");
 $ctx1.sendIdx[","]=1;
-self._error_($1);
+self._error_($2);
 };
 _st(_st($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
 return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
@@ -923,8 +933,9 @@ category: 'proxy',
 fn: function (aMessage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector())) == nil || $receiver == null){
+var $2,$1;
+$2=self._lookupProperty_(_st(_st(aMessage)._selector())._asJavaScriptSelector());
+if(($receiver = $2) == nil || $receiver == null){
 $1=smalltalk.JSObjectProxy.superclass.fn.prototype._doesNotUnderstand_.apply(_st(self), [aMessage]);
 } else {
 var jsSelector;
@@ -1555,15 +1566,16 @@ fn: function (){
 var self=this;
 function $PackageTransport(){return smalltalk.PackageTransport||(typeof PackageTransport=="undefined"?nil:PackageTransport)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(($receiver = self["@transport"]) == nil || $receiver == null){
-$2=_st($PackageTransport())._fromJson_(self._basicTransport());
-_st($2)._package_(self);
-$3=_st($2)._yourself();
-self["@transport"]=$3;
+var $2,$3,$4,$1;
+$2=self["@transport"];
+if(($receiver = $2) == nil || $receiver == null){
+$3=_st($PackageTransport())._fromJson_(self._basicTransport());
+_st($3)._package_(self);
+$4=_st($3)._yourself();
+self["@transport"]=$4;
 $1=self["@transport"];
 } else {
-$1=self["@transport"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"transport",{},smalltalk.Package)})},
@@ -1668,12 +1680,13 @@ var children,others,nodes,expandedClasses;
 function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$5;
+var $1,$3,$2,$5,$4,$6;
 children=[];
 others=[];
 _st(classes)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(classes)._includes_(_st(each)._superclass()))){
+$1=_st(classes)._includes_(_st(each)._superclass());
+if(smalltalk.assert($1)){
 return _st(others)._add_(each);
 } else {
 return _st(children)._add_(each);
@@ -1687,21 +1700,21 @@ return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
 nodes=_st(nodes)._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
-$2=_st(a)._theClass();
+$3=_st(a)._theClass();
 $ctx2.sendIdx["theClass"]=1;
-$1=_st($2)._name();
+$2=_st($3)._name();
 $ctx2.sendIdx["name"]=1;
-$4=_st(b)._theClass();
-$3=_st($4)._name();
-return _st($1).__lt_eq($3);
+$5=_st(b)._theClass();
+$4=_st($5)._name();
+return _st($2).__lt_eq($4);
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,5)})}));
 expandedClasses=_st($Array())._new();
 _st(nodes)._do_((function(aNode){
 return smalltalk.withContext(function($ctx2) {
 return _st(aNode)._traverseClassesWith_(expandedClasses);
 }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1,6)})}));
-$5=expandedClasses;
-return $5;
+$6=expandedClasses;
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
 args: ["classes"],
 source: "sortedClasses: classes\x0a\x09\x22Answer classes, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)\x22\x0a\x0a\x09| children others nodes expandedClasses |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [:each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [children add: each]\x0a\x09\x09\x09ifTrue: [others add: each]].\x0a\x09nodes := children collect: [:each |\x0a\x09\x09ClassSorterNode on: each classes: others level: 0].\x0a\x09nodes := nodes sorted: [:a :b | a theClass name <= b theClass name ].\x0a\x09expandedClasses := Array new.\x0a\x09nodes do: [:aNode |\x0a\x09\x09aNode traverseClassesWith: expandedClasses].\x0a\x09^expandedClasses",
@@ -1722,8 +1735,9 @@ category: 'actions',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@worker"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._error_("ajax: not available");
 } else {
 $1=_st(self["@worker"])._ajax_(anObject);
@@ -1744,8 +1758,9 @@ category: 'actions',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@worker"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._error_("alert: not available");
 } else {
 $1=_st(self["@worker"])._alert_(aString);
@@ -1766,8 +1781,9 @@ category: 'actions',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@worker"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._error_("confirm: not available");
 } else {
 $1=_st(self["@worker"])._confirm_(aString);
@@ -1831,13 +1847,15 @@ var self=this;
 var candidate;
 function $BrowserInterface(){return smalltalk.BrowserInterface||(typeof BrowserInterface=="undefined"?nil:BrowserInterface)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 smalltalk.PlatformInterface.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
 if(($receiver = $BrowserInterface()) == nil || $receiver == null){
 $BrowserInterface();
 } else {
 candidate=_st($BrowserInterface())._new();
 candidate;
-if(smalltalk.assert(_st(candidate)._isAvailable())){
+$1=_st(candidate)._isAvailable();
+if(smalltalk.assert($1)){
 self._setWorker_(candidate);
 return self;
 };
@@ -1857,8 +1875,9 @@ category: 'actions',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@worker"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@worker"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._error_("prompt: not available");
 } else {
 $1=_st(self["@worker"])._prompt_(aString);
@@ -1916,12 +1935,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@current"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@current"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@current"]=self._new();
 $1=self["@current"];
 } else {
-$1=self["@current"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ProgressHandler.klass)})},
@@ -2027,11 +2047,12 @@ var self=this;
 function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
 function $JavaScriptException(){return smalltalk.JavaScriptException||(typeof JavaScriptException=="undefined"?nil:JavaScriptException)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(_st(self._isSmalltalkObject_(anObject))._and_((function(){
+var $2,$1;
+$2=_st(self._isSmalltalkObject_(anObject))._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(anObject)._isKindOf_($Error());
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+if(smalltalk.assert($2)){
 $1=anObject;
 } else {
 $1=_st($JavaScriptException())._on_(anObject);
@@ -2070,8 +2091,9 @@ category: 'accessing',
 fn: function (aKey,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._includesKey_(aKey))._ifTrue_ifFalse_((function(){
+var $2,$1;
+$2=self._includesKey_(aKey);
+$1=_st($2)._ifTrue_ifFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._at_(aKey);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),aBlock);
@@ -2184,13 +2206,14 @@ category: 'private',
 fn: function (packageName,aDict){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 self._deprecatedAPI();
-if(! smalltalk.assert(_st(aDict)._isEmpty())){
+$1=_st(aDict)._isEmpty();
+if(! smalltalk.assert($1)){
 self._error_("createPackage:properties: called with nonempty properties");
 };
-$1=self._createPackage_(packageName);
-return $1;
+$2=self._createPackage_(packageName);
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"createPackage:properties:",{packageName:packageName,aDict:aDict},smalltalk.Smalltalk)})},
 args: ["packageName", "aDict"],
 source: "createPackage: packageName properties: aDict\x0a\x09\x22Needed to import .st files: they begin with this call.\x22\x0a\x09self deprecatedAPI.\x0a\x09\x0a\x09aDict isEmpty ifFalse: [ self error: 'createPackage:properties: called with nonempty properties' ].\x0a\x09^ self createPackage: packageName",
@@ -2354,8 +2377,9 @@ category: 'packages',
 fn: function (packageName,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._packageAt_(packageName))._ifNil_(aBlock);
+var $2,$1;
+$2=self._packageAt_(packageName);
+$1=_st($2)._ifNil_(aBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
 args: ["packageName", "aBlock"],
@@ -2494,15 +2518,16 @@ var self=this;
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $ClassRemoved(){return smalltalk.ClassRemoved||(typeof ClassRemoved=="undefined"?nil:ClassRemoved)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-if(smalltalk.assert(_st(aClass)._isMetaclass())){
+var $1,$2,$3;
+$1=_st(aClass)._isMetaclass();
+if(smalltalk.assert($1)){
 self._error_(_st(_st(aClass)._asString()).__comma(" is a Metaclass and cannot be removed!"));
 };
 self._deleteClass_(aClass);
-$1=_st($ClassRemoved())._new();
-_st($1)._theClass_(aClass);
-$2=_st($1)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($2);
+$2=_st($ClassRemoved())._new();
+_st($2)._theClass_(aClass);
+$3=_st($2)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($3);
 return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
 args: ["aClass"],
 source: "removeClass: aClass\x0a\x09aClass isMetaclass ifTrue: [self error: aClass asString, ' is a Metaclass and cannot be removed!'].\x0a\x09\x0a\x09self deleteClass: aClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassRemoved new\x0a\x09\x09\x09theClass: aClass;\x0a\x09\x09\x09yourself)",
@@ -2544,7 +2569,7 @@ fn: function (packageName,newName){
 var self=this;
 var pkg;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3;
 pkg=self._packageAt_ifAbsent_(packageName,(function(){
 return smalltalk.withContext(function($ctx2) {
 $1="Missing package: ".__comma(packageName);
@@ -2552,11 +2577,12 @@ $ctx2.sendIdx[","]=1;
 return self._error_($1);
 $ctx2.sendIdx["error:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-if(($receiver = self._packageAt_(newName)) == nil || $receiver == null){
-self._packageAt_(newName);
+$2=self._packageAt_(newName);
+if(($receiver = $2) == nil || $receiver == null){
+$2;
 } else {
-$2="Already exists a package called: ".__comma(newName);
-self._error_($2);
+$3="Already exists a package called: ".__comma(newName);
+self._error_($3);
 };
 _st(self._at_("packages"))._at_put_(newName,pkg);
 _st(pkg)._name_(newName);

+ 68 - 38
js/Kernel-Methods.js

@@ -223,13 +223,14 @@ fn: function (anErrorClass,aBlock){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 $1=self._try_catch_(self,(function(error){
 var smalltalkError;
 return smalltalk.withContext(function($ctx2) {
 smalltalkError=_st(_st($Smalltalk())._current())._asSmalltalkException_(error);
 smalltalkError;
-if(smalltalk.assert(_st(smalltalkError)._isKindOf_(anErrorClass))){
+$2=_st(smalltalkError)._isKindOf_(anErrorClass);
+if(smalltalk.assert($2)){
 return _st(aBlock)._value_(smalltalkError);
 } else {
 return _st(smalltalkError)._resignal();
@@ -492,11 +493,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._basicAt_("category")) == nil || $receiver == null){
+var $2,$1;
+$2=self._basicAt_("category");
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._defaultCategory();
 } else {
-$1=self._basicAt_("category");
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.CompiledMethod)})},
@@ -633,12 +635,14 @@ fn: function (){
 var self=this;
 var selector;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 var $early={};
 try {
 selector=self._selector();
 _st(self._methodClass())._allSubclassesDo_((function(each){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(_st(each)._includesSelector_(selector))){
+$1=_st(each)._includesSelector_(selector);
+if(smalltalk.assert($1)){
 throw $early=[true];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
@@ -661,21 +665,22 @@ fn: function (){
 var self=this;
 var superclass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$5,$4,$3,$2;
+var $1,$2,$6,$5,$4,$3;
 $1=self._methodClass();
 $ctx1.sendIdx["methodClass"]=1;
 superclass=_st($1)._superclass();
 $ctx1.sendIdx["superclass"]=1;
-if(($receiver = superclass) == nil || $receiver == null){
+$2=superclass;
+if(($receiver = $2) == nil || $receiver == null){
 return false;
 } else {
-superclass;
+$2;
 };
-$5=self._methodClass();
-$4=_st($5)._superclass();
-$3=_st($4)._lookupSelector_(self._selector());
-$2=_st($3)._notNil();
-return $2;
+$6=self._methodClass();
+$5=_st($6)._superclass();
+$4=_st($5)._lookupSelector_(self._selector());
+$3=_st($4)._notNil();
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass},smalltalk.CompiledMethod)})},
 args: [],
 source: "isOverride\x0a\x09| superclass |\x0a    \x0a    superclass := self methodClass superclass.\x0a\x09superclass ifNil: [ ^ false ].\x0a\x09\x0a    ^ (self methodClass superclass lookupSelector: self selector) notNil",
@@ -831,11 +836,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self._basicAt_("source")) == nil || $receiver == null){
+var $2,$1;
+$2=self._basicAt_("source");
+if(($receiver = $2) == nil || $receiver == null){
 $1="";
 } else {
-$1=self._basicAt_("source");
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.CompiledMethod)})},
@@ -908,7 +914,9 @@ category: 'actions',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(_st(self["@poolSize"]).__lt(self._maxPoolSize()))){
+var $1;
+$1=_st(self["@poolSize"]).__lt(self._maxPoolSize());
+if(smalltalk.assert($1)){
 self._addWorker();
 };
 _st(self["@queue"])._nextPut_(aBlock);
@@ -949,7 +957,7 @@ var self=this;
 var sentinel;
 function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 sentinel=_st($Object())._new();
 $1=(function(){
 var block;
@@ -961,7 +969,8 @@ return smalltalk.withContext(function($ctx3) {
 return sentinel;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 block;
-if(! smalltalk.assert(_st(block).__eq_eq(sentinel))){
+$2=_st(block).__eq_eq(sentinel);
+if(! smalltalk.assert($2)){
 return _st((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(block)._value();
@@ -987,11 +996,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@maxPoolSize"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@maxPoolSize"];
+if(($receiver = $2) == nil || $receiver == null){
 $1=self._defaultMaxPoolSize();
 } else {
-$1=self["@maxPoolSize"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"maxPoolSize",{},smalltalk.ForkPool)})},
@@ -1027,12 +1037,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(($receiver = self["@default"]) == nil || $receiver == null){
+var $2,$1;
+$2=self["@default"];
+if(($receiver = $2) == nil || $receiver == null){
 self["@default"]=self._new();
 $1=self["@default"];
 } else {
-$1=self["@default"];
+$1=$2;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.ForkPool.klass)})},
@@ -1469,15 +1480,16 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-if(smalltalk.assert(self._isBlockContext())){
-$2="a block (in ".__comma(_st(self._methodContext())._asString());
+var $2,$3,$4,$1;
+$2=self._isBlockContext();
+if(smalltalk.assert($2)){
+$3="a block (in ".__comma(_st(self._methodContext())._asString());
 $ctx1.sendIdx[","]=2;
-$1=_st($2).__comma(")");
+$1=_st($3).__comma(")");
 $ctx1.sendIdx[","]=1;
 } else {
-$3=_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ");
-$1=_st($3).__comma(self._selector());
+$4=_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ");
+$1=_st($4).__comma(self._selector());
 $ctx1.sendIdx[","]=3;
 };
 return $1;
@@ -1489,6 +1501,22 @@ referencedClasses: []
 }),
 smalltalk.MethodContext);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "evaluatedSelector",
+category: 'accessing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+return self.evaluatedSelector;
+return self}, function($ctx1) {$ctx1.fill(self,"evaluatedSelector",{},smalltalk.MethodContext)})},
+args: [],
+source: "evaluatedSelector\x0a\x09<return self.evaluatedSelector>",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.MethodContext);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "home",
@@ -1592,18 +1620,20 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(! smalltalk.assert(self._isBlockContext())){
+var $1,$3,$2;
+$1=self._isBlockContext();
+if(! smalltalk.assert($1)){
 return self;
 };
-if(($receiver = self._outerContext()) == nil || $receiver == null){
-$1=self._outerContext();
+$3=self._outerContext();
+if(($receiver = $3) == nil || $receiver == null){
+$2=$3;
 } else {
 var outer;
 outer=$receiver;
-$1=_st(outer)._methodContext();
+$2=_st(outer)._methodContext();
 };
-return $1;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"methodContext",{},smalltalk.MethodContext)})},
 args: [],
 source: "methodContext\x0a\x09self isBlockContext ifFalse: [ ^ self ].\x0a\x09\x0a\x09^ self outerContext ifNotNil: [ :outer |\x0a\x09\x09outer methodContext ]",

+ 30 - 17
js/Kernel-Objects.js

@@ -637,8 +637,9 @@ category: 'testing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-if(smalltalk.assert(self._isMemberOf_(aClass))){
+var $2,$1;
+$2=self._isMemberOf_(aClass);
+if(smalltalk.assert($2)){
 $1=true;
 } else {
 $1=_st(self._class())._inheritsFrom_(aClass);
@@ -1232,8 +1233,9 @@ category: 'controlling',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self.__eq(true))._ifTrue_ifFalse_(aBlock,(function(){
+var $2,$1;
+$2=self.__eq(true);
+$1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
 return smalltalk.withContext(function($ctx2) {
 return false;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -1453,8 +1455,9 @@ category: 'controlling',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self.__eq(true))._ifTrue_ifFalse_((function(){
+var $2,$1;
+$2=self.__eq(true);
+$1=_st($2)._ifTrue_ifFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
 return true;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),aBlock);
@@ -3006,10 +3009,13 @@ category: 'mathematical functions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(smalltalk.assert(self._isZero())){
+var $1,$2;
+$1=self._isZero();
+if(smalltalk.assert($1)){
 return (0);
 };
-if(smalltalk.assert(self._positive())){
+$2=self._positive();
+if(smalltalk.assert($2)){
 return (1);
 } else {
 return (-1);
@@ -3159,14 +3165,16 @@ var self=this;
 var array,value,pos;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2,$3;
 value=self;
 array=_st($Array())._new();
 pos=(1);
-if(smalltalk.assert(_st(step).__eq((0)))){
+$1=_st(step).__eq((0));
+if(smalltalk.assert($1)){
 self._error_("step must be non-zero");
 };
-if(smalltalk.assert(_st(step).__lt((0)))){
+$2=_st(step).__lt((0));
+if(smalltalk.assert($2)){
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(value).__gt_eq(stop);
@@ -3196,8 +3204,8 @@ value=_st(value).__plus(step);
 return value;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)})}));
 };
-$1=array;
-return $1;
+$3=array;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
 args: ["stop", "step"],
 source: "to: stop by: step\x0a\x09| array value pos |\x0a\x09value := self.\x0a\x09array := Array new.\x0a\x09pos := 1.\x0a\x09step = 0 ifTrue: [self error: 'step must be non-zero'].\x0a\x09step < 0\x0a\x09\x09ifTrue: [[ value >= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09array at: pos put: value.\x0a\x09\x09\x09\x09\x09pos := pos + 1.\x0a\x09\x09\x09\x09\x09value := value + step]]\x0a\x09\x09ifFalse: [[ value <= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09array at: pos put: value.\x0a\x09\x09\x09\x09pos := pos + 1.\x0a\x09\x09\x09\x09\x09value := value + step]].\x0a\x09^array",
@@ -3214,11 +3222,14 @@ fn: function (stop,step,aBlock){
 var self=this;
 var value;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 value=self;
-if(smalltalk.assert(_st(step).__eq((0)))){
+$1=_st(step).__eq((0));
+if(smalltalk.assert($1)){
 self._error_("step must be non-zero");
 };
-if(smalltalk.assert(_st(step).__lt((0)))){
+$2=_st(step).__lt((0));
+if(smalltalk.assert($2)){
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(value).__gt_eq(stop);
@@ -3548,13 +3559,15 @@ category: 'printing',
 fn: function (aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 _st(self["@x"])._printOn_(aStream);
 $ctx1.sendIdx["printOn:"]=1;
 _st(aStream)._nextPutAll_("@");
-if(smalltalk.assert(_st(_st(self["@y"])._notNil())._and_((function(){
+$1=_st(_st(self["@y"])._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self["@y"])._negative();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+if(smalltalk.assert($1)){
 _st(aStream)._space();
 };
 _st(self["@y"])._printOn_(aStream);

+ 4 - 2
js/Kernel-Tests.js

@@ -957,8 +957,10 @@ fn: function (){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = self["@theClass"]) == nil || $receiver == null){
-self["@theClass"];
+var $1;
+$1=self["@theClass"];
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 _st(_st($Smalltalk())._current())._removeClass_(self["@theClass"]);
 self["@theClass"]=nil;

+ 6 - 4
js/SUnit-Tests.js

@@ -365,7 +365,7 @@ var suite,runner,result,assertBlock;
 function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
 function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$5;
+var $1,$2,$3,$4,$6,$5,$7;
 suite=["fakeError", "fakeErrorFailingInTearDown", "fakeFailure", "testPass"]._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._class())._selector_(each);
@@ -392,7 +392,8 @@ return smalltalk.withContext(function($ctx2) {
 $6=_st(ann)._result();
 $5=_st($6).__eq_eq(result);
 if(smalltalk.assert($5)){
-return _st(_st(_st(result)._runs()).__eq(_st(result)._total()))._ifTrue_(assertBlock);
+$7=_st(_st(result)._runs()).__eq(_st(result)._total());
+return _st($7)._ifTrue_(assertBlock);
 };
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,3)})}));
 _st(runner)._run();
@@ -523,7 +524,7 @@ function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteR
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
 function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3;
+var $1,$2,$4,$3,$5;
 suite=["fakeTimeout", "fakeMultipleTimeoutFailing", "fakeMultipleTimeoutPassing", "testPass"]._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._class())._selector_(each);
@@ -547,7 +548,8 @@ return smalltalk.withContext(function($ctx2) {
 $4=_st(ann)._result();
 $3=_st($4).__eq_eq(result);
 if(smalltalk.assert($3)){
-return _st(_st(_st(result)._runs()).__eq(_st(result)._total()))._ifTrue_(assertBlock);
+$5=_st(_st(result)._runs()).__eq(_st(result)._total());
+return _st($5)._ifTrue_(assertBlock);
 };
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,3)})}));
 _st(runner)._run();

+ 27 - 16
js/SUnit.js

@@ -111,12 +111,13 @@ fn: function (aBlock){
 var self=this;
 var c;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 self._errorIfNotAsync_("#async");
 c=self["@context"];
 $1=(function(){
 return smalltalk.withContext(function($ctx2) {
-if(smalltalk.assert(self._isAsync())){
+$2=self._isAsync();
+if(smalltalk.assert($2)){
 return _st(c)._execute_(aBlock);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})});
@@ -168,7 +169,9 @@ category: 'error handling',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(! smalltalk.assert(self._isAsync())){
+var $1;
+$1=self._isAsync();
+if(! smalltalk.assert($1)){
 self._error_(_st(aString).__comma(" used without prior #timeout:"));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"errorIfNotAsync:",{aString:aString},smalltalk.TestCase)})},
@@ -401,8 +404,10 @@ category: 'async',
 fn: function (aNumber){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = self["@asyncTimeout"]) == nil || $receiver == null){
-self["@asyncTimeout"];
+var $1;
+$1=self["@asyncTimeout"];
+if(($receiver = $1) == nil || $receiver == null){
+$1;
 } else {
 _st(self["@asyncTimeout"])._clearTimeout();
 };
@@ -428,13 +433,14 @@ fn: function (){
 var self=this;
 var selectors;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 selectors=self._testSelectors();
-if(smalltalk.assert(self._shouldInheritSelectors())){
+$1=self._shouldInheritSelectors();
+if(smalltalk.assert($1)){
 _st(selectors)._addAll_(_st(self._superclass())._allTestSelectors());
 };
-$1=selectors;
-return $1;
+$2=selectors;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"allTestSelectors",{selectors:selectors},smalltalk.TestCase.klass)})},
 args: [],
 source: "allTestSelectors\x0a\x09| selectors |\x0a\x09selectors := self testSelectors.\x0a\x09self shouldInheritSelectors ifTrue: [\x0a\x09\x09selectors addAll: self superclass allTestSelectors].\x0a\x09^selectors",
@@ -586,7 +592,7 @@ fn: function (aBlock){
 var self=this;
 var failed;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2;
 _st(self["@testCase"])._context_(self);
 $ctx1.sendIdx["context:"]=1;
 _st((function(){
@@ -599,15 +605,16 @@ return failed;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._ensure_((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(self["@testCase"])._context_(nil);
-if(smalltalk.assert(_st(failed)._and_((function(){
+$1=_st(failed)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(self["@testCase"])._isAsync();
 $ctx3.sendIdx["isAsync"]=1;
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})})))){
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
+if(smalltalk.assert($1)){
 _st(self["@testCase"])._finished();
 };
-$1=_st(self["@testCase"])._isAsync();
-if(! smalltalk.assert($1)){
+$2=_st(self["@testCase"])._isAsync();
+if(! smalltalk.assert($2)){
 return _st(self["@testCase"])._tearDown();
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
@@ -687,6 +694,7 @@ category: 'running',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._withErrorReporting_((function(){
@@ -695,7 +703,8 @@ return smalltalk.ReportingTestContext.superclass.fn.prototype._execute_.apply(_s
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._ensure_((function(){
 return smalltalk.withContext(function($ctx2) {
-if(! smalltalk.assert(_st(self["@testCase"])._isAsync())){
+$1=_st(self["@testCase"])._isAsync();
+if(! smalltalk.assert($1)){
 _st(self["@result"])._increaseRuns();
 return _st(self["@finished"])._value();
 };
@@ -1115,6 +1124,7 @@ var self=this;
 function $Announcer(){return smalltalk.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
 function $TestResult(){return smalltalk.TestResult||(typeof TestResult=="undefined"?nil:TestResult)}
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 smalltalk.TestSuiteRunner.superclass.fn.prototype._initialize.apply(_st(self), []);
 self["@announcer"]=_st($Announcer())._new();
 $ctx1.sendIdx["new"]=1;
@@ -1124,7 +1134,8 @@ var runs;
 return smalltalk.withContext(function($ctx2) {
 runs=_st(self["@result"])._runs();
 runs;
-if(smalltalk.assert(_st(runs).__lt(_st(self["@result"])._total()))){
+$1=_st(runs).__lt(_st(self["@result"])._total());
+if(smalltalk.assert($1)){
 return _st(self._contextOf_(_st(runs).__plus((1))))._start();
 };
 }, function($ctx2) {$ctx2.fillBlock({runs:runs},$ctx1,1)})});

+ 14 - 11
js/Spaces.js

@@ -51,10 +51,12 @@ category: 'releasing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-if(($receiver = self["@frame"]) == nil || $receiver == null){
+var $1;
+$1=self["@frame"];
+if(($receiver = $1) == nil || $receiver == null){
 return self;
 } else {
-self["@frame"];
+$1;
 };
 _st(_st(self["@frame"])._asJQuery())._remove();
 self._release();
@@ -74,17 +76,18 @@ fn: function (aBlock){
 var self=this;
 function $ObjectSpaceConnectionError(){return smalltalk.ObjectSpaceConnectionError||(typeof ObjectSpaceConnectionError=="undefined"?nil:ObjectSpaceConnectionError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$5,$4,$2;
-if(! smalltalk.assert(self._isConnected())){
-$1=_st($ObjectSpaceConnectionError())._signal();
-return $1;
+var $1,$2,$4,$6,$5,$3;
+$1=self._isConnected();
+if(! smalltalk.assert($1)){
+$2=_st($ObjectSpaceConnectionError())._signal();
+return $2;
 };
-$3=_st(self["@frame"])._contentWindow();
-$5="(".__comma(_st(aBlock)._compiledSource());
-$4=_st($5).__comma(")()");
+$4=_st(self["@frame"])._contentWindow();
+$6="(".__comma(_st(aBlock)._compiledSource());
+$5=_st($6).__comma(")()");
 $ctx1.sendIdx[","]=1;
-$2=_st($3)._eval_($4);
-return $2;
+$3=_st($4)._eval_($5);
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.ObjectSpace)})},
 args: ["aBlock"],
 source: "do: aBlock\x0a\x09self isConnected ifFalse: [ ^ ObjectSpaceConnectionError signal ].\x0a\x09^ frame contentWindow eval: '(', aBlock compiledSource, ')()'",

+ 13 - 5
st/Compiler-Interpreter.st

@@ -95,7 +95,7 @@ forContext: aContext node: aNode
 ! !
 
 MethodContext subclass: #AIContext
-	instanceVariableNames: 'outerContext innerContext pc locals selector index sendIndexes ast interpreter'
+	instanceVariableNames: 'outerContext innerContext pc locals selector index sendIndexes evaluatedSelector ast interpreter'
 	package: 'Compiler-Interpreter'!
 !AIContext commentStamp!
 I am like a `MethodContext`, used by the `ASTInterpreter`.
@@ -105,6 +105,14 @@ When debugging, my instances are created by copying the current `MethodContext`
 
 !AIContext methodsFor: 'accessing'!
 
+evaluatedSelector
+	^ evaluatedSelector
+!
+
+evaluatedSelector: aString
+	evaluatedSelector := aString
+!
+
 index
 	^ index ifNil: [ 0 ]
 !
@@ -201,6 +209,7 @@ initializeAST
 initializeFromMethodContext: aMethodContext
 
 	self
+		evaluatedSelector: aMethodContext evaluatedSelector;
 		index: aMethodContext index;
 		sendIndexes: aMethodContext sendIndexes;
 		receiver: aMethodContext receiver;
@@ -219,9 +228,8 @@ initializeInterpreter
 		context: self;
 		yourself.
 	
-	(self innerContext notNil and: [ 
-		self innerContext isBlockContext not ]) ifTrue: [
-			self setupInterpreter: interpreter ]
+	self innerContext ifNotNil: [
+		self setupInterpreter: interpreter ]
 !
 
 initializeLocals
@@ -266,7 +274,7 @@ setupInterpreter: anInterpreter
 	
 	"Retrieve the current node"
 	currentNode := ASTPCNodeVisitor new
-			selector: self innerContext selector;
+			selector: self evaluatedSelector;
 			context: self;
 			visit: self ast;
 			currentNode.

+ 2 - 1
st/Compiler-Semantic.st

@@ -576,7 +576,8 @@ visitSendNode: aNode
 			(self superSends at: aNode selector) add: aNode ]
 		
 		ifFalse: [ (IRSendInliner inlinedSelectors includes: aNode selector) ifTrue: [
-			aNode shouldBeInlined: true ] ].
+			aNode shouldBeInlined: true.
+			aNode receiver shouldBeAliased: true ] ].
 
 	self messageSends at: aNode selector ifAbsentPut: [ Set new ].
 	(self messageSends at: aNode selector) add: aNode.

+ 14 - 14
st/IDE.st

@@ -2340,45 +2340,45 @@ inspectOn: anInspector
 	anInspector setLabel: label
 ! !
 
-!HashedCollection methodsFor: '*IDE'!
+!MethodContext methodsFor: '*IDE'!
 
 inspectOn: anInspector
 	| variables |
 	variables := Dictionary new.
 	variables at: '#self' put: self.
-	variables at: '#keys' put: self keys.
-	self keysAndValuesDo: [:key :value |
-		variables at: key put: value].
+	variables at: '#home' put: self home.
+	variables at: '#receiver' put: self receiver.
+	variables at: '#selector' put: self selector.
+	variables at: '#temps' put: self temps.
+	self class instanceVariableNames do: [:each |
+		variables at: each put: (self instVarAt: each)].
 	anInspector
 		setLabel: self printString;
 		setVariables: variables
 ! !
 
-!Set methodsFor: '*IDE'!
+!HashedCollection methodsFor: '*IDE'!
 
 inspectOn: anInspector
 	| variables |
 	variables := Dictionary new.
 	variables at: '#self' put: self.
-	elements withIndexDo: [:each :i |
-		variables at: i put: each].
+	variables at: '#keys' put: self keys.
+	self keysAndValuesDo: [:key :value |
+		variables at: key put: value].
 	anInspector
 		setLabel: self printString;
 		setVariables: variables
 ! !
 
-!MethodContext methodsFor: '*IDE'!
+!Set methodsFor: '*IDE'!
 
 inspectOn: anInspector
 	| variables |
 	variables := Dictionary new.
 	variables at: '#self' put: self.
-	variables at: '#home' put: self home.
-	variables at: '#receiver' put: self receiver.
-	variables at: '#selector' put: self selector.
-	variables at: '#temps' put: self temps.
-	self class instanceVariableNames do: [:each |
-		variables at: each put: (self instVarAt: each)].
+	elements withIndexDo: [:each :i |
+		variables at: i put: each].
 	anInspector
 		setLabel: self printString;
 		setVariables: variables

+ 4 - 0
st/Kernel-Methods.st

@@ -552,6 +552,10 @@ My instances are JavaScript `SmalltalkMethodContext` objects defined in `boot.js
 
 !MethodContext methodsFor: 'accessing'!
 
+evaluatedSelector
+	<return self.evaluatedSelector>
+!
+
 home
 	<return self.homeContext>
 !

+ 4 - 1
support/boot.js

@@ -812,6 +812,9 @@ function RuntimeBrik(brikz, st) {
 			this.selector    = selector;
 			this.locals      = locals || {};
 			this.lookupClass = lookupClass;
+			if(this.homeContext) {
+				this.homeContext.evaluatedSelector = selector;
+			}
 		};
 
 		SmalltalkMethodContext.prototype.fillBlock = function(locals, ctx, index) {
@@ -942,7 +945,7 @@ function MessageSendBrik(brikz, st) {
 		/* Handles not understood messages. Also see the Amber counter-part
 		 Object>>doesNotUnderstand: */
 
-		return receiver._doesNotUnderstand_(
+		receiver._doesNotUnderstand_(
 			st.Message._new()
 				._selector_(st.convertSelector(selector))
 				._arguments_(args)

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