Browse Source

- Avoid too many aliasing due to send indexes (partial fix only)
- recompiled all JS files

Nicolas Petton 10 years ago
parent
commit
ab78f6e3de

+ 6 - 14
js/Benchfib.js

@@ -29,7 +29,7 @@ category: '*Benchfib',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$5,$4,$7,$6,$3,$1;
+var $2,$5,$4,$3,$1;
 $2=self.__lt((2));
 if(smalltalk.assert($2)){
 $1=(1);
@@ -38,9 +38,7 @@ $5=self.__minus((1));
 $ctx1.sendIdx["-"]=1;
 $4=_st($5)._benchFib();
 $ctx1.sendIdx["benchFib"]=1;
-$7=self.__minus((2));
-$6=_st($7)._benchFib();
-$3=_st($4).__plus($6);
+$3=_st($4).__plus(_st(self.__minus((2)))._benchFib());
 $1=_st($3).__plus((1));
 $ctx1.sendIdx["+"]=1;
 };
@@ -175,7 +173,7 @@ var self=this;
 var t1,t2,r,n1,n2;
 function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
 return smalltalk.withContext(function($ctx1) { 
-var $7,$6,$5,$4,$3,$10,$9,$8,$2,$1;
+var $7,$6,$5,$4,$3,$2,$1;
 n1=(1);
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -218,10 +216,7 @@ $ctx1.sendIdx["/"]=1;
 $4=_st($5)._printString();
 $ctx1.sendIdx["printString"]=1;
 $3=_st($4).__comma(" bytecodes/sec; ");
-$10=_st(r).__star((1000));
-$9=_st($10).__slash(t2);
-$8=_st($9)._printString();
-$2=_st($3).__comma($8);
+$2=_st($3).__comma(_st(_st(_st(r).__star((1000))).__slash(t2))._printString());
 $ctx1.sendIdx[","]=2;
 $1=_st($2).__comma(" sends/sec");
 $ctx1.sendIdx[","]=1;
@@ -243,7 +238,7 @@ var self=this;
 var t1,t2,r,n1,n2;
 function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
 return smalltalk.withContext(function($ctx1) { 
-var $7,$6,$5,$4,$3,$10,$9,$8,$2,$1;
+var $7,$6,$5,$4,$3,$2,$1;
 n1=(1);
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -286,10 +281,7 @@ $ctx1.sendIdx["/"]=1;
 $4=_st($5)._printString();
 $ctx1.sendIdx["printString"]=1;
 $3=_st($4).__comma(" bytecodes/sec; ");
-$10=_st(r).__star((1000));
-$9=_st($10).__slash(t2);
-$8=_st($9)._printString();
-$2=_st($3).__comma($8);
+$2=_st($3).__comma(_st(_st(_st(r).__star((1000))).__slash(t2))._printString());
 $ctx1.sendIdx[","]=2;
 $1=_st($2).__comma(" sends/sec");
 $ctx1.sendIdx[","]=1;

+ 10 - 15
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,$6;
+var $2,$4,$3,$1,$5;
 $2="<span />"._asJQuery();
 $4="&".__comma(aString);
 $ctx1.sendIdx[","]=2;
@@ -637,8 +637,7 @@ $1=_st($2)._html_($3);
 result=_st($1)._text();
 $5=_st(_st(result)._size()).__eq((1));
 if(! smalltalk.assert($5)){
-$6="Not an HTML entity: ".__comma(aString);
-self._error_($6);
+self._error_("Not an HTML entity: ".__comma(aString));
 };
 self._with_(result);
 return self}, function($ctx1) {$ctx1.fill(self,"entity:",{aString:aString,result:result},smalltalk.HTMLCanvas)})},
@@ -2208,9 +2207,8 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st(jQuery)._at_("browser");
-$2=_st($3)._at_("msie");
+var $2,$1;
+$2=_st(_st(jQuery)._at_("browser"))._at_("msie");
 $ctx1.sendIdx["at:"]=1;
 $1=_st($2)._notNil();
 return $1;
@@ -2229,9 +2227,8 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st(jQuery)._at_("browser");
-$2=_st($3)._at_("mozilla");
+var $2,$1;
+$2=_st(_st(jQuery)._at_("browser"))._at_("mozilla");
 $ctx1.sendIdx["at:"]=1;
 $1=_st($2)._notNil();
 return $1;
@@ -2250,9 +2247,8 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st(jQuery)._at_("browser");
-$2=_st($3)._at_("opera");
+var $2,$1;
+$2=_st(_st(jQuery)._at_("browser"))._at_("opera");
 $ctx1.sendIdx["at:"]=1;
 $1=_st($2)._notNil();
 return $1;
@@ -2271,9 +2267,8 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st(jQuery)._at_("browser");
-$2=_st($3)._at_("webkit");
+var $2,$1;
+$2=_st(_st(jQuery)._at_("browser"))._at_("webkit");
 $ctx1.sendIdx["at:"]=1;
 $1=_st($2)._notNil();
 return $1;

+ 35 - 47
js/Compiler-AST.js

@@ -176,14 +176,13 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$5,$2,$1;
+var $4,$3,$2,$1;
 $4=self._parent();
 $ctx1.sendIdx["parent"]=1;
 $3=_st($4)._isSequenceNode();
 $2=_st($3)._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._parent();
-return _st($5)._isAssignmentNode();
+return _st(self._parent())._isAssignmentNode();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $1=_st($2)._not();
 return $1;
@@ -307,16 +306,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._nodes();
 $ctx1.sendIdx["nodes"]=1;
 $2=_st($3)._isEmpty();
 if(smalltalk.assert($2)){
 $1=self;
 } else {
-$5=self._nodes();
-$4=_st($5)._first();
-$1=_st($4)._nextChild();
+$1=_st(_st(self._nodes())._first())._nextChild();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nextChild",{},smalltalk.Node)})},
@@ -360,20 +357,17 @@ fn: function (aNode){
 var self=this;
 var next;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2,$5;
+var $1,$2;
 var $early={};
 try {
 $1=self._nodes();
 $ctx1.sendIdx["nodes"]=1;
-$4=self._nodes();
-$3=_st($4)._indexOf_(aNode);
-$2=_st($3).__plus((1));
-next=_st($1)._at_ifAbsent_($2,(function(){
+next=_st($1)._at_ifAbsent_(_st(_st(self._nodes())._indexOf_(aNode)).__plus((1)),(function(){
 return smalltalk.withContext(function($ctx2) {
 throw $early=[self];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$5=_st(next)._nextChild();
-return $5;
+$2=_st(next)._nextChild();
+return $2;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode,next:next},smalltalk.Node)})},
@@ -630,12 +624,11 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(self._shouldBeAliased())._or_((function(){
+var $1;
+$1=_st(_st(self._shouldBeAliased())._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._shouldBeInlined();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$1=_st($2)._or_((function(){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(self._nodes())._detect_ifNone_((function(each){
 return smalltalk.withContext(function($ctx3) {
@@ -1243,19 +1236,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$9,$8,$7,$6,$5,$1;
+var $4,$3,$2,$1;
 $4=self._source();
 $ctx1.sendIdx["source"]=1;
 $3=_st($4)._lines();
 $ctx1.sendIdx["lines"]=1;
 $2=_st($3)._size();
 $ctx1.sendIdx["size"]=1;
-$9=self._source();
-$8=_st($9)._lines();
-$7=_st($8)._last();
-$6=_st($7)._size();
-$5=_st($6).__plus((1));
-$1=_st($2).__at($5);
+$1=_st($2).__at(_st(_st(_st(_st(self._source())._lines())._last())._size()).__plus((1)));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"extent",{},smalltalk.MethodNode)})},
 args: [],
@@ -1734,7 +1722,7 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$6,$5,$7,$8,$9,$4;
+var $1,$3,$2,$5,$6,$4;
 $1=self._receiver();
 $ctx1.sendIdx["receiver"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -1745,13 +1733,10 @@ return $2;
 } else {
 $1;
 };
-$6=self._receiver();
-$5=_st($Array())._with_($6);
-$7=$5;
-$8=self._arguments();
-_st($7)._addAll_($8);
-$9=_st($5)._yourself();
-$4=$9;
+$5=_st($Array())._with_(self._receiver());
+_st($5)._addAll_(self._arguments());
+$6=_st($5)._yourself();
+$4=$6;
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.SendNode)})},
 args: [],
@@ -1840,20 +1825,26 @@ selector: "shouldBeAliased",
 category: 'testing',
 fn: function (){
 var self=this;
+var sends;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
+sends=_st(_st(_st(self._method())._sendIndexes())._at_(self._selector()))._size();
 $1=_st(smalltalk.SendNode.superclass.fn.prototype._shouldBeAliased.apply(_st(self), []))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(_st(_st(self._method())._sendIndexes())._at_(self._selector()))._size()).__gt((1)))._and_((function(){
+return _st(_st(_st(sends).__gt((1)))._and_((function(){
+return smalltalk.withContext(function($ctx3) {
+return _st(self._index()).__lt(sends);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._and_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._isReferenced();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
+$ctx2.sendIdx["and:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},smalltalk.SendNode)})},
+}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{sends:sends},smalltalk.SendNode)})},
 args: [],
-source: "shouldBeAliased\x0a\x09^ super shouldBeAliased or: [\x0a\x09\x09(self method sendIndexes at: self selector) size > 1 and: [\x0a\x09\x09\x09self isReferenced ] ]",
-messageSends: ["or:", "shouldBeAliased", "and:", ">", "size", "at:", "sendIndexes", "method", "selector", "isReferenced"],
+source: "shouldBeAliased\x0a\x09\x22Because we keep track of send indexes, some send nodes need additional care for aliasing. \x0a\x09See IRJSVisitor >> visitIRSend:\x22\x0a\x09\x0a\x09| sends |\x0a\x09\x0a\x09sends := (self method sendIndexes at: self selector) size.\x0a\x09\x0a\x09^ super shouldBeAliased or: [\x0a\x09\x09(sends > 1 and: [ self index < sends ]) and: [ self isReferenced ] ]",
+messageSends: ["size", "at:", "sendIndexes", "method", "selector", "or:", "shouldBeAliased", "and:", ">", "<", "index", "isReferenced"],
 referencedClasses: []
 }),
 smalltalk.SendNode);
@@ -1921,7 +1912,7 @@ fn: function (anObject){
 var self=this;
 function $SendNode(){return smalltalk.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$6,$4,$7,$1;
+var $2,$3,$5,$4,$6,$1;
 $2=_st($SendNode())._new();
 _st($2)._position_(self._position());
 $3=$2;
@@ -1930,14 +1921,13 @@ $ctx1.sendIdx["receiver"]=1;
 if(($receiver = $5) == nil || $receiver == null){
 $4=anObject;
 } else {
-$6=self._receiver();
-$4=_st($6)._valueForReceiver_(anObject);
+$4=_st(self._receiver())._valueForReceiver_(anObject);
 };
 _st($3)._receiver_($4);
 _st($2)._selector_(self._selector());
 _st($2)._arguments_(self._arguments());
-$7=_st($2)._yourself();
-$1=$7;
+$6=_st($2)._yourself();
+$1=$6;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"valueForReceiver:",{anObject:anObject},smalltalk.SendNode)})},
 args: ["anObject"],
@@ -2438,16 +2428,14 @@ fn: function (){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2;
+var $1,$2;
 $1=self._source();
 $ctx1.sendIdx["source"]=1;
 _st($1)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._error_("Method source is empty");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$3=_st($Smalltalk())._current();
-$4=self._source();
-$2=_st($3)._parse_($4);
+$2=_st(_st($Smalltalk())._current())._parse_(self._source());
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"ast",{},smalltalk.CompiledMethod)})},
 args: [],

+ 14 - 18
js/Compiler-Core.js

@@ -348,14 +348,13 @@ fn: function (aString){
 var self=this;
 function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $1,$2;
 self._currentClass_($DoIt());
-$2="doIt ^[".__comma(aString);
-$1=_st($2).__comma("] value");
+$1=_st("doIt ^[".__comma(aString)).__comma("] value");
 $ctx1.sendIdx[","]=1;
 self._source_($1);
-$3=self._compileNode_(self._parse_(self._source()));
-return $3;
+$2=self._compileNode_(self._parse_(self._source()));
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"compileExpression:",{aString:aString},smalltalk.Compiler)})},
 args: ["aString"],
 source: "compileExpression: aString\x0a\x09self currentClass: DoIt.\x0a\x09self source: 'doIt ^[', aString, '] value'.\x0a\x09^self compileNode: (self parse: self source)",
@@ -371,14 +370,13 @@ category: 'compiling',
 fn: function (aString,anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $1,$2;
 self._currentClass_(_st(anObject)._class());
-$2="xxxDoIt ^[".__comma(aString);
-$1=_st($2).__comma("] value");
+$1=_st("xxxDoIt ^[".__comma(aString)).__comma("] value");
 $ctx1.sendIdx[","]=1;
 self._source_($1);
-$3=self._compileNode_(self._parse_(self._source()));
-return $3;
+$2=self._compileNode_(self._parse_(self._source()));
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"compileExpression:on:",{aString:aString,anObject:anObject},smalltalk.Compiler)})},
 args: ["aString", "anObject"],
 source: "compileExpression: aString on: anObject\x0a\x09self currentClass: anObject class.\x0a\x09self source: 'xxxDoIt ^[', aString, '] value'.\x0a\x09^self compileNode: (self parse: self source)",
@@ -489,17 +487,16 @@ fn: function (aString,anObject){
 var self=this;
 var result,method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 method=self._eval_(self._compileExpression_on_(aString,anObject));
 _st(method)._category_("xxxDoIt");
 $1=_st(anObject)._class();
 $ctx1.sendIdx["class"]=1;
 _st($1)._addCompiledMethod_(method);
 result=_st(anObject)._xxxDoIt();
-$2=_st(anObject)._class();
-_st($2)._removeCompiledMethod_(method);
-$3=result;
-return $3;
+_st(_st(anObject)._class())._removeCompiledMethod_(method);
+$2=result;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"evaluateExpression:on:",{aString:aString,anObject:anObject,result:result,method:method},smalltalk.Compiler)})},
 args: ["aString", "anObject"],
 source: "evaluateExpression: aString on: anObject\x0a\x09\x22Unlike #eval: evaluate a Smalltalk expression with anObject as the receiver and answer the returned object\x22\x0a\x09| result method |\x0a\x09method := self eval: (self compileExpression: aString on: anObject).\x0a\x09method category: 'xxxDoIt'.\x0a\x09anObject class addCompiledMethod: method.\x0a\x09result := anObject xxxDoIt.\x0a\x09anObject class removeCompiledMethod: method.\x0a\x09^result",
@@ -553,9 +550,8 @@ category: 'compiling',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3="doIt ^[".__comma(aString);
-$2=_st($3).__comma("] value");
+var $2,$1;
+$2=_st("doIt ^[".__comma(aString)).__comma("] value");
 $ctx1.sendIdx[","]=1;
 $1=self._parse_($2);
 return $1;

+ 4 - 6
js/Compiler-Exceptions.js

@@ -83,9 +83,8 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="Variable shadowing error: ".__comma(self._variableName());
-$1=_st($2).__comma(" is already defined");
+var $1;
+$1=_st("Variable shadowing error: ".__comma(self._variableName())).__comma(" is already defined");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.ShadowingVariableError)})},
@@ -141,9 +140,8 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="Unknown Variable error: ".__comma(self._variableName());
-$1=_st($2).__comma(" is not defined");
+var $1;
+$1=_st("Unknown Variable error: ".__comma(self._variableName())).__comma(" is not defined");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.UnknownVariableError)})},

+ 96 - 149
js/Compiler-IR.js

@@ -15,7 +15,7 @@ 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,$4,$6,$5,$7,$8,$10,$11,$12,$13,$9,$14;
+var $1,$2,$3,$4,$6,$5,$7,$8,$10,$11,$9,$12;
 $1=_st(aNode)._isImmutable();
 if(smalltalk.assert($1)){
 $2=self._visit_(aNode);
@@ -36,17 +36,15 @@ $8=self._sequence();
 $10=_st($IRAssignment())._new();
 _st($10)._add_(variable);
 $ctx1.sendIdx["add:"]=2;
-$11=$10;
-$12=self._visit_(aNode);
-_st($11)._add_($12);
+_st($10)._add_(self._visit_(aNode));
 $ctx1.sendIdx["add:"]=3;
-$13=_st($10)._yourself();
-$9=$13;
+$11=_st($10)._yourself();
+$9=$11;
 _st($8)._add_($9);
 $ctx1.sendIdx["add:"]=1;
 _st(_st(self._method())._internalVariables())._add_(variable);
-$14=variable;
-return $14;
+$12=variable;
+return $12;
 }, 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",
@@ -301,7 +299,7 @@ var closure;
 function $IRClosure(){return smalltalk.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}
 function $IRTempDeclaration(){return smalltalk.IRTempDeclaration||(typeof IRTempDeclaration=="undefined"?nil:IRTempDeclaration)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$5,$7,$9,$10,$11,$12,$8,$13;
+var $1,$2,$3,$4,$6,$5,$7,$8,$9;
 $1=_st($IRClosure())._new();
 $ctx1.sendIdx["new"]=1;
 _st($1)._arguments_(_st(aNode)._parameters());
@@ -318,15 +316,11 @@ $ctx1.sendIdx["scope"]=2;
 $5=_st($6)._temps();
 _st($5)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$7=closure;
-$9=_st($IRTempDeclaration())._new();
-_st($9)._name_(_st(each)._name());
-$10=$9;
-$11=_st(aNode)._scope();
-_st($10)._scope_($11);
-$12=_st($9)._yourself();
-$8=$12;
-return _st($7)._add_($8);
+$7=_st($IRTempDeclaration())._new();
+_st($7)._name_(_st(each)._name());
+_st($7)._scope_(_st(aNode)._scope());
+$8=_st($7)._yourself();
+return _st(closure)._add_($8);
 $ctx2.sendIdx["add:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 $ctx1.sendIdx["do:"]=1;
@@ -334,8 +328,8 @@ _st(_st(aNode)._nodes())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(closure)._add_(self._visit_(each));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$13=closure;
-return $13;
+$9=closure;
+return $9;
 }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode,closure:closure},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "visitBlockNode: aNode\x0a\x09| closure |\x0a\x09closure := IRClosure new\x0a\x09\x09arguments: aNode parameters;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself.\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09closure add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x09aNode nodes do: [ :each | closure add: (self visit: each) ].\x0a\x09^ closure",
@@ -353,7 +347,7 @@ var self=this;
 function $IRBlockSequence(){return smalltalk.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}
 function $IRBlockReturn(){return smalltalk.IRBlockReturn||(typeof IRBlockReturn=="undefined"?nil:IRBlockReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$4,$6,$7,$10,$9,$8,$11,$13,$14,$17,$16,$15,$18,$12,$19,$22,$21,$20,$1;
+var $2,$3,$5,$4,$6,$7,$10,$9,$8,$11,$13,$14,$17,$16,$15,$18,$12,$1;
 $2=_st($IRBlockSequence())._new();
 $ctx1.sendIdx["new"]=1;
 $1=self._withSequence_do_($2,(function(){
@@ -380,11 +374,7 @@ $9=_st($10)._last();
 $ctx3.sendIdx["last"]=1;
 $8=_st($9)._isReturnNode();
 if(smalltalk.assert($8)){
-$19=self._sequence();
-$22=_st(aNode)._nodes();
-$21=_st($22)._last();
-$20=self._visitOrAlias_($21);
-return _st($19)._add_($20);
+return _st(self._sequence())._add_(self._visitOrAlias_(_st(_st(aNode)._nodes())._last()));
 } else {
 $11=self._sequence();
 $ctx3.sendIdx["sequence"]=2;
@@ -423,7 +413,7 @@ var self=this;
 var alias,receiver;
 function $VariableNode(){return smalltalk.VariableNode||(typeof VariableNode=="undefined"?nil:VariableNode)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$6,$5,$9,$8,$7;
+var $2,$1,$3,$5,$4,$6;
 $2=_st(aNode)._receiver();
 $ctx1.sendIdx["receiver"]=1;
 $1=_st($2)._isImmutable();
@@ -432,31 +422,28 @@ receiver=_st(aNode)._receiver();
 $ctx1.sendIdx["receiver"]=2;
 receiver;
 } else {
-$3=_st(aNode)._receiver();
-alias=self._alias_($3);
+alias=self._alias_(_st(aNode)._receiver());
 $ctx1.sendIdx["alias:"]=1;
 alias;
 receiver=_st(_st($VariableNode())._new())._binding_(_st(alias)._variable());
 receiver;
 };
-$4=_st(aNode)._nodes();
+$3=_st(aNode)._nodes();
 $ctx1.sendIdx["nodes"]=1;
-_st($4)._do_((function(each){
+_st($3)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._receiver_(receiver);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
 $ctx1.sendIdx["do:"]=1;
-$6=_st(aNode)._nodes();
+$5=_st(aNode)._nodes();
 $ctx1.sendIdx["nodes"]=2;
-$5=_st($6)._allButLast();
-_st($5)._do_((function(each){
+$4=_st($5)._allButLast();
+_st($4)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._sequence())._add_(self._visit_(each));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
-$9=_st(aNode)._nodes();
-$8=_st($9)._last();
-$7=self._alias_($8);
-return $7;
+$6=self._alias_(_st(_st(aNode)._nodes())._last());
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode,alias:alias,receiver:receiver},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "visitCascadeNode: aNode\x0a\x09| alias receiver |\x0a\x0a\x09aNode receiver isImmutable \x0a\x09\x09ifTrue: [ receiver := aNode receiver ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09alias := self alias: aNode receiver.\x0a\x09\x09\x09receiver := VariableNode new binding: alias variable ].\x0a\x09\x0a\x09aNode nodes do: [ :each |\x0a\x09\x09\x09each receiver: receiver ].\x0a\x0a\x09aNode nodes allButLast do: [ :each |\x0a\x09\x09self sequence add: (self visit: each) ].\x0a\x0a\x09^ self alias: aNode nodes last",
@@ -548,7 +535,7 @@ function $IRTempDeclaration(){return smalltalk.IRTempDeclaration||(typeof IRTemp
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 function $IRVariable(){return smalltalk.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1,$7,$6,$8,$10,$11,$12,$13,$9,$14,$16,$15,$18,$19,$17,$21,$22,$25,$24,$23,$26,$20,$27;
+var $2,$3,$4,$5,$1,$7,$6,$8,$10,$11,$12,$13,$9,$14,$16,$15,$18,$19,$17,$20,$21,$22;
 $2=_st($IRMethod())._new();
 $ctx1.sendIdx["new"]=1;
 _st($2)._source_(_st(self._source())._crlfSanitized());
@@ -604,19 +591,14 @@ $ctx1.sendIdx["method"]=3;
 $19=_st($IRReturn())._new();
 $ctx1.sendIdx["new"]=3;
 $17=_st($18)._add_($19);
-$21=_st($IRVariable())._new();
-$22=$21;
-$25=_st(aNode)._scope();
-$24=_st($25)._pseudoVars();
-$23=_st($24)._at_("self");
-_st($22)._variable_($23);
-$26=_st($21)._yourself();
-$20=$26;
-_st($17)._add_($20);
+$20=_st($IRVariable())._new();
+_st($20)._variable_(_st(_st(_st(aNode)._scope())._pseudoVars())._at_("self"));
+$21=_st($20)._yourself();
+_st($17)._add_($21);
 $ctx1.sendIdx["add:"]=3;
 };
-$27=self._method();
-return $27;
+$22=self._method();
+return $22;
 }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source crlfSanitized;\x0a\x09\x09theClass: self theClass;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09sendIndexes: aNode sendIndexes;\x0a\x09\x09superSends: aNode superSends;\x0a\x09\x09classReferences: aNode classReferences;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself).\x0a\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09self method add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode nodes do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [\x0a\x09\x09(self method add: IRReturn new) add: (IRVariable new\x0a\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ self method",
@@ -1148,13 +1130,11 @@ category: 'building',
 fn: function (anIRInstruction,anotherIRInstruction){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 _st(anotherIRInstruction)._parent_(self);
 $1=self._instructions();
 $ctx1.sendIdx["instructions"]=1;
-$3=self._instructions();
-$2=_st($3)._indexOf_(anIRInstruction);
-_st($1)._at_put_($2,anotherIRInstruction);
+_st($1)._at_put_(_st(self._instructions())._indexOf_(anIRInstruction),anotherIRInstruction);
 return self}, function($ctx1) {$ctx1.fill(self,"replace:with:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},smalltalk.IRInstruction)})},
 args: ["anIRInstruction", "anotherIRInstruction"],
 source: "replace: anIRInstruction with: anotherIRInstruction\x0a\x09anotherIRInstruction parent: self.\x0a\x09self instructions\x0a\x09\x09at: (self instructions indexOf: anIRInstruction)\x0a\x09\x09put: anotherIRInstruction",
@@ -2953,16 +2933,14 @@ category: 'visiting',
 fn: function (anIRAssignment){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=_st(anIRAssignment)._instructions();
 $ctx1.sendIdx["instructions"]=1;
 $1=_st($2)._first();
 self._visit_($1);
 $ctx1.sendIdx["visit:"]=1;
 _st(self._stream())._nextPutAssignment();
-$4=_st(anIRAssignment)._instructions();
-$3=_st($4)._last();
-self._visit_($3);
+self._visit_(_st(_st(anIRAssignment)._instructions())._last());
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment},smalltalk.IRJSTranslator)})},
 args: ["anIRAssignment"],
 source: "visitIRAssignment: anIRAssignment\x0a\x09self visit: anIRAssignment instructions first.\x0a\x09self stream nextPutAssignment.\x0a\x09self visit: anIRAssignment instructions last.",
@@ -2978,7 +2956,7 @@ category: 'visiting',
 fn: function (anIRClosure){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutClosureWith_arguments_((function(){
@@ -2989,8 +2967,7 @@ _st($2)._nextPutVars_(_st(_st(anIRClosure)._tempDeclarations())._collect_((funct
 return smalltalk.withContext(function($ctx3) {
 return _st(_st(each)._name())._asVariableName();
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})})));
-$3=self._stream();
-return _st($3)._nextPutBlockContextFor_during_(anIRClosure,(function(){
+return _st(self._stream())._nextPutBlockContextFor_during_(anIRClosure,(function(){
 return smalltalk.withContext(function($ctx3) {
 return smalltalk.IRJSTranslator.superclass.fn.prototype._visitIRClosure_.apply(_st(self), [anIRClosure]);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
@@ -3010,7 +2987,7 @@ category: 'visiting',
 fn: function (anIRDynamicArray){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutAll_("[");
@@ -3020,8 +2997,7 @@ return smalltalk.withContext(function($ctx2) {
 return self._visit_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$2=self._stream();
-return _st($2)._nextPutAll_(",");
+return _st(self._stream())._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(self["@stream"])._nextPutAll_("]");
@@ -3040,7 +3016,7 @@ category: 'visiting',
 fn: function (anIRDynamicDictionary){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutAll_("smalltalk.HashedCollection._from_([");
@@ -3055,8 +3031,7 @@ $ctx2.sendIdx["stream"]=2;
 return _st($2)._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$3=self._stream();
-_st($3)._nextPutAll_("])");
+_st(self._stream())._nextPutAll_("])");
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:",{anIRDynamicDictionary:anIRDynamicDictionary},smalltalk.IRJSTranslator)})},
 args: ["anIRDynamicDictionary"],
 source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09self stream nextPutAll: 'smalltalk.HashedCollection._from_(['.\x0a\x09\x09anIRDynamicDictionary instructions\x0a\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09separatedBy: [self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: '])'",
@@ -3072,7 +3047,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,$14;
+var $1,$2,$3,$4,$5,$6,$8,$7,$9,$10;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutMethodDeclaration_with_(anIRMethod,(function(){
@@ -3106,18 +3081,14 @@ $7=_st($8)._notEmpty();
 if(smalltalk.assert($7)){
 $9=self._stream();
 $ctx4.sendIdx["stream"]=6;
-$12=_st(anIRMethod)._internalVariables();
-$11=_st($12)._asArray();
-$10=_st($11)._collect_((function(each){
+_st($9)._nextPutVars_(_st(_st(_st(anIRMethod)._internalVariables())._asArray())._collect_((function(each){
 return smalltalk.withContext(function($ctx5) {
 return _st(_st(each)._variable())._alias();
-}, function($ctx5) {$ctx5.fillBlock({each:each},$ctx4,7)})}));
-_st($9)._nextPutVars_($10);
+}, function($ctx5) {$ctx5.fillBlock({each:each},$ctx4,7)})})));
 };
-$13=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
-if(smalltalk.assert($13)){
-$14=self._stream();
-return _st($14)._nextPutNonLocalReturnHandlingWith_((function(){
+$10=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
+if(smalltalk.assert($10)){
+return _st(self._stream())._nextPutNonLocalReturnHandlingWith_((function(){
 return smalltalk.withContext(function($ctx5) {
 return smalltalk.IRJSTranslator.superclass.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
 $ctx5.sendIdx["visitIRMethod:"]=1;
@@ -3212,15 +3183,14 @@ category: 'visiting',
 fn: function (anIRSequence){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutSequenceWith_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(anIRSequence)._instructions())._do_((function(each){
 return smalltalk.withContext(function($ctx3) {
-$2=self._stream();
-return _st($2)._nextPutStatementWith_(self._visit_(each));
+return _st(self._stream())._nextPutStatementWith_(self._visit_(each));
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRSequence:",{anIRSequence:anIRSequence},smalltalk.IRJSTranslator)})},
@@ -3269,7 +3239,7 @@ category: 'visiting',
 fn: function (anIRVariable){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$5,$7,$6;
+var $3,$2,$1,$4;
 $3=_st(anIRVariable)._variable();
 $ctx1.sendIdx["variable"]=1;
 $2=_st($3)._name();
@@ -3280,10 +3250,7 @@ $ctx1.sendIdx["stream"]=1;
 _st($4)._nextPutAll_("smalltalk.getThisContext()");
 $ctx1.sendIdx["nextPutAll:"]=1;
 } else {
-$5=self._stream();
-$7=_st(anIRVariable)._variable();
-$6=_st($7)._alias();
-_st($5)._nextPutAll_($6);
+_st(self._stream())._nextPutAll_(_st(_st(anIRVariable)._variable())._alias());
 };
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRVariable:",{anIRVariable:anIRVariable},smalltalk.IRJSTranslator)})},
 args: ["anIRVariable"],
@@ -3300,13 +3267,12 @@ category: 'visiting',
 fn: function (anIRVerbatim){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutStatementWith_((function(){
 return smalltalk.withContext(function($ctx2) {
-$2=self._stream();
-return _st($2)._nextPutAll_(_st(anIRVerbatim)._source());
+return _st(self._stream())._nextPutAll_(_st(anIRVerbatim)._source());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:",{anIRVerbatim:anIRVerbatim},smalltalk.IRJSTranslator)})},
 args: ["anIRVerbatim"],
@@ -3323,7 +3289,7 @@ category: 'visiting',
 fn: function (anIRInstruction){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2,$3;
 $1=_st(anIRInstruction)._needsBoxingAsReceiver();
 if(! smalltalk.assert($1)){
 $2=self._visit_(anIRInstruction);
@@ -3335,8 +3301,7 @@ $ctx1.sendIdx["stream"]=1;
 _st($3)._nextPutAll_("_st(");
 $ctx1.sendIdx["nextPutAll:"]=1;
 self._visit_(anIRInstruction);
-$4=self._stream();
-_st($4)._nextPutAll_(")");
+_st(self._stream())._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: ')'",
@@ -3352,32 +3317,28 @@ category: 'visiting',
 fn: function (anIRSend){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$5,$4,$7,$6,$8,$9;
+var $2,$1,$3,$4,$5;
 $2=_st(anIRSend)._instructions();
 $ctx1.sendIdx["instructions"]=1;
 $1=_st($2)._first();
 self._visitReceiver_($1);
 $3=self._stream();
 $ctx1.sendIdx["stream"]=1;
-$5=".".__comma(_st(_st(anIRSend)._selector())._asSelector());
-$4=_st($5).__comma("(");
+$4=_st(".".__comma(_st(_st(anIRSend)._selector())._asSelector())).__comma("(");
 $ctx1.sendIdx[","]=1;
 _st($3)._nextPutAll_($4);
 $ctx1.sendIdx["nextPutAll:"]=1;
-$7=_st(anIRSend)._instructions();
-$6=_st($7)._allButFirst();
-_st($6)._do_separatedBy_((function(each){
+_st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._visit_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$8=self._stream();
+$5=self._stream();
 $ctx2.sendIdx["stream"]=2;
-return _st($8)._nextPutAll_(",");
+return _st($5)._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$9=self._stream();
-_st($9)._nextPutAll_(")");
+_st(self._stream())._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"visitSend:",{anIRSend:anIRSend},smalltalk.IRJSTranslator)})},
 args: ["anIRSend"],
 source: "visitSend: anIRSend\x0a\x09self visitReceiver: anIRSend instructions first.\x0a\x09self stream nextPutAll: '.', anIRSend selector asSelector, '('.\x0a\x09anIRSend instructions allButFirst\x0a\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: ')'",
@@ -3393,7 +3354,7 @@ category: 'visiting',
 fn: function (anIRSend){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6,$8,$9;
+var $1,$2,$4,$3,$5,$6;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutAll_(_st(self._currentClass())._asJavascript());
@@ -3413,20 +3374,17 @@ $5=self._stream();
 $ctx1.sendIdx["stream"]=2;
 _st($5)._nextPutAll_("), [");
 $ctx1.sendIdx["nextPutAll:"]=5;
-$7=_st(anIRSend)._instructions();
-$6=_st($7)._allButFirst();
-_st($6)._do_separatedBy_((function(each){
+_st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._visit_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$8=self._stream();
+$6=self._stream();
 $ctx2.sendIdx["stream"]=3;
-return _st($8)._nextPutAll_(",");
+return _st($6)._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=6;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$9=self._stream();
-_st($9)._nextPutAll_("])");
+_st(self._stream())._nextPutAll_("])");
 return self}, function($ctx1) {$ctx1.fill(self,"visitSuperSend:",{anIRSend:anIRSend},smalltalk.IRJSTranslator)})},
 args: ["anIRSend"],
 source: "visitSuperSend: anIRSend\x0a\x09self stream\x0a\x09\x09nextPutAll: self currentClass asJavascript;\x0a\x09\x09nextPutAll: '.superclass.fn.prototype.';\x0a\x09\x09nextPutAll: anIRSend selector asSelector, '.apply(';\x0a\x09\x09nextPutAll: '_st('.\x0a\x09self visit: anIRSend instructions first.\x0a\x09self stream nextPutAll: '), ['.\x0a\x09anIRSend instructions allButFirst\x0a\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: '])'",
@@ -3544,7 +3502,7 @@ category: 'streaming',
 fn: function (anIRClosure,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$5,$9,$8,$7,$6,$13,$12,$11,$10,$14,$16,$15,$23,$22,$21,$20,$26,$25,$24,$19,$18,$17;
+var $4,$3,$2,$1,$5,$9,$8,$7,$6,$13,$12,$11,$10,$14,$15,$22,$21,$20,$19,$18,$17,$16;
 $4=_st(anIRClosure)._scope();
 $ctx1.sendIdx["scope"]=1;
 $3=_st($4)._alias();
@@ -3583,8 +3541,7 @@ self._nextPutAll_($14);
 $ctx2.sendIdx["nextPutAll:"]=4;
 self._nextPutAll_(":");
 $ctx2.sendIdx["nextPutAll:"]=5;
-$16=_st(each)._asVariableName();
-$15=self._nextPutAll_($16);
+$15=self._nextPutAll_(_st(each)._asVariableName());
 $ctx2.sendIdx["nextPutAll:"]=6;
 return $15;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
@@ -3594,19 +3551,16 @@ $ctx2.sendIdx["nextPutAll:"]=7;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 self._nextPutAll_("},");
 $ctx1.sendIdx["nextPutAll:"]=8;
-$23=_st(anIRClosure)._scope();
+$22=_st(anIRClosure)._scope();
 $ctx1.sendIdx["scope"]=4;
-$22=_st($23)._outerScope();
-$21=_st($22)._alias();
-$20=_st($21).__comma(",");
-$26=_st(anIRClosure)._scope();
-$25=_st($26)._blockIndex();
-$24=_st($25)._asString();
-$19=_st($20).__comma($24);
+$21=_st($22)._outerScope();
+$20=_st($21)._alias();
+$19=_st($20).__comma(",");
+$18=_st($19).__comma(_st(_st(_st(anIRClosure)._scope())._blockIndex())._asString());
 $ctx1.sendIdx[","]=7;
-$18=_st($19).__comma(")})");
+$17=_st($18).__comma(")})");
 $ctx1.sendIdx[","]=6;
-$17=self._nextPutAll_($18);
+$16=self._nextPutAll_($17);
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutBlockContextFor:during:",{anIRClosure:anIRClosure,aBlock:aBlock},smalltalk.JSStream)})},
 args: ["anIRClosure", "aBlock"],
 source: "nextPutBlockContextFor: anIRClosure during: aBlock\x0a\x09self\x0a\x09\x09nextPutAll: 'return smalltalk.withContext(function(', anIRClosure scope alias, ') {'; lf.\x0a\x09\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '}, function(', anIRClosure scope alias, ') {';\x0a\x09\x09nextPutAll: anIRClosure scope alias, '.fillBlock({'.\x0a\x09\x0a\x09anIRClosure locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: anIRClosure scope outerScope alias, ',', anIRClosure scope blockIndex asString, ')})'",
@@ -3689,7 +3643,7 @@ category: 'streaming',
 fn: function (aMethod,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$5,$10,$9,$8,$7,$12,$11,$6,$16,$15,$14,$13,$17,$19,$18,$20,$21;
+var $4,$3,$2,$1,$5,$10,$9,$8,$7,$6,$14,$13,$12,$11,$15,$16,$17;
 $4=_st(aMethod)._scope();
 $ctx1.sendIdx["scope"]=1;
 $3=_st($4)._alias();
@@ -3710,31 +3664,28 @@ $8="}, function(".__comma($9);
 $ctx1.sendIdx[","]=5;
 $7=_st($8).__comma(") {");
 $ctx1.sendIdx[","]=4;
-$12=_st(aMethod)._scope();
-$11=_st($12)._alias();
-$6=_st($7).__comma($11);
+$6=_st($7).__comma(_st(_st(aMethod)._scope())._alias());
 $ctx1.sendIdx[","]=3;
 self._nextPutAll_($6);
 $ctx1.sendIdx["nextPutAll:"]=2;
-$16=_st(_st(aMethod)._selector())._asJavascript();
+$14=_st(_st(aMethod)._selector())._asJavascript();
 $ctx1.sendIdx["asJavascript"]=1;
-$15=".fill(self,".__comma($16);
-$14=_st($15).__comma(",{");
+$13=".fill(self,".__comma($14);
+$12=_st($13).__comma(",{");
 $ctx1.sendIdx[","]=6;
-$13=self._nextPutAll_($14);
+$11=self._nextPutAll_($12);
 $ctx1.sendIdx["nextPutAll:"]=3;
 _st(_st(aMethod)._locals())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$17=_st(each)._asVariableName();
+$15=_st(each)._asVariableName();
 $ctx2.sendIdx["asVariableName"]=1;
-self._nextPutAll_($17);
+self._nextPutAll_($15);
 $ctx2.sendIdx["nextPutAll:"]=4;
 self._nextPutAll_(":");
 $ctx2.sendIdx["nextPutAll:"]=5;
-$19=_st(each)._asVariableName();
-$18=self._nextPutAll_($19);
+$16=self._nextPutAll_(_st(each)._asVariableName());
 $ctx2.sendIdx["nextPutAll:"]=6;
-return $18;
+return $16;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return self._nextPutAll_(",");
@@ -3742,10 +3693,9 @@ $ctx2.sendIdx["nextPutAll:"]=7;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 self._nextPutAll_("},");
 $ctx1.sendIdx["nextPutAll:"]=8;
-$20=_st(_st(aMethod)._theClass())._asJavascript();
-self._nextPutAll_($20);
+self._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
 $ctx1.sendIdx["nextPutAll:"]=9;
-$21=self._nextPutAll_(")})");
+$17=self._nextPutAll_(")})");
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutContextFor:during:",{aMethod:aMethod,aBlock:aBlock},smalltalk.JSStream)})},
 args: ["aMethod", "aBlock"],
 source: "nextPutContextFor: aMethod during: aBlock\x0a\x09self\x0a\x09\x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; lf.\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '}, function(', aMethod scope alias, ') {', aMethod scope alias;\x0a\x09\x09nextPutAll: '.fill(self,', aMethod selector asJavascript, ',{'.\x0a\x0a\x09aMethod locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: aMethod theClass asJavascript;\x0a\x09\x09nextPutAll: ')})'",
@@ -3858,7 +3808,7 @@ fn: function (aMethod,aBlock){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3,$6,$9,$8,$7,$10,$11,$12,$15,$14,$13,$16,$19,$18,$17,$20,$24,$23,$22,$21,$25,$26,$27,$28,$29;
+var $1,$2,$5,$4,$3,$6,$9,$8,$7,$10,$11,$12,$15,$14,$13,$16,$19,$18,$17,$20,$23,$22,$21,$24,$25,$26;
 $1=self["@stream"];
 _st($1)._nextPutAll_("smalltalk.method({");
 $ctx1.sendIdx["nextPutAll:"]=1;
@@ -3910,11 +3860,10 @@ $ctx1.sendIdx["nextPutAll:"]=5;
 _st($11)._lf();
 $ctx1.sendIdx["lf"]=5;
 $20=$11;
-$24=_st(_st(_st(aMethod)._arguments())._collect_((function(each){
+$23=_st(_st(_st(_st(aMethod)._arguments())._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._value();
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._asArray();
-$23=_st($24)._asJavascript();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._asArray())._asJavascript();
 $ctx1.sendIdx["asJavascript"]=4;
 $22="args: ".__comma($23);
 $21=_st($22).__comma(",");
@@ -3922,23 +3871,21 @@ $ctx1.sendIdx[","]=8;
 _st($20)._nextPutAll_($21);
 $ctx1.sendIdx["nextPutAll:"]=6;
 _st($11)._lf();
-$25=_st($11)._nextPutAll_("referencedClasses: [");
+$24=_st($11)._nextPutAll_("referencedClasses: [");
 $ctx1.sendIdx["nextPutAll:"]=7;
 _st(_st(aMethod)._classReferences())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$26=self["@stream"];
-$27=_st(each)._asJavascript();
-return _st($26)._nextPutAll_($27);
+return _st(self["@stream"])._nextPutAll_(_st(each)._asJavascript());
 $ctx2.sendIdx["nextPutAll:"]=8;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self["@stream"])._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=9;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$28=self["@stream"];
-_st($28)._nextPutAll_("]");
+$25=self["@stream"];
+_st($25)._nextPutAll_("]");
 $ctx1.sendIdx["nextPutAll:"]=10;
-$29=_st($28)._nextPutAll_("})");
+$26=_st($25)._nextPutAll_("})");
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutMethodDeclaration:with:",{aMethod:aMethod,aBlock:aBlock},smalltalk.JSStream)})},
 args: ["aMethod", "aBlock"],
 source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream\x0a\x09\x09nextPutAll: 'smalltalk.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf.\x0a\x09aBlock value.\x0a\x09stream\x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: aMethod messageSends asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09aMethod classReferences\x0a\x09\x09do: [:each | stream nextPutAll: each asJavascript]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream\x0a\x09\x09nextPutAll: ']';\x0a\x09\x09nextPutAll: '})'",

+ 97 - 145
js/Compiler-Inlining.js

@@ -341,7 +341,7 @@ category: 'testing',
 fn: function (anIRAssignment){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$6,$5,$1;
+var $4,$3,$2,$1;
 $1=_st(_st(_st(anIRAssignment)._isInlined())._not())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 $4=_st(anIRAssignment)._instructions();
@@ -351,9 +351,7 @@ $ctx2.sendIdx["last"]=1;
 $2=_st($3)._isSend();
 return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$6=_st(anIRAssignment)._instructions();
-$5=_st($6)._last();
-return self._shouldInlineSend_($5);
+return self._shouldInlineSend_(_st(_st(anIRAssignment)._instructions())._last());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["and:"]=1;
@@ -373,7 +371,7 @@ category: 'testing',
 fn: function (anIRReturn){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$6,$5,$1;
+var $4,$3,$2,$1;
 $1=_st(_st(_st(anIRReturn)._isInlined())._not())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 $4=_st(anIRReturn)._instructions();
@@ -383,9 +381,7 @@ $ctx2.sendIdx["first"]=1;
 $2=_st($3)._isSend();
 return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$6=_st(anIRReturn)._instructions();
-$5=_st($6)._first();
-return self._shouldInlineSend_($5);
+return self._shouldInlineSend_(_st(_st(anIRReturn)._instructions())._first());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["and:"]=1;
@@ -429,7 +425,7 @@ var self=this;
 var localReturn;
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$5,$6,$7,$8,$9,$10,$11;
+var $2,$1,$4,$3,$5,$6,$7,$8,$9;
 $2=_st(anIRNonLocalReturn)._scope();
 $ctx1.sendIdx["scope"]=1;
 $1=_st($2)._canInlineNonLocalReturns();
@@ -441,22 +437,20 @@ $5=_st(anIRNonLocalReturn)._scope();
 $ctx1.sendIdx["scope"]=3;
 _st($3)._removeNonLocalReturn_($5);
 $6=_st($IRReturn())._new();
-$7=$6;
-$8=_st(anIRNonLocalReturn)._scope();
-_st($7)._scope_($8);
-$9=_st($6)._yourself();
-localReturn=$9;
+_st($6)._scope_(_st(anIRNonLocalReturn)._scope());
+$7=_st($6)._yourself();
+localReturn=$7;
 localReturn;
 _st(_st(anIRNonLocalReturn)._instructions())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(localReturn)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 _st(anIRNonLocalReturn)._replaceWith_(localReturn);
-$10=localReturn;
-return $10;
+$8=localReturn;
+return $8;
 };
-$11=smalltalk.IRInliner.superclass.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
-return $11;
+$9=smalltalk.IRInliner.superclass.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
+return $9;
 }, function($ctx1) {$ctx1.fill(self,"transformNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn,localReturn:localReturn},smalltalk.IRInliner)})},
 args: ["anIRNonLocalReturn"],
 source: "transformNonLocalReturn: anIRNonLocalReturn\x0a\x09\x22Replace a non local return into a local return\x22\x0a\x0a\x09| localReturn |\x0a\x09anIRNonLocalReturn scope canInlineNonLocalReturns ifTrue: [\x0a\x09\x09anIRNonLocalReturn scope methodScope removeNonLocalReturn: anIRNonLocalReturn scope.\x0a\x09\x09localReturn := IRReturn new\x0a\x09\x09\x09scope: anIRNonLocalReturn scope;\x0a\x09\x09\x09yourself.\x0a\x09\x09anIRNonLocalReturn instructions do: [ :each |\x0a\x09\x09\x09localReturn add: each ].\x0a\x09\x09anIRNonLocalReturn replaceWith: localReturn.\x0a\x09\x09^ localReturn ].\x0a\x09^ super visitIRNonLocalReturn: anIRNonLocalReturn",
@@ -602,7 +596,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfFalse){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6;
+var $1,$2,$4,$3;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIf_with_((function(){
@@ -616,13 +610,10 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(")");
+return _st(self._stream())._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfFalse)._instructions();
-$6=_st($7)._last();
-return self._visit_($6);
+return self._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._last());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfFalse:",{anIRInlinedIfFalse:anIRInlinedIfFalse},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfFalse"],
@@ -639,7 +630,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfNil){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6;
+var $1,$2,$4,$3;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIf_with_((function(){
@@ -653,13 +644,10 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(") == nil || $receiver == null");
+return _st(self._stream())._nextPutAll_(") == nil || $receiver == null");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfNil)._instructions();
-$6=_st($7)._last();
-return self._visit_($6);
+return self._visit_(_st(_st(anIRInlinedIfNil)._instructions())._last());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNil:",{anIRInlinedIfNil:anIRInlinedIfNil},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfNil"],
@@ -676,7 +664,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfNilIfNotNil){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6,$9,$8;
+var $1,$2,$4,$3,$6,$5;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIfElse_with_with_((function(){
@@ -690,20 +678,17 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(") == nil || $receiver == null");
+return _st(self._stream())._nextPutAll_(") == nil || $receiver == null");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfNilIfNotNil)._instructions();
+$6=_st(anIRInlinedIfNilIfNotNil)._instructions();
 $ctx2.sendIdx["instructions"]=2;
-$6=_st($7)._second();
-return self._visit_($6);
+$5=_st($6)._second();
+return self._visit_($5);
 $ctx2.sendIdx["visit:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$9=_st(anIRInlinedIfNilIfNotNil)._instructions();
-$8=_st($9)._third();
-return self._visit_($8);
+return self._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._third());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNilIfNotNil:",{anIRInlinedIfNilIfNotNil:anIRInlinedIfNilIfNotNil},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfNilIfNotNil"],
@@ -720,7 +705,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfTrue){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6;
+var $1,$2,$4,$3;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIf_with_((function(){
@@ -734,13 +719,10 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(")");
+return _st(self._stream())._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfTrue)._instructions();
-$6=_st($7)._last();
-return self._visit_($6);
+return self._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._last());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrue:",{anIRInlinedIfTrue:anIRInlinedIfTrue},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfTrue"],
@@ -757,7 +739,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfTrueIfFalse){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6,$9,$8;
+var $1,$2,$4,$3,$6,$5;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIfElse_with_with_((function(){
@@ -771,20 +753,17 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(")");
+return _st(self._stream())._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfTrueIfFalse)._instructions();
+$6=_st(anIRInlinedIfTrueIfFalse)._instructions();
 $ctx2.sendIdx["instructions"]=2;
-$6=_st($7)._second();
-return self._visit_($6);
+$5=_st($6)._second();
+return self._visit_($5);
 $ctx2.sendIdx["visit:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$9=_st(anIRInlinedIfTrueIfFalse)._instructions();
-$8=_st($9)._third();
-return self._visit_($8);
+return self._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._third());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrueIfFalse:",{anIRInlinedIfTrueIfFalse:anIRInlinedIfTrueIfFalse},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfTrueIfFalse"],
@@ -801,15 +780,14 @@ category: 'visiting',
 fn: function (anIRInlinedReturn){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutStatementWith_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._visit_(_st(_st(anIRInlinedReturn)._instructions())._last());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$2=self._stream();
-_st($2)._nextPutNonLocalReturnWith_((function(){
+_st(self._stream())._nextPutNonLocalReturnWith_((function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedNonLocalReturn:",{anIRInlinedReturn:anIRInlinedReturn},smalltalk.IRInliningJSTranslator)})},
@@ -1059,7 +1037,7 @@ function $IRAssignment(){return smalltalk.IRAssignment||(typeof IRAssignment=="u
 function $IRVariable(){return smalltalk.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}
 function $AliasVar(){return smalltalk.AliasVar||(typeof AliasVar=="undefined"?nil:AliasVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$4,$7,$9,$10,$12,$14,$15,$16,$17,$13,$11,$18,$20,$22,$23,$24,$25,$21,$19,$26,$8,$28,$27,$31,$30,$32,$29,$33,$36,$35,$34,$37,$38,$39;
+var $1,$2,$3,$5,$6,$4,$7,$9,$10,$12,$14,$15,$16,$17,$13,$11,$18,$20,$22,$23,$21,$19,$24,$8,$26,$25,$29,$28,$30,$27,$31,$34,$33,$32,$35;
 inlinedClosure=self._inlinedClosure();
 $1=inlinedClosure;
 $2=_st(anIRClosure)._scope();
@@ -1111,29 +1089,27 @@ $18=$9;
 $20=_st($IRVariable())._new();
 $ctx2.sendIdx["new"]=5;
 $22=_st($AliasVar())._new();
-$23=$22;
-$24=_st(inlinedClosure)._scope();
-_st($23)._scope_($24);
+_st($22)._scope_(_st(inlinedClosure)._scope());
 _st($22)._name_("$receiver");
-$25=_st($22)._yourself();
+$23=_st($22)._yourself();
 $ctx2.sendIdx["yourself"]=3;
-$21=$25;
+$21=$23;
 $19=_st($20)._variable_($21);
 _st($18)._add_($19);
 $ctx2.sendIdx["add:"]=5;
-$26=_st($9)._yourself();
-$8=$26;
+$24=_st($9)._yourself();
+$8=$24;
 return _st($7)._add_($8);
 $ctx2.sendIdx["add:"]=3;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 $ctx1.sendIdx["do:"]=2;
 _st(inlinedClosure)._add_(sequence);
 $ctx1.sendIdx["add:"]=6;
-$28=_st(anIRClosure)._instructions();
+$26=_st(anIRClosure)._instructions();
 $ctx1.sendIdx["instructions"]=2;
-$27=_st($28)._last();
+$25=_st($26)._last();
 $ctx1.sendIdx["last"]=1;
-statements=_st($27)._instructions();
+statements=_st($25)._instructions();
 $ctx1.sendIdx["instructions"]=1;
 _st(statements)._ifNotEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -1142,31 +1118,29 @@ return smalltalk.withContext(function($ctx3) {
 return _st(sequence)._add_(each);
 $ctx3.sendIdx["add:"]=7;
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,4)})}));
-$31=_st(statements)._last();
+$29=_st(statements)._last();
 $ctx2.sendIdx["last"]=2;
-$30=_st($31)._isReturn();
-$29=_st($30)._and_((function(){
+$28=_st($29)._isReturn();
+$27=_st($28)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$32=_st(statements)._last();
+$30=_st(statements)._last();
 $ctx3.sendIdx["last"]=3;
-return _st($32)._isBlockReturn();
+return _st($30)._isBlockReturn();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
-if(smalltalk.assert($29)){
-$33=sequence;
-$36=_st(statements)._last();
+if(smalltalk.assert($27)){
+$31=sequence;
+$34=_st(statements)._last();
 $ctx2.sendIdx["last"]=4;
-$35=_st($36)._instructions();
-$34=_st($35)._first();
-return _st($33)._add_($34);
+$33=_st($34)._instructions();
+$32=_st($33)._first();
+return _st($31)._add_($32);
 $ctx2.sendIdx["add:"]=8;
 } else {
-$37=sequence;
-$38=_st(statements)._last();
-return _st($37)._add_($38);
+return _st(sequence)._add_(_st(statements)._last());
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$39=inlinedClosure;
-return $39;
+$35=inlinedClosure;
+return $35;
 }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,sequence:sequence,statements:statements},smalltalk.IRSendInliner)})},
 args: ["anIRClosure"],
 source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure sequence statements |\x0a\x0a\x09inlinedClosure := self inlinedClosure.\x0a\x09inlinedClosure scope: anIRClosure scope.\x0a\x0a\x09\x22Add the possible temp declarations\x22\x0a\x09anIRClosure tempDeclarations do: [ :each |\x0a\x09\x09\x09inlinedClosure add: each ].\x0a\x0a\x09\x22Add a block sequence\x22\x0a\x09sequence := self inlinedSequence.\x0a\x0a\x09\x22Map the closure arguments to the receiver of the message send\x22\x0a\x09anIRClosure arguments do: [ :each |\x0a\x09\x09inlinedClosure add: (IRTempDeclaration new name: each; yourself).\x0a\x09\x09sequence add: (IRAssignment new\x0a\x09\x09\x09add: (IRVariable new variable: (AliasVar new scope: inlinedClosure scope; name: each; yourself));\x0a\x09\x09\x09add: (IRVariable new variable: (AliasVar new scope: inlinedClosure scope; name: '$receiver'; yourself));\x0a\x09\x09\x09yourself) ].\x0a\x09\x09\x09\x0a\x09\x22To ensure the correct order of the closure instructions: first the temps then the sequence\x22\x0a\x09inlinedClosure add: sequence.\x0a\x0a\x09\x22Get all the statements\x22\x0a\x09statements := anIRClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements allButLast do: [ :each | sequence add: each ].\x0a\x0a\x09\x09\x22Inlined closures don't have implicit local returns\x22\x0a\x09\x09(statements last isReturn and: [ statements last isBlockReturn ])\x0a\x09\x09\x09ifTrue: [ sequence add: statements last instructions first ]\x0a\x09\x09\x09ifFalse: [ sequence add: statements last ] ].\x0a\x0a\x09^ inlinedClosure",
@@ -1182,15 +1156,12 @@ category: 'inlining',
 fn: function (anIRSend){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$6,$5,$4,$1;
+var $3,$2,$1;
 self._send_(anIRSend);
 $3=self._send();
 $ctx1.sendIdx["send"]=1;
 $2=_st($3)._selector();
-$6=self._send();
-$5=_st($6)._instructions();
-$4=_st($5)._allButFirst();
-$1=self._perform_withArguments_($2,$4);
+$1=self._perform_withArguments_($2,_st(_st(self._send())._instructions())._allButFirst());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inlineSend:",{anIRSend:anIRSend},smalltalk.IRSendInliner)})},
 args: ["anIRSend"],
@@ -1227,7 +1198,7 @@ fn: function (inlinedSend,anIRInstruction){
 var self=this;
 var inlinedClosure;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3,$6,$7;
+var $1,$2,$5,$4,$3,$6;
 $1=_st(anIRInstruction)._isClosure();
 if(! smalltalk.assert($1)){
 self._inliningError_("Message argument should be a block");
@@ -1245,8 +1216,7 @@ $3=_st($4)._first();
 _st(inlinedSend)._add_($3);
 $ctx1.sendIdx["add:"]=1;
 $6=_st(inlinedSend)._add_(inlinedClosure);
-$7=self._send();
-_st($7)._replaceWith_(inlinedSend);
+_st(self._send())._replaceWith_(inlinedSend);
 return inlinedSend;
 }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,inlinedClosure:inlinedClosure},smalltalk.IRSendInliner)})},
 args: ["inlinedSend", "anIRInstruction"],
@@ -1264,7 +1234,7 @@ fn: function (inlinedSend,anIRInstruction,anotherIRInstruction){
 var self=this;
 var inlinedClosure1,inlinedClosure2;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$9,$8,$7,$10,$11;
+var $1,$2,$3,$4,$7,$6,$5,$8;
 $1=_st(anIRInstruction)._isClosure();
 $ctx1.sendIdx["isClosure"]=1;
 if(! smalltalk.assert($1)){
@@ -1281,20 +1251,17 @@ $4=self._inlineClosure_(anIRInstruction);
 $ctx1.sendIdx["inlineClosure:"]=1;
 inlinedClosure1=_st($3)._visit_($4);
 $ctx1.sendIdx["visit:"]=1;
-$5=self._translator();
-$6=self._inlineClosure_(anotherIRInstruction);
-inlinedClosure2=_st($5)._visit_($6);
-$9=self._send();
+inlinedClosure2=_st(self._translator())._visit_(self._inlineClosure_(anotherIRInstruction));
+$7=self._send();
 $ctx1.sendIdx["send"]=1;
-$8=_st($9)._instructions();
-$7=_st($8)._first();
-_st(inlinedSend)._add_($7);
+$6=_st($7)._instructions();
+$5=_st($6)._first();
+_st(inlinedSend)._add_($5);
 $ctx1.sendIdx["add:"]=1;
 _st(inlinedSend)._add_(inlinedClosure1);
 $ctx1.sendIdx["add:"]=2;
-$10=_st(inlinedSend)._add_(inlinedClosure2);
-$11=self._send();
-_st($11)._replaceWith_(inlinedSend);
+$8=_st(inlinedSend)._add_(inlinedClosure2);
+_st(self._send())._replaceWith_(inlinedSend);
 return inlinedSend;
 }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction,inlinedClosure1:inlinedClosure1,inlinedClosure2:inlinedClosure2},smalltalk.IRSendInliner)})},
 args: ["inlinedSend", "anIRInstruction", "anotherIRInstruction"],
@@ -1505,7 +1472,7 @@ var self=this;
 var inlinedAssignment;
 function $IRInlinedAssignment(){return smalltalk.IRInlinedAssignment||(typeof IRInlinedAssignment=="undefined"?nil:IRInlinedAssignment)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4;
+var $1,$2;
 self._assignment_(anIRAssignment);
 inlinedAssignment=_st($IRInlinedAssignment())._new();
 $1=_st(anIRAssignment)._instructions();
@@ -1515,11 +1482,9 @@ return smalltalk.withContext(function($ctx2) {
 return _st(inlinedAssignment)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 _st(anIRAssignment)._replaceWith_(inlinedAssignment);
-$3=_st(inlinedAssignment)._instructions();
-$2=_st($3)._last();
-self._inlineSend_($2);
-$4=inlinedAssignment;
-return $4;
+self._inlineSend_(_st(_st(inlinedAssignment)._instructions())._last());
+$2=inlinedAssignment;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"inlineAssignment:",{anIRAssignment:anIRAssignment,inlinedAssignment:inlinedAssignment},smalltalk.IRAssignmentInliner)})},
 args: ["anIRAssignment"],
 source: "inlineAssignment: anIRAssignment\x0a\x09| inlinedAssignment |\x0a\x09self assignment: anIRAssignment.\x0a\x09inlinedAssignment := IRInlinedAssignment new.\x0a\x09anIRAssignment instructions do: [ :each |\x0a\x09\x09inlinedAssignment add: each ].\x0a\x09anIRAssignment replaceWith: inlinedAssignment.\x0a\x09self inlineSend: inlinedAssignment instructions last.\x0a\x09^ inlinedAssignment",
@@ -1537,7 +1502,7 @@ var self=this;
 var inlinedClosure,statements;
 function $IRAssignment(){return smalltalk.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$5,$7,$8,$10,$9,$11,$13,$12,$14,$6,$15;
+var $2,$1,$4,$3,$5,$7,$8,$6,$9;
 inlinedClosure=smalltalk.IRAssignmentInliner.superclass.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
 $2=_st(inlinedClosure)._instructions();
 $ctx1.sendIdx["instructions"]=2;
@@ -1554,22 +1519,16 @@ if(smalltalk.assert($3)){
 $5=_st(statements)._last();
 $ctx2.sendIdx["last"]=3;
 $7=_st($IRAssignment())._new();
-$8=$7;
-$10=_st(self._assignment())._instructions();
-$9=_st($10)._first();
-_st($8)._add_($9);
+_st($7)._add_(_st(_st(self._assignment())._instructions())._first());
 $ctx2.sendIdx["add:"]=1;
-$11=$7;
-$13=_st(statements)._last();
-$12=_st($13)._copy();
-_st($11)._add_($12);
-$14=_st($7)._yourself();
-$6=$14;
+_st($7)._add_(_st(_st(statements)._last())._copy());
+$8=_st($7)._yourself();
+$6=$8;
 return _st($5)._replaceWith_($6);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$15=inlinedClosure;
-return $15;
+$9=inlinedClosure;
+return $9;
 }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,statements:statements},smalltalk.IRAssignmentInliner)})},
 args: ["anIRClosure"],
 source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last canBeAssigned ifTrue: [\x0a\x09\x09\x09statements last replaceWith: (IRAssignment new\x0a\x09\x09\x09\x09add: self assignment instructions first;\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself) ] ].\x0a\x0a\x09^ inlinedClosure",
@@ -1591,33 +1550,28 @@ var self=this;
 var closure,statements;
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$5,$7,$8,$10,$9,$11,$6,$12;
+var $1,$3,$2,$4,$5,$6,$7;
 closure=smalltalk.IRReturnInliner.superclass.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
-$2=_st(closure)._instructions();
-$1=_st($2)._last();
+$1=_st(_st(closure)._instructions())._last();
 $ctx1.sendIdx["last"]=1;
 statements=_st($1)._instructions();
 $ctx1.sendIdx["instructions"]=1;
 _st(statements)._ifNotEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(statements)._last();
+$3=_st(statements)._last();
 $ctx2.sendIdx["last"]=2;
-$3=_st($4)._isReturn();
-if(! smalltalk.assert($3)){
-$5=_st(statements)._last();
+$2=_st($3)._isReturn();
+if(! smalltalk.assert($2)){
+$4=_st(statements)._last();
 $ctx2.sendIdx["last"]=3;
-$7=_st($IRReturn())._new();
-$8=$7;
-$10=_st(statements)._last();
-$9=_st($10)._copy();
-_st($8)._add_($9);
-$11=_st($7)._yourself();
-$6=$11;
-return _st($5)._replaceWith_($6);
+$5=_st($IRReturn())._new();
+_st($5)._add_(_st(_st(statements)._last())._copy());
+$6=_st($5)._yourself();
+return _st($4)._replaceWith_($6);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$12=closure;
-return $12;
+$7=closure;
+return $7;
 }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,closure:closure,statements:statements},smalltalk.IRReturnInliner)})},
 args: ["anIRClosure"],
 source: "inlineClosure: anIRClosure\x0a\x09| closure statements |\x0a\x0a\x09closure := super inlineClosure: anIRClosure.\x0a\x09statements := closure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last isReturn\x0a\x09\x09\x09ifFalse: [ statements last replaceWith: (IRReturn new\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself)] ].\x0a\x0a\x09^ closure",
@@ -1634,7 +1588,7 @@ fn: function (anIRReturn){
 var self=this;
 var return_;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4;
+var $1,$2;
 return_=self._inlinedReturn();
 $1=_st(anIRReturn)._instructions();
 $ctx1.sendIdx["instructions"]=1;
@@ -1643,11 +1597,9 @@ return smalltalk.withContext(function($ctx2) {
 return _st(return_)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 _st(anIRReturn)._replaceWith_(return_);
-$3=_st(return_)._instructions();
-$2=_st($3)._last();
-self._inlineSend_($2);
-$4=return_;
-return $4;
+self._inlineSend_(_st(_st(return_)._instructions())._last());
+$2=return_;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"inlineReturn:",{anIRReturn:anIRReturn,return_:return_},smalltalk.IRReturnInliner)})},
 args: ["anIRReturn"],
 source: "inlineReturn: anIRReturn\x0a\x09| return |\x0a\x09return := self inlinedReturn.\x0a\x09anIRReturn instructions do: [ :each |\x0a\x09\x09return add: each ].\x0a\x09anIRReturn replaceWith: return.\x0a\x09self inlineSend: return instructions last.\x0a\x09^ return",

+ 50 - 79
js/Compiler-Interpreter.js

@@ -184,7 +184,7 @@ fn: function (aCollection){
 var self=this;
 var context,sequenceNode;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$7,$6;
+var $1,$2,$3,$4,$5,$6;
 context=_st(self["@outerContext"])._newBlockContext();
 $1=_st(_st(_st(self["@node"])._nodes())._first())._copy();
 _st($1)._parent_(nil);
@@ -204,8 +204,7 @@ $4=_st($3)._proceed();
 $5=_st(self["@outerContext"])._interpreter();
 $ctx1.sendIdx["interpreter"]=2;
 _st($5)._setNonLocalReturnFromContext_(context);
-$7=_st(context)._interpreter();
-$6=_st($7)._pop();
+$6=_st(_st(context)._interpreter())._pop();
 return $6;
 }, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection,context:context,sequenceNode:sequenceNode},smalltalk.AIBlockClosure)})},
 args: ["aCollection"],
@@ -378,14 +377,11 @@ fn: function (){
 var self=this;
 function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2;
+var $1;
 $1=self._method();
 $ctx1.sendIdx["method"]=1;
 self["@ast"]=_st($1)._ast();
-$4=self._method();
-$3=_st($4)._methodClass();
-$2=_st($SemanticAnalyzer())._on_($3);
-_st($2)._visit_(self["@ast"]);
+_st(_st($SemanticAnalyzer())._on_(_st(self._method())._methodClass()))._visit_(self["@ast"]);
 return self}, function($ctx1) {$ctx1.fill(self,"initializeAST",{},smalltalk.AIContext)})},
 args: [],
 source: "initializeAST\x0a\x09ast := self method ast.\x0a\x09(SemanticAnalyzer on: self method methodClass)\x0a\x09\x09visit: ast",
@@ -401,7 +397,7 @@ category: 'initialization',
 fn: function (aMethodContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$4,$7,$8;
+var $1,$2,$3,$4;
 self._evaluatedSelector_(_st(aMethodContext)._evaluatedSelector());
 self._index_(_st(aMethodContext)._index());
 self._sendIndexes_(_st(aMethodContext)._sendIndexes());
@@ -418,17 +414,13 @@ $3=_st(outer)._methodContext();
 if(($receiver = $3) == nil || $receiver == null){
 $3;
 } else {
-$5=self._class();
-$6=_st(aMethodContext)._outerContext();
-$4=_st($5)._fromMethodContext_($6);
-self._outerContext_($4);
+self._outerContext_(_st(self._class())._fromMethodContext_(_st(aMethodContext)._outerContext()));
 };
-$7=_st(aMethodContext)._locals();
+$4=_st(aMethodContext)._locals();
 $ctx1.sendIdx["locals"]=1;
-_st($7)._keysAndValuesDo_((function(key,value){
+_st($4)._keysAndValuesDo_((function(key,value){
 return smalltalk.withContext(function($ctx2) {
-$8=self._locals();
-return _st($8)._at_put_(key,value);
+return _st(self._locals())._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)})},
@@ -661,7 +653,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$5,$4,$3,$7,$6,$1;
+var $2,$5,$4,$3,$1;
 $2=self._methodContext();
 $ctx1.sendIdx["methodContext"]=1;
 if(($receiver = $2) == nil || $receiver == null){
@@ -671,9 +663,7 @@ $5=self._methodContext();
 $ctx1.sendIdx["methodContext"]=2;
 $4=_st($5)._receiver();
 $3=_st($4)._class();
-$7=self._methodContext();
-$6=_st($7)._selector();
-$1=_st($3)._lookupSelector_($6);
+$1=_st($3)._lookupSelector_(_st(self._methodContext())._selector());
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.AIContext)})},
@@ -878,7 +868,7 @@ var self=this;
 var currentNode;
 function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3,$7,$6;
+var $1,$2,$5,$4,$3;
 $1=_st($ASTPCNodeVisitor())._new();
 _st($1)._selector_(self._evaluatedSelector());
 _st($1)._context_(self);
@@ -895,9 +885,7 @@ return smalltalk.withContext(function($ctx2) {
 return _st(anInterpreter)._push_(each);
 $ctx2.sendIdx["push:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$7=self._innerContext();
-$6=_st($7)._receiver();
-_st(anInterpreter)._push_($6);
+_st(anInterpreter)._push_(_st(self._innerContext())._receiver());
 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 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)",
@@ -1253,7 +1241,7 @@ category: 'private',
 fn: function (aNode,anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$5,$6;
+var $1,$3,$2,$4;
 $1=_st(_st(aNode)._binding())._isInstanceVar();
 if(smalltalk.assert($1)){
 $3=self._context();
@@ -1263,9 +1251,7 @@ $4=_st(aNode)._value();
 $ctx1.sendIdx["value"]=1;
 _st($2)._instVarAt_put_($4,anObject);
 } else {
-$5=self._context();
-$6=_st(aNode)._value();
-_st($5)._localAt_put_($6,anObject);
+_st(self._context())._localAt_put_(_st(aNode)._value(),anObject);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject},smalltalk.ASTInterpreter)})},
 args: ["aNode", "anObject"],
@@ -1340,7 +1326,7 @@ var source,function_;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$6,$9,$8,$7,$5;
+var $3,$2,$1,$4,$5;
 source=_st($String())._streamContents_((function(str){
 return smalltalk.withContext(function($ctx2) {
 _st(str)._nextPutAll_("(function(");
@@ -1367,11 +1353,7 @@ $4=_st(str)._nextPutAll_("})() })");
 return $4;
 }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)})}));
 function_=_st(_st($Compiler())._new())._eval_(source);
-$6=function_;
-$9=self._context();
-$8=_st($9)._locals();
-$7=_st($8)._values();
-$5=_st($6)._valueWithPossibleArguments_($7);
+$5=_st(function_)._valueWithPossibleArguments_(_st(_st(self._context())._locals())._values());
 return $5;
 }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,source:source,function_:function_},smalltalk.ASTInterpreter)})},
 args: ["aString"],
@@ -1538,7 +1520,7 @@ category: 'stack',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1,$2;
 var $early={};
 try {
 $1=self._stack();
@@ -1547,8 +1529,7 @@ _st($1)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
 throw $early=[nil];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$3=self._stack();
-$2=_st($3)._last();
+$2=_st(self._stack())._last();
 return $2;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
@@ -1702,7 +1683,7 @@ fn: function (aMessage,anObject,aBoolean){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$7,$6,$5,$8,$9;
+var $1,$3,$2,$4,$5,$6;
 var $early={};
 try {
 if(! smalltalk.assert(aBoolean)){
@@ -1720,16 +1701,13 @@ return $4;
 } else {
 $2;
 };
-$7=_st(anObject)._class();
-$6=_st($7)._superclass();
-$5=_st($6)._methodDictionary();
-method=_st($5)._at_ifAbsent_(_st(aMessage)._selector(),(function(){
+method=_st(_st(_st(_st(anObject)._class())._superclass())._methodDictionary())._at_ifAbsent_(_st(aMessage)._selector(),(function(){
 return smalltalk.withContext(function($ctx2) {
-$8=self._messageNotUnderstood_receiver_(aMessage,anObject);
-throw $early=[$8];
+$5=self._messageNotUnderstood_receiver_(aMessage,anObject);
+throw $early=[$5];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$9=_st(method)._sendTo_arguments_(anObject,_st(aMessage)._arguments());
-return $9;
+$6=_st(method)._sendTo_arguments_(anObject,_st(aMessage)._arguments());
+return $6;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"sendMessage:to:superSend:",{aMessage:aMessage,anObject:anObject,aBoolean:aBoolean,method:method},smalltalk.ASTInterpreter)})},
@@ -1747,16 +1725,14 @@ category: 'interpreting',
 fn: function (aContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=_st(aContext)._interpreter();
 $ctx1.sendIdx["interpreter"]=1;
 $1=_st($2)._hasReturned();
 if(smalltalk.assert($1)){
 self["@returned"]=true;
 self["@returned"];
-$4=_st(aContext)._interpreter();
-$3=_st($4)._returnValue();
-self._returnValue_($3);
+self._returnValue_(_st(_st(aContext)._interpreter())._returnValue());
 };
 return self}, function($ctx1) {$ctx1.fill(self,"setNonLocalReturnFromContext:",{aContext:aContext},smalltalk.ASTInterpreter)})},
 args: ["aContext"],
@@ -2072,7 +2048,7 @@ var self=this;
 function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$5,$6,$4,$3,$9,$8,$11,$10,$12,$13,$14,$16,$15,$17,$18,$19,$20,$7;
+var $2,$1,$5,$6,$4,$3,$8,$10,$9,$11,$12,$13,$15,$14,$16,$17,$7;
 $2=_st(aNode)._binding();
 $ctx1.sendIdx["binding"]=1;
 $1=_st($2)._isUnknownVar();
@@ -2090,33 +2066,30 @@ $3=self._push_($4);
 $ctx1.sendIdx["push:"]=1;
 return $3;
 };
-$9=_st(aNode)._binding();
-$8=_st($9)._isInstanceVar();
+$8=_st(_st(aNode)._binding())._isInstanceVar();
 if(smalltalk.assert($8)){
-$11=self._context();
+$10=self._context();
 $ctx1.sendIdx["context"]=1;
-$10=_st($11)._receiver();
-$12=_st(aNode)._value();
+$9=_st($10)._receiver();
+$11=_st(aNode)._value();
 $ctx1.sendIdx["value"]=2;
-$7=_st($10)._instVarAt_($12);
+$7=_st($9)._instVarAt_($11);
 } else {
-$13=self._context();
-$14=_st(aNode)._value();
+$12=self._context();
+$13=_st(aNode)._value();
 $ctx1.sendIdx["value"]=3;
-$7=_st($13)._localAt_ifAbsent_($14,(function(){
+$7=_st($12)._localAt_ifAbsent_($13,(function(){
 return smalltalk.withContext(function($ctx2) {
-$16=_st(aNode)._value();
+$15=_st(aNode)._value();
 $ctx2.sendIdx["value"]=4;
-$15=_st($16)._isCapitalized();
-if(smalltalk.assert($15)){
-$17=_st($Smalltalk())._current();
-$18=_st(aNode)._value();
+$14=_st($15)._isCapitalized();
+if(smalltalk.assert($14)){
+$16=_st($Smalltalk())._current();
+$17=_st(aNode)._value();
 $ctx2.sendIdx["value"]=5;
-return _st($17)._at_ifAbsent_($18,(function(){
+return _st($16)._at_ifAbsent_($17,(function(){
 return smalltalk.withContext(function($ctx3) {
-$19=_st($PlatformInterface())._globals();
-$20=_st(aNode)._value();
-return _st($19)._at_($20);
+return _st(_st($PlatformInterface())._globals())._at_(_st(aNode)._value());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
@@ -2288,7 +2261,7 @@ fn: function (aNode){
 var self=this;
 var sendIndex;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$3,$7,$6,$9,$8;
+var $1,$2,$4,$3,$6,$5,$7;
 $1=self._context();
 $2=self._selector();
 $ctx1.sendIdx["selector"]=1;
@@ -2296,16 +2269,14 @@ sendIndex=_st($1)._sendIndexAt_($2);
 smalltalk.ASTPCNodeVisitor.superclass.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
 $4=self._selector();
 $ctx1.sendIdx["selector"]=2;
-$5=_st(aNode)._selector();
-$3=_st($4).__eq($5);
+$3=_st($4).__eq(_st(aNode)._selector());
 if(smalltalk.assert($3)){
-$7=self._index();
+$6=self._index();
 $ctx1.sendIdx["index"]=1;
-$6=_st($7).__lt(sendIndex);
-if(! smalltalk.assert($6)){
-$9=self._index();
-$8=_st($9).__gt(sendIndex);
-if(! smalltalk.assert($8)){
+$5=_st($6).__lt(sendIndex);
+if(! smalltalk.assert($5)){
+$7=_st(self._index()).__gt(sendIndex);
+if(! smalltalk.assert($7)){
 self["@currentNode"]=aNode;
 self["@currentNode"];
 };

+ 42 - 68
js/Compiler-Semantic.js

@@ -12,13 +12,11 @@ fn: function (aString){
 var self=this;
 function $ArgVar(){return smalltalk.ArgVar||(typeof ArgVar=="undefined"?nil:ArgVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 $1=self._args();
 $ctx1.sendIdx["args"]=1;
 _st($1)._at_put_(aString,_st($ArgVar())._on_(aString));
-$3=self._args();
-$2=_st($3)._at_(aString);
-_st($2)._scope_(self);
+_st(_st(self._args())._at_(aString))._scope_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"addArg:",{aString:aString},smalltalk.LexicalScope)})},
 args: ["aString"],
 source: "addArg: aString\x0a\x09self args at: aString put: (ArgVar on: aString).\x0a\x09(self args at: aString) scope: self",
@@ -35,13 +33,11 @@ fn: function (aString){
 var self=this;
 function $TempVar(){return smalltalk.TempVar||(typeof TempVar=="undefined"?nil:TempVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 $1=self._temps();
 $ctx1.sendIdx["temps"]=1;
 _st($1)._at_put_(aString,_st($TempVar())._on_(aString));
-$3=self._temps();
-$2=_st($3)._at_(aString);
-_st($2)._scope_(self);
+_st(_st(self._temps())._at_(aString))._scope_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"addTemp:",{aString:aString},smalltalk.LexicalScope)})},
 args: ["aString"],
 source: "addTemp: aString\x0a\x09self temps at: aString put: (TempVar on: aString).\x0a\x09(self temps at: aString) scope: self",
@@ -75,11 +71,10 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=_st(self._args())._keys();
 $ctx1.sendIdx["keys"]=1;
-$3=_st(self._temps())._keys();
-$1=_st($2).__comma($3);
+$1=_st($2).__comma(_st(self._temps())._keys());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"allVariableNames",{},smalltalk.LexicalScope)})},
 args: [],
@@ -121,7 +116,7 @@ category: 'accessing',
 fn: function (aStringOrNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$6,$7,$1;
+var $2,$3,$4,$5,$1;
 $2=self._pseudoVars();
 $3=_st(aStringOrNode)._value();
 $ctx1.sendIdx["value"]=1;
@@ -132,9 +127,7 @@ $5=_st(aStringOrNode)._value();
 $ctx2.sendIdx["value"]=2;
 return _st($4)._at_ifAbsent_($5,(function(){
 return smalltalk.withContext(function($ctx3) {
-$6=self._temps();
-$7=_st(aStringOrNode)._value();
-return _st($6)._at_ifAbsent_($7,(function(){
+return _st(self._temps())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
 return smalltalk.withContext(function($ctx4) {
 return nil;
 }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
@@ -270,14 +263,13 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$4,$1;
+var $3,$2,$1;
 $3=self._instruction();
 $ctx1.sendIdx["instruction"]=1;
 $2=_st($3)._notNil();
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$4=self._instruction();
-return _st($4)._isInlined();
+return _st(self._instruction())._isInlined();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.LexicalScope)})},
@@ -312,7 +304,7 @@ fn: function (aNode){
 var self=this;
 var lookup;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2,$3;
 lookup=self._bindingFor_(aNode);
 $1=lookup;
 if(($receiver = $1) == nil || $receiver == null){
@@ -321,15 +313,14 @@ $ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 lookup=$2;
 } else {
-$3=self._outerScope();
-lookup=_st($3)._lookupVariable_(aNode);
+lookup=_st(self._outerScope())._lookupVariable_(aNode);
 };
 lookup;
 } else {
 $1;
 };
-$4=lookup;
-return $4;
+$3=lookup;
+return $3;
 }, 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",
@@ -345,14 +336,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=self._outerScope();
 $ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1=$2;
 } else {
-$3=self._outerScope();
-$1=_st($3)._methodScope();
+$1=_st(self._outerScope())._methodScope();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methodScope",{},smalltalk.LexicalScope)})},
@@ -456,7 +446,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$7,$6,$5;
+var $1,$2,$4,$3,$5;
 $1=self._outerScope();
 $ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -472,9 +462,7 @@ $3=_st($4)._scopeLevel();
 $ctx1.sendIdx["scopeLevel"]=1;
 return $3;
 };
-$7=self._outerScope();
-$6=_st($7)._scopeLevel();
-$5=_st($6).__plus((1));
+$5=_st(_st(self._outerScope())._scopeLevel()).__plus((1));
 return $5;
 }, function($ctx1) {$ctx1.fill(self,"scopeLevel",{},smalltalk.LexicalScope)})},
 args: [],
@@ -521,13 +509,11 @@ fn: function (aString){
 var self=this;
 function $InstanceVar(){return smalltalk.InstanceVar||(typeof InstanceVar=="undefined"?nil:InstanceVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 $1=self._iVars();
 $ctx1.sendIdx["iVars"]=1;
 _st($1)._at_put_(aString,_st($InstanceVar())._on_(aString));
-$3=self._iVars();
-$2=_st($3)._at_(aString);
-_st($2)._scope_(self);
+_st(_st(self._iVars())._at_(aString))._scope_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"addIVar:",{aString:aString},smalltalk.MethodLexicalScope)})},
 args: ["aString"],
 source: "addIVar: aString\x0a\x09self iVars at: aString put: (InstanceVar on: aString).\x0a\x09(self iVars at: aString) scope: self",
@@ -1182,9 +1168,8 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="$".__comma(self._name());
-$1=_st($2).__comma("()");
+var $1;
+$1=_st("$".__comma(self._name())).__comma("()");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.ClassRefVar)})},
@@ -1238,9 +1223,8 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="self[\x22@".__comma(self._name());
-$1=_st($2).__comma("\x22]");
+var $1;
+$1=_st("self[\x22@".__comma(self._name())).__comma("\x22]");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.InstanceVar)})},
@@ -1420,7 +1404,7 @@ 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,$7;
+var $1,$2,$3,$4,$5;
 identifier=_st(aNode)._value();
 $ctx1.sendIdx["value"]=1;
 $1=_st(_st(_st(_st(_st($Smalltalk())._current())._globalJsVariables())._includes_(identifier))._not())._and_((function(){
@@ -1436,9 +1420,7 @@ _st($3)._variableName_($4);
 $5=_st($2)._signal();
 $5;
 } else {
-$6=_st(_st(self["@currentScope"])._methodScope())._unknownVariables();
-$7=_st(aNode)._value();
-_st($6)._add_($7);
+_st(_st(_st(self["@currentScope"])._methodScope())._unknownVariables())._add_(_st(aNode)._value());
 };
 return self}, function($ctx1) {$ctx1.fill(self,"errorUnknownVariable:",{aNode:aNode,identifier:identifier},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
@@ -1745,15 +1727,14 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4;
+var $3,$2,$1;
 smalltalk.SemanticAnalyzer.superclass.fn.prototype._visitCascadeNode_.apply(_st(self), [aNode]);
 $3=_st(aNode)._nodes();
 $ctx1.sendIdx["nodes"]=1;
 $2=_st($3)._first();
 $1=_st($2)._superSend();
 if(smalltalk.assert($1)){
-$4=_st(aNode)._nodes();
-_st($4)._do_((function(each){
+_st(_st(aNode)._nodes())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._superSend_(true);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
@@ -1833,7 +1814,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,$15,$17,$18,$16,$21,$22,$20,$19;
+var $3,$2,$1,$4,$5,$6,$8,$9,$7,$11,$12,$10,$13,$14,$16,$17,$15;
 $3=_st(aNode)._receiver();
 $ctx1.sendIdx["receiver"]=1;
 $2=_st($3)._value();
@@ -1867,30 +1848,25 @@ $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);
+_st(_st(aNode)._receiver())._shouldBeAliased_(true);
 };
 };
-$14=self._messageSends();
+$13=self._messageSends();
 $ctx1.sendIdx["messageSends"]=1;
-$15=_st(aNode)._selector();
+$14=_st(aNode)._selector();
 $ctx1.sendIdx["selector"]=4;
-_st($14)._at_ifAbsentPut_($15,(function(){
+_st($13)._at_ifAbsentPut_($14,(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st($Set())._new();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
-$17=self._messageSends();
+$16=self._messageSends();
 $ctx1.sendIdx["messageSends"]=2;
-$18=_st(aNode)._selector();
+$17=_st(aNode)._selector();
 $ctx1.sendIdx["selector"]=5;
-$16=_st($17)._at_($18);
+$15=_st($16)._at_($17);
 $ctx1.sendIdx["at:"]=2;
-_st($16)._add_(aNode);
-$21=self._messageSends();
-$22=_st(aNode)._selector();
-$20=_st($21)._at_($22);
-$19=_st($20)._size();
-_st(aNode)._index_($19);
+_st($15)._add_(aNode);
+_st(aNode)._index_(_st(_st(self._messageSends())._at_(_st(aNode)._selector()))._size());
 smalltalk.SemanticAnalyzer.superclass.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
 return self}, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
@@ -1931,7 +1907,7 @@ 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 $1,$3,$2,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13;
+var $1,$3,$2,$4,$5,$6,$7,$8,$9,$10,$11;
 binding=_st(self["@currentScope"])._lookupVariable_(aNode);
 $1=binding;
 if(($receiver = $1) == nil || $receiver == null){
@@ -1957,11 +1933,9 @@ _st($8)._add_($9);
 } else {
 self._errorUnknownVariable_(aNode);
 $10=_st($UnknownVar())._new();
-$11=$10;
-$12=_st(aNode)._value();
-_st($11)._name_($12);
-$13=_st($10)._yourself();
-binding=$13;
+_st($10)._name_(_st(aNode)._value());
+$11=_st($10)._yourself();
+binding=$11;
 binding;
 };
 } else {

+ 38 - 64
js/Compiler-Tests.js

@@ -70,16 +70,15 @@ var self=this;
 function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
 function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$4,$6,$1;
+var $2,$3,$4,$5,$1;
 $2=_st($ASTPCNodeVisitor())._new();
 $ctx1.sendIdx["new"]=1;
 $3=$2;
-$5=_st($AIContext())._new();
-$4=_st($5)._yourself();
+$4=_st(_st($AIContext())._new())._yourself();
 $ctx1.sendIdx["yourself"]=1;
 _st($3)._context_($4);
-$6=_st($2)._yourself();
-$1=$6;
+$5=_st($2)._yourself();
+$1=$5;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"astPCNodeVisitor",{},smalltalk.ASTPCNodeVisitorTest)})},
 args: [],
@@ -98,17 +97,16 @@ var self=this;
 function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
 function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$4,$6,$1;
+var $2,$3,$4,$5,$1;
 $2=_st($ASTPCNodeVisitor())._new();
 $ctx1.sendIdx["new"]=1;
 _st($2)._selector_(aString);
 $3=$2;
-$5=_st($AIContext())._new();
-$4=_st($5)._yourself();
+$4=_st(_st($AIContext())._new())._yourself();
 $ctx1.sendIdx["yourself"]=1;
 _st($3)._context_($4);
-$6=_st($2)._yourself();
-$1=$6;
+$5=_st($2)._yourself();
+$1=$5;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"astPCNodeVisitorForSelector:",{aString:aString},smalltalk.ASTPCNodeVisitorTest)})},
 args: ["aString"],
@@ -196,7 +194,7 @@ var self=this;
 var ast;
 function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$1,$7,$8,$6,$5;
+var $3,$4,$2,$1,$5,$6;
 ast=self._parse_forClass_("foo true ifTrue: [ self asString yourself ]. ^ self asBoolean",$Object());
 $ctx1.sendIdx["parse:forClass:"]=1;
 $3=self._astPCNodeVisitorForSelector_("yourself");
@@ -211,12 +209,10 @@ $ctx1.sendIdx["selector"]=1;
 self._assert_equals_($1,"yourself");
 $ctx1.sendIdx["assert:equals:"]=1;
 ast=self._parse_forClass_("foo true ifTrue: [ self asString yourself ]. ^ self asBoolean",$Object());
-$7=self._astPCNodeVisitorForSelector_("asBoolean");
-_st($7)._visit_(ast);
-$8=_st($7)._currentNode();
-$6=$8;
-$5=_st($6)._selector();
-self._assert_equals_($5,"asBoolean");
+$5=self._astPCNodeVisitorForSelector_("asBoolean");
+_st($5)._visit_(ast);
+$6=_st($5)._currentNode();
+self._assert_equals_(_st($6)._selector(),"asBoolean");
 return self}, function($ctx1) {$ctx1.fill(self,"testMessageSendWithInlining",{ast:ast},smalltalk.ASTPCNodeVisitorTest)})},
 args: [],
 source: "testMessageSendWithInlining\x0a\x09| ast |\x0a\x09\x0a\x09ast := self parse: 'foo true ifTrue: [ self asString yourself ]. ^ self asBoolean' forClass: Object.\x0a\x09self assert: ((self astPCNodeVisitorForSelector: 'yourself')\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) selector equals: 'yourself'.\x0a\x09\x09\x0a\x09ast := self parse: 'foo true ifTrue: [ self asString yourself ]. ^ self asBoolean' forClass: Object.\x0a\x09self assert: ((self astPCNodeVisitorForSelector: 'asBoolean')\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) selector equals: 'asBoolean'",
@@ -338,15 +334,14 @@ fn: function (aString,anObject,aResult){
 var self=this;
 var method,result;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 self["@receiver"]=anObject;
 $1=self._compiler();
 $2=_st(anObject)._class();
 $ctx1.sendIdx["class"]=1;
 method=_st($1)._install_forClass_category_(aString,$2,"tests");
 result=_st(self["@receiver"])._perform_(_st(method)._selector());
-$3=_st(anObject)._class();
-_st($3)._removeCompiledMethod_(method);
+_st(_st(anObject)._class())._removeCompiledMethod_(method);
 self._assert_equals_(aResult,result);
 return self}, function($ctx1) {$ctx1.fill(self,"should:receiver:return:",{aString:aString,anObject:anObject,aResult:aResult,method:method,result:result},smalltalk.CodeGeneratorTest)})},
 args: ["aString", "anObject", "aResult"],
@@ -486,11 +481,10 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2="foo".__minus_gt((1));
 $ctx1.sendIdx["->"]=1;
-$3="bar".__minus_gt((2));
-$1=smalltalk.HashedCollection._from_([$2,$3]);
+$1=smalltalk.HashedCollection._from_([$2,"bar".__minus_gt((2))]);
 self._should_return_("foo\x0a\x09| x |\x0a\x09x := 'foo'->1.\x0a\x09^ #{ x. (true ifTrue: [ x := 'bar'->2 ]) }\x0a",$1);
 return self}, function($ctx1) {$ctx1.fill(self,"testDynamicDictionaryElementsOrdered",{},smalltalk.CodeGeneratorTest)})},
 args: [],
@@ -529,7 +523,7 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$5,$6,$4,$8,$9,$7,$11,$12,$10;
+var $2,$3,$1,$5,$6,$4,$8,$9,$7,$11,$10;
 $2="foo".__minus_gt($Array());
 $ctx1.sendIdx["->"]=1;
 $3="bar".__minus_gt((2));
@@ -553,8 +547,7 @@ self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { 'foo'->x. 'bar'
 $ctx1.sendIdx["should:return:"]=3;
 $11="foo".__minus_gt((1));
 $ctx1.sendIdx["->"]=7;
-$12="bar".__minus_gt((2));
-$10=smalltalk.HashedCollection._from_([$11,$12]);
+$10=smalltalk.HashedCollection._from_([$11,"bar".__minus_gt((2))]);
 self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ #{ 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",$10);
 return self}, function($ctx1) {$ctx1.fill(self,"testInnerTemporalDependentElementsOrdered",{},smalltalk.CodeGeneratorTest)})},
 args: [],
@@ -587,7 +580,7 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 self._should_return_("foo ^ 1",(1));
 $ctx1.sendIdx["should:return:"]=1;
 self._should_return_("foo ^ 'hello'","hello");
@@ -602,8 +595,7 @@ self._should_return_("foo ^ false",false);
 $ctx1.sendIdx["should:return:"]=6;
 $2=(1).__minus_gt((2));
 $ctx1.sendIdx["->"]=1;
-$3=(3).__minus_gt((4));
-$1=smalltalk.HashedCollection._from_([$2,$3]);
+$1=smalltalk.HashedCollection._from_([$2,(3).__minus_gt((4))]);
 self._should_return_("foo ^ #{1->2. 3->4}",$1);
 $ctx1.sendIdx["should:return:"]=7;
 self._should_return_("foo ^ #hello","hello");
@@ -1201,7 +1193,7 @@ function $VariableNode(){return smalltalk.VariableNode||(typeof VariableNode=="u
 function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
 function $MethodLexicalScope(){return smalltalk.MethodLexicalScope||(typeof MethodLexicalScope=="undefined"?nil:MethodLexicalScope)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6;
+var $1,$2,$3,$4;
 $1=_st($VariableNode())._new();
 $ctx1.sendIdx["new"]=1;
 _st($1)._value_("Object");
@@ -1209,10 +1201,8 @@ $2=_st($1)._yourself();
 node=$2;
 $3=_st($SemanticAnalyzer())._new();
 $ctx1.sendIdx["new"]=2;
-$4=$3;
-$5=_st($MethodLexicalScope())._new();
-_st($4)._pushScope_($5);
-$6=_st($3)._visit_(node);
+_st($3)._pushScope_(_st($MethodLexicalScope())._new());
+$4=_st($3)._visit_(node);
 self._assert_(_st(_st(node)._binding())._isClassRefVar());
 return self}, function($ctx1) {$ctx1.fill(self,"testClassRefVar",{node:node},smalltalk.ScopeVarTest)})},
 args: [],
@@ -1259,7 +1249,7 @@ var node,pseudoVars;
 function $VariableNode(){return smalltalk.VariableNode||(typeof VariableNode=="undefined"?nil:VariableNode)}
 function $MethodLexicalScope(){return smalltalk.MethodLexicalScope||(typeof MethodLexicalScope=="undefined"?nil:MethodLexicalScope)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3;
+var $1,$2;
 pseudoVars=["self", "super", "true", "false", "nil"];
 _st(pseudoVars)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
@@ -1269,10 +1259,7 @@ _st($1)._value_(each);
 $2=_st($1)._yourself();
 node=$2;
 node;
-$5=_st($MethodLexicalScope())._new();
-$4=_st($5)._bindingFor_(node);
-$3=_st($4)._isPseudoVar();
-return self._assert_($3);
+return self._assert_(_st(_st(_st($MethodLexicalScope())._new())._bindingFor_(node))._isPseudoVar());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"testPseudoVar",{node:node,pseudoVars:pseudoVars},smalltalk.ScopeVarTest)})},
 args: [],
@@ -1319,16 +1306,13 @@ var node;
 function $VariableNode(){return smalltalk.VariableNode||(typeof VariableNode=="undefined"?nil:VariableNode)}
 function $MethodLexicalScope(){return smalltalk.MethodLexicalScope||(typeof MethodLexicalScope=="undefined"?nil:MethodLexicalScope)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3;
+var $1,$2;
 $1=_st($VariableNode())._new();
 $ctx1.sendIdx["new"]=1;
 _st($1)._value_("bzzz");
 $2=_st($1)._yourself();
 node=$2;
-$5=_st($MethodLexicalScope())._new();
-$4=_st($5)._bindingFor_(node);
-$3=_st($4)._isNil();
-self._assert_($3);
+self._assert_(_st(_st(_st($MethodLexicalScope())._new())._bindingFor_(node))._isNil());
 return self}, function($ctx1) {$ctx1.fill(self,"testUnknownVar",{node:node},smalltalk.ScopeVarTest)})},
 args: [],
 source: "testUnknownVar\x0a\x09| node |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'bzzz';\x0a\x09\x09yourself.\x0a\x09self assert: (MethodLexicalScope new bindingFor: node) isNil",
@@ -1429,19 +1413,16 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
-var $6,$5,$4,$3,$2,$7,$1;
+var $4,$3,$2,$1;
 src="foo | a | a + 1. [ | b | b := a ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-$6=_st(ast)._nodes();
-$5=_st($6)._first();
-$4=_st($5)._nodes();
+$4=_st(_st(_st(ast)._nodes())._first())._nodes();
 $ctx1.sendIdx["nodes"]=1;
 $3=_st($4)._last();
 $2=_st($3)._scope();
 $ctx1.sendIdx["scope"]=1;
-$7=_st(ast)._scope();
-$1=_st($2).__eq_eq($7);
+$1=_st($2).__eq_eq(_st(ast)._scope());
 self._deny_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"testScope",{src:src,ast:ast},smalltalk.SemanticAnalyzerTest)})},
 args: [],
@@ -1459,13 +1440,11 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
-var $10,$9,$8,$7,$6,$5,$4,$3,$2,$11,$1;
+var $8,$7,$6,$5,$4,$3,$2,$1;
 src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-$10=_st(ast)._nodes();
-$9=_st($10)._first();
-$8=_st($9)._nodes();
+$8=_st(_st(_st(ast)._nodes())._first())._nodes();
 $ctx1.sendIdx["nodes"]=3;
 $7=_st($8)._last();
 $6=_st($7)._nodes();
@@ -1478,8 +1457,7 @@ $3=_st($4)._first();
 $ctx1.sendIdx["first"]=1;
 $2=_st($3)._scope();
 $ctx1.sendIdx["scope"]=1;
-$11=_st(ast)._scope();
-$1=_st($2).__eq_eq($11);
+$1=_st($2).__eq_eq(_st(ast)._scope());
 self._deny_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"testScope2",{src:src,ast:ast},smalltalk.SemanticAnalyzerTest)})},
 args: [],
@@ -1497,7 +1475,7 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$12,$11,$10,$9,$8,$7,$6,$5,$4,$3;
+var $2,$1,$10,$9,$8,$7,$6,$5,$4,$3;
 src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
@@ -1507,9 +1485,7 @@ $1=_st($2)._scopeLevel();
 $ctx1.sendIdx["scopeLevel"]=1;
 self._assert_equals_($1,(1));
 $ctx1.sendIdx["assert:equals:"]=1;
-$12=_st(ast)._nodes();
-$11=_st($12)._first();
-$10=_st($11)._nodes();
+$10=_st(_st(_st(ast)._nodes())._first())._nodes();
 $ctx1.sendIdx["nodes"]=3;
 $9=_st($10)._last();
 $8=_st($9)._nodes();
@@ -1688,7 +1664,7 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
-var $7,$6,$5,$4,$3,$2,$1,$15,$14,$13,$12,$11,$10,$9,$16,$8,$27,$26,$25,$24,$23,$22,$21,$20,$19,$18,$17,$39,$38,$37,$36,$35,$34,$33,$32,$31,$30,$29,$44,$43,$42,$41,$40,$28;
+var $7,$6,$5,$4,$3,$2,$1,$15,$14,$13,$12,$11,$10,$9,$16,$8,$27,$26,$25,$24,$23,$22,$21,$20,$19,$18,$17,$39,$38,$37,$36,$35,$34,$33,$32,$31,$30,$29,$42,$41,$40,$28;
 src="foo | a | a + 1. [ | b | b := a ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
@@ -1770,9 +1746,7 @@ $31=_st($32)._left();
 $30=_st($31)._binding();
 $29=_st($30)._scope();
 $ctx1.sendIdx["scope"]=3;
-$44=_st(ast)._nodes();
-$43=_st($44)._first();
-$42=_st($43)._nodes();
+$42=_st(_st(_st(ast)._nodes())._first())._nodes();
 $ctx1.sendIdx["nodes"]=13;
 $41=_st($42)._last();
 $40=_st($41)._scope();

+ 76 - 112
js/Helios-Browser.js

@@ -228,21 +228,19 @@ function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="unde
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $5,$4,$6,$3,$2,$1,$7;
+var $5,$4,$3,$2,$1;
 $5=self._packagesListWidget();
 $ctx1.sendIdx["packagesListWidget"]=1;
 $4=_st($HLVerticalSplitter())._with_with_($5,self._classesListWidget());
 $ctx1.sendIdx["with:with:"]=3;
-$6=_st($HLVerticalSplitter())._with_with_(self._protocolsListWidget(),self._methodsListWidget());
-$3=_st($HLVerticalSplitter())._with_with_($4,$6);
+$3=_st($HLVerticalSplitter())._with_with_($4,_st($HLVerticalSplitter())._with_with_(self._protocolsListWidget(),self._methodsListWidget()));
 $ctx1.sendIdx["with:with:"]=2;
 $2=_st($HLHorizontalSplitter())._with_with_($3,self._sourceWidget());
 $ctx1.sendIdx["with:with:"]=1;
 $1=_st($HLContainer())._with_($2);
 _st(html)._with_($1);
 $ctx1.sendIdx["with:"]=1;
-$7=self._packagesListWidget();
-_st($7)._focus();
+_st(self._packagesListWidget())._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowser)})},
 args: ["html"],
 source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a    \x09with: (HLVerticalSplitter\x0a        \x09with: (HLVerticalSplitter\x0a            \x09with: self packagesListWidget\x0a                with: self classesListWidget)\x0a            with: (HLVerticalSplitter\x0a            \x09with: self protocolsListWidget\x0a                with: self methodsListWidget)) \x0a        with: self sourceWidget)).\x0a\x09\x0a\x09self packagesListWidget focus",
@@ -853,7 +851,7 @@ fn: function (aBoolean){
 var self=this;
 function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2;
+var $1,$3,$2;
 self._withChangesDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@showInstance"]=aBoolean;
@@ -868,8 +866,7 @@ $3=self._selectedClass();
 $ctx2.sendIdx["selectedClass"]=2;
 $2=_st($3)._theNonMetaClass();
 } else {
-$4=self._selectedClass();
-$2=_st($4)._theMetaClass();
+$2=_st(self._selectedClass())._theMetaClass();
 };
 self._selectedClass_($2);
 };
@@ -937,7 +934,7 @@ category: 'actions',
 fn: function (aSelector){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$6,$5,$3,$7;
+var $2,$1,$3,$4;
 $2=self._theClass();
 $ctx1.sendIdx["theClass"]=1;
 $1=_st($2)._superclass();
@@ -945,13 +942,10 @@ $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$4=self._selectorsCache();
-$6=self._theClass();
-$5=_st($6)._superclass();
-$3=_st($4)._cacheFor_($5);
+$3=_st(self._selectorsCache())._cacheFor_(_st(self._theClass())._superclass());
 _st($3)._removeSelector_(aSelector);
-$7=_st($3)._invalidateParentSelector_(aSelector);
-$7;
+$4=_st($3)._invalidateParentSelector_(aSelector);
+$4;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
 args: ["aSelector"],
@@ -1195,7 +1189,7 @@ category: 'accessing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4;
+var $3,$2,$1,$4;
 $3=_st(aClass)._theNonMetaClass();
 $ctx1.sendIdx["theNonMetaClass"]=1;
 $2=_st($3)._comment();
@@ -1203,8 +1197,7 @@ $1=_st($2)._isEmpty();
 if(smalltalk.assert($1)){
 return "uncommented";
 };
-$5=_st(aClass)._theNonMetaClass();
-$4=_st($5)._heliosClass();
+$4=_st(_st(aClass)._theNonMetaClass())._heliosClass();
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
 args: ["aClass"],
@@ -1429,7 +1422,7 @@ fn: function (anAnnouncement){
 var self=this;
 var class_,oldClass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2,$5;
+var $1,$4,$3,$2;
 class_=_st(anAnnouncement)._theClass();
 oldClass=_st(anAnnouncement)._oldClass();
 $1=_st(self._items())._includes_(oldClass);
@@ -1441,8 +1434,7 @@ $ctx1.sendIdx["model"]=1;
 $3=_st($4)._selectedClass();
 $2=_st($3).__eq(oldClass);
 if(smalltalk.assert($2)){
-$5=self._model();
-_st($5)._selectedClass_(class_);
+_st(self._model())._selectedClass_(class_);
 };
 self._setItemsForSelectedPackage();
 self._refresh();
@@ -1462,7 +1454,7 @@ fn: function (anAnnouncement){
 var self=this;
 var class_,oldPackage;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$5,$4,$2,$6,$8,$7,$1,$10,$12,$11,$9,$13;
+var $3,$5,$4,$2,$6,$8,$7,$1,$9,$10;
 class_=_st(anAnnouncement)._theClass();
 oldPackage=_st(anAnnouncement)._oldPackage();
 $3=oldPackage;
@@ -1485,14 +1477,11 @@ $ctx2.sendIdx["="]=2;
 if(! smalltalk.assert($1)){
 return self;
 };
-$10=oldPackage;
-$12=self._model();
-$11=_st($12)._selectedPackage();
-$9=_st($10).__eq($11);
+$9=_st(oldPackage).__eq(_st(self._model())._selectedPackage());
 if(smalltalk.assert($9)){
 self._selectedItem_(nil);
-$13=self._selectItem_(nil);
-$13;
+$10=self._selectItem_(nil);
+$10;
 };
 self._setItemsForSelectedPackage();
 self._refresh();
@@ -1558,7 +1547,7 @@ fn: function (anAnnouncement){
 var self=this;
 var selectedClass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2,$3;
 $1=_st(anAnnouncement)._item();
 $ctx1.sendIdx["item"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -1566,14 +1555,13 @@ return self;
 } else {
 $1;
 };
-$2=_st(anAnnouncement)._item();
-selectedClass=_st($2)._theNonMetaClass();
+selectedClass=_st(_st(anAnnouncement)._item())._theNonMetaClass();
 self._selectedItem_(selectedClass);
-$3=self._hasFocus();
-if(! smalltalk.assert($3)){
+$2=self._hasFocus();
+if(! smalltalk.assert($2)){
 self._activateItem_(selectedClass);
-$4=self._focus();
-$4;
+$3=self._focus();
+$3;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,selectedClass:selectedClass},smalltalk.HLClassesListWidget)})},
 args: ["anAnnouncement"],
@@ -1658,7 +1646,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,$6,$5,$7,$8,$9,$11,$10,$12,$2,$13,$15,$16,$14,$17;
+var $1,$3,$4,$6,$5,$7,$8,$9,$10,$2,$11,$13,$14,$12,$15;
 $1=_st(html)._div();
 _st($1)._class_("btn-group");
 $ctx1.sendIdx["class:"]=1;
@@ -1690,45 +1678,43 @@ $ctx3.sendIdx["showInstance:"]=1;
 $ctx2.sendIdx["onClick:"]=1;
 $7;
 $8=_st(html)._button();
-$9=$8;
-$10=_st($String())._streamContents_((function(str){
+_st($8)._class_(_st($String())._streamContents_((function(str){
 return smalltalk.withContext(function($ctx3) {
 _st(str)._nextPutAll_("btn");
 $ctx3.sendIdx["nextPutAll:"]=3;
-$11=self._showClass();
-if(smalltalk.assert($11)){
+$9=self._showClass();
+if(smalltalk.assert($9)){
 return _st(str)._nextPutAll_(" active");
 };
-}, function($ctx3) {$ctx3.fillBlock({str:str},$ctx2,5)})}));
-_st($9)._class_($10);
+}, function($ctx3) {$ctx3.fillBlock({str:str},$ctx2,5)})})));
 $ctx2.sendIdx["class:"]=3;
 _st($8)._with_("Class");
 $ctx2.sendIdx["with:"]=3;
-$12=_st($8)._onClick_((function(){
+$10=_st($8)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._showInstance_(false);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
 $ctx2.sendIdx["onClick:"]=2;
-return $12;
+return $10;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["with:"]=1;
-$13=_st(html)._label();
-_st($13)._class_("checkbox");
-$14=_st($13)._with_((function(){
+$11=_st(html)._label();
+_st($11)._class_("checkbox");
+$12=_st($11)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-$15=_st(html)._input();
-_st($15)._type_("checkbox");
-$16=_st($15)._onClick_((function(){
+$13=_st(html)._input();
+_st($13)._type_("checkbox");
+$14=_st($13)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._toggleShowComment();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
-checkbox=$16;
+checkbox=$14;
 checkbox;
 return _st(html)._with_("Doc");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,8)})}));
 $ctx1.sendIdx["with:"]=4;
-$17=self._showComment();
-if(smalltalk.assert($17)){
+$15=self._showComment();
+if(smalltalk.assert($15)){
 _st(checkbox)._at_put_("checked","checked");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,checkbox:checkbox},smalltalk.HLClassesListWidget)})},
@@ -1747,7 +1733,7 @@ fn: function (aClass,anInteger,html){
 var self=this;
 var li;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$6,$5,$3;
+var $1,$2,$4,$5,$3;
 li=_st(html)._li();
 $1=_st(li)._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
@@ -1765,8 +1751,7 @@ return self._renderItemLabel_level_on_(aClass,anInteger,html);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 $5=_st($4)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
-$6=_st(li)._asJQuery();
-return self._activateListItem_($6);
+return self._activateListItem_(_st(li)._asJQuery());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
 return $5;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -1886,7 +1871,7 @@ category: 'private',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 if(($receiver = aPackage) == nil || $receiver == null){
 $1=[];
 } else {
@@ -1897,8 +1882,7 @@ return _st(each)._theNonMetaClass();
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._name();
 $ctx2.sendIdx["name"]=1;
-$3=_st(b)._name();
-return _st($2).__lt($3);
+return _st($2).__lt(_st(b)._name());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,4)})}));
 };
 self._items_($1);
@@ -2252,7 +2236,7 @@ category: 'reactions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $5,$4,$3,$2,$1,$9,$8,$7,$6;
+var $5,$4,$3,$2,$1;
 $5=self._model();
 $ctx1.sendIdx["model"]=1;
 $4=_st($5)._selectedClass();
@@ -2261,11 +2245,7 @@ $3=_st($4)._theNonMetaClass();
 $ctx1.sendIdx["theNonMetaClass"]=1;
 $2=_st($3)._name();
 $1=_st($2).__comma(" comment");
-$9=self._model();
-$8=_st($9)._selectedClass();
-$7=_st($8)._theNonMetaClass();
-$6=_st($7)._comment();
-self._request_value_do_($1,$6,(function(comment){
+self._request_value_do_($1,_st(_st(_st(self._model())._selectedClass())._theNonMetaClass())._comment(),(function(comment){
 return smalltalk.withContext(function($ctx2) {
 return self._setClassComment_(comment);
 }, function($ctx2) {$ctx2.fillBlock({comment:comment},$ctx1,1)})}));
@@ -2309,7 +2289,7 @@ fn: function (html){
 var self=this;
 function $Showdown(){return smalltalk.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$3,$7,$8,$6;
+var $1,$2,$4,$5,$3,$6,$7;
 $1=self._selectedItem();
 if(($receiver = $1) == nil || $receiver == null){
 $1;
@@ -2332,11 +2312,10 @@ return $5;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 $ctx1.sendIdx["with:"]=2;
 $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()));
+$6=_st(html)._div();
+_st($6)._class_("markdown");
+$7=_st($6)._asJQuery();
+_st($7)._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"],
@@ -2372,7 +2351,7 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$5,$6,$9,$8,$7,$12,$11,$10,$2;
+var $1,$4,$3,$5,$6,$9,$8,$7,$10,$2;
 $1=_st(html)._div();
 _st($1)._class_("inheritance");
 $2=_st($1)._with_((function(){
@@ -2397,9 +2376,7 @@ $7=_st($8)._name();
 _st($6)._with_($7);
 $10=_st($5)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
-$12=self._selectedItem();
-$11=_st($12)._superclass();
-return self._selectClass_($11);
+return self._selectClass_(_st(self._selectedItem())._superclass());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
 return $10;
 };
@@ -2623,7 +2600,7 @@ category: 'accessing',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$5,$7,$6,$9,$8,$4;
+var $2,$1,$3,$5,$7,$6,$4;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._selectedClass();
@@ -2642,9 +2619,7 @@ $6=_st($7)._selectedClass();
 $ctx1.sendIdx["selectedClass"]=2;
 $4=_st($6)._methods();
 } else {
-$9=self._model();
-$8=_st($9)._selectedClass();
-$4=_st($8)._methodsInProtocol_(aString);
+$4=_st(_st(self._model())._selectedClass())._methodsInProtocol_(aString);
 };
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
@@ -2743,7 +2718,7 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$6,$5,$8,$7,$4,$9;
+var $3,$2,$1,$6,$5,$4,$7;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._selectedMethod();
@@ -2755,15 +2730,13 @@ return self;
 $6=self._model();
 $ctx1.sendIdx["model"]=2;
 $5=_st($6)._selectedProtocol();
-$8=self._model();
-$7=_st($8)._allProtocol();
-$4=_st($5).__eq($7);
+$4=_st($5).__eq(_st(self._model())._allProtocol());
 if(! smalltalk.assert($4)){
 self._selectedItem_(nil);
 self._selectItem_(nil);
 self._setItemsForSelectedProtocol();
-$9=self._refresh();
-$9;
+$7=self._refresh();
+$7;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onMethodMoved:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
 args: ["anAnnouncement"],
@@ -2781,7 +2754,7 @@ fn: function (anAnnouncement){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$6,$3,$7;
+var $1,$2,$4,$3,$5;
 var $early={};
 try {
 method=_st(anAnnouncement)._method();
@@ -2804,14 +2777,12 @@ $4=_st(_st(method)._methodClass()).__eq(_st(self._model())._selectedClass());
 $ctx1.sendIdx["="]=2;
 $3=_st($4)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=_st(method)._selector();
-$6=self._selectedItem();
-return _st($5).__eq($6);
+return _st(_st(method)._selector()).__eq(self._selectedItem());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
 if(smalltalk.assert($3)){
 self._selectedItem_(nil);
-$7=self._selectItem_(nil);
-$7;
+$5=self._selectItem_(nil);
+$5;
 };
 };
 self._setItemsForSelectedProtocol();
@@ -3054,7 +3025,7 @@ category: 'actions',
 fn: function (aSelector){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $2,$1;
 if(($receiver = aSelector) == nil || $receiver == null){
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
@@ -3064,8 +3035,7 @@ return $1;
 } else {
 aSelector;
 };
-$3=self._model();
-_st($3)._selectedMethod_(self._methodForSelector_(aSelector));
+_st(self._model())._selectedMethod_(self._methodForSelector_(aSelector));
 return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
 args: ["aSelector"],
 source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a   \x09self model selectedMethod: (self methodForSelector: aSelector)",
@@ -3232,13 +3202,12 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 self["@items"]=_st(_st(self._model())._packages())._sort_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._name();
 $ctx2.sendIdx["name"]=1;
-$3=_st(b)._name();
-return _st($2).__lt($3);
+return _st($2).__lt(_st(b)._name());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
 $1=self["@items"];
 return $1;
@@ -3320,16 +3289,14 @@ var self=this;
 function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
 function $PackageAdded(){return smalltalk.PackageAdded||(typeof PackageAdded=="undefined"?nil:PackageAdded)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._systemAnnouncer();
 $ctx1.sendIdx["systemAnnouncer"]=1;
 _st($1)._on_send_to_($ClassAdded(),"onClassAdded:",self);
 $ctx1.sendIdx["on:send:to:"]=1;
-$4=self._model();
-$3=_st($4)._systemAnnouncer();
-_st($3)._on_send_to_($PackageAdded(),"onPackageAdded:",self);
+_st(_st(self._model())._systemAnnouncer())._on_send_to_($PackageAdded(),"onPackageAdded:",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLPackagesListWidget)})},
 args: [],
 source: "observeSystem\x0a    self model systemAnnouncer \x0a\x09\x09on: ClassAdded \x0a\x09\x09send: #onClassAdded:\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model systemAnnouncer\x0a\x09\x09on: PackageAdded\x0a\x09\x09send: #onPackageAdded:\x0a\x09\x09to: self",
@@ -3624,7 +3591,7 @@ fn: function (anAnnouncement){
 var self=this;
 var class_,protocol;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$1,$7,$6,$5,$8;
+var $2,$4,$3,$1,$5,$6;
 class_=_st(anAnnouncement)._theClass();
 protocol=_st(anAnnouncement)._protocol();
 $2=class_;
@@ -3636,13 +3603,11 @@ $ctx1.sendIdx["="]=1;
 if(! smalltalk.assert($1)){
 return self;
 };
-$7=self._model();
-$6=_st($7)._selectedProtocol();
-$5=_st($6).__eq(protocol);
+$5=_st(_st(self._model())._selectedProtocol()).__eq(protocol);
 if(smalltalk.assert($5)){
 self._selectedItem_(nil);
-$8=self._selectItem_(nil);
-$8;
+$6=self._selectItem_(nil);
+$6;
 };
 self._setItemsForSelectedClass();
 self._refresh();
@@ -3772,18 +3737,17 @@ fn: function (aClass){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$5,$1;
+var $2,$3,$4,$1;
 if(($receiver = aClass) == nil || $receiver == null){
 $2=self._allProtocol();
 $ctx1.sendIdx["allProtocol"]=1;
 $1=_st($Array())._with_($2);
 $ctx1.sendIdx["with:"]=1;
 } else {
-$4=self._allProtocol();
-$3=_st($Array())._with_($4);
+$3=_st($Array())._with_(self._allProtocol());
 _st($3)._addAll_(_st(aClass)._protocols());
-$5=_st($3)._yourself();
-$1=$5;
+$4=_st($3)._yourself();
+$1=$4;
 };
 self._items_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},

+ 4 - 9
js/Helios-Commands-Browser.js

@@ -355,15 +355,13 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._showComment();
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._model();
-$4=_st($5)._selectedClass();
-return _st($4)._notNil();
+return _st(_st(self._model())._selectedClass())._notNil();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLEditCommentCommand)})},
@@ -451,13 +449,10 @@ category: 'executing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2;
+var $1;
 $1=self._model();
 $ctx1.sendIdx["model"]=1;
-$4=self._model();
-$3=_st($4)._showComment();
-$2=_st($3)._not();
-_st($1)._showComment_($2);
+_st($1)._showComment_(_st(_st(self._model())._showComment())._not());
 return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleClassCommentCommand)})},
 args: [],
 source: "execute\x0a\x09self model showComment: self model showComment not",

+ 4 - 6
js/Helios-Commands-Core.js

@@ -851,14 +851,12 @@ var self=this;
 var activeTab;
 function $HLTabSelectionWidget(){return smalltalk.HLTabSelectionWidget||(typeof HLTabSelectionWidget=="undefined"?nil:HLTabSelectionWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
+var $2,$3,$1;
 activeTab=self._selectedTab();
 $ctx1.sendIdx["selectedTab"]=1;
 $2=_st($HLTabSelectionWidget())._new();
 _st($2)._tabs_(self._tabs());
-$3=$2;
-$4=self._selectedTab();
-_st($3)._selectedTab_($4);
+_st($2)._selectedTab_(self._selectedTab());
 _st($2)._selectCallback_((function(tab){
 return smalltalk.withContext(function($ctx2) {
 return _st(tab)._activate();
@@ -872,8 +870,8 @@ _st($2)._cancelCallback_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(activeTab)._activate();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$5=_st($2)._show();
-$1=$5;
+$3=_st($2)._show();
+$1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"execute",{activeTab:activeTab},smalltalk.HLSwitchTabCommand)})},
 args: [],

+ 4 - 7
js/Helios-Commands-Tools.js

@@ -507,13 +507,12 @@ category: 'defaults',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$4,$1;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._selectedMethod();
 if(($receiver = $2) == nil || $receiver == null){
-$5=self._model();
-$4=_st($5)._selectedClass();
+$4=_st(self._model())._selectedClass();
 if(($receiver = $4) == nil || $receiver == null){
 $1="";
 } else {
@@ -578,13 +577,11 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._availableClassNames();
-$5=self._model();
-$4=_st($5)._allSelectors();
-$1=_st($2).__comma($4);
+$1=_st($2).__comma(_st(self._model())._allSelectors());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},smalltalk.HLFindReferencesCommand)})},
 args: [],

+ 123 - 191
js/Helios-Core.js

@@ -189,20 +189,16 @@ fn: function (aString){
 var self=this;
 function $HLInstVarAdded(){return smalltalk.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$7,$8,$4;
+var $1,$2,$3,$4;
 $1=self._environment();
 $2=self._selectedClass();
 $ctx1.sendIdx["selectedClass"]=1;
 _st($1)._addInstVarNamed_to_(aString,$2);
-$3=self._announcer();
-$5=_st($HLInstVarAdded())._new();
-$6=$5;
-$7=self._selectedClass();
-_st($6)._theClass_($7);
-_st($5)._variableName_(aString);
-$8=_st($5)._yourself();
-$4=$8;
-_st($3)._announce_($4);
+$3=_st($HLInstVarAdded())._new();
+_st($3)._theClass_(self._selectedClass());
+_st($3)._variableName_(aString);
+$4=_st($3)._yourself();
+_st(self._announcer())._announce_($4);
 return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString},smalltalk.HLToolModel)})},
 args: ["aString"],
 source: "addInstVarNamed: aString\x0a\x09self environment addInstVarNamed: aString to: self selectedClass.\x0a\x09self announcer announce: (HLInstVarAdded new\x0a\x09\x09theClass: self selectedClass;\x0a\x09\x09variableName: aString;\x0a\x09\x09yourself)",
@@ -341,7 +337,7 @@ fn: function (){
 var self=this;
 var currentProtocol;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$4;
+var $1,$2,$4,$3;
 currentProtocol=self._selectedProtocol();
 $1=currentProtocol;
 if(($receiver = $1) == nil || $receiver == null){
@@ -356,17 +352,16 @@ $ctx1.sendIdx["selectedMethod"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $2;
 } else {
-$3=self._selectedMethod();
-currentProtocol=_st($3)._protocol();
+currentProtocol=_st(self._selectedMethod())._protocol();
 currentProtocol;
 };
-$5=_st(currentProtocol).__eq(self._allProtocol());
-if(smalltalk.assert($5)){
-$4=self._unclassifiedProtocol();
+$4=_st(currentProtocol).__eq(self._allProtocol());
+if(smalltalk.assert($4)){
+$3=self._unclassifiedProtocol();
 } else {
-$4=currentProtocol;
+$3=currentProtocol;
 };
-return $4;
+return $3;
 }, 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 ]",
@@ -478,7 +473,7 @@ var self=this;
 var split,line,column,messageToInsert;
 function $HLParseErrorRaised(){return smalltalk.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$6,$7,$8,$9,$10,$11,$5;
+var $1,$3,$2,$4,$6,$7,$8,$9,$5;
 split=_st(_st(anError)._messageText())._tokenize_(" : ");
 $ctx1.sendIdx["tokenize:"]=1;
 messageToInsert=_st(split)._second();
@@ -498,13 +493,11 @@ $7=$6;
 $8=_st(line)._asNumber();
 $ctx1.sendIdx["asNumber"]=1;
 _st($7)._line_($8);
-$9=$6;
-$10=_st(column)._asNumber();
-_st($9)._column_($10);
+_st($6)._column_(_st(column)._asNumber());
 _st($6)._message_(messageToInsert);
 _st($6)._error_(anError);
-$11=_st($6)._yourself();
-$5=$11;
+$9=_st($6)._yourself();
+$5=$9;
 _st($4)._announce_($5);
 return self}, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},smalltalk.HLToolModel)})},
 args: ["anError"],
@@ -656,7 +649,7 @@ category: 'commands actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2,$5,$6;
+var $1,$4,$3,$2;
 self._withChangesDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 $1=self._manager();
@@ -666,9 +659,7 @@ $3=_st($4)._name();
 $2="Do you REALLY want to remove class ".__comma($3);
 return _st($1)._confirm_ifTrue_($2,(function(){
 return smalltalk.withContext(function($ctx3) {
-$5=self._environment();
-$6=self._selectedClass();
-return _st($5)._removeClass_($6);
+return _st(self._environment())._removeClass_(self._selectedClass());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.HLToolModel)})},
@@ -686,7 +677,7 @@ category: 'commands actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$7,$6,$5,$4,$3,$9,$8,$2,$10,$11;
+var $1,$7,$6,$5,$4,$3,$9,$8,$2;
 self._withChangesDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 $1=self._manager();
@@ -704,9 +695,7 @@ $2=_st($3).__comma($8);
 $ctx2.sendIdx[","]=1;
 return _st($1)._confirm_ifTrue_($2,(function(){
 return smalltalk.withContext(function($ctx3) {
-$10=self._environment();
-$11=self._selectedMethod();
-return _st($10)._removeMethod_($11);
+return _st(self._environment())._removeMethod_(self._selectedMethod());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.HLToolModel)})},
@@ -724,7 +713,7 @@ category: 'commands actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$5;
+var $1,$3,$2;
 self._withChangesDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 $1=self._manager();
@@ -733,9 +722,7 @@ $ctx2.sendIdx["selectedProtocol"]=1;
 $2="Do you REALLY want to remove protocol ".__comma($3);
 return _st($1)._confirm_ifTrue_($2,(function(){
 return smalltalk.withContext(function($ctx3) {
-$4=self._environment();
-$5=self._selectedProtocol();
-return _st($4)._removeProtocol_from_($5,self._selectedClass());
+return _st(self._environment())._removeProtocol_from_(self._selectedProtocol(),self._selectedClass());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},smalltalk.HLToolModel)})},
@@ -851,7 +838,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,$8,$10,$9;
+var $3,$2,$1,$4,$6,$5,$7;
 $3=self._selectedClass();
 $ctx1.sendIdx["selectedClass"]=1;
 $2=_st($3).__eq(aClass);
@@ -888,10 +875,7 @@ self["@selectedClass"];
 };
 };
 self._selectedProtocol_(nil);
-$8=self._announcer();
-$10=self._selectedClass();
-$9=_st($HLClassSelected())._on_($10);
-return _st($8)._announce_($9);
+return _st(self._announcer())._announce_(_st($HLClassSelected())._on_(self._selectedClass()));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},smalltalk.HLToolModel)})},
 args: ["aClass"],
@@ -908,15 +892,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$1;
+var $2,$1;
 $2=self._selectedClass();
 $ctx1.sendIdx["selectedClass"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1=$2;
 } else {
-$4=self._selectedClass();
-$3=_st($4)._methodDictionary();
-$1=_st($3)._at_ifAbsent_(self["@selectedSelector"],(function(){
+$1=_st(_st(self._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
 return smalltalk.withContext(function($ctx2) {
 return nil;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
@@ -1105,7 +1087,7 @@ function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefin
 function $UnknownVariableError(){return smalltalk.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
 function $CompilerError(){return smalltalk.CompilerError||(typeof CompilerError=="undefined"?nil:CompilerError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._environment();
 $ctx1.sendIdx["environment"]=1;
 _st($1)._evaluate_on_do_((function(){
@@ -1114,8 +1096,7 @@ $2=self._environment();
 $ctx2.sendIdx["environment"]=2;
 return _st($2)._evaluate_on_do_((function(){
 return smalltalk.withContext(function($ctx3) {
-$3=self._environment();
-return _st($3)._evaluate_on_do_(aBlock,$ParseError(),(function(ex){
+return _st(self._environment())._evaluate_on_do_(aBlock,$ParseError(),(function(ex){
 return smalltalk.withContext(function($ctx4) {
 return self._handleParseError_(ex);
 }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx3,3)})}));
@@ -1144,7 +1125,7 @@ category: 'private',
 fn: function (aString,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2,$5,$6;
+var $1,$3,$4,$2,$5;
 $1="#helper"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._remove();
@@ -1162,8 +1143,7 @@ _st($2)._appendToJQuery_($5);
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(aBlock)._value();
-$6="#helper"._asJQuery();
-return _st($6)._remove();
+return _st("#helper"._asJQuery())._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},smalltalk.HLToolModel)})},
 args: ["aString", "aBlock"],
@@ -1305,13 +1285,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $2,$1;
 $2=self._widget();
 $ctx1.sendIdx["widget"]=1;
 $1=_st($2)._canHaveFocus();
 if(smalltalk.assert($1)){
-$3=self._widget();
-_st($3)._focus();
+_st(self._widget())._focus();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLTabWidget)})},
 args: [],
@@ -1512,15 +1491,14 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self["@root"];
 if(($receiver = $1) == nil || $receiver == null){
 $2="body"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 self._appendToJQuery_($2);
 } else {
-$3=_st(self["@root"])._asJQuery();
-_st($3)._css_put_("visibility","visible");
+_st(_st(self["@root"])._asJQuery())._css_put_("visibility","visible");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.HLTabWidget)})},
 args: [],
@@ -1705,7 +1683,7 @@ category: 'updating',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$6,$5;
+var $1,$3,$2;
 $1=self._wrapper();
 $ctx1.sendIdx["wrapper"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -1718,13 +1696,10 @@ $ctx1.sendIdx["wrapper"]=2;
 $2=_st($3)._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($2)._empty();
-$4=(function(html){
+_st((function(html){
 return smalltalk.withContext(function($ctx2) {
 return self._renderContentOn_(html);
-}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,2)})});
-$6=self._wrapper();
-$5=_st($6)._asJQuery();
-_st($4)._appendToJQuery_($5);
+}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,2)})}))._appendToJQuery_(_st(self._wrapper())._asJQuery());
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLWidget)})},
 args: [],
 source: "refresh\x0a\x09self wrapper ifNil: [ ^ self ].\x0a    \x0a\x09self wrapper asJQuery empty.\x0a    [ :html | self renderContentOn: html ] appendToJQuery: self wrapper asJQuery",
@@ -2059,15 +2034,13 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._wrapper();
 $ctx1.sendIdx["wrapper"]=1;
 $2=_st($3)._notNil();
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._wrapper();
-$4=_st($5)._asJQuery();
-return _st($4)._hasClass_(self._focusClass());
+return _st(_st(self._wrapper())._asJQuery())._hasClass_(self._focusClass());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},smalltalk.HLFocusableWidget)})},
@@ -2100,7 +2073,7 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$4,$6,$9,$8,$10,$7;
+var $1,$2,$3,$5,$4,$6,$7;
 $1=_st(html)._div();
 _st($1)._class_("hl_widget");
 $2=_st($1)._yourself();
@@ -2123,10 +2096,7 @@ return _st($4)._removeClass_($6);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 $7=_st($3)._onFocus_((function(){
 return smalltalk.withContext(function($ctx2) {
-$9=self._wrapper();
-$8=_st($9)._asJQuery();
-$10=self._focusClass();
-return _st($8)._addClass_($10);
+return _st(_st(self._wrapper())._asJQuery())._addClass_(self._focusClass());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLFocusableWidget)})},
 args: ["html"],
@@ -2209,7 +2179,7 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$8,$7,$6,$5;
+var $4,$3,$2,$1;
 $4=self._wrapper();
 $ctx1.sendIdx["wrapper"]=1;
 $3=_st($4)._asJQuery();
@@ -2218,11 +2188,7 @@ $2=_st($3)._find_("li.active");
 $ctx1.sendIdx["find:"]=1;
 $1=_st($2)._next();
 self._activateListItem_($1);
-$8=self._wrapper();
-$7=_st($8)._asJQuery();
-$6=_st($7)._find_(" .active");
-$5=_st($6)._get();
-_st($5)._ifEmpty_((function(){
+_st(_st(_st(_st(self._wrapper())._asJQuery())._find_(" .active"))._get())._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._activateFirstListItem();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -2292,7 +2258,7 @@ fn: function (aListItem){
 var self=this;
 var parent,position;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$5,$4,$3,$6,$10,$9,$12,$11,$8,$7,$2,$17,$16,$18,$15,$19,$14,$20,$25,$24,$26,$23,$28,$30,$29,$27,$22,$21,$13;
+var $1,$4,$3,$2,$5,$9,$8,$11,$10,$7,$6,$15,$14,$16,$13,$17,$12,$18,$22,$23,$21,$20,$19;
 $1=_st(aListItem)._get_((0));
 $ctx1.sendIdx["get:"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -2302,57 +2268,52 @@ $1;
 };
 position=self._positionOf_(aListItem);
 parent=_st(aListItem)._parent();
-$5=_st(aListItem)._position();
+$4=_st(aListItem)._position();
 $ctx1.sendIdx["position"]=1;
-$4=_st($5)._top();
+$3=_st($4)._top();
 $ctx1.sendIdx["top"]=1;
-$3=_st($4).__lt((0));
-if(smalltalk.assert($3)){
-$6=_st(parent)._get_((0));
+$2=_st($3).__lt((0));
+if(smalltalk.assert($2)){
+$5=_st(parent)._get_((0));
 $ctx1.sendIdx["get:"]=2;
-$10=_st(parent)._get_((0));
+$9=_st(parent)._get_((0));
 $ctx1.sendIdx["get:"]=3;
-$9=_st($10)._scrollTop();
+$8=_st($9)._scrollTop();
 $ctx1.sendIdx["scrollTop"]=1;
-$12=_st(aListItem)._position();
+$11=_st(aListItem)._position();
 $ctx1.sendIdx["position"]=2;
-$11=_st($12)._top();
+$10=_st($11)._top();
 $ctx1.sendIdx["top"]=2;
-$8=_st($9).__plus($11);
+$7=_st($8).__plus($10);
 $ctx1.sendIdx["+"]=1;
-$7=_st($8).__minus((10));
+$6=_st($7).__minus((10));
 $ctx1.sendIdx["-"]=1;
-$2=_st($6)._scrollTop_($7);
+_st($5)._scrollTop_($6);
 $ctx1.sendIdx["scrollTop:"]=1;
 };
-$17=_st(aListItem)._position();
+$15=_st(aListItem)._position();
 $ctx1.sendIdx["position"]=3;
-$16=_st($17)._top();
+$14=_st($15)._top();
 $ctx1.sendIdx["top"]=3;
-$18=_st(aListItem)._height();
+$16=_st(aListItem)._height();
 $ctx1.sendIdx["height"]=1;
-$15=_st($16).__plus($18);
+$13=_st($14).__plus($16);
 $ctx1.sendIdx["+"]=2;
-$19=_st(parent)._height();
+$17=_st(parent)._height();
 $ctx1.sendIdx["height"]=2;
-$14=_st($15).__gt($19);
-if(smalltalk.assert($14)){
-$20=_st(parent)._get_((0));
+$12=_st($13).__gt($17);
+if(smalltalk.assert($12)){
+$18=_st(parent)._get_((0));
 $ctx1.sendIdx["get:"]=4;
-$25=_st(parent)._get_((0));
-$24=_st($25)._scrollTop();
-$26=_st(aListItem)._height();
+$22=_st(_st(parent)._get_((0)))._scrollTop();
+$23=_st(aListItem)._height();
 $ctx1.sendIdx["height"]=3;
-$23=_st($24).__plus($26);
-$28=_st(parent)._height();
-$30=_st(aListItem)._position();
-$29=_st($30)._top();
-$27=_st($28).__minus($29);
-$22=_st($23).__minus($27);
+$21=_st($22).__plus($23);
+$20=_st($21).__minus(_st(_st(parent)._height()).__minus(_st(_st(aListItem)._position())._top()));
 $ctx1.sendIdx["-"]=2;
-$21=_st($22).__plus((10));
+$19=_st($20).__plus((10));
 $ctx1.sendIdx["+"]=3;
-$13=_st($20)._scrollTop_($21);
+_st($18)._scrollTop_($19);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,parent:parent,position:position},smalltalk.HLListWidget)})},
 args: ["aListItem"],
@@ -2369,15 +2330,13 @@ category: 'accessing',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$6,$5,$2,$1;
+var $4,$3,$2,$1;
 $4=_st(self["@wrapper"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 $3=_st($4)._find_("li");
 $2=_st($3)._filter_(_st((function(thisArg,otherArg){
 return smalltalk.withContext(function($ctx2) {
-$6=_st(thisArg)._asJQuery();
-$5=_st($6)._data_("item");
-return _st($5).__eq(anObject);
+return _st(_st(_st(thisArg)._asJQuery())._data_("item")).__eq(anObject);
 }, function($ctx2) {$ctx2.fillBlock({thisArg:thisArg,otherArg:otherArg},$ctx1,1)})}))._currySelf());
 $1=_st($2)._eq_((0));
 return $1;
@@ -2567,7 +2526,7 @@ fn: function (anObject,html){
 var self=this;
 var li;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$6,$5,$3;
+var $1,$2,$4,$5,$3;
 li=_st(html)._li();
 $1=_st(li)._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
@@ -2585,8 +2544,7 @@ return self._renderItemLabel_on_(anObject,html);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 $5=_st($4)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
-$6=_st(li)._asJQuery();
-return self._activateListItem_($6);
+return self._activateListItem_(_st(li)._asJQuery());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
 return $5;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -2761,14 +2719,13 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._next();
 $ctx1.sendIdx["next"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=self._next();
-_st($2)._focus();
+_st(self._next())._focus();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"nextFocus",{},smalltalk.HLNavigationListWidget)})},
 args: [],
@@ -2824,14 +2781,13 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._previous();
 $ctx1.sendIdx["previous"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=self._previous();
-_st($2)._focus();
+_st(self._previous())._focus();
 };
 return self}, function($ctx1) {$ctx1.fill(self,"previousFocus",{},smalltalk.HLNavigationListWidget)})},
 args: [],
@@ -2848,7 +2804,7 @@ category: 'events',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1,$3;
 smalltalk.HLNavigationListWidget.superclass.fn.prototype._setupKeyBindings.apply(_st(self), []);
 _st(_st(self._wrapper())._asJQuery())._keydown_((function(e){
 return smalltalk.withContext(function($ctx2) {
@@ -2859,8 +2815,7 @@ $ctx2.sendIdx["="]=1;
 if(smalltalk.assert($1)){
 self._nextFocus();
 };
-$4=_st(e)._which();
-$3=_st($4).__eq((37));
+$3=_st(_st(e)._which()).__eq((37));
 if(smalltalk.assert($3)){
 return self._previousFocus();
 };
@@ -2975,19 +2930,16 @@ fn: function (){
 var self=this;
 function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$5,$2,$1;
-$3=_st(_st($HLToolCommand())._concreteClasses())._select_((function(each){
+var $2,$1;
+$1=_st(_st(_st(_st($HLToolCommand())._concreteClasses())._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$4=self._model();
+$2=self._model();
 $ctx2.sendIdx["model"]=1;
-return _st(each)._isValidFor_($4);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$2=_st($3)._collect_((function(each){
+return _st(each)._isValidFor_($2);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$5=self._model();
-return _st(each)._for_($5);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$1=_st($2)._select_((function(each){
+return _st(each)._for_(self._model());
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})})))._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(_st(each)._category()).__eq(self._commandCategory()))._and_((function(){
 return smalltalk.withContext(function($ctx3) {
@@ -3124,7 +3076,7 @@ fn: function (html){
 var self=this;
 var commands;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$6,$8,$9,$10,$7,$3;
+var $1,$2,$4,$5,$6,$8,$9,$7,$3;
 commands=self._menuCommands();
 $ctx1.sendIdx["menuCommands"]=1;
 $1=_st(commands)._isEmpty();
@@ -3152,18 +3104,17 @@ $6=_st(html)._ul();
 _st($6)._class_("dropdown-menu pull-right");
 $7=_st($6)._with_((function(){
 return smalltalk.withContext(function($ctx3) {
-$8=self._menuCommands();
-return _st($8)._do_((function(each){
+return _st(self._menuCommands())._do_((function(each){
 return smalltalk.withContext(function($ctx4) {
 return _st(_st(html)._li())._with_((function(){
 return smalltalk.withContext(function($ctx5) {
-$9=_st(html)._a();
-_st($9)._with_(_st(each)._menuLabel());
-$10=_st($9)._onClick_((function(){
+$8=_st(html)._a();
+_st($8)._with_(_st(each)._menuLabel());
+$9=_st($8)._onClick_((function(){
 return smalltalk.withContext(function($ctx6) {
 return self._execute_(each);
 }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)})}));
-return $10;
+return $9;
 }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)})}));
 $ctx4.sendIdx["with:"]=4;
 }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,5)})}));
@@ -3204,16 +3155,14 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 smalltalk.HLToolListWidget.superclass.fn.prototype._unregister.apply(_st(self), []);
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._announcer();
 _st($1)._unsubscribe_(self);
 $ctx1.sendIdx["unsubscribe:"]=1;
-$4=self._model();
-$3=_st($4)._systemAnnouncer();
-_st($3)._unsubscribe_(self);
+_st(_st(self._model())._systemAnnouncer())._unsubscribe_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLToolListWidget)})},
 args: [],
 source: "unregister\x0a\x09super unregister.\x0a\x09\x0a\x09self model announcer unsubscribe: self.\x0a\x09self model systemAnnouncer unsubscribe: self",
@@ -3229,7 +3178,7 @@ category: 'updating',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$7,$6,$5;
+var $3,$2,$1;
 $3=self._wrapper();
 $ctx1.sendIdx["wrapper"]=1;
 $2=_st($3)._asJQuery();
@@ -3237,14 +3186,10 @@ $ctx1.sendIdx["asJQuery"]=1;
 $1=_st($2)._find_(".cog");
 $ctx1.sendIdx["find:"]=1;
 _st($1)._remove();
-$4=(function(html){
+_st((function(html){
 return smalltalk.withContext(function($ctx2) {
 return self._renderMenuOn_(html);
-}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
-$7=self._wrapper();
-$6=_st($7)._asJQuery();
-$5=_st($6)._find_(".list-label");
-_st($4)._appendToJQuery_($5);
+}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}))._appendToJQuery_(_st(_st(self._wrapper())._asJQuery())._find_(".list-label"));
 return self}, function($ctx1) {$ctx1.fill(self,"updateMenu",{},smalltalk.HLToolListWidget)})},
 args: [],
 source: "updateMenu\x0a\x09(self wrapper asJQuery find: '.cog') remove.\x0a\x09\x0a\x09[ :html | self renderMenuOn: html ] \x0a\x09\x09appendToJQuery: (self wrapper asJQuery find: '.list-label')",
@@ -3483,7 +3428,7 @@ 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,$4,$5,$6,$8,$7;
+var $1,$2,$3,$4,$5,$6,$7;
 $1=_st(window)._opener();
 if(($receiver = $1) == nil || $receiver == null){
 parent=_st(window)._parent();
@@ -3509,8 +3454,7 @@ return $6;
 } else {
 $5;
 };
-$8=_st(parentSmalltalk)._at_("Environment");
-$7=_st($8)._new();
+$7=_st(_st(parentSmalltalk)._at_("Environment"))._new();
 return $7;
 }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent,parentSmalltalk:parentSmalltalk},smalltalk.HLManager)})},
 args: [],
@@ -3613,7 +3557,7 @@ function $HLInspector(){return smalltalk.HLInspector||(typeof HLInspector=="unde
 function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
 function $ProgressHandler(){return smalltalk.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 smalltalk.HLManager.superclass.fn.prototype._initialize.apply(_st(self), []);
 _st($HLErrorHandler())._register();
 $ctx1.sendIdx["register"]=1;
@@ -3622,8 +3566,7 @@ self._registerInspector_($HLInspector());
 $1=_st($ErrorHandler())._current();
 $ctx1.sendIdx["current"]=1;
 self._registerErrorHandler_($1);
-$2=_st($ProgressHandler())._current();
-self._registerProgressHandler_($2);
+self._registerProgressHandler_(_st($ProgressHandler())._current());
 _st(self._keyBinder())._setupEvents();
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLManager)})},
 args: [],
@@ -3659,12 +3602,11 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=".navbar"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._remove();
-$2="body"._asJQuery();
-self._appendToJQuery_($2);
+self._appendToJQuery_("body"._asJQuery());
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLManager)})},
 args: [],
 source: "refresh\x0a\x09'.navbar' asJQuery remove.\x0a\x09self appendToJQuery: 'body' asJQuery",
@@ -3763,7 +3705,7 @@ category: 'actions',
 fn: function (aTab){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$6,$5;
+var $2,$1,$3;
 $2=self._tabs();
 $ctx1.sendIdx["tabs"]=1;
 $1=_st($2)._includes_(aTab);
@@ -3771,18 +3713,15 @@ if(! smalltalk.assert($1)){
 return self;
 };
 self._removeFromHistory_(aTab);
-$3=self._tabs();
-_st($3)._remove_(aTab);
+_st(self._tabs())._remove_(aTab);
 _st(self._keyBinder())._flushBindings();
 _st(aTab)._remove();
 self._refresh();
-$4=self._history();
+$3=self._history();
 $ctx1.sendIdx["history"]=1;
-_st($4)._ifNotEmpty_((function(){
+_st($3)._ifNotEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-$6=self._history();
-$5=_st($6)._last();
-return _st($5)._activate();
+return _st(_st(self._history())._last())._activate();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},smalltalk.HLManager)})},
 args: ["aTab"],
@@ -3800,7 +3739,7 @@ fn: function (html){
 var self=this;
 function $HLWidget(){return smalltalk.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$5,$7,$8,$9,$10,$11,$6,$2;
+var $1,$3,$4,$5,$7,$8,$9,$6,$2;
 $1=_st(html)._li();
 $ctx1.sendIdx["li"]=1;
 _st($1)._class_("dropdown");
@@ -3832,20 +3771,18 @@ return _st(each)._canBeOpenAsTab();
 return smalltalk.withContext(function($ctx4) {
 $7=_st(a)._tabPriority();
 $ctx4.sendIdx["tabPriority"]=1;
-$8=_st(b)._tabPriority();
-return _st($7).__lt($8);
+return _st($7).__lt(_st(b)._tabPriority());
 }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3,5)})})))._do_((function(each){
 return smalltalk.withContext(function($ctx4) {
-$9=_st(html)._li();
-return _st($9)._with_((function(){
+return _st(_st(html)._li())._with_((function(){
 return smalltalk.withContext(function($ctx5) {
-$10=_st(html)._a();
-_st($10)._with_(_st(each)._tabLabel());
-$11=_st($10)._onClick_((function(){
+$8=_st(html)._a();
+_st($8)._with_(_st(each)._tabLabel());
+$9=_st($8)._onClick_((function(){
 return smalltalk.withContext(function($ctx6) {
 return _st(each)._openAsTab();
 }, function($ctx6) {$ctx6.fillBlock({},$ctx5,8)})}));
-return $11;
+return $9;
 }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)})}));
 $ctx4.sendIdx["with:"]=5;
 }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,6)})}));
@@ -4173,7 +4110,7 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=".dialog"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._removeClass_("active");
@@ -4183,8 +4120,7 @@ $2="#overlay"._asJQuery();
 $ctx2.sendIdx["asJQuery"]=2;
 _st($2)._remove();
 $ctx2.sendIdx["remove"]=1;
-$3=".dialog"._asJQuery();
-return _st($3)._remove();
+return _st(".dialog"._asJQuery())._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._valueWithTimeout_((300));
 return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.HLModalWidget)})},
 args: [],
@@ -4757,7 +4693,7 @@ category: 'actions',
 fn: function (aProgressBar){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._progressBars();
 $ctx1.sendIdx["progressBars"]=1;
 _st($1)._remove_ifAbsent_(aProgressBar,(function(){
@@ -4765,8 +4701,7 @@ return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 _st(_st(_st(aProgressBar)._wrapper())._asJQuery())._remove();
 $ctx1.sendIdx["remove"]=1;
-$2=self._progressBars();
-_st($2)._ifEmpty_((function(){
+_st(self._progressBars())._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._remove();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
@@ -5290,7 +5225,7 @@ category: 'actions',
 fn: function (anInteger){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$7,$6,$5,$8,$10,$9;
+var $4,$3,$2,$1,$7,$6,$5;
 $4=self._collection();
 $ctx1.sendIdx["collection"]=1;
 $3=_st($4)._size();
@@ -5305,10 +5240,7 @@ $5=_st(anInteger).__lt_eq($6);
 if(smalltalk.assert($5)){
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-$8=self._workBlock();
-$10=self._collection();
-$9=_st($10)._at_(anInteger);
-_st($8)._value_($9);
+_st(self._workBlock())._value_(_st(self._collection())._at_(anInteger));
 return self._evaluateAt_(_st(anInteger).__plus((1)));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((10));
 $ctx1.sendIdx["valueWithTimeout:"]=1;

+ 12 - 24
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,$6;
+var $1,$2,$3,$4;
 variables=_st($Dictionary())._new();
 inspectedContext=self._context();
 $1=variables;
@@ -68,13 +68,11 @@ $3=inspectedContext;
 if(($receiver = $3) == nil || $receiver == null){
 return $3;
 } else {
-$4=variables;
-$5=_st(inspectedContext)._locals();
-return _st($4)._addAll_($5);
+return _st(variables)._addAll_(_st(inspectedContext)._locals());
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 _st(anInspector)._setLabel_("Context");
-$6=_st(anInspector)._setVariables_(variables);
+$4=_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",
@@ -229,16 +227,14 @@ var self=this;
 function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
 function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._announcer();
 $ctx1.sendIdx["announcer"]=1;
 _st($1)._on_send_to_($HLDebuggerContextSelected(),"onContextSelected:",self);
 $ctx1.sendIdx["on:send:to:"]=1;
-$4=self._model();
-$3=_st($4)._announcer();
-_st($3)._on_send_to_($HLDebuggerStepped(),"onContextSelected:",self);
+_st(_st(self._model())._announcer())._on_send_to_($HLDebuggerStepped(),"onContextSelected:",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDebugger)})},
 args: [],
 source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self",
@@ -291,10 +287,8 @@ function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="unde
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$1;
-$3=self._stackListWidget();
-$4=_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget());
-$2=_st($HLHorizontalSplitter())._with_with_($3,$4);
+var $2,$1;
+$2=_st($HLHorizontalSplitter())._with_with_(self._stackListWidget(),_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget()));
 $ctx1.sendIdx["with:with:"]=1;
 $1=_st($HLContainer())._with_($2);
 _st(html)._with_($1);
@@ -503,7 +497,7 @@ fn: function (aNode){
 var self=this;
 var token;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$6,$5,$4,$3,$9,$8,$7,$2,$13,$12,$11,$10,$14,$19,$18,$17,$16,$20,$15,$25,$24,$23,$22,$26,$21;
+var $1,$6,$5,$4,$3,$9,$8,$7,$2,$13,$12,$11,$10,$14,$19,$18,$17,$16,$20,$15,$22,$21;
 if(($receiver = aNode) == nil || $receiver == null){
 aNode;
 } else {
@@ -546,13 +540,9 @@ $ctx1.sendIdx["->"]=3;
 $20="ch".__minus_gt(_st(token)._start());
 $ctx1.sendIdx["->"]=4;
 $15=smalltalk.HashedCollection._from_([$16,$20]);
-$25=_st(aNode)._position();
-$24=_st($25)._x();
-$23=_st($24).__minus((1));
-$22="line".__minus_gt($23);
+$22="line".__minus_gt(_st(_st(_st(aNode)._position())._x()).__minus((1)));
 $ctx1.sendIdx["->"]=5;
-$26="ch".__minus_gt(_st(token)._end());
-$21=smalltalk.HashedCollection._from_([$22,$26]);
+$21=smalltalk.HashedCollection._from_([$22,"ch".__minus_gt(_st(token)._end())]);
 _st($14)._setSelection_to_($15,$21);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token},smalltalk.HLDebuggerCodeWidget)})},
@@ -573,7 +563,7 @@ function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected
 function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
 function $HLDebuggerWhere(){return smalltalk.HLDebuggerWhere||(typeof HLDebuggerWhere=="undefined"?nil:HLDebuggerWhere)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$6,$5;
+var $2,$1,$4,$3;
 smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._observeBrowserModel.apply(_st(self), []);
 $2=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
@@ -587,9 +577,7 @@ $3=_st($4)._announcer();
 $ctx1.sendIdx["announcer"]=2;
 _st($3)._on_send_to_($HLDebuggerStepped(),"onContextSelected",self);
 $ctx1.sendIdx["on:send:to:"]=2;
-$6=self._browserModel();
-$5=_st($6)._announcer();
-_st($5)._on_send_to_($HLDebuggerWhere(),"onContextSelected",self);
+_st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerWhere(),"onContextSelected",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},smalltalk.HLDebuggerCodeWidget)})},
 args: [],
 source: "observeBrowserModel\x0a\x09super observeBrowserModel.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerWhere\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self",

+ 4 - 6
js/Helios-Inspector.js

@@ -1121,9 +1121,8 @@ var self=this;
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget());
-$1=_st($HLHorizontalSplitter())._with_with_($2,self._codeWidget());
+var $1;
+$1=_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget()),self._codeWidget());
 $ctx1.sendIdx["with:with:"]=1;
 _st(html)._with_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorWidget)})},
@@ -1241,7 +1240,7 @@ function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="unde
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$5;
+var $4,$3,$2,$1;
 $4=self._variablesWidget();
 $ctx1.sendIdx["variablesWidget"]=1;
 $3=_st($HLVerticalSplitter())._with_with_($4,self._displayWidget());
@@ -1250,8 +1249,7 @@ $ctx1.sendIdx["with:with:"]=1;
 $1=_st($HLContainer())._with_($2);
 _st(html)._with_($1);
 $ctx1.sendIdx["with:"]=1;
-$5=self._variablesWidget();
-_st($5)._focus();
+_st(self._variablesWidget())._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspector)})},
 args: ["html"],
 source: "renderContentOn: html\x0a   \x09html with: (HLContainer with: (HLHorizontalSplitter\x0a    \x09with: (HLVerticalSplitter \x0a            with: self variablesWidget\x0a            with: self displayWidget)\x0a        with: self codeWidget)).\x0a\x09\x0a\x09self variablesWidget focus",

+ 27 - 42
js/Helios-KeyBindings.js

@@ -361,7 +361,7 @@ fn: function (){
 var self=this;
 function $HLBindingActionInputWidget(){return smalltalk.HLBindingActionInputWidget||(typeof HLBindingActionInputWidget=="undefined"?nil:HLBindingActionInputWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$4,$6,$8,$7,$9,$11,$10,$12,$13,$1;
+var $2,$3,$5,$4,$6,$8,$7,$9,$10,$1;
 $2=_st($HLBindingActionInputWidget())._new();
 $3=$2;
 $5=self._command();
@@ -373,18 +373,15 @@ $8=self._command();
 $ctx1.sendIdx["command"]=2;
 $7=_st($8)._defaultInput();
 _st($6)._defaultValue_($7);
-$9=$2;
-$11=self._command();
-$10=_st($11)._inputCompletion();
-_st($9)._inputCompletion_($10);
+_st($2)._inputCompletion_(_st(self._command())._inputCompletion());
 _st($2)._callback_((function(value){
 return smalltalk.withContext(function($ctx2) {
 self._input_(value);
-$12=self._executeCommand();
-return $12;
+$9=self._executeCommand();
+return $9;
 }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,1)})}));
-$13=_st($2)._yourself();
-$1=$13;
+$10=_st($2)._yourself();
+$1=$10;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputWidget",{},smalltalk.HLBindingAction)})},
 args: [],
@@ -976,7 +973,7 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$6,$8,$10,$9,$7,$5,$11,$12,$13,$3,$14;
+var $1,$2,$4,$6,$8,$10,$9,$7,$5,$11,$12,$13,$3;
 $1=self["@wrapper"];
 if(($receiver = $1) == nil || $receiver == null){
 self["@wrapper"]=_st(html)._span();
@@ -1021,8 +1018,7 @@ return self["@messageTag"];
 $ctx1.sendIdx["with:"]=1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-$14=_st(self["@input"])._asJQuery();
-return _st($14)._focus();
+return _st(_st(self["@input"])._asJQuery())._focus();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLBindingActionInputWidget)})},
 args: ["html"],
@@ -1206,7 +1202,7 @@ function $HLCloseTabCommand(){return smalltalk.HLCloseTabCommand||(typeof HLClos
 function $HLSwitchTabCommand(){return smalltalk.HLSwitchTabCommand||(typeof HLSwitchTabCommand=="undefined"?nil:HLSwitchTabCommand)}
 function $HLOpenCommand(){return smalltalk.HLOpenCommand||(typeof HLOpenCommand=="undefined"?nil:HLOpenCommand)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6,$8,$9;
+var $1,$2,$4,$3,$5,$6;
 $1=_st($HLBindingGroup())._new();
 $ctx1.sendIdx["new"]=1;
 $2=$1;
@@ -1216,15 +1212,12 @@ $3=_st($4)._asBinding();
 $ctx1.sendIdx["asBinding"]=1;
 _st($2)._add_($3);
 $ctx1.sendIdx["add:"]=1;
-$5=$1;
-$7=_st($HLSwitchTabCommand())._new();
-$6=_st($7)._asBinding();
-_st($5)._add_($6);
-$8=_st($1)._yourself();
-group=$8;
+_st($1)._add_(_st(_st($HLSwitchTabCommand())._new())._asBinding());
+$5=_st($1)._yourself();
+group=$5;
 _st($HLOpenCommand())._registerConcreteClassesOn_(group);
-$9=group;
-return $9;
+$6=group;
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"defaultBindings",{group:group},smalltalk.HLKeyBinder)})},
 args: [],
 source: "defaultBindings\x0a\x09| group |\x0a\x09\x0a\x09group := HLBindingGroup new\x0a\x09\x09add: HLCloseTabCommand new asBinding;\x0a\x09\x09add: HLSwitchTabCommand new asBinding;\x0a\x09\x09yourself.\x0a\x09\x09\x0a\x09HLOpenCommand registerConcreteClassesOn: group.\x0a\x09\x09\x09\x09\x0a\x09^ group",
@@ -1272,16 +1265,14 @@ category: 'events',
 fn: function (event){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1,$6;
+var $3,$2,$1,$4;
 $3=_st(event)._which();
 $ctx1.sendIdx["which"]=1;
 $2=_st($3).__eq(self._escapeKey());
 $ctx1.sendIdx["="]=1;
 $1=_st($2)._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=_st(event)._which();
-$4=_st($5).__eq((71));
-return _st($4)._and_((function(){
+return _st(_st(_st(event)._which()).__eq((71)))._and_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(event)._ctrlKey();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
@@ -1291,8 +1282,8 @@ self._deactivate();
 _st(event)._preventDefault();
 return false;
 };
-$6=self._handleBindingFor_(event);
-return $6;
+$4=self._handleBindingFor_(event);
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"handleActiveKeyDown:",{event:event},smalltalk.HLKeyBinder)})},
 args: ["event"],
 source: "handleActiveKeyDown: event\x0a\x0a\x09\x22ESC or ctrl+g deactivate the keyBinder\x22\x0a\x09(event which = self escapeKey or: [\x0a\x09\x09event which = 71 and: [ event ctrlKey ] ])\x0a        \x09ifTrue: [ \x0a            \x09self deactivate.\x0a\x09\x09\x09\x09event preventDefault.\x0a\x09\x09\x09\x09^ false ].\x0a            \x0a    \x22Handle the keybinding\x22\x0a    ^ self handleBindingFor: event",
@@ -1704,13 +1695,12 @@ category: 'rendering',
 fn: function (aBindingGroup,html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 _st(_st(_st(aBindingGroup)._activeBindings())._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(a)._key();
 $ctx2.sendIdx["key"]=1;
-$2=_st(b)._key();
-return _st($1).__lt($2);
+return _st($1).__lt(_st(b)._key());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._renderBindingActionFor_on_(each,html);
@@ -1867,7 +1857,7 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$5,$7,$6,$4,$2,$8,$9;
+var $1,$3,$5,$6,$4,$2,$7;
 $1="#helper"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._remove();
@@ -1876,19 +1866,17 @@ return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._div();
 _st($3)._id_("helper");
 $5=$3;
-$7="Press ".__comma(_st(self._keyBinder())._activationKeyLabel());
-$6=_st($7).__comma(" to start");
+$6=_st("Press ".__comma(_st(self._keyBinder())._activationKeyLabel())).__comma(" to start");
 $ctx2.sendIdx[","]=1;
 $4=_st($5)._with_($6);
 return $4;
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
-$8="body"._asJQuery();
+$7="body"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=2;
-_st($2)._appendToJQuery_($8);
+_st($2)._appendToJQuery_($7);
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-$9="#helper"._asJQuery();
-return _st($9)._fadeOut_((1000));
+return _st("#helper"._asJQuery())._fadeOut_((1000));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((2000));
 return self}, function($ctx1) {$ctx1.fill(self,"renderStart",{},smalltalk.HLKeyBinderHelperWidget)})},
 args: [],
@@ -1956,7 +1944,7 @@ category: 'actions',
 fn: function (aWidget){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$6,$5,$4;
+var $3,$2,$1;
 $3=self._mainId();
 $ctx1.sendIdx["mainId"]=1;
 $2="#".__comma($3);
@@ -1964,10 +1952,7 @@ $ctx1.sendIdx[","]=1;
 $1=_st($2)._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._empty();
-$6=self._mainId();
-$5="#".__comma($6);
-$4=_st($5)._asJQuery();
-_st(aWidget)._appendToJQuery_($4);
+_st(aWidget)._appendToJQuery_(_st("#".__comma(self._mainId()))._asJQuery());
 return self}, function($ctx1) {$ctx1.fill(self,"showWidget:",{aWidget:aWidget},smalltalk.HLKeyBinderHelperWidget)})},
 args: ["aWidget"],
 source: "showWidget: aWidget\x0a\x09\x22Some actions need to display more info to the user or request input.\x0a\x09This method is the right place for that\x22\x0a\x09\x0a\x09('#', self mainId) asJQuery empty.\x0a\x09aWidget appendToJQuery: ('#', self mainId) asJQuery",

+ 16 - 30
js/Helios-Layout.js

@@ -354,7 +354,7 @@ fn: function (anInteger){
 var self=this;
 var container,size,offset,percentage;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$6,$7,$5,$4,$8,$10,$9,$11,$14,$13,$12,$15,$18,$17,$16;
+var $1,$3,$2,$6,$7,$5,$4,$8,$10,$9,$11,$14,$13,$12;
 $1=_st(self["@firstPane"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 container=_st($1)._parent();
@@ -389,11 +389,7 @@ $12=_st($13).__comma("%");
 $ctx1.sendIdx[","]=2;
 _st($11)._css_put_("top",$12);
 $ctx1.sendIdx["css:put:"]=2;
-$15=_st(self["@secondPane"])._asJQuery();
-$18=(100).__minus(percentage);
-$17=_st($18)._asString();
-$16=_st($17).__comma("%");
-_st($15)._css_put_("top",$16);
+_st(_st(self["@secondPane"])._asJQuery())._css_put_("top",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
 return self}, function($ctx1) {$ctx1.fill(self,"resize:",{anInteger:anInteger,container:container,size:size,offset:offset,percentage:percentage},smalltalk.HLHorizontalSplitter)})},
 args: ["anInteger"],
 source: "resize: anInteger\x0a\x09| container size offset percentage |\x0a    \x0a    container := firstPane asJQuery parent.\x0a\x09offset := firstPane asJQuery offset top.\x0a    size := container height.\x0a\x09\x0a\x09percentage := (size - (anInteger - offset)) / size * 100.\x0a\x09percentage := 80 min: (percentage max: 20).\x0a\x09\x0a    firstPane asJQuery css: 'bottom' put: percentage asString, '%'.\x0a\x09\x0a\x09splitter asJQuery css: 'top' put: (100 - percentage) asString, '%'.\x0a\x09secondPane asJQuery css: 'top' put: (100 - percentage) asString, '%'",
@@ -409,27 +405,24 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$6,$5,$4,$7,$8,$9,$2;
+var $1,$3,$4,$5,$6,$2;
 $1=_st(self["@splitter"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 $3="axis".__minus_gt("y");
 $ctx1.sendIdx["->"]=1;
-$6=_st(self["@splitter"])._asJQuery();
-$5=_st($6)._parent();
-$4="containment".__minus_gt($5);
+$4="containment".__minus_gt(_st(_st(self["@splitter"])._asJQuery())._parent());
 $ctx1.sendIdx["->"]=2;
-$7="helper".__minus_gt("clone");
+$5="helper".__minus_gt("clone");
 $ctx1.sendIdx["->"]=3;
-$8="start".__minus_gt((function(e,ui){
+$6="start".__minus_gt((function(e,ui){
 return smalltalk.withContext(function($ctx2) {
 return self._startResizing_(_st(ui)._helper());
 }, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,1)})}));
 $ctx1.sendIdx["->"]=4;
-$9="drag".__minus_gt((function(e,ui){
+$2=smalltalk.HashedCollection._from_([$3,$4,$5,$6,"drag".__minus_gt((function(e,ui){
 return smalltalk.withContext(function($ctx2) {
 return self._resize_(_st(_st(ui)._offset())._top());
-}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}));
-$2=smalltalk.HashedCollection._from_([$3,$4,$7,$8,$9]);
+}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}))]);
 _st($1)._draggable_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLHorizontalSplitter)})},
 args: [],
@@ -518,7 +511,7 @@ fn: function (anInteger){
 var self=this;
 var container,size,offset,percentage;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$6,$7,$5,$4,$8,$10,$9,$11,$14,$13,$12,$15,$18,$17,$16;
+var $1,$3,$2,$6,$7,$5,$4,$8,$10,$9,$11,$14,$13,$12;
 $1=_st(self["@firstPane"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 container=_st($1)._parent();
@@ -553,11 +546,7 @@ $12=_st($13).__comma("%");
 $ctx1.sendIdx[","]=2;
 _st($11)._css_put_("left",$12);
 $ctx1.sendIdx["css:put:"]=2;
-$15=_st(self["@secondPane"])._asJQuery();
-$18=(100).__minus(percentage);
-$17=_st($18)._asString();
-$16=_st($17).__comma("%");
-_st($15)._css_put_("left",$16);
+_st(_st(self["@secondPane"])._asJQuery())._css_put_("left",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
 return self}, function($ctx1) {$ctx1.fill(self,"resize:",{anInteger:anInteger,container:container,size:size,offset:offset,percentage:percentage},smalltalk.HLVerticalSplitter)})},
 args: ["anInteger"],
 source: "resize: anInteger\x0a\x09| container size offset percentage |\x0a    \x0a    container := firstPane asJQuery parent.\x0a\x09offset := firstPane asJQuery offset left.\x0a    size := container width.\x0a\x09\x0a\x09percentage := (size - (anInteger - offset)) / size * 100.\x0a\x09percentage := 80 min: (percentage max: 20).\x0a\x09\x0a    firstPane asJQuery css: 'right' put: percentage asString, '%'.\x0a\x09\x0a\x09splitter asJQuery css: 'left' put: (100 - percentage) asString, '%'.\x0a\x09secondPane asJQuery css: 'left' put: (100 - percentage) asString, '%'",
@@ -573,27 +562,24 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$6,$5,$4,$7,$8,$9,$2;
+var $1,$3,$4,$5,$6,$2;
 $1=_st(self["@splitter"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 $3="axis".__minus_gt("x");
 $ctx1.sendIdx["->"]=1;
-$6=_st(self["@splitter"])._asJQuery();
-$5=_st($6)._parent();
-$4="containment".__minus_gt($5);
+$4="containment".__minus_gt(_st(_st(self["@splitter"])._asJQuery())._parent());
 $ctx1.sendIdx["->"]=2;
-$7="helper".__minus_gt("clone");
+$5="helper".__minus_gt("clone");
 $ctx1.sendIdx["->"]=3;
-$8="start".__minus_gt((function(e,ui){
+$6="start".__minus_gt((function(e,ui){
 return smalltalk.withContext(function($ctx2) {
 return self._startResizing_(_st(ui)._helper());
 }, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,1)})}));
 $ctx1.sendIdx["->"]=4;
-$9="drag".__minus_gt((function(e,ui){
+$2=smalltalk.HashedCollection._from_([$3,$4,$5,$6,"drag".__minus_gt((function(e,ui){
 return smalltalk.withContext(function($ctx2) {
 return self._resize_(_st(_st(ui)._offset())._left());
-}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}));
-$2=smalltalk.HashedCollection._from_([$3,$4,$7,$8,$9]);
+}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}))]);
 _st($1)._draggable_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLVerticalSplitter)})},
 args: [],

+ 7 - 11
js/Helios-References.js

@@ -298,21 +298,19 @@ function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="unde
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $5,$4,$6,$3,$2,$1,$7;
+var $5,$4,$3,$2,$1;
 $5=self._sendersListWidget();
 $ctx1.sendIdx["sendersListWidget"]=1;
 $4=_st($HLVerticalSplitter())._with_with_($5,self._implementorsListWidget());
 $ctx1.sendIdx["with:with:"]=3;
-$6=_st($HLVerticalSplitter())._with_with_(self._classReferencesListWidget(),self._regexpListWidget());
-$3=_st($HLVerticalSplitter())._with_with_($4,$6);
+$3=_st($HLVerticalSplitter())._with_with_($4,_st($HLVerticalSplitter())._with_with_(self._classReferencesListWidget(),self._regexpListWidget()));
 $ctx1.sendIdx["with:with:"]=2;
 $2=_st($HLHorizontalSplitter())._with_with_($3,self._sourceCodeWidget());
 $ctx1.sendIdx["with:with:"]=1;
 $1=_st($HLContainer())._with_($2);
 _st(html)._with_($1);
 $ctx1.sendIdx["with:"]=1;
-$7=self._sendersListWidget();
-_st($7)._focus();
+_st(self._sendersListWidget())._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLReferences)})},
 args: ["html"],
 source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a    \x09with: (HLVerticalSplitter\x0a        \x09with: (HLVerticalSplitter\x0a            \x09with: self sendersListWidget\x0a                with: self implementorsListWidget)\x0a            with: (HLVerticalSplitter\x0a            \x09with: self classReferencesListWidget\x0a                with: self regexpListWidget)) \x0a        with: self sourceCodeWidget)).\x0a\x09\x0a\x09self sendersListWidget focus",
@@ -544,7 +542,7 @@ category: 'reactions',
 fn: function (aMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3;
+var $1,$2,$3;
 var $early={};
 try {
 if(($receiver = aMethod) == nil || $receiver == null){
@@ -564,8 +562,7 @@ throw $early=[self];
 $2=_st(aMethod)._selector();
 $ctx1.sendIdx["selector"]=2;
 self._selectedItem_($2);
-$4=_st(aMethod)._selector();
-$3=self._activateItem_($4);
+$3=self._activateItem_(_st(aMethod)._selector());
 return self}
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
@@ -599,9 +596,8 @@ category: 'rendering',
 fn: function (aMethod,html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #");
-$1=_st($2).__comma(_st(aMethod)._selector());
+var $1;
+$1=_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector());
 $ctx1.sendIdx[","]=1;
 _st(html)._with_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},

+ 2 - 3
js/Helios-Workspace-Tests.js

@@ -12,13 +12,12 @@ var self=this;
 function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(_st($HLCodeWidget())._pcKeyMap())._isKindOf_($HashedCollection());
 $ctx1.sendIdx["isKindOf:"]=1;
 self._assert_($1);
 $ctx1.sendIdx["assert:"]=1;
-$2=_st(_st($HLCodeWidget())._macKeyMap())._isKindOf_($HashedCollection());
-self._assert_($2);
+self._assert_(_st(_st($HLCodeWidget())._macKeyMap())._isKindOf_($HashedCollection()));
 return self}, function($ctx1) {$ctx1.fill(self,"testKeyMap",{},smalltalk.HLCodeWidgetTest)})},
 args: [],
 source: "testKeyMap\x0a\x09\x22Key maps are a collection of associations.\x22\x0a\x09self assert: (HLCodeWidget pcKeyMap isKindOf: HashedCollection).\x0a\x09self assert: (HLCodeWidget macKeyMap isKindOf: HashedCollection)",

+ 60 - 102
js/Helios-Workspace.js

@@ -241,12 +241,11 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._editor();
 $ctx1.sendIdx["editor"]=1;
 _st($1)._at_put_("amberCodeWidget",self);
-$2=self._editor();
-_st($2)._on_do_("change",(function(){
+_st(self._editor())._on_do_("change",(function(){
 return smalltalk.withContext(function($ctx2) {
 return self._onChange();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -350,7 +349,7 @@ var result;
 function $HLDoItRequested(){return smalltalk.HLDoItRequested||(typeof HLDoItRequested=="undefined"?nil:HLDoItRequested)}
 function $HLDoItExecuted(){return smalltalk.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$5,$4,$6,$7;
+var $2,$1,$3,$4;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._announcer();
@@ -360,12 +359,9 @@ $ctx1.sendIdx["on:"]=1;
 _st($1)._announce_($3);
 $ctx1.sendIdx["announce:"]=1;
 result=_st(self["@model"])._doIt_(self._currentLineOrSelection());
-$5=self._model();
-$4=_st($5)._announcer();
-$6=_st($HLDoItExecuted())._on_(self["@model"]);
-_st($4)._announce_($6);
-$7=result;
-return $7;
+_st(_st(self._model())._announcer())._announce_(_st($HLDoItExecuted())._on_(self["@model"]));
+$4=result;
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},smalltalk.HLCodeWidget)})},
 args: [],
 source: "doIt\x0a\x09| result |\x0a\x0a\x09self model announcer announce: (HLDoItRequested on: model).\x0a\x09result := model doIt: self currentLineOrSelection.\x0a\x09self model announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result",
@@ -399,7 +395,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$6,$7,$8,$9,$12,$11,$10,$1;
+var $2,$3,$4,$5,$6,$7,$8,$9,$10,$1;
 $2="theme".__minus_gt("amber");
 $ctx1.sendIdx["->"]=1;
 $3="lineNumbers".__minus_gt(true);
@@ -416,9 +412,7 @@ $8="electricChars".__minus_gt(false);
 $ctx1.sendIdx["->"]=7;
 $9="keyMap".__minus_gt("Amber");
 $ctx1.sendIdx["->"]=8;
-$12="Shift-Space".__minus_gt("autocomplete");
-$11=smalltalk.HashedCollection._from_([$12]);
-$10="extraKeys".__minus_gt($11);
+$10="extraKeys".__minus_gt(smalltalk.HashedCollection._from_(["Shift-Space".__minus_gt("autocomplete")]));
 $ctx1.sendIdx["->"]=9;
 $1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10]);
 return $1;
@@ -489,13 +483,12 @@ var self=this;
 var newInspector;
 function $HLInspectItRequested(){return smalltalk.HLInspectItRequested||(typeof HLInspectItRequested=="undefined"?nil:HLInspectItRequested)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $2,$1;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._announcer();
 _st($1)._announce_(_st($HLInspectItRequested())._on_(self["@model"]));
-$3=self._model();
-_st($3)._inspect_(self._doIt());
+_st(self._model())._inspect_(self._doIt());
 return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{newInspector:newInspector},smalltalk.HLCodeWidget)})},
 args: [],
 source: "inspectIt\x0a\x09| newInspector |\x0a       \x0a\x09self model announcer announce: (HLInspectItRequested on: model).\x0a\x09self model inspect: self doIt",
@@ -512,7 +505,7 @@ fn: function (anEditor,aToken){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $1=_st(_st(_st(_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value())._asArray())._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(aToken)._string();
@@ -520,8 +513,7 @@ $ctx2.sendIdx["string"]=1;
 return _st(each)._includesSubString_($2);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._reject_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$3=_st(aToken)._string();
-return _st(each).__eq($3);
+return _st(each).__eq(_st(aToken)._string());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageHintFor:token:",{anEditor:anEditor,aToken:aToken},smalltalk.HLCodeWidget)})},
@@ -661,7 +653,7 @@ var self=this;
 var start,stop,currentLine;
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$6,$7,$8,$10,$11,$9,$12,$15,$16,$14,$13,$17,$21,$20,$19,$18,$22,$23;
+var $1,$2,$4,$3,$5,$6,$7,$8,$10,$9,$11,$12,$13,$15,$14;
 $1=_st(self["@editor"])._getCursor_(false);
 $ctx1.sendIdx["getCursor:"]=1;
 currentLine=_st($1)._line();
@@ -687,32 +679,24 @@ $ctx2.sendIdx["at:put:"]=3;
 $8=self["@editor"];
 $10="line".__minus_gt(currentLine);
 $ctx2.sendIdx["->"]=1;
-$11="ch".__minus_gt((0));
-$9=smalltalk.HashedCollection._from_([$10,$11]);
+$9=smalltalk.HashedCollection._from_([$10,"ch".__minus_gt((0))]);
 return _st($8)._setSelection_end_($9,start);
 $ctx2.sendIdx["setSelection:end:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 stop=_st($HashedCollection())._new();
 _st(stop)._at_put_("line",currentLine);
 $ctx1.sendIdx["at:put:"]=4;
-$12=stop;
-$15=_st(start)._at_("ch");
-$16=_st(aString)._size();
-$14=_st($15).__plus($16);
-$13=_st($14).__plus((2));
+$11=stop;
+$12=_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2));
 $ctx1.sendIdx["+"]=1;
-_st($12)._at_put_("ch",$13);
-$17=self["@editor"];
-$21=_st(self["@editor"])._getSelection();
-$20=_st($21).__comma(" ");
-$19=_st($20).__comma(aString);
+_st($11)._at_put_("ch",$12);
+$13=self["@editor"];
+$15=_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
 $ctx1.sendIdx[","]=2;
-$18=_st($19).__comma(" ");
+$14=_st($15).__comma(" ");
 $ctx1.sendIdx[","]=1;
-_st($17)._replaceSelection_($18);
-$22=self["@editor"];
-$23=_st(self["@editor"])._getCursor_(true);
-_st($22)._setCursor_($23);
+_st($13)._replaceSelection_($14);
+_st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
 _st(self["@editor"])._setSelection_end_(stop,start);
 return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},smalltalk.HLCodeWidget)})},
 args: ["aString"],
@@ -985,15 +969,14 @@ category: 'updating',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._hasModification();
 if(smalltalk.assert($1)){
 $2=_st(self["@state"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($2)._addClass_("modified");
 } else {
-$3=_st(self["@state"])._asJQuery();
-_st($3)._removeClass_("modified");
+_st(_st(self["@state"])._asJQuery())._removeClass_("modified");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"updateState",{},smalltalk.HLCodeWidget)})},
 args: [],
@@ -1012,43 +995,39 @@ var self=this;
 var variables,classNames,pseudoVariables;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$6,$5,$7,$13,$12,$11,$10,$14,$9,$15,$8;
+var $3,$2,$1,$5,$4,$10,$9,$8,$11,$7,$6;
 $3=_st(_st(_st(anEditor)._display())._wrapper())._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 $2=_st($3)._find_("span.cm-variable");
 $1=_st($2)._get();
 variables=_st($1)._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(each)._asJQuery();
-return _st($4)._html();
+return _st(_st(each)._asJQuery())._html();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 $ctx1.sendIdx["collect:"]=1;
-$6=_st($Smalltalk())._current();
+$5=_st($Smalltalk())._current();
 $ctx1.sendIdx["current"]=1;
-$5=_st($6)._classes();
-classNames=_st($5)._collect_((function(each){
+$4=_st($5)._classes();
+classNames=_st($4)._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._name();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$7=_st($Smalltalk())._current();
-pseudoVariables=_st($7)._pseudoVariableNames();
-$13=_st(variables).__comma(classNames);
-$12=_st($13).__comma(pseudoVariables);
+pseudoVariables=_st(_st($Smalltalk())._current())._pseudoVariableNames();
+$10=_st(_st(variables).__comma(classNames)).__comma(pseudoVariables);
 $ctx1.sendIdx[","]=1;
-$11=_st($12)._asSet();
-$10=_st($11)._asArray();
-$9=_st($10)._select_((function(each){
+$9=_st($10)._asSet();
+$8=_st($9)._asArray();
+$7=_st($8)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$14=_st(aToken)._string();
+$11=_st(aToken)._string();
 $ctx2.sendIdx["string"]=1;
-return _st(each)._includesSubString_($14);
+return _st(each)._includesSubString_($11);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
-$8=_st($9)._reject_((function(each){
+$6=_st($7)._reject_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$15=_st(aToken)._string();
-return _st(each).__eq($15);
+return _st(each).__eq(_st(aToken)._string());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
-return $8;
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken,variables:variables,classNames:classNames,pseudoVariables:pseudoVariables},smalltalk.HLCodeWidget)})},
 args: ["anEditor", "aToken"],
 source: "variableHintFor: anEditor token: aToken\x0a\x09| variables classNames pseudoVariables |\x0a\x09\x0a\x09variables := (anEditor display wrapper asJQuery find: 'span.cm-variable') get\x0a\x09\x09collect: [ :each | each asJQuery html ].\x0a\x09\x0a\x09classNames := Smalltalk current classes collect: [ :each | each name ].\x0a\x09pseudoVariables := Smalltalk current pseudoVariableNames.\x0a\x09\x0a\x09^ ((variables, classNames, pseudoVariables) asSet asArray \x0a\x09\x09select: [ :each | each includesSubString: aToken string ])\x0a\x09\x09reject: [ :each | each = aToken string ]",
@@ -1068,7 +1047,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,$5,$7,$10,$11,$9,$8,$14,$15,$13,$12,$6;
+var $1,$4,$3,$2,$5,$7,$10,$11,$9,$8,$6;
 cursor=_st(anEditor)._getCursor();
 token=_st(anEditor)._getTokenAt_(cursor);
 $1=token;
@@ -1094,11 +1073,7 @@ $9=_st($10)._value_value_($11,_st(token)._end());
 $ctx1.sendIdx["value:value:"]=2;
 $8="from".__minus_gt($9);
 $ctx1.sendIdx["->"]=2;
-$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]);
+$6=smalltalk.HashedCollection._from_([$7,$8,"to".__minus_gt(_st(_st($CodeMirror())._basicAt_("Pos"))._value_value_(_st(cursor)._line(),_st(token)._start()))]);
 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"],
@@ -1159,7 +1134,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$1;
+var $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$1;
 $2="Alt-Backspace".__minus_gt("delWordBefore");
 $ctx1.sendIdx["->"]=1;
 $3="Alt-Delete".__minus_gt("delWordAfter");
@@ -1210,8 +1185,7 @@ $25="Shift-Cmd-G".__minus_gt("findPrev");
 $ctx1.sendIdx["->"]=24;
 $26="Shift-Cmd-Z".__minus_gt("redo");
 $ctx1.sendIdx["->"]=25;
-$27="fallthrough".__minus_gt(["basic","emacsy"]);
-$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27]);
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,"fallthrough".__minus_gt(["basic","emacsy"])]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"macKeyMap",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1246,7 +1220,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$1;
+var $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$1;
 $2="Alt-Left".__minus_gt("goLineStart");
 $ctx1.sendIdx["->"]=1;
 $3="Alt-Right".__minus_gt("goLineEnd");
@@ -1297,8 +1271,7 @@ $25="Shift-Ctrl-R".__minus_gt("replaceAll");
 $ctx1.sendIdx["->"]=24;
 $26="Shift-Ctrl-Z".__minus_gt("redo");
 $ctx1.sendIdx["->"]=25;
-$27="fallthrough".__minus_gt(["basic"]);
-$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27]);
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,"fallthrough".__minus_gt(["basic"])]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"pcKeyMap",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1337,7 +1310,7 @@ fn: function (){
 var self=this;
 function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$5;
+var $1,$2,$3,$4,$5;
 $1=_st($CodeMirror())._basicAt_("commands");
 _st($1)._at_put_("doIt",(function(cm){
 return smalltalk.withContext(function($ctx2) {
@@ -1362,8 +1335,7 @@ return _st($4)._printIt();
 $ctx1.sendIdx["at:put:"]=3;
 $5=_st($1)._at_put_("saveIt",(function(cm){
 return smalltalk.withContext(function($ctx2) {
-$6=_st(cm)._amberCodeWidget();
-return _st($6)._saveIt();
+return _st(_st(cm)._amberCodeWidget())._saveIt();
 }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,4)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"setupCommands",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1777,7 +1749,7 @@ fn: function (anAnnouncement){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4,$9,$8,$7,$10,$6;
+var $3,$2,$1,$5,$4,$7,$6;
 method=_st(anAnnouncement)._method();
 $3=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
@@ -1796,12 +1768,9 @@ return self;
 } else {
 $4;
 };
-$9=self._browserModel();
-$8=_st($9)._selectedMethod();
-$7=_st($8)._selector();
+$7=_st(_st(self._browserModel())._selectedMethod())._selector();
 $ctx1.sendIdx["selector"]=1;
-$10=_st(method)._selector();
-$6=_st($7).__eq($10);
+$6=_st($7).__eq(_st(method)._selector());
 if(! smalltalk.assert($6)){
 return self;
 };
@@ -1877,7 +1846,7 @@ var self=this;
 var lineIndex,newContents;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$7,$6,$5,$4;
+var $1,$3,$2,$6,$5,$4;
 lineIndex=(1);
 self._contents_(_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
@@ -1897,8 +1866,7 @@ _st(stream)._nextPutAll_(_st(anAnnouncement)._message());
 $ctx3.sendIdx["nextPutAll:"]=3;
 _st(stream)._nextPutAll_(" ");
 $ctx3.sendIdx["nextPutAll:"]=4;
-$7=_st(anAnnouncement)._column();
-$6=_st($7).__plus((1));
+$6=_st(_st(anAnnouncement)._column()).__plus((1));
 $ctx3.sendIdx["+"]=1;
 $5=_st(each)._copyFrom_to_($6,_st(each)._size());
 $4=_st(stream)._nextPutAll_($5);
@@ -1928,7 +1896,7 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$6,$5,$4;
+var $2,$1,$3;
 $2=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
 $1=_st($2)._selectedClass();
@@ -1940,10 +1908,7 @@ return $3;
 } else {
 $1;
 };
-$6=self._browserModel();
-$5=_st($6)._selectedClass();
-$4=_st($5)._definition();
-self._contents_($4);
+self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLBrowserCodeWidget)})},
 args: ["anAnnouncement"],
 source: "onProtocolSelected: anAnnouncement\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a    self contents: self browserModel selectedClass definition",
@@ -1975,7 +1940,7 @@ category: 'reactions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$6,$5,$4;
+var $2,$1,$3;
 $2=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
 $1=_st($2)._selectedClass();
@@ -1987,10 +1952,7 @@ return $3;
 } else {
 $1;
 };
-$6=self._browserModel();
-$5=_st($6)._selectedClass();
-$4=_st($5)._definition();
-self._contents_($4);
+self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLBrowserCodeWidget)})},
 args: [],
 source: "onShowInstanceToggled\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a    \x0a    self contents: self browserModel selectedClass definition",
@@ -2135,16 +2097,14 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 smalltalk.HLBrowserCodeWidget.superclass.fn.prototype._unregsiter.apply(_st(self), []);
 $2=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
 $1=_st($2)._announcer();
 _st($1)._unsubscribe_(self);
 $ctx1.sendIdx["unsubscribe:"]=1;
-$4=self._browserModel();
-$3=_st($4)._systemAnnouncer();
-_st($3)._unsubscribe_(self);
+_st(_st(self._browserModel())._systemAnnouncer())._unsubscribe_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLBrowserCodeWidget)})},
 args: [],
 source: "unregister\x0a\x09super unregsiter.\x0a\x09\x0a\x09self browserModel announcer unsubscribe: self.\x0a\x09self browserModel systemAnnouncer unsubscribe: self",
@@ -2261,12 +2221,10 @@ var self=this;
 function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._codeWidget(),(function(canvas){
+_st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._codeWidget(),(function(canvas){
 return smalltalk.withContext(function($ctx2) {
 return self._renderTranscriptOn_(canvas);
-}, function($ctx2) {$ctx2.fillBlock({canvas:canvas},$ctx1,1)})})));
-_st(html)._with_($1);
+}, function($ctx2) {$ctx2.fillBlock({canvas:canvas},$ctx1,1)})}))));
 $ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWorkspace)})},
 args: ["html"],

File diff suppressed because it is too large
+ 149 - 226
js/IDE.js


+ 66 - 100
js/Importer-Exporter.js

@@ -159,13 +159,12 @@ category: 'output',
 fn: function (aCategory,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2;
+var $1,$3,$2;
 $1="!".__comma(self._classNameFor_(_st(aCategory)._theClass()));
 $ctx1.sendIdx[","]=1;
 _st(aStream)._nextPutAll_($1);
 $ctx1.sendIdx["nextPutAll:"]=1;
-$4=" methodsFor: '".__comma(_st(aCategory)._name());
-$3=_st($4).__comma("'!");
+$3=_st(" methodsFor: '".__comma(_st(aCategory)._name())).__comma("'!");
 $ctx1.sendIdx[","]=2;
 $2=_st(aStream)._nextPutAll_($3);
 return self}, function($ctx1) {$ctx1.fill(self,"exportCategoryPrologueOf:on:",{aCategory:aCategory,aStream:aStream},smalltalk.ChunkExporter)})},
@@ -183,7 +182,7 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$6,$5,$7,$9,$8,$12,$11,$10,$15,$14,$13,$16;
+var $1,$3,$2,$4,$6,$5,$7,$9,$8,$11,$10,$12;
 $1=self._classNameFor_(_st(aClass)._superclass());
 $ctx1.sendIdx["classNameFor:"]=1;
 _st(aStream)._nextPutAll_($1);
@@ -226,8 +225,7 @@ $9=_st(aClass)._comment();
 $ctx1.sendIdx["comment"]=1;
 $8=_st($9)._notEmpty();
 if(smalltalk.assert($8)){
-$12=self._classNameFor_(aClass);
-$11="!".__comma($12);
+$11="!".__comma(self._classNameFor_(aClass));
 $ctx1.sendIdx[","]=5;
 $10=_st($11).__comma(" commentStamp!");
 $ctx1.sendIdx[","]=4;
@@ -235,13 +233,10 @@ _st(aStream)._nextPutAll_($10);
 $ctx1.sendIdx["nextPutAll:"]=8;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=4;
-$15=_st(aClass)._comment();
-$14=self._chunkEscape_($15);
-$13=_st($14).__comma("!");
-_st(aStream)._nextPutAll_($13);
-$16=_st(aStream)._lf();
+_st(aStream)._nextPutAll_(_st(self._chunkEscape_(_st(aClass)._comment())).__comma("!"));
+$12=_st(aStream)._lf();
 $ctx1.sendIdx["lf"]=5;
-$16;
+$12;
 };
 _st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
@@ -259,7 +254,7 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4,$6,$8,$7,$9;
+var $3,$2,$1,$5,$4,$6,$7;
 $3=_st(aClass)._class();
 $ctx1.sendIdx["class"]=1;
 $2=_st($3)._instanceVariableNames();
@@ -274,9 +269,7 @@ $ctx1.sendIdx["nextPutAll:"]=1;
 $6=_st(aStream)._nextPutAll_(" instanceVariableNames: '");
 $ctx1.sendIdx["nextPutAll:"]=2;
 $6;
-$8=_st(aClass)._class();
-$7=_st($8)._instanceVariableNames();
-_st($7)._do_separatedBy_((function(each){
+_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(each);
 $ctx2.sendIdx["nextPutAll:"]=3;
@@ -288,8 +281,8 @@ $ctx2.sendIdx["nextPutAll:"]=4;
 _st(aStream)._nextPutAll_("'!");
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=1;
-$9=_st(aStream)._lf();
-$9;
+$7=_st(aStream)._lf();
+$7;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aClass", "aStream"],
@@ -330,7 +323,7 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 self._exportPackageDefinitionOf_on_(aPackage,aStream);
 _st(_st(aPackage)._sortedClasses())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
@@ -340,8 +333,7 @@ $ctx2.sendIdx["ownMethodProtocolsOfClass:"]=1;
 self._exportProtocols_on_($1,aStream);
 $ctx2.sendIdx["exportProtocols:on:"]=1;
 self._exportMetaDefinitionOf_on_(each,aStream);
-$2=self._ownMethodProtocolsOfClass_(_st(each)._class());
-return self._exportProtocols_on_($2,aStream);
+return self._exportProtocols_on_(self._ownMethodProtocolsOfClass_(_st(each)._class()),aStream);
 $ctx2.sendIdx["exportProtocols:on:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 self._exportProtocols_on_(self._extensionProtocolsOfPackage_(aPackage),aStream);
@@ -360,12 +352,11 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
-$2="Smalltalk current createPackage: '".__comma(_st(aPackage)._name());
-$1=_st($2).__comma("'!");
+var $1,$2;
+$1=_st("Smalltalk current createPackage: '".__comma(_st(aPackage)._name())).__comma("'!");
 $ctx1.sendIdx[","]=1;
 _st(aStream)._nextPutAll_($1);
-$3=_st(aStream)._lf();
+$2=_st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aPackage", "aStream"],
 source: "exportPackageDefinitionOf: aPackage on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'Smalltalk current createPackage: ''', aPackage name, '''!';\x0a\x09\x09lf",
@@ -422,13 +413,12 @@ category: 'output',
 fn: function (aProtocol,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2;
+var $1,$3,$2;
 $1="!".__comma(self._classNameFor_(_st(aProtocol)._theClass()));
 $ctx1.sendIdx[","]=1;
 _st(aStream)._nextPutAll_($1);
 $ctx1.sendIdx["nextPutAll:"]=1;
-$4=" methodsFor: '".__comma(_st(aProtocol)._name());
-$3=_st($4).__comma("'!");
+$3=_st(" methodsFor: '".__comma(_st(aProtocol)._name())).__comma("'!");
 $ctx1.sendIdx[","]=2;
 $2=_st(aStream)._nextPutAll_($3);
 return self}, function($ctx1) {$ctx1.fill(self,"exportProtocolPrologueOf:on:",{aProtocol:aProtocol,aStream:aStream},smalltalk.ChunkExporter)})},
@@ -624,7 +614,7 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4,$6,$8,$7,$9,$10,$12,$11,$13,$15,$14,$16;
+var $3,$2,$1,$5,$4,$6,$8,$7,$9,$11,$10,$12;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=1;
 _st(aStream)._nextPutAll_("smalltalk.addClass(");
@@ -660,30 +650,26 @@ $ctx2.sendIdx["nextPutAll:"]=6;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(aStream)._nextPutAll_("], '");
 $ctx1.sendIdx["nextPutAll:"]=7;
-$9=_st(_st(aClass)._category()).__comma("'");
-_st(aStream)._nextPutAll_($9);
+_st(aStream)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
 $ctx1.sendIdx["nextPutAll:"]=8;
-$10=_st(aStream)._nextPutAll_(");");
+$9=_st(aStream)._nextPutAll_(");");
 $ctx1.sendIdx["nextPutAll:"]=9;
-$12=_st(aClass)._comment();
+$11=_st(aClass)._comment();
 $ctx1.sendIdx["comment"]=1;
-$11=_st($12)._notEmpty();
-if(smalltalk.assert($11)){
+$10=_st($11)._notEmpty();
+if(smalltalk.assert($10)){
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=2;
 _st(aStream)._nextPutAll_("smalltalk.");
 $ctx1.sendIdx["nextPutAll:"]=10;
-$13=self._classNameFor_(aClass);
-_st(aStream)._nextPutAll_($13);
+_st(aStream)._nextPutAll_(self._classNameFor_(aClass));
 $ctx1.sendIdx["nextPutAll:"]=11;
 _st(aStream)._nextPutAll_(".comment=");
 $ctx1.sendIdx["nextPutAll:"]=12;
-$15=_st(aClass)._comment();
-$14=_st($15)._asJavascript();
-_st(aStream)._nextPutAll_($14);
+_st(aStream)._nextPutAll_(_st(_st(aClass)._comment())._asJavascript());
 $ctx1.sendIdx["nextPutAll:"]=13;
-$16=_st(aStream)._nextPutAll_(";");
-$16;
+$12=_st(aStream)._nextPutAll_(";");
+$12;
 };
 _st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
@@ -702,7 +688,7 @@ fn: function (aClass,aStream){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$6,$5,$4,$7,$9,$8,$11,$10,$13,$12;
+var $3,$2,$1,$6,$5,$4,$7,$9,$8;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=1;
 $3=_st(aClass)._class();
@@ -721,24 +707,20 @@ $ctx1.sendIdx["nextPutAll:"]=1;
 $7=_st(aStream)._nextPutAll_(".iVarNames = [");
 $ctx1.sendIdx["nextPutAll:"]=2;
 $7;
-$9=_st(aClass)._class();
-$8=_st($9)._instanceVariableNames();
-_st($8)._do_separatedBy_((function(each){
+_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$11="'".__comma(each);
+$9="'".__comma(each);
 $ctx2.sendIdx[","]=3;
-$10=_st($11).__comma("'");
+$8=_st($9).__comma("'");
 $ctx2.sendIdx[","]=2;
-return _st(aStream)._nextPutAll_($10);
+return _st(aStream)._nextPutAll_($8);
 $ctx2.sendIdx["nextPutAll:"]=3;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=4;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$13=_st($String())._lf();
-$12="];".__comma($13);
-_st(aStream)._nextPutAll_($12);
+_st(aStream)._nextPutAll_("];".__comma(_st($String())._lf()));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
 args: ["aClass", "aStream"],
@@ -755,7 +737,7 @@ category: 'output',
 fn: function (aMethod,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4,$7,$6,$10,$9,$8,$13,$12,$11,$16,$15,$14,$19,$18,$17,$20,$21;
+var $3,$2,$1,$5,$4,$7,$6,$10,$9,$8,$13,$12,$11,$16,$15,$14,$18,$17,$19;
 _st(aStream)._nextPutAll_("smalltalk.addMethod(");
 $ctx1.sendIdx["nextPutAll:"]=1;
 _st(aStream)._lf();
@@ -820,8 +802,7 @@ _st(aStream)._nextPutAll_($14);
 $ctx1.sendIdx["nextPutAll:"]=8;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=8;
-$19=_st(_st(aMethod)._referencedClasses())._asJavascript();
-$18="referencedClasses: ".__comma($19);
+$18="referencedClasses: ".__comma(_st(_st(aMethod)._referencedClasses())._asJavascript());
 $ctx1.sendIdx[","]=13;
 $17=_st(aStream)._nextPutAll_($18);
 $ctx1.sendIdx["nextPutAll:"]=9;
@@ -831,13 +812,12 @@ _st(aStream)._nextPutAll_("}),");
 $ctx1.sendIdx["nextPutAll:"]=10;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=10;
-$20="smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass()));
-_st(aStream)._nextPutAll_($20);
+_st(aStream)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass())));
 $ctx1.sendIdx["nextPutAll:"]=11;
 _st(aStream)._nextPutAll_(");");
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=11;
-$21=_st(aStream)._lf();
+$19=_st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.Exporter)})},
 args: ["aMethod", "aStream"],
 source: "exportMethod: aMethod on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.addMethod(';lf;\x0a\x09\x09\x22nextPutAll: aMethod selector asSelector asJavascript, ',';lf;\x22\x0a\x09\x09nextPutAll: 'smalltalk.method({';lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'category: ''', aMethod category, ''',';lf;\x0a\x09\x09nextPutAll: 'fn: ', aMethod fn compiledSource, ',';lf;\x0a\x09\x09nextPutAll: 'args: ', aMethod arguments asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'messageSends: ', aMethod messageSends asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ', aMethod referencedClasses asJavascript.\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '}),';lf;\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aMethod methodClass);\x0a\x09\x09nextPutAll: ');';lf;lf",
@@ -853,7 +833,7 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 self._exportPackagePrologueOf_on_(aPackage,aStream);
 self._exportPackageDefinitionOf_on_(aPackage,aStream);
 $1=self._exportPackageTransportOf_on_(aPackage,aStream);
@@ -869,8 +849,7 @@ $ctx3.sendIdx["exportMethod:on:"]=1;
 }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,2)})}));
 $ctx2.sendIdx["do:"]=2;
 self._exportMetaDefinitionOf_on_(each,aStream);
-$3=_st(_st(each)._class())._ownMethods();
-return _st($3)._do_((function(method){
+return _st(_st(_st(each)._class())._ownMethods())._do_((function(method){
 return smalltalk.withContext(function($ctx3) {
 return self._exportMethod_on_(method,aStream);
 $ctx3.sendIdx["exportMethod:on:"]=2;
@@ -898,14 +877,13 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $1,$2;
 _st(aStream)._nextPutAll_("smalltalk.addPackage(");
 $ctx1.sendIdx["nextPutAll:"]=1;
-$2="'".__comma(_st(aPackage)._name());
-$1=_st($2).__comma("');");
+$1=_st("'".__comma(_st(aPackage)._name())).__comma("');");
 $ctx1.sendIdx[","]=1;
 _st(aStream)._nextPutAll_($1);
-$3=_st(aStream)._lf();
+$2=_st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
 args: ["aPackage", "aStream"],
 source: "exportPackageDefinitionOf: aPackage on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.addPackage(';\x0a\x09\x09nextPutAll: '''', aPackage name, ''');';\x0a\x09\x09lf",
@@ -983,13 +961,12 @@ category: 'accessing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $1=_st(_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._selector();
 $ctx2.sendIdx["selector"]=1;
-$3=_st(b)._selector();
-return _st($2).__lt_eq($3);
+return _st($2).__lt_eq(_st(b)._selector());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._reject_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(each)._category())._match_("^\x5c*");
@@ -1032,7 +1009,7 @@ category: 'private',
 fn: function (anArray){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$1;
+var $2,$1;
 $1=_st(_st(anArray)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
 $2=self._amdNamespaceOfPackage_(each);
@@ -1040,9 +1017,7 @@ $ctx2.sendIdx["amdNamespaceOfPackage:"]=1;
 return _st($2)._notNil();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$4=self._amdNamespaceOfPackage_(each);
-$3=_st($4).__comma("/");
-return _st($3).__comma(_st(each)._name());
+return _st(_st(self._amdNamespaceOfPackage_(each)).__comma("/")).__comma(_st(each)._name());
 $ctx2.sendIdx[","]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 return $1;
@@ -1061,14 +1036,13 @@ category: 'private',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$5,$1;
+var $4,$3,$2,$1;
 $4=_st(aPackage)._transport();
 $ctx1.sendIdx["transport"]=1;
 $3=_st($4)._type();
 $2=_st($3).__eq("amd");
 if(smalltalk.assert($2)){
-$5=_st(aPackage)._transport();
-$1=_st($5)._namespace();
+$1=_st(_st(aPackage)._transport())._namespace();
 } else {
 $1=nil;
 };
@@ -1222,13 +1196,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $1=_st(_st(self._theClass())._methodsInProtocol_(self._name()))._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._selector();
 $ctx2.sendIdx["selector"]=1;
-$3=_st(b)._selector();
-return _st($2).__lt_eq($3);
+return _st($2).__lt_eq(_st(b)._selector());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methods",{},smalltalk.ExportMethodProtocol)})},
@@ -1387,7 +1360,7 @@ category: 'private',
 fn: function (aURL,aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$10,$9,$8,$7,$6,$1;
+var $2,$3,$4,$5,$8,$7,$6,$1;
 $2="url".__minus_gt(aURL);
 $ctx1.sendIdx["->"]=1;
 $3="type".__minus_gt("PUT");
@@ -1396,18 +1369,16 @@ $4="data".__minus_gt(aString);
 $ctx1.sendIdx["->"]=3;
 $5="contentType".__minus_gt("text/plain;charset=UTF-8");
 $ctx1.sendIdx["->"]=4;
-$6="error".__minus_gt((function(xhr){
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,"error".__minus_gt((function(xhr){
 return smalltalk.withContext(function($ctx2) {
-$10="Commiting ".__comma(aURL);
-$9=_st($10).__comma(" failed with reason: \x22");
+$8=_st("Commiting ".__comma(aURL)).__comma(" failed with reason: \x22");
 $ctx2.sendIdx[","]=3;
-$8=_st($9).__comma(_st(xhr)._responseText());
+$7=_st($8).__comma(_st(xhr)._responseText());
 $ctx2.sendIdx[","]=2;
-$7=_st($8).__comma("\x22");
+$6=_st($7).__comma("\x22");
 $ctx2.sendIdx[","]=1;
-return self._alert_($7);
-}, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1,1)})}));
-$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6]);
+return self._alert_($6);
+}, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1,1)})}))]);
 self._ajax_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.PackageHandler)})},
 args: ["aURL", "aString"],
@@ -1506,9 +1477,8 @@ category: 'committing',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st(self._commitPathJsFor_(aPackage)).__comma("/");
-$2=_st($3).__comma(_st(aPackage)._name());
+var $2,$1;
+$2=_st(_st(self._commitPathJsFor_(aPackage)).__comma("/")).__comma(_st(aPackage)._name());
 $ctx1.sendIdx[","]=2;
 $1=_st($2).__comma(".js");
 $ctx1.sendIdx[","]=1;
@@ -1560,9 +1530,8 @@ category: 'committing',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st(self._commitPathStFor_(aPackage)).__comma("/");
-$2=_st($3).__comma(_st(aPackage)._name());
+var $2,$1;
+$2=_st(_st(self._commitPathStFor_(aPackage)).__comma("/")).__comma(_st(aPackage)._name());
 $ctx1.sendIdx[","]=2;
 $1=_st($2).__comma(".st");
 $ctx1.sendIdx[","]=1;
@@ -2051,15 +2020,13 @@ category: 'registration',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1;
 $1=_st(aClass)._type();
 $ctx1.sendIdx["type"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=self["@registry"];
-$3=_st(aClass)._type();
-_st($2)._at_put_($3,aClass);
+_st(self["@registry"])._at_put_(_st(aClass)._type(),aClass);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"register:",{aClass:aClass},smalltalk.PackageTransport.klass)})},
 args: ["aClass"],
@@ -2153,15 +2120,14 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1;
+var $3,$2,$1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 _st(stream)._nextPutAll_(_st(self._class())._name());
 $ctx2.sendIdx["nextPutAll:"]=1;
 _st(stream)._nextPutAll_(" namespace: ");
 $ctx2.sendIdx["nextPutAll:"]=2;
-$4="'".__comma(self._namespace());
-$3=_st($4).__comma("'");
+$3=_st("'".__comma(self._namespace())).__comma("'");
 $ctx2.sendIdx[","]=1;
 $2=_st(stream)._nextPutAll_($3);
 return $2;

+ 2 - 5
js/Kernel-Announcements.js

@@ -102,7 +102,7 @@ fn: function (anAnnouncement){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$6,$7,$5,$1;
+var $3,$4,$2,$1;
 $3=_st($Smalltalk())._current();
 $ctx1.sendIdx["current"]=1;
 $4=_st(self._announcementClass())._name();
@@ -114,10 +114,7 @@ return false;
 } else {
 var class_;
 class_=$receiver;
-$6=_st($Smalltalk())._current();
-$7=_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name();
-$5=_st($6)._at_($7);
-$1=_st($5)._includesBehavior_(class_);
+$1=_st(_st(_st($Smalltalk())._current())._at_(_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name()))._includesBehavior_(class_);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},

+ 71 - 103
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,$10;
+var $2,$3,$1,$4,$5,$6,$7,$8;
 oldMethod=_st(self._methodDictionary())._at_ifAbsent_(_st(aMethod)._selector(),(function(){
 return smalltalk.withContext(function($ctx2) {
 return nil;
@@ -43,26 +43,24 @@ $3=_st(aMethod)._protocol();
 $ctx1.sendIdx["protocol"]=1;
 $1=_st($2)._includes_($3);
 if(! smalltalk.assert($1)){
-$4=self._organization();
-$5=_st(aMethod)._protocol();
-_st($4)._addElement_($5);
+_st(self._organization())._addElement_(_st(aMethod)._protocol());
 };
 self._basicAddCompiledMethod_(aMethod);
-$6=oldMethod;
-if(($receiver = $6) == nil || $receiver == null){
-$7=_st($MethodAdded())._new();
+$4=oldMethod;
+if(($receiver = $4) == nil || $receiver == null){
+$5=_st($MethodAdded())._new();
 $ctx1.sendIdx["new"]=1;
-_st($7)._method_(aMethod);
+_st($5)._method_(aMethod);
 $ctx1.sendIdx["method:"]=1;
-$8=_st($7)._yourself();
+$6=_st($5)._yourself();
 $ctx1.sendIdx["yourself"]=1;
-announcement=$8;
+announcement=$6;
 } else {
-$9=_st($MethodModified())._new();
-_st($9)._oldMethod_(oldMethod);
-_st($9)._method_(aMethod);
-$10=_st($9)._yourself();
-announcement=$10;
+$7=_st($MethodModified())._new();
+_st($7)._oldMethod_(oldMethod);
+_st($7)._method_(aMethod);
+$8=_st($7)._yourself();
+announcement=$8;
 };
 _st(_st($SystemAnnouncer())._current())._announce_(announcement);
 return self}, function($ctx1) {$ctx1.fill(self,"addCompiledMethod:",{aMethod:aMethod,oldMethod:oldMethod,announcement:announcement},smalltalk.Behavior)})},
@@ -81,20 +79,17 @@ fn: function (){
 var self=this;
 var result;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5;
+var $1,$2;
 result=_st(self._instanceVariableNames())._copy();
 $1=self._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=result;
-$4=self._superclass();
-$3=_st($4)._allInstanceVariableNames();
-_st($2)._addAll_($3);
+_st(result)._addAll_(_st(self._superclass())._allInstanceVariableNames());
 };
-$5=result;
-return $5;
+$2=result;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"allInstanceVariableNames",{result:result},smalltalk.Behavior)})},
 args: [],
 source: "allInstanceVariableNames\x0a\x09| result |\x0a\x09result := self instanceVariableNames copy.\x0a\x09self superclass ifNotNil: [\x0a\x09\x09result addAll: self superclass allInstanceVariableNames].\x0a\x09^result",
@@ -110,16 +105,15 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
+var $2,$3,$4,$1;
 $2=self._allSuperclasses();
 $3=self._selectors();
 $ctx1.sendIdx["selectors"]=1;
 $1=_st($2)._inject_into_($3,(function(acc,each){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(each)._selectors();
-_st(acc)._addAll_($4);
-$5=_st(acc)._yourself();
-return $5;
+_st(acc)._addAll_(_st(each)._selectors());
+$4=_st(acc)._yourself();
+return $4;
 }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Behavior)})},
@@ -138,7 +132,7 @@ fn: function (){
 var self=this;
 var subclasses,index;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1;
 subclasses=self._subclasses();
 $ctx1.sendIdx["subclasses"]=1;
 index=(1);
@@ -147,14 +141,12 @@ return smalltalk.withContext(function($ctx2) {
 return _st(index).__gt(_st(subclasses)._size());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
-$1=subclasses;
-$2=_st(_st(subclasses)._at_(index))._subclasses();
-_st($1)._addAll_($2);
+_st(subclasses)._addAll_(_st(_st(subclasses)._at_(index))._subclasses());
 index=_st(index).__plus((1));
 return index;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$3=subclasses;
-return $3;
+$1=subclasses;
+return $1;
 }, function($ctx1) {$ctx1.fill(self,"allSubclasses",{subclasses:subclasses,index:index},smalltalk.Behavior)})},
 args: [],
 source: "allSubclasses\x0a\x09\x22Answer an collection of the receiver's and the receiver's descendent's subclasses. \x22\x0a\x0a\x09| subclasses index |\x0a\x09\x0a\x09subclasses := self subclasses.\x0a\x09index := 1.\x0a\x09[ index > subclasses size ]\x0a\x09\x09whileFalse: [ subclasses addAll: (subclasses at: index) subclasses.\x0a\x09\x09\x09index := index + 1 ].\x0a\x0a\x09^ subclasses",
@@ -190,7 +182,7 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$6,$8,$7,$9,$3;
+var $1,$2,$5,$4,$6,$3;
 $1=self._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -202,12 +194,9 @@ $1;
 $5=self._superclass();
 $ctx1.sendIdx["superclass"]=2;
 $4=_st($OrderedCollection())._with_($5);
-$6=$4;
-$8=self._superclass();
-$7=_st($8)._allSuperclasses();
-_st($6)._addAll_($7);
-$9=_st($4)._yourself();
-$3=$9;
+_st($4)._addAll_(_st(self._superclass())._allSuperclasses());
+$6=_st($4)._yourself();
+$3=$6;
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"allSuperclasses",{},smalltalk.Behavior)})},
 args: [],
@@ -272,7 +261,7 @@ category: 'testing',
 fn: function (aSelector){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$4,$1;
+var $3,$2,$1;
 $1=_st(_st(_st(self._methodDictionary())._keys())._includes_(_st(aSelector)._asString()))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 $3=self._superclass();
@@ -280,8 +269,7 @@ $ctx2.sendIdx["superclass"]=1;
 $2=_st($3)._notNil();
 return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$4=self._superclass();
-return _st($4)._canUnderstand_(aSelector);
+return _st(self._superclass())._canUnderstand_(aSelector);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
@@ -478,7 +466,7 @@ category: 'testing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$5,$2;
+var $1,$4,$3,$2;
 $1=self._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -491,8 +479,7 @@ $ctx1.sendIdx["superclass"]=2;
 $3=_st(aClass).__eq_eq($4);
 $2=_st($3)._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._superclass();
-return _st($5)._inheritsFrom_(aClass);
+return _st(self._superclass())._inheritsFrom_(aClass);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"inheritsFrom:",{aClass:aClass},smalltalk.Behavior)})},
@@ -783,7 +770,7 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $1=_st(_st(self._ownProtocols())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
 return smalltalk.withContext(function($ctx2) {
 return _st(acc).__comma(self._methodsInProtocol_(each));
@@ -791,8 +778,7 @@ return _st(acc).__comma(self._methodsInProtocol_(each));
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._selector();
 $ctx2.sendIdx["selector"]=1;
-$3=_st(b)._selector();
-return _st($2).__lt_eq($3);
+return _st($2).__lt_eq(_st(b)._selector());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ownMethods",{},smalltalk.Behavior)})},
@@ -918,7 +904,7 @@ var self=this;
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6;
+var $1,$2,$3,$4;
 self._basicRemoveCompiledMethod_(aMethod);
 _st(self._methods())._detect_ifNone_((function(each){
 return smalltalk.withContext(function($ctx2) {
@@ -929,14 +915,12 @@ $ctx2.sendIdx["protocol"]=2;
 return _st($1).__eq($2);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$3=self._organization();
-$4=_st(aMethod)._protocol();
-return _st($3)._removeElement_($4);
+return _st(self._organization())._removeElement_(_st(aMethod)._protocol());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$5=_st($MethodRemoved())._new();
-_st($5)._method_(aMethod);
-$6=_st($5)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($6);
+$3=_st($MethodRemoved())._new();
+_st($3)._method_(aMethod);
+$4=_st($3)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($4);
 return self}, function($ctx1) {$ctx1.fill(self,"removeCompiledMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
 args: ["aMethod"],
 source: "removeCompiledMethod: aMethod\x0a\x09self basicRemoveCompiledMethod: aMethod.\x0a\x09\x0a\x09self methods\x0a\x09\x09detect: [ :each | each protocol = aMethod protocol ]\x0a\x09\x09ifNone: [ self organization removeElement: aMethod protocol ].\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (MethodRemoved new\x0a\x09\x09\x09method: aMethod;\x0a\x09\x09\x09yourself)",
@@ -1080,14 +1064,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=self._package();
 $ctx1.sendIdx["package"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1="Unclassified";
 } else {
-$3=self._package();
-$1=_st($3)._name();
+$1=_st(self._package())._name();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.Class)})},
@@ -1106,7 +1089,7 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$5,$8,$7,$9,$6,$10,$1;
+var $3,$4,$2,$5,$6,$7,$1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 _st(stream)._nextPutAll_(_st(self._superclass())._asString());
@@ -1135,10 +1118,7 @@ return smalltalk.withContext(function($ctx3) {
 return _st(stream)._nextPutAll_(" ");
 $ctx3.sendIdx["nextPutAll:"]=7;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
-$8=_st($String())._lf();
-$7="'".__comma($8);
-$9=_st($String())._tab();
-$6=_st($7).__comma($9);
+$6=_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab());
 $ctx2.sendIdx[","]=2;
 _st(stream)._nextPutAll_($6);
 $ctx2.sendIdx["nextPutAll:"]=8;
@@ -1146,8 +1126,8 @@ _st(stream)._nextPutAll_("package: '");
 $ctx2.sendIdx["nextPutAll:"]=9;
 _st(stream)._nextPutAll_(self._category());
 $ctx2.sendIdx["nextPutAll:"]=10;
-$10=_st(stream)._nextPutAll_("'");
-return $10;
+$7=_st(stream)._nextPutAll_("'");
+return $7;
 }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"definition",{},smalltalk.Class)})},
@@ -1202,7 +1182,7 @@ var oldPackage;
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $ClassMoved(){return smalltalk.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$5,$6;
+var $2,$1,$3,$4,$5;
 $2=self._package();
 $ctx1.sendIdx["package"]=1;
 $1=_st($2).__eq(aPackage);
@@ -1214,13 +1194,12 @@ self._basicAt_put_("pkg",aPackage);
 $3=_st(oldPackage)._organization();
 $ctx1.sendIdx["organization"]=1;
 _st($3)._removeElement_(self);
-$4=_st(aPackage)._organization();
-_st($4)._addElement_(self);
-$5=_st($ClassMoved())._new();
-_st($5)._theClass_(self);
-_st($5)._oldPackage_(oldPackage);
-$6=_st($5)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($6);
+_st(_st(aPackage)._organization())._addElement_(self);
+$4=_st($ClassMoved())._new();
+_st($4)._theClass_(self);
+_st($4)._oldPackage_(oldPackage);
+$5=_st($4)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($5);
 return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage,oldPackage:oldPackage},smalltalk.Class)})},
 args: ["aPackage"],
 source: "package: aPackage\x0a\x09| oldPackage |\x0a\x09\x0a\x09self package = aPackage ifTrue: [ ^ self ].\x0a\x09\x0a\x09oldPackage := self package.\x0a\x09\x0a\x09self basicAt: 'pkg' put: aPackage.\x0a\x09oldPackage organization removeElement: self.\x0a\x09aPackage organization addElement: self.\x0a\x0a\x09SystemAnnouncer current announce: (ClassMoved new\x0a\x09\x09theClass: self;\x0a\x09\x09oldPackage: oldPackage;\x0a\x09\x09yourself)",
@@ -1363,9 +1342,8 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="smalltalk.".__comma(_st(self._instanceClass())._name());
-$1=_st($2).__comma(".klass");
+var $1;
+$1=_st("smalltalk.".__comma(_st(self._instanceClass())._name())).__comma(".klass");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Metaclass)})},
@@ -1746,7 +1724,7 @@ fn: function (aClass,anotherClass){
 var self=this;
 function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$5,$6,$8,$7,$11,$10,$9,$12,$13,$14,$15;
+var $2,$1,$3,$4,$5,$6,$8,$7,$11,$10,$9;
 _st(anotherClass)._comment_(_st(aClass)._comment());
 $2=_st(aClass)._methodDictionary();
 $ctx1.sendIdx["methodDictionary"]=1;
@@ -1776,11 +1754,7 @@ $10=_st($11)._methodDictionary();
 $9=_st($10)._values();
 _st($9)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$12=_st($Compiler())._new();
-$13=_st(each)._source();
-$14=_st(anotherClass)._class();
-$15=_st(each)._category();
-return _st($12)._install_forClass_category_($13,$14,$15);
+return _st(_st($Compiler())._new())._install_forClass_category_(_st(each)._source(),_st(anotherClass)._class(),_st(each)._category());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 self._setupClass_(anotherClass);
 return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
@@ -1861,12 +1835,10 @@ category: 'class migration',
 fn: function (aClass,anotherClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$1;
+var $2,$1;
 $2=_st(aClass)._name();
 $ctx1.sendIdx["name"]=1;
-$3=_st(aClass)._instanceVariableNames();
-$4=_st(_st(aClass)._package())._name();
-$1=self._migrateClassNamed_superclass_instanceVariableNames_package_($2,anotherClass,$3,$4);
+$1=self._migrateClassNamed_superclass_instanceVariableNames_package_($2,anotherClass,_st(aClass)._instanceVariableNames(),_st(_st(aClass)._package())._name());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"migrateClass:superclass:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
 args: ["aClass", "anotherClass"],
@@ -1888,7 +1860,7 @@ function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $ClassMigrated(){return smalltalk.ClassMigrated||(typeof ClassMigrated=="undefined"?nil:ClassMigrated)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$7,$6,$8,$9,$10,$11;
+var $1,$2,$3,$4,$5,$6,$7,$8,$9;
 tmp="new*".__comma(className);
 $ctx1.sendIdx[","]=1;
 $1=_st($Smalltalk())._current();
@@ -1916,19 +1888,17 @@ $5=(function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._migrateClass_superclass_(each,newClass);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})});
-$7="Recompiling ".__comma(_st(newClass)._name());
-$6=_st($7).__comma("...");
+$6=_st("Recompiling ".__comma(_st(newClass)._name())).__comma("...");
 $ctx1.sendIdx[","]=2;
 _st($4)._do_displayingProgress_($5,$6);
 self._basicRemoveClass_(oldClass);
-$8=_st($SystemAnnouncer())._current();
-$9=_st($ClassMigrated())._new();
-_st($9)._theClass_(newClass);
-_st($9)._oldClass_(oldClass);
-$10=_st($9)._yourself();
-_st($8)._announce_($10);
-$11=newClass;
-return $11;
+$7=_st($ClassMigrated())._new();
+_st($7)._theClass_(newClass);
+_st($7)._oldClass_(oldClass);
+$8=_st($7)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($8);
+$9=newClass;
+return $9;
 }, function($ctx1) {$ctx1.fill(self,"migrateClassNamed:superclass:instanceVariableNames:package:",{className:className,aClass:aClass,aCollection:aCollection,packageName:packageName,oldClass:oldClass,newClass:newClass,tmp:tmp},smalltalk.ClassBuilder)})},
 args: ["className", "aClass", "aCollection", "packageName"],
 source: "migrateClassNamed: className superclass: aClass instanceVariableNames: aCollection package: packageName\x0a\x09| oldClass newClass tmp |\x0a\x09\x0a\x09tmp := 'new*', className.\x0a\x09oldClass := Smalltalk current at: className.\x0a\x09\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass\x0a\x09\x09named: tmp\x0a\x09\x09instanceVariableNames: aCollection\x0a\x09\x09package: packageName.\x0a\x0a\x09self basicSwapClassNames: oldClass with: newClass.\x0a\x0a\x09[ self copyClass: oldClass to: newClass ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :exception |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09basicSwapClassNames: oldClass with: newClass;\x0a\x09\x09\x09\x09basicRemoveClass: newClass.\x0a\x09\x09\x09exception signal ].\x0a\x0a\x09self\x0a\x09\x09rawRenameClass: oldClass to: tmp;\x0a\x09\x09rawRenameClass: newClass to: className.\x0a\x0a\x09oldClass subclasses \x0a\x09\x09do: [ :each | self migrateClass: each superclass: newClass ]\x0a\x09\x09displayingProgress: 'Recompiling ', newClass name, '...'.\x0a\x0a\x09self basicRemoveClass: oldClass.\x0a\x09\x0a\x09SystemAnnouncer current announce: (ClassMigrated new\x0a\x09\x09theClass: newClass;\x0a\x09\x09oldClass: oldClass;\x0a\x09\x09yourself).\x0a\x09\x0a\x09^newClass",
@@ -2332,7 +2302,7 @@ category: 'visiting',
 fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$5,$4;
+var $1,$3,$2;
 $1=self._theClass();
 $ctx1.sendIdx["theClass"]=1;
 _st(aCollection)._add_($1);
@@ -2342,9 +2312,7 @@ $3=_st(a)._theClass();
 $ctx2.sendIdx["theClass"]=2;
 $2=_st($3)._name();
 $ctx2.sendIdx["name"]=1;
-$5=_st(b)._theClass();
-$4=_st($5)._name();
-return _st($2).__lt_eq($4);
+return _st($2).__lt_eq(_st(_st(b)._theClass())._name());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._do_((function(aNode){
 return smalltalk.withContext(function($ctx2) {
 return _st(aNode)._traverseClassesWith_(aCollection);

+ 68 - 102
js/Kernel-Collections.js

@@ -11,25 +11,22 @@ category: 'comparing',
 fn: function (anAssociation){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$6,$7,$5,$8,$9,$1;
+var $3,$2,$5,$4,$6,$1;
 $3=self._class();
 $ctx1.sendIdx["class"]=1;
-$4=_st(anAssociation)._class();
-$2=_st($3).__eq($4);
+$2=_st($3).__eq(_st(anAssociation)._class());
 $ctx1.sendIdx["="]=1;
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$6=self._key();
+$5=self._key();
 $ctx2.sendIdx["key"]=1;
-$7=_st(anAssociation)._key();
-$5=_st($6).__eq($7);
+$4=_st($5).__eq(_st(anAssociation)._key());
 $ctx2.sendIdx["="]=2;
-return _st($5)._and_((function(){
+return _st($4)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$8=self._value();
+$6=self._value();
 $ctx3.sendIdx["value"]=1;
-$9=_st(anAssociation)._value();
-return _st($8).__eq($9);
+return _st($6).__eq(_st(anAssociation)._value());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["and:"]=1;
@@ -601,7 +598,7 @@ var self=this;
 var set,outputSet;
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$4;
+var $2,$1,$3;
 set=self._asSet();
 outputSet=_st($Set())._new();
 _st(aCollection)._do_((function(each){
@@ -610,15 +607,14 @@ $2=_st(set)._includes_(each);
 $ctx2.sendIdx["includes:"]=1;
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$3=_st(outputSet)._includes_(each);
-return _st($3)._not();
+return _st(_st(outputSet)._includes_(each))._not();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 if(smalltalk.assert($1)){
 return _st(outputSet)._add_(each);
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$4=_st(self._class())._withAll_(_st(outputSet)._asArray());
-return $4;
+$3=_st(self._class())._withAll_(_st(outputSet)._asArray());
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"intersection:",{aCollection:aCollection,set:set,outputSet:outputSet},smalltalk.Collection)})},
 args: ["aCollection"],
 source: "intersection: aCollection\x0a\x09\x22Answer the set theoretic intersection of two collections.\x22\x0a\x0a\x09| set outputSet |\x0a\x09\x0a\x09set := self asSet.\x0a\x09outputSet := Set new.\x0a\x09\x0a\x09aCollection do: [ :each |\x0a\x09\x09((set includes: each) and: [(outputSet includes: each) not])\x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09outputSet add: each]].\x0a\x09\x09\x0a\x09^ self class withAll: outputSet asArray",
@@ -803,20 +799,18 @@ fn: function (selectBlock,collectBlock){
 var self=this;
 var stream;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2;
 stream=_st(_st(self._class())._new())._writeStream();
 self._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(selectBlock)._value_(each);
 $ctx2.sendIdx["value:"]=1;
 if(smalltalk.assert($1)){
-$2=stream;
-$3=_st(collectBlock)._value_(each);
-return _st($2)._nextPut_($3);
+return _st(stream)._nextPut_(_st(collectBlock)._value_(each));
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$4=_st(stream)._contents();
-return $4;
+$2=_st(stream)._contents();
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"select:thenCollect:",{selectBlock:selectBlock,collectBlock:collectBlock,stream:stream},smalltalk.Collection)})},
 args: ["selectBlock", "collectBlock"],
 source: "select: selectBlock thenCollect: collectBlock\x0a\x09| stream |\x0a\x09stream := self class new writeStream.\x0a\x09self do: [:each |\x0a\x09\x09(selectBlock value: each) ifTrue: [\x0a\x09\x09stream nextPut: (collectBlock value: each)]].\x0a\x09^stream contents",
@@ -1158,28 +1152,25 @@ category: 'comparing',
 fn: function (aHashedCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$5,$6,$4,$8,$9,$7;
+var $2,$1,$4,$3,$6,$5;
 $2=self._class();
 $ctx1.sendIdx["class"]=1;
-$3=_st(aHashedCollection)._class();
-$1=_st($2).__eq($3);
+$1=_st($2).__eq(_st(aHashedCollection)._class());
 $ctx1.sendIdx["="]=1;
 if(! smalltalk.assert($1)){
 return false;
 };
-$5=self._size();
+$4=self._size();
 $ctx1.sendIdx["size"]=1;
-$6=_st(aHashedCollection)._size();
-$4=_st($5).__eq($6);
+$3=_st($4).__eq(_st(aHashedCollection)._size());
 $ctx1.sendIdx["="]=2;
-if(! smalltalk.assert($4)){
+if(! smalltalk.assert($3)){
 return false;
 };
-$8=self._associations();
+$6=self._associations();
 $ctx1.sendIdx["associations"]=1;
-$9=_st(aHashedCollection)._associations();
-$7=_st($8).__eq($9);
-return $7;
+$5=_st($6).__eq(_st(aHashedCollection)._associations());
+return $5;
 }, function($ctx1) {$ctx1.fill(self,"=",{aHashedCollection:aHashedCollection},smalltalk.HashedCollection)})},
 args: ["aHashedCollection"],
 source: "= aHashedCollection\x0a\x09self class = aHashedCollection class ifFalse: [^false].\x0a\x09self size = aHashedCollection size ifFalse: [^false].\x0a\x09^self associations = aHashedCollection associations",
@@ -1892,7 +1883,7 @@ fn: function (aCollection){
 var self=this;
 var newCollection;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$5,$6,$7,$8;
+var $2,$1,$3,$4,$5;
 $2=_st(aCollection)._size();
 $ctx1.sendIdx["size"]=1;
 $1=_st($2)._even();
@@ -1900,18 +1891,15 @@ if(! smalltalk.assert($1)){
 self._error_("#newFromPairs only accepts arrays of an even length");
 };
 newCollection=self._new();
-$4=_st(aCollection)._size();
-$3=(1)._to_by_($4,(2));
-_st($3)._do_((function(each){
+_st((1)._to_by_(_st(aCollection)._size(),(2)))._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$5=newCollection;
-$6=_st(aCollection)._at_(each);
+$3=newCollection;
+$4=_st(aCollection)._at_(each);
 $ctx2.sendIdx["at:"]=1;
-$7=_st(aCollection)._at_(_st(each).__plus((1)));
-return _st($5)._at_put_($6,$7);
+return _st($3)._at_put_($4,_st(aCollection)._at_(_st(each).__plus((1))));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$8=newCollection;
-return $8;
+$5=newCollection;
+return $5;
 }, function($ctx1) {$ctx1.fill(self,"newFromPairs:",{aCollection:aCollection,newCollection:newCollection},smalltalk.HashedCollection.klass)})},
 args: ["aCollection"],
 source: "newFromPairs: aCollection\x0a\x09\x22Accept an array of elements where every two elements form an \x0a\x09association - the odd element being the key, and the even element the value.\x22\x0a\x09\x0a\x09| newCollection |\x0a\x09\x0a\x09aCollection size even ifFalse: [ \x0a\x09\x09self error: '#newFromPairs only accepts arrays of an even length' ].\x0a\x09\x09\x0a\x09newCollection := self new.\x0a\x09( 1 to: aCollection size by: 2 ) do: [ :each | \x0a\x09\x09newCollection at: (aCollection at: each) put: (aCollection at: each + 1) ].\x0a\x09\x09\x0a\x09^ newCollection",
@@ -2218,20 +2206,18 @@ category: 'comparing',
 fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$5,$6,$1,$7;
+var $3,$2,$4,$1,$5;
 var $early={};
 try {
 $3=self._class();
 $ctx1.sendIdx["class"]=1;
-$4=_st(aCollection)._class();
-$2=_st($3).__eq($4);
+$2=_st($3).__eq(_st(aCollection)._class());
 $ctx1.sendIdx["="]=1;
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._size();
+$4=self._size();
 $ctx2.sendIdx["size"]=1;
-$6=_st(aCollection)._size();
-return _st($5).__eq($6);
+return _st($4).__eq(_st(aCollection)._size());
 $ctx2.sendIdx["="]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 if(! smalltalk.assert($1)){
@@ -2239,8 +2225,8 @@ return false;
 };
 self._withIndexDo_((function(each,i){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(_st(aCollection)._at_(i)).__eq(each);
-if(! smalltalk.assert($7)){
+$5=_st(_st(aCollection)._at_(i)).__eq(each);
+if(! smalltalk.assert($5)){
 throw $early=[false];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,3)})}));
@@ -2864,12 +2850,11 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="[".__comma(_st(self._collect_((function(each){
+var $1;
+$1=_st("[".__comma(_st(self._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._asJavascript();
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._join_(", "));
-$1=_st($2).__comma("]");
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._join_(", "))).__comma("]");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Array)})},
@@ -3316,11 +3301,10 @@ category: 'copying',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=self._asString();
 $ctx1.sendIdx["asString"]=1;
-$3=_st(aString)._asString();
-$1=_st($2).__comma($3);
+$1=_st($2).__comma(_st(aString)._asString());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,",",{aString:aString},smalltalk.CharacterArray)})},
 args: ["aString"],
@@ -4046,12 +4030,11 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$4,$1;
+var $3,$2,$1;
 $3=self._first();
 $ctx1.sendIdx["first"]=1;
 $2=_st($3)._asUppercase();
-$4=self._first();
-$1=_st($2).__eq_eq($4);
+$1=_st($2).__eq_eq(self._first());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isCapitalized",{},smalltalk.String)})},
 args: [],
@@ -4152,7 +4135,7 @@ var self=this;
 var cr,lf,start,sz,nextLF,nextCR;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$5,$3,$6,$7,$9,$8,$10,$11,$12,$13;
+var $2,$1,$4,$5,$3,$6,$7,$9,$8,$10,$11;
 var $early={};
 try {
 start=(1);
@@ -4224,9 +4207,7 @@ nextLF=self._indexOf_startingAt_(lf,start);
 $ctx2.sendIdx["indexOf:startingAt:"]=5;
 return nextLF;
 } else {
-$12=start;
-$13=_st(nextCR).__minus((1));
-_st(aBlock)._value_value_value_($12,$13,nextCR);
+_st(aBlock)._value_value_value_(start,_st(nextCR).__minus((1)),nextCR);
 start=(1).__plus(nextCR);
 start;
 nextCR=self._indexOf_startingAt_(cr,start);
@@ -4570,9 +4551,8 @@ fn: function (separators){
 var self=this;
 function $RegularExpression(){return smalltalk.RegularExpression||(typeof RegularExpression=="undefined"?nil:RegularExpression)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1;
-$4="^[".__comma(separators);
-$3=_st($4).__comma("]+");
+var $3,$2,$1;
+$3=_st("^[".__comma(separators)).__comma("]+");
 $ctx1.sendIdx[","]=1;
 $2=_st($RegularExpression())._fromString_flag_($3,"g");
 $1=self._replaceRegexp_with_($2,"");
@@ -4611,9 +4591,8 @@ fn: function (separators){
 var self=this;
 function $RegularExpression(){return smalltalk.RegularExpression||(typeof RegularExpression=="undefined"?nil:RegularExpression)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1;
-$4="[".__comma(separators);
-$3=_st($4).__comma("]+$");
+var $3,$2,$1;
+$3=_st("[".__comma(separators)).__comma("]+$");
 $ctx1.sendIdx[","]=1;
 $2=_st($RegularExpression())._fromString_flag_($3,"g");
 $1=self._replaceRegexp_with_($2,"");
@@ -4873,28 +4852,26 @@ category: 'comparing',
 fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$5,$6,$4,$7;
+var $2,$1,$4,$3,$5;
 var $early={};
 try {
 $2=self._class();
 $ctx1.sendIdx["class"]=1;
-$3=_st(aCollection)._class();
-$1=_st($2).__eq($3);
+$1=_st($2).__eq(_st(aCollection)._class());
 $ctx1.sendIdx["="]=1;
 if(! smalltalk.assert($1)){
 return false;
 };
-$5=self._size();
+$4=self._size();
 $ctx1.sendIdx["size"]=1;
-$6=_st(aCollection)._size();
-$4=_st($5).__eq($6);
-if(! smalltalk.assert($4)){
+$3=_st($4).__eq(_st(aCollection)._size());
+if(! smalltalk.assert($3)){
 return false;
 };
 self._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(aCollection)._includes_(each);
-if(! smalltalk.assert($7)){
+$5=_st(aCollection)._includes_(each);
+if(! smalltalk.assert($5)){
 throw $early=[false];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
@@ -5509,7 +5486,7 @@ category: 'reading',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$5,$6,$1;
+var $2,$4,$3,$1;
 $2=self._atEnd();
 if(smalltalk.assert($2)){
 $1=nil;
@@ -5518,9 +5495,7 @@ $4=self._position();
 $ctx1.sendIdx["position"]=1;
 $3=_st($4).__plus((1));
 self._position_($3);
-$5=self["@collection"];
-$6=self._position();
-$1=_st($5)._at_($6);
+$1=_st(self["@collection"])._at_(self._position());
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Stream)})},
@@ -5565,7 +5540,7 @@ category: 'writing',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$6,$7,$5;
+var $2,$1,$3,$4;
 $2=self._position();
 $ctx1.sendIdx["position"]=1;
 $1=_st($2).__plus((1));
@@ -5574,10 +5549,7 @@ $3=self._collection();
 $4=self._position();
 $ctx1.sendIdx["position"]=2;
 _st($3)._at_put_($4,anObject);
-$6=self._streamSize();
-$7=self._position();
-$5=_st($6)._max_($7);
-self._setStreamSize_($5);
+self._setStreamSize_(_st(self._streamSize())._max_(self._position()));
 return self}, function($ctx1) {$ctx1.fill(self,"nextPut:",{anObject:anObject},smalltalk.Stream)})},
 args: ["anObject"],
 source: "nextPut: anObject\x0a\x09self position: self position + 1.\x0a\x09self collection at: self position put: anObject.\x0a\x09self setStreamSize: (self streamSize max: self position)",
@@ -5966,7 +5938,7 @@ fn: function (aString){
 var self=this;
 var pre,post;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$5,$6,$9,$8,$10,$7,$12,$11,$14,$13,$16,$17,$15,$19,$20,$18;
+var $1,$3,$2,$4,$5,$6,$9,$8,$10,$7,$11,$12,$14,$13;
 $1=self._atEnd();
 if(smalltalk.assert($1)){
 $3=self._collection();
@@ -5993,25 +5965,19 @@ $10=_st(aString)._size();
 $ctx1.sendIdx["size"]=1;
 $7=_st($8).__plus($10);
 $ctx1.sendIdx["+"]=1;
-$12=self._collection();
-$11=_st($12)._size();
+$11=_st(self._collection())._size();
 $ctx1.sendIdx["size"]=2;
 post=_st($6)._copyFrom_to_($7,$11);
 post;
-$14=_st(pre).__comma(aString);
-$13=_st($14).__comma(post);
+$12=_st(_st(pre).__comma(aString)).__comma(post);
 $ctx1.sendIdx[","]=2;
-self._setCollection_($13);
+self._setCollection_($12);
 };
-$16=self._position();
+$14=self._position();
 $ctx1.sendIdx["position"]=3;
-$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);
+$13=_st($14).__plus(_st(aString)._size());
+self._position_($13);
+self._setStreamSize_(_st(self._streamSize())._max_(self._position()));
 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)",

+ 8 - 12
js/Kernel-Exceptions.js

@@ -361,9 +361,8 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(_st(self._receiver())._asString()).__comma(" does not understand #");
-$1=_st($2).__comma(_st(self._message())._selector());
+var $1;
+$1=_st(_st(_st(self._receiver())._asString()).__comma(" does not understand #")).__comma(_st(self._message())._selector());
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.MessageNotUnderstood)})},
@@ -457,14 +456,13 @@ category: 'error handling',
 fn: function (anError){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(anError)._context();
 $ctx1.sendIdx["context"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=_st(anError)._context();
-self._logErrorContext_($2);
+self._logErrorContext_(_st(anError)._context());
 };
 self._logError_(anError);
 return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.ErrorHandler)})},
@@ -498,14 +496,13 @@ category: 'private',
 fn: function (aContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(aContext)._home();
 $ctx1.sendIdx["home"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=_st(aContext)._home();
-self._logContext_($2);
+self._logContext_(_st(aContext)._home());
 };
 self._log_(_st(aContext)._asString());
 return self}, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext},smalltalk.ErrorHandler)})},
@@ -539,7 +536,7 @@ category: 'private',
 fn: function (aContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 if(($receiver = aContext) == nil || $receiver == null){
 aContext;
 } else {
@@ -548,8 +545,7 @@ $ctx1.sendIdx["home"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=_st(aContext)._home();
-self._logContext_($2);
+self._logContext_(_st(aContext)._home());
 };
 };
 return self}, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext},smalltalk.ErrorHandler)})},

+ 38 - 60
js/Kernel-Infrastructure.js

@@ -155,17 +155,15 @@ category: 'compiling',
 fn: function (aString,aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$4,$7;
+var $1,$2,$3,$4,$5;
 $1=self._classBuilder();
 $2=_st(aClass)._superclass();
 $3=_st(aClass)._name();
 $ctx1.sendIdx["name"]=1;
-$5=_st(_st(aClass)._instanceVariableNames())._copy();
-_st($5)._add_(aString);
-$6=_st($5)._yourself();
-$4=$6;
-$7=_st(_st(aClass)._package())._name();
-_st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$7);
+$4=_st(_st(aClass)._instanceVariableNames())._copy();
+_st($4)._add_(aString);
+$5=_st($4)._yourself();
+_st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,_st(_st(aClass)._package())._name());
 return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
 args: ["aString", "aClass"],
 source: "addInstVarNamed: aString to: aClass\x0a\x09self classBuilder\x0a\x09\x09addSubclassOf: aClass superclass \x0a\x09\x09named: aClass name \x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name",
@@ -245,20 +243,17 @@ fn: function (aClass){
 var self=this;
 var protocols;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5;
+var $1,$2;
 protocols=_st(aClass)._protocols();
 $1=_st(aClass)._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=protocols;
-$4=_st(aClass)._superclass();
-$3=self._availableProtocolsFor_($4);
-_st($2)._addAll_($3);
+_st(protocols)._addAll_(self._availableProtocolsFor_(_st(aClass)._superclass()));
 };
-$5=_st(_st(protocols)._asSet())._asArray();
-return $5;
+$2=_st(_st(protocols)._asSet())._asArray();
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.Environment)})},
 args: ["aClass"],
 source: "availableProtocolsFor: aClass\x0a\x09| protocols |\x0a\x09\x0a\x09protocols := aClass protocols.\x0a\x09aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].\x0a\x09^ protocols asSet asArray",
@@ -405,13 +400,12 @@ 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 $1,$3,$2;
+var $1,$2;
 $1=_st(_st($Smalltalk())._current())._at_(aClassName);
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$3="A class named ".__comma(aClassName);
-$2=_st($3).__comma(" already exists");
+$2=_st("A class named ".__comma(aClassName)).__comma(" already exists");
 $ctx1.sendIdx[","]=1;
 self._error_($2);
 };
@@ -558,7 +552,7 @@ var self=this;
 var destinationClass;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2,$5;
+var $1,$3,$4,$2;
 destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
 $1=destinationClass;
 if(($receiver = $1) == nil || $receiver == null){
@@ -574,8 +568,7 @@ if(smalltalk.assert($2)){
 return self;
 };
 _st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
-$5=_st(aMethod)._methodClass();
-_st($5)._removeCompiledMethod_(aMethod);
+_st(_st(aMethod)._methodClass())._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",
@@ -734,13 +727,12 @@ 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 $1,$3,$2;
+var $1,$2;
 $1=_st(_st($Smalltalk())._current())._at_(aClassName);
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$3="A class named ".__comma(aClassName);
-$2=_st($3).__comma(" already exists");
+$2=_st("A class named ".__comma(aClassName)).__comma(" already exists");
 $ctx1.sendIdx[","]=1;
 self._error_($2);
 };
@@ -799,10 +791,8 @@ fn: function (){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st($Smalltalk())._current();
-$2=_st($3)._at_("SystemAnnouncer");
-$1=_st($2)._current();
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
 $ctx1.sendIdx["current"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
@@ -1313,7 +1303,7 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$5,$3,$8,$7,$6,$10,$11,$9,$13,$12,$1;
+var $2,$4,$5,$3,$7,$6,$8,$9,$1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(self._class())._name();
@@ -1330,24 +1320,20 @@ _st(stream)._nextPutAll_($3);
 $ctx2.sendIdx["nextPutAll:"]=2;
 _st(stream)._nextPutAll_(" named: ");
 $ctx2.sendIdx["nextPutAll:"]=3;
-$8=self._name();
-$7="'".__comma($8);
+$7="'".__comma(self._name());
 $ctx2.sendIdx[","]=3;
 $6=_st($7).__comma("'");
 $ctx2.sendIdx[","]=2;
 _st(stream)._nextPutAll_($6);
 $ctx2.sendIdx["nextPutAll:"]=4;
-$10=_st($String())._lf();
-$11=_st($String())._tab();
-$9=_st($10).__comma($11);
+$8=_st(_st($String())._lf()).__comma(_st($String())._tab());
 $ctx2.sendIdx[","]=4;
-_st(stream)._nextPutAll_($9);
+_st(stream)._nextPutAll_($8);
 $ctx2.sendIdx["nextPutAll:"]=5;
 _st(stream)._nextPutAll_(" transport: (");
 $ctx2.sendIdx["nextPutAll:"]=6;
-$13=_st(_st(self._transport())._definition()).__comma(")");
-$12=_st(stream)._nextPutAll_($13);
-return $12;
+$9=_st(stream)._nextPutAll_(_st(_st(self._transport())._definition()).__comma(")"));
+return $9;
 }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"definition",{},smalltalk.Package)})},
@@ -1411,7 +1397,7 @@ var self=this;
 var starCategoryName;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$5,$7,$6,$8,$1;
+var $4,$3,$2,$5,$1;
 starCategoryName="*".__comma(self._name());
 $4=self._classes();
 $ctx1.sendIdx["classes"]=1;
@@ -1423,15 +1409,12 @@ $2=_st($3)._asSet();
 _st($2)._remove_ifAbsent_(nil,(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$5=$2;
-$7=_st(_st($Smalltalk())._current())._classes();
-$6=_st($7)._select_((function(each){
+_st($2)._addAll_(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(each)._protocols())._includes_(starCategoryName);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
-_st($5)._addAll_($6);
-$8=_st($2)._yourself();
-$1=$8;
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})})));
+$5=_st($2)._yourself();
+$1=$5;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"loadDependencyClasses",{starCategoryName:starCategoryName},smalltalk.Package)})},
 args: [],
@@ -1613,13 +1596,12 @@ fn: function (aPackageName){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=_st($Smalltalk())._current();
 $ctx1.sendIdx["current"]=1;
 $1=_st($2)._packageAt_ifAbsent_(aPackageName,(function(){
 return smalltalk.withContext(function($ctx2) {
-$3=_st($Smalltalk())._current();
-return _st($3)._createPackage_(aPackageName);
+return _st(_st($Smalltalk())._current())._createPackage_(aPackageName);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
@@ -1680,7 +1662,7 @@ 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 $1,$3,$2,$5,$4,$6;
+var $1,$3,$2,$4;
 children=[];
 others=[];
 _st(classes)._do_((function(each){
@@ -1704,17 +1686,15 @@ $3=_st(a)._theClass();
 $ctx2.sendIdx["theClass"]=1;
 $2=_st($3)._name();
 $ctx2.sendIdx["name"]=1;
-$5=_st(b)._theClass();
-$4=_st($5)._name();
-return _st($2).__lt_eq($4);
+return _st($2).__lt_eq(_st(_st(b)._theClass())._name());
 }, 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)})}));
-$6=expandedClasses;
-return $6;
+$4=expandedClasses;
+return $4;
 }, 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",
@@ -2449,7 +2429,7 @@ fn: function (anException,aString){
 var self=this;
 function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$8,$7,$6,$9,$5,$4,$10,$3,$1;
+var $2,$8,$7,$6,$9,$5,$4,$3,$1;
 $2=_st($ParseError())._new();
 $8=_st(anException)._basicAt_("line");
 $ctx1.sendIdx["basicAt:"]=1;
@@ -2462,8 +2442,7 @@ $5=_st($6).__comma($9);
 $ctx1.sendIdx[","]=3;
 $4=_st($5).__comma(" : Unexpected character ");
 $ctx1.sendIdx[","]=2;
-$10=_st(anException)._basicAt_("found");
-$3=_st($4).__comma($10);
+$3=_st($4).__comma(_st(anException)._basicAt_("found"));
 $ctx1.sendIdx[","]=1;
 $1=_st($2)._messageText_($3);
 return $1;
@@ -2569,7 +2548,7 @@ fn: function (packageName,newName){
 var self=this;
 var pkg;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 pkg=self._packageAt_ifAbsent_(packageName,(function(){
 return smalltalk.withContext(function($ctx2) {
 $1="Missing package: ".__comma(packageName);
@@ -2581,8 +2560,7 @@ $2=self._packageAt_(newName);
 if(($receiver = $2) == nil || $receiver == null){
 $2;
 } else {
-$3="Already exists a package called: ".__comma(newName);
-self._error_($3);
+self._error_("Already exists a package called: ".__comma(newName));
 };
 _st(self._at_("packages"))._at_put_(newName,pkg);
 _st(pkg)._name_(newName);

+ 9 - 18
js/Kernel-Methods.js

@@ -519,7 +519,7 @@ var oldProtocol;
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $MethodMoved(){return smalltalk.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$4,$8,$7,$9,$6,$11,$10;
+var $1,$2,$3,$5,$4,$8,$7,$6;
 oldProtocol=self._protocol();
 $ctx1.sendIdx["protocol"]=1;
 self._basicAt_put_("category",aString);
@@ -543,14 +543,11 @@ $ctx1.sendIdx["methodClass"]=3;
 $7=_st($8)._methods();
 $6=_st($7)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$9=_st(each)._protocol();
-return _st($9).__eq(oldProtocol);
+return _st(_st(each)._protocol()).__eq(oldProtocol);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 _st($6)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-$11=self._methodClass();
-$10=_st($11)._organization();
-return _st($10)._removeElement_(oldProtocol);
+return _st(_st(self._methodClass())._organization())._removeElement_(oldProtocol);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"category:",{aString:aString,oldProtocol:oldProtocol},smalltalk.CompiledMethod)})},
@@ -665,7 +662,7 @@ fn: function (){
 var self=this;
 var superclass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$6,$5,$4,$3;
+var $1,$2,$3;
 $1=self._methodClass();
 $ctx1.sendIdx["methodClass"]=1;
 superclass=_st($1)._superclass();
@@ -676,10 +673,7 @@ return false;
 } else {
 $2;
 };
-$6=self._methodClass();
-$5=_st($6)._superclass();
-$4=_st($5)._lookupSelector_(self._selector());
-$3=_st($4)._notNil();
+$3=_st(_st(_st(self._methodClass())._superclass())._lookupSelector_(self._selector()))._notNil();
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass},smalltalk.CompiledMethod)})},
 args: [],
@@ -1480,7 +1474,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$1;
+var $2,$3,$1;
 $2=self._isBlockContext();
 if(smalltalk.assert($2)){
 $3="a block (in ".__comma(_st(self._methodContext())._asString());
@@ -1488,8 +1482,7 @@ $ctx1.sendIdx[","]=2;
 $1=_st($3).__comma(")");
 $ctx1.sendIdx[","]=1;
 } else {
-$4=_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ");
-$1=_st($4).__comma(self._selector());
+$1=_st(_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ")).__comma(self._selector());
 $ctx1.sendIdx[","]=3;
 };
 return $1;
@@ -1590,7 +1583,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$5,$4,$3,$7,$6,$1;
+var $2,$5,$4,$3,$1;
 $2=self._methodContext();
 $ctx1.sendIdx["methodContext"]=1;
 if(($receiver = $2) == nil || $receiver == null){
@@ -1600,9 +1593,7 @@ $5=self._methodContext();
 $ctx1.sendIdx["methodContext"]=2;
 $4=_st($5)._receiver();
 $3=_st($4)._class();
-$7=self._methodContext();
-$6=_st($7)._selector();
-$1=_st($3)._lookupSelector_($6);
+$1=_st($3)._lookupSelector_(_st(self._methodContext())._selector());
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodContext)})},

+ 33 - 53
js/Kernel-Objects.js

@@ -48,11 +48,10 @@ category: 'comparing',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=self._identityHash();
 $ctx1.sendIdx["identityHash"]=1;
-$3=_st(anObject)._identityHash();
-$1=_st($2).__eq($3);
+$1=_st($2).__eq(_st(anObject)._identityHash());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject},smalltalk.Object)})},
 args: ["anObject"],
@@ -289,15 +288,14 @@ category: 'error handling',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$6,$5,$4,$9,$8,$7,$3,$2;
+var $1,$6,$5,$4,$8,$7,$3,$2;
 $1=console;
 $6=smalltalk.getThisContext()._home();
 $ctx1.sendIdx["home"]=1;
 $5=_st($6)._asString();
 $ctx1.sendIdx["asString"]=1;
 $4=_st($5).__comma(" is deprecated! (in ");
-$9=smalltalk.getThisContext()._home();
-$8=_st($9)._home();
+$8=_st(smalltalk.getThisContext()._home())._home();
 $ctx1.sendIdx["home"]=2;
 $7=_st($8)._asString();
 $3=_st($4).__comma($7);
@@ -857,7 +855,7 @@ category: 'printing',
 fn: function (aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $5,$4,$3,$2,$1,$7,$6;
+var $5,$4,$3,$2,$1;
 $5=self._class();
 $ctx1.sendIdx["class"]=1;
 $4=_st($5)._name();
@@ -871,9 +869,7 @@ $1="a ";
 };
 _st(aStream)._nextPutAll_($1);
 $ctx1.sendIdx["nextPutAll:"]=1;
-$7=self._class();
-$6=_st($7)._name();
-_st(aStream)._nextPutAll_($6);
+_st(aStream)._nextPutAll_(_st(self._class())._name());
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Object)})},
 args: ["aStream"],
 source: "printOn: aStream\x0a\x09\x22Append to the aStream, a string representing the receiver.\x22\x0a\x09\x0a\x09aStream nextPutAll: (self class name first isVowel\x0a\x09\x09ifTrue: [ 'an ' ]\x0a\x09\x09ifFalse: [ 'a ' ]).\x0a\x09aStream nextPutAll: self class name",
@@ -1099,9 +1095,8 @@ category: 'comparing',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self.__eq(anObject);
-$1=_st($2).__eq(false);
+var $1;
+$1=_st(self.__eq(anObject)).__eq(false);
 $ctx1.sendIdx["="]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"~=",{anObject:anObject},smalltalk.Object)})},
@@ -2142,12 +2137,11 @@ var self=this;
 var t;
 function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $1;
 t=_st($Date())._now();
 $ctx1.sendIdx["now"]=1;
 _st(aBlock)._value();
-$2=_st($Date())._now();
-$1=_st($2).__minus(t);
+$1=_st(_st($Date())._now()).__minus(t);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"millisecondsToRun:",{aBlock:aBlock,t:t},smalltalk.Date.klass)})},
 args: ["aBlock"],
@@ -2535,9 +2529,8 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="(".__comma(self._printString());
-$1=_st($2).__comma(")");
+var $1;
+$1=_st("(".__comma(self._printString())).__comma(")");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
@@ -3129,11 +3122,10 @@ var self=this;
 var array,first,last,count;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 first=self._truncated();
 $ctx1.sendIdx["truncated"]=1;
-$1=_st(aNumber)._truncated();
-last=_st($1).__plus((1));
+last=_st(_st(aNumber)._truncated()).__plus((1));
 $ctx1.sendIdx["+"]=1;
 count=(1);
 array=_st($Array())._new();
@@ -3146,8 +3138,8 @@ count;
 first=_st(first).__plus((1));
 return first;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$2=array;
-return $2;
+$1=array;
+return $1;
 }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
 args: ["aNumber"],
 source: "to: aNumber\x0a\x09| array first last count |\x0a\x09first := self truncated.\x0a\x09last := aNumber truncated + 1.\x0a\x09count := 1.\x0a\x09array := Array new.\x0a\x09(last - first) timesRepeat: [\x0a\x09\x09array at: count put: first.\x0a\x09\x09count := count + 1.\x0a\x09\x09first := first + 1].\x0a\x09^array",
@@ -3385,7 +3377,7 @@ fn: function (aPoint){
 var self=this;
 function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$5,$4,$2,$7,$9,$8,$6,$1;
+var $3,$5,$4,$2,$7,$6,$1;
 $3=self._x();
 $ctx1.sendIdx["x"]=1;
 $5=_st(aPoint)._asPoint();
@@ -3395,9 +3387,7 @@ $2=_st($3).__star($4);
 $ctx1.sendIdx["*"]=1;
 $7=self._y();
 $ctx1.sendIdx["y"]=1;
-$9=_st(aPoint)._asPoint();
-$8=_st($9)._y();
-$6=_st($7).__star($8);
+$6=_st($7).__star(_st(_st(aPoint)._asPoint())._y());
 $1=_st($Point())._x_y_($2,$6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
@@ -3416,7 +3406,7 @@ fn: function (aPoint){
 var self=this;
 function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$5,$4,$2,$7,$9,$8,$6,$1;
+var $3,$5,$4,$2,$7,$6,$1;
 $3=self._x();
 $ctx1.sendIdx["x"]=1;
 $5=_st(aPoint)._asPoint();
@@ -3426,9 +3416,7 @@ $2=_st($3).__plus($4);
 $ctx1.sendIdx["+"]=1;
 $7=self._y();
 $ctx1.sendIdx["y"]=1;
-$9=_st(aPoint)._asPoint();
-$8=_st($9)._y();
-$6=_st($7).__plus($8);
+$6=_st($7).__plus(_st(_st(aPoint)._asPoint())._y());
 $1=_st($Point())._x_y_($2,$6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
@@ -3447,7 +3435,7 @@ fn: function (aPoint){
 var self=this;
 function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$5,$4,$2,$7,$9,$8,$6,$1;
+var $3,$5,$4,$2,$7,$6,$1;
 $3=self._x();
 $ctx1.sendIdx["x"]=1;
 $5=_st(aPoint)._asPoint();
@@ -3457,9 +3445,7 @@ $2=_st($3).__minus($4);
 $ctx1.sendIdx["-"]=1;
 $7=self._y();
 $ctx1.sendIdx["y"]=1;
-$9=_st(aPoint)._asPoint();
-$8=_st($9)._y();
-$6=_st($7).__minus($8);
+$6=_st($7).__minus(_st(_st(aPoint)._asPoint())._y());
 $1=_st($Point())._x_y_($2,$6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
@@ -3478,7 +3464,7 @@ fn: function (aPoint){
 var self=this;
 function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$5,$4,$2,$7,$9,$8,$6,$1;
+var $3,$5,$4,$2,$7,$6,$1;
 $3=self._x();
 $ctx1.sendIdx["x"]=1;
 $5=_st(aPoint)._asPoint();
@@ -3488,9 +3474,7 @@ $2=_st($3).__slash($4);
 $ctx1.sendIdx["/"]=1;
 $7=self._y();
 $ctx1.sendIdx["y"]=1;
-$9=_st(aPoint)._asPoint();
-$8=_st($9)._y();
-$6=_st($7).__slash($8);
+$6=_st($7).__slash(_st(_st(aPoint)._asPoint())._y());
 $1=_st($Point())._x_y_($2,$6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
@@ -3508,24 +3492,21 @@ category: 'arithmetic',
 fn: function (aPoint){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$6,$7,$5,$9,$10,$8,$1;
+var $3,$2,$5,$4,$7,$6,$1;
 $3=_st(aPoint)._class();
 $ctx1.sendIdx["class"]=1;
-$4=self._class();
-$2=_st($3).__eq($4);
+$2=_st($3).__eq(self._class());
 $ctx1.sendIdx["="]=1;
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$6=_st(aPoint)._x();
+$5=_st(aPoint)._x();
 $ctx2.sendIdx["x"]=1;
-$7=self._x();
-$5=_st($6).__eq($7);
+$4=_st($5).__eq(self._x());
 $ctx2.sendIdx["="]=2;
-$9=_st(aPoint)._y();
+$7=_st(aPoint)._y();
 $ctx2.sendIdx["y"]=1;
-$10=self._y();
-$8=_st($9).__eq($10);
-return _st($5).__and($8);
+$6=_st($7).__eq(self._y());
+return _st($4).__and($6);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
@@ -3586,11 +3567,10 @@ category: 'transforming',
 fn: function (delta){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=_st(_st(delta)._x()).__plus(self["@x"]);
 $ctx1.sendIdx["+"]=1;
-$3=_st(_st(delta)._y()).__plus(self["@y"]);
-$1=_st($2).__at($3);
+$1=_st($2).__at(_st(_st(delta)._y()).__plus(self["@y"]));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
 args: ["delta"],

File diff suppressed because it is too large
+ 152 - 231
js/Kernel-Tests.js


+ 29 - 41
js/SUnit-Tests.js

@@ -88,13 +88,12 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(self["@full"])._includes_((5));
 $ctx1.sendIdx["includes:"]=1;
 self._assert_($1);
 $ctx1.sendIdx["assert:"]=1;
-$2=_st(self["@full"])._includes_("abc");
-self._assert_($2);
+self._assert_(_st(self["@full"])._includes_("abc"));
 return self}, function($ctx1) {$ctx1.fill(self,"testIncludes",{},smalltalk.ExampleSetTest)})},
 args: [],
 source: "testIncludes\x0a\x09self assert: (full includes: 5).\x0a\x09self assert: (full includes: #abc)",
@@ -110,7 +109,7 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=_st(self["@empty"])._occurrencesOf_((0));
 $ctx1.sendIdx["occurrencesOf:"]=1;
 self._assert_equals_($1,(0));
@@ -120,8 +119,7 @@ $ctx1.sendIdx["occurrencesOf:"]=2;
 self._assert_equals_($2,(1));
 $ctx1.sendIdx["assert:equals:"]=2;
 _st(self["@full"])._add_((5));
-$3=_st(self["@full"])._occurrencesOf_((5));
-self._assert_equals_($3,(1));
+self._assert_equals_(_st(self["@full"])._occurrencesOf_((5)),(1));
 return self}, function($ctx1) {$ctx1.fill(self,"testOccurrences",{},smalltalk.ExampleSetTest)})},
 args: [],
 source: "testOccurrences\x0a\x09self assert: (empty occurrencesOf: 0) equals: 0.\x0a\x09self assert: (full occurrencesOf: 5) equals: 1.\x0a\x09full add: 5.\x0a\x09self assert: (full occurrencesOf: 5) equals: 1",
@@ -137,13 +135,12 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 _st(self["@full"])._remove_((5));
 $1=_st(self["@full"])._includes_("abc");
 $ctx1.sendIdx["includes:"]=1;
 self._assert_($1);
-$2=_st(self["@full"])._includes_((5));
-self._deny_($2);
+self._deny_(_st(self["@full"])._includes_((5)));
 return self}, function($ctx1) {$ctx1.fill(self,"testRemove",{},smalltalk.ExampleSetTest)})},
 args: [],
 source: "testRemove\x0a\x09full remove: 5.\x0a\x09self assert: (full includes: #abc).\x0a\x09self deny: (full includes: 5)",
@@ -229,17 +226,16 @@ category: 'helpers',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $1;
 self._timeout_((100));
 $ctx1.sendIdx["timeout:"]=1;
 $1=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._timeout_((20));
-$2=self._async_((function(){
+return _st(self._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
-return _st($2)._valueWithTimeout_((30));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._valueWithTimeout_((30));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["async:"]=1;
 _st($1)._valueWithTimeout_((20));
@@ -259,17 +255,16 @@ category: 'helpers',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $1;
 self._timeout_((20));
 $ctx1.sendIdx["timeout:"]=1;
 $1=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._timeout_((40));
-$2=self._async_((function(){
+return _st(self._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
-return _st($2)._valueWithTimeout_((20));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._valueWithTimeout_((20));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["async:"]=1;
 _st($1)._valueWithTimeout_((10));
@@ -365,7 +360,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,$7;
+var $1,$2,$3,$4;
 suite=["fakeError", "fakeErrorFailingInTearDown", "fakeFailure", "testPass"]._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._class())._selector_(each);
@@ -382,18 +377,15 @@ $2=["fakeError"]._asSet();
 $ctx2.sendIdx["asSet"]=1;
 self._assert_equals_($1,$2);
 $ctx2.sendIdx["assert:equals:"]=1;
-$3=self._selectorSetOf_(_st(result)._failures());
-$4=["fakeErrorFailingInTearDown", "fakeFailure"]._asSet();
-self._assert_equals_($3,$4);
+self._assert_equals_(self._selectorSetOf_(_st(result)._failures()),["fakeErrorFailingInTearDown", "fakeFailure"]._asSet());
 return self._finished();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
 return smalltalk.withContext(function($ctx2) {
-$6=_st(ann)._result();
-$5=_st($6).__eq_eq(result);
-if(smalltalk.assert($5)){
-$7=_st(_st(result)._runs()).__eq(_st(result)._total());
-return _st($7)._ifTrue_(assertBlock);
+$3=_st(_st(ann)._result()).__eq_eq(result);
+if(smalltalk.assert($3)){
+$4=_st(_st(result)._runs()).__eq(_st(result)._total());
+return _st($4)._ifTrue_(assertBlock);
 };
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,3)})}));
 _st(runner)._run();
@@ -469,7 +461,7 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._isAsync();
 $ctx1.sendIdx["isAsync"]=1;
 self._deny_($1);
@@ -479,8 +471,7 @@ $2=self._isAsync();
 $ctx1.sendIdx["isAsync"]=2;
 self._assert_($2);
 self._finished();
-$3=self._isAsync();
-self._deny_($3);
+self._deny_(self._isAsync());
 return self}, function($ctx1) {$ctx1.fill(self,"testIsAsyncReturnsCorrectValues",{},smalltalk.SUnitAsyncTest)})},
 args: [],
 source: "testIsAsyncReturnsCorrectValues\x0a\x09self deny: self isAsync.\x0a\x09self timeout: 0.\x0a\x09self assert: self isAsync.\x0a\x09self finished.\x0a\x09self deny: self isAsync",
@@ -524,7 +515,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,$5;
+var $1,$2,$3;
 suite=["fakeTimeout", "fakeMultipleTimeoutFailing", "fakeMultipleTimeoutPassing", "testPass"]._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._class())._selector_(each);
@@ -539,17 +530,15 @@ $1=self._selectorSetOf_(_st(result)._errors());
 $ctx2.sendIdx["selectorSetOf:"]=1;
 self._assert_equals_($1,_st($Set())._new());
 $ctx2.sendIdx["assert:equals:"]=1;
-$2=self._selectorSetOf_(_st(result)._failures());
-self._assert_equals_($2,["fakeMultipleTimeoutFailing", "fakeTimeout"]._asSet());
+self._assert_equals_(self._selectorSetOf_(_st(result)._failures()),["fakeMultipleTimeoutFailing", "fakeTimeout"]._asSet());
 return self._finished();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(ann)._result();
-$3=_st($4).__eq_eq(result);
-if(smalltalk.assert($3)){
-$5=_st(_st(result)._runs()).__eq(_st(result)._total());
-return _st($5)._ifTrue_(assertBlock);
+$2=_st(_st(ann)._result()).__eq_eq(result);
+if(smalltalk.assert($2)){
+$3=_st(_st(result)._runs()).__eq(_st(result)._total());
+return _st($3)._ifTrue_(assertBlock);
 };
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,3)})}));
 _st(runner)._run();
@@ -569,7 +558,7 @@ fn: function (){
 var self=this;
 var x;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 self["@flag"]="bad";
 self._timeout_((10));
 x=(0);
@@ -588,7 +577,7 @@ $ctx2.sendIdx["assert:equals:"]=1;
 $ctx1.sendIdx["async:"]=1;
 self["@flag"]=_st($1)._valueWithTimeout_((0));
 $ctx1.sendIdx["valueWithTimeout:"]=1;
-$2=self._async_((function(){
+self["@flag"]=_st(self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._finished();
 self["@flag"]="ok";
@@ -596,8 +585,7 @@ self["@flag"];
 x=_st(x).__plus((1));
 x;
 return self._assert_equals_(x,(1));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-self["@flag"]=_st($2)._valueWithTimeout_((0));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})})))._valueWithTimeout_((0));
 return self}, function($ctx1) {$ctx1.fill(self,"testTwoAsyncPassesWithFinishedOnlyOneIsRun",{x:x},smalltalk.SUnitAsyncTest)})},
 args: [],
 source: "testTwoAsyncPassesWithFinishedOnlyOneIsRun\x0a\x09| x |\x0a\x09flag := 'bad'.\x0a\x09self timeout: 10.\x0a\x09x := 0.\x0a\x09flag := (self async: [ self finished. flag := 'ok'. x := x+1. self assert: x equals: 1 ]) valueWithTimeout: 0.\x0a\x09flag := (self async: [ self finished. flag := 'ok'. x := x+1. self assert: x equals: 1 ]) valueWithTimeout: 0.",

+ 4 - 7
js/SUnit.js

@@ -83,15 +83,14 @@ category: 'testing',
 fn: function (actual,expected){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$6,$5,$4,$7,$3,$1;
+var $2,$6,$5,$4,$3,$1;
 $2=_st(actual).__eq(expected);
 $6=_st(expected)._printString();
 $ctx1.sendIdx["printString"]=1;
 $5="Expected: ".__comma($6);
 $4=_st($5).__comma(" but was: ");
 $ctx1.sendIdx[","]=2;
-$7=_st(actual)._printString();
-$3=_st($4).__comma($7);
+$3=_st($4).__comma(_st(actual)._printString());
 $ctx1.sendIdx[","]=1;
 $1=self._assert_description_($2,$3);
 return $1;
@@ -922,14 +921,12 @@ category: 'running',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._runs();
 $ctx1.sendIdx["runs"]=1;
 $2=_st($3).__eq_eq(self._total());
 if(! smalltalk.assert($2)){
-$5=self._runs();
-$4=_st($5).__plus((1));
-$1=_st(aBlock)._value_($4);
+$1=_st(aBlock)._value_(_st(self._runs()).__plus((1)));
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nextRunDo:",{aBlock:aBlock},smalltalk.TestResult)})},

+ 8 - 15
js/Spaces.js

@@ -28,13 +28,11 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 $1="body"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._append_("<iframe style=\x22display: none;\x22></iframe>");
-$3="iframe"._asJQuery();
-$2=_st($3)._get();
-self["@frame"]=_st($2)._last();
+self["@frame"]=_st(_st("iframe"._asJQuery())._get())._last();
 _st(_st(self["@frame"])._contentWindow())._location_(_st(window)._location());
 return self}, function($ctx1) {$ctx1.fill(self,"create",{},smalltalk.ObjectSpace)})},
 args: [],
@@ -76,15 +74,14 @@ fn: function (aBlock){
 var self=this;
 function $ObjectSpaceConnectionError(){return smalltalk.ObjectSpaceConnectionError||(typeof ObjectSpaceConnectionError=="undefined"?nil:ObjectSpaceConnectionError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$6,$5,$3;
+var $1,$2,$4,$5,$3;
 $1=self._isConnected();
 if(! smalltalk.assert($1)){
 $2=_st($ObjectSpaceConnectionError())._signal();
 return $2;
 };
 $4=_st(self["@frame"])._contentWindow();
-$6="(".__comma(_st(aBlock)._compiledSource());
-$5=_st($6).__comma(")()");
+$5=_st("(".__comma(_st(aBlock)._compiledSource())).__comma(")()");
 $ctx1.sendIdx[","]=1;
 $3=_st($4)._eval_($5);
 return $3;
@@ -308,7 +305,7 @@ var self=this;
 var result;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 _st(self["@space"])._whenReadyDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 result=_st(self["@space"])._do_((function(){
@@ -320,9 +317,7 @@ $2=_st(result)._class();
 $ctx2.sendIdx["class"]=1;
 $1=_st($2)._name();
 self._assert_equals_($1,"Smalltalk");
-$4=_st(result)._class();
-$3=_st($4).__eq($Smalltalk());
-self._deny_($3);
+self._deny_(_st(_st(result)._class()).__eq($Smalltalk()));
 $ctx2.sendIdx["deny:"]=1;
 return self._deny_(_st(result).__eq_eq(smalltalk));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -341,16 +336,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=_st(self["@space"])._frame();
 $ctx1.sendIdx["frame"]=1;
 $1=_st($2)._isNil();
 $ctx1.sendIdx["isNil"]=1;
 self._deny_($1);
 _st(self["@space"])._release();
-$4=_st(self["@space"])._frame();
-$3=_st($4)._isNil();
-self._assert_($3);
+self._assert_(_st(_st(self["@space"])._frame())._isNil());
 return self}, function($ctx1) {$ctx1.fill(self,"testRelease",{},smalltalk.ObjectSpaceTest)})},
 args: [],
 source: "testRelease\x0a\x0a\x09self deny: space frame isNil.\x0a\x0a\x09space release.\x0a\x09\x0a\x09self assert: space frame isNil",

+ 8 - 2
st/Compiler-AST.st

@@ -560,9 +560,15 @@ isSendNode
 !
 
 shouldBeAliased
+	"Because we keep track of send indexes, some send nodes need additional care for aliasing. 
+	See IRJSVisitor >> visitIRSend:"
+	
+	| sends |
+	
+	sends := (self method sendIndexes at: self selector) size.
+	
 	^ super shouldBeAliased or: [
-		(self method sendIndexes at: self selector) size > 1 and: [
-			self isReferenced ] ]
+		(sends > 1 and: [ self index < sends ]) and: [ self isReferenced ] ]
 !
 
 stopOnStepping

+ 0 - 4
st/Helios-Core.st

@@ -924,10 +924,6 @@ previous: aWidget
 
 !HLNavigationListWidget methodsFor: 'actions'!
 
-activateItem: anObject
-	self activateListItem: ((wrapper asJQuery find: 'li[list-data="',  (self items indexOf: anObject ifAbsent: [ ^self ]) asString, '"]') eq: 0)
-!
-
 nextFocus
 	self next ifNotNil: [ self next focus ]
 !

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