Browse Source

Recompiled all packages

Nicolas Petton 10 years ago
parent
commit
803bb9fbcc

+ 68 - 18
js/Benchfib.js

@@ -29,12 +29,20 @@ category: '*Benchfib',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$5,$4,$7,$6,$3,$1;
 $2=self.__lt((2));
 if(smalltalk.assert($2)){
 $1=(1);
 } else {
-$1=_st(_st(_st(self.__minus((1)))._benchFib()).__plus(_st(self.__minus((2)))._benchFib())).__plus((1));
+$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);
+$1=_st($3).__plus((1));
+$ctx1.sendIdx["+"]=1;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"benchFib",{},smalltalk.Number)})},
@@ -54,9 +62,9 @@ var self=this;
 var size,flags,prime,k,count;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $2,$1,$3;
 size=(8190);
-(1)._to_do_(self,(function(iter){
+$1=(1)._to_do_(self,(function(iter){
 return smalltalk.withContext(function($ctx2) {
 count=(0);
 count;
@@ -68,11 +76,13 @@ return _st(flags)._add_(true);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 return (1)._to_do_(size,(function(i){
 return smalltalk.withContext(function($ctx3) {
-$1=_st(flags)._at_(i);
-if(smalltalk.assert($1)){
+$2=_st(flags)._at_(i);
+if(smalltalk.assert($2)){
 prime=_st(i).__plus((1));
+$ctx3.sendIdx["+"]=1;
 prime;
 k=_st(i).__plus(prime);
+$ctx3.sendIdx["+"]=2;
 k;
 _st((function(){
 return smalltalk.withContext(function($ctx4) {
@@ -81,6 +91,7 @@ return _st(k).__lt_eq(size);
 return smalltalk.withContext(function($ctx4) {
 _st(flags)._at_put_(k,false);
 k=_st(k).__plus(prime);
+$ctx4.sendIdx["+"]=3;
 return k;
 }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
 count=_st(count).__plus((1));
@@ -88,8 +99,9 @@ return count;
 };
 }, function($ctx3) {$ctx3.fillBlock({i:i},$ctx2,3)})}));
 }, function($ctx2) {$ctx2.fillBlock({iter:iter},$ctx1,1)})}));
-$2=count;
-return $2;
+$ctx1.sendIdx["to:do:"]=1;
+$3=count;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"benchmark",{size:size,flags:flags,prime:prime,k:k,count:count},smalltalk.Number)})},
 args: [],
 source: "benchmark\x0a\x09\x22Handy bytecode-heavy benchmark\x22\x0a\x09\x22(500000 // time to run) = approx bytecodes per second\x22\x0a\x09\x225000000 // (Time millisecondsToRun: [10 benchmark]) * 1000\x22\x0a\x09\x223059000 on a Mac 8100/100\x22\x0a\x09| size flags prime k count |\x0a\x09size := 8190.\x0a\x091 to: self do:\x0a\x09\x09[:iter |\x0a\x09\x09count := 0.\x0a\x09\x09flags := Array new.\x0a\x09\x09size timesRepeat: [ flags add: true].\x0a\x09\x091 to: size do:\x0a\x09\x09\x09[:i | (flags at: i) ifTrue:\x0a\x09\x09\x09\x09[prime := i+1.\x0a\x09\x09\x09\x09k := i + prime.\x0a\x09\x09\x09\x09[k <= size] whileTrue:\x0a\x09\x09\x09\x09\x09[flags at: k put: false.\x0a\x09\x09\x09\x09\x09k := k + prime].\x0a\x09\x09\x09\x09count := count + 1]]].\x0a\x09^ count",
@@ -163,23 +175,27 @@ 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 $1;
+var $1,$2,$9,$8,$7,$6,$5,$12,$11,$10,$4,$3;
 n1=(1);
-_st((function(){
+$1=_st((function(){
 return smalltalk.withContext(function($ctx2) {
 t1=_st($Date())._millisecondsToRun_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(n1)._jsbenchmark();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+$ctx2.sendIdx["millisecondsToRun:"]=1;
 t1;
 return _st(t1).__lt((1000));
+$ctx2.sendIdx["<"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
 return smalltalk.withContext(function($ctx2) {
 n1=_st(n1).__star((2));
+$ctx2.sendIdx["*"]=1;
 return n1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
+$ctx1.sendIdx["whileTrue:"]=1;
 n2=(28);
-_st((function(){
+$2=_st((function(){
 return smalltalk.withContext(function($ctx2) {
 t2=_st($Date())._millisecondsToRun_((function(){
 return smalltalk.withContext(function($ctx3) {
@@ -193,8 +209,23 @@ return smalltalk.withContext(function($ctx2) {
 n2=_st(n2).__plus((1));
 return n2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
-$1=_st(_st(_st(_st(_st(_st(_st(n1).__star((500000))).__star((1000))).__slash(t1))._printString()).__comma(" bytecodes/sec; ")).__comma(_st(_st(_st(r).__star((1000))).__slash(t2))._printString())).__comma(" sends/sec");
-return $1;
+$9=_st(n1).__star((500000));
+$ctx1.sendIdx["*"]=3;
+$8=_st($9).__star((1000));
+$ctx1.sendIdx["*"]=2;
+$7=_st($8).__slash(t1);
+$ctx1.sendIdx["/"]=1;
+$6=_st($7)._printString();
+$ctx1.sendIdx["printString"]=1;
+$5=_st($6).__comma(" bytecodes/sec; ");
+$12=_st(r).__star((1000));
+$11=_st($12).__slash(t2);
+$10=_st($11)._printString();
+$4=_st($5).__comma($10);
+$ctx1.sendIdx[","]=2;
+$3=_st($4).__comma(" sends/sec");
+$ctx1.sendIdx[","]=1;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"jstinyBenchmarks",{t1:t1,t2:t2,r:r,n1:n1,n2:n2},smalltalk.Number)})},
 args: [],
 source: "jstinyBenchmarks\x0a\x09\x220 jstinyBenchmarks\x22\x0a\x0a\x09| t1 t2 r n1 n2 |\x0a\x09n1 := 1.\x0a\x09[t1 := Date millisecondsToRun: [n1 jsbenchmark].\x0a\x09t1 < 1000] whileTrue:[n1 := n1 * 2]. \x22Note: #benchmark's runtime is about O(n)\x22\x0a\x0a\x09n2 := 28.\x0a\x09[t2 := Date millisecondsToRun: [r := n2 jsbenchFib].\x0a\x09t2 < 1000] whileTrue:[n2 := n2 + 1].\x0a\x09\x22Note: #jsbenchFib's runtime is about O(k^n),\x0a\x09\x09where k is the golden number = (1 + 5 sqrt) / 2 = 1.618....\x22\x0a\x0a\x09^ ((n1 * 500000 * 1000) / t1) printString, ' bytecodes/sec; ',\x0a\x09\x09((r * 1000) / t2) printString, ' sends/sec'",
@@ -212,23 +243,27 @@ 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 $1;
+var $1,$2,$9,$8,$7,$6,$5,$12,$11,$10,$4,$3;
 n1=(1);
-_st((function(){
+$1=_st((function(){
 return smalltalk.withContext(function($ctx2) {
 t1=_st($Date())._millisecondsToRun_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(n1)._benchmark();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+$ctx2.sendIdx["millisecondsToRun:"]=1;
 t1;
 return _st(t1).__lt((1000));
+$ctx2.sendIdx["<"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
 return smalltalk.withContext(function($ctx2) {
 n1=_st(n1).__star((2));
+$ctx2.sendIdx["*"]=1;
 return n1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
+$ctx1.sendIdx["whileTrue:"]=1;
 n2=(16);
-_st((function(){
+$2=_st((function(){
 return smalltalk.withContext(function($ctx2) {
 t2=_st($Date())._millisecondsToRun_((function(){
 return smalltalk.withContext(function($ctx3) {
@@ -242,8 +277,23 @@ return smalltalk.withContext(function($ctx2) {
 n2=_st(n2).__plus((1));
 return n2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
-$1=_st(_st(_st(_st(_st(_st(_st(n1).__star((500000))).__star((1000))).__slash(t1))._printString()).__comma(" bytecodes/sec; ")).__comma(_st(_st(_st(r).__star((1000))).__slash(t2))._printString())).__comma(" sends/sec");
-return $1;
+$9=_st(n1).__star((500000));
+$ctx1.sendIdx["*"]=3;
+$8=_st($9).__star((1000));
+$ctx1.sendIdx["*"]=2;
+$7=_st($8).__slash(t1);
+$ctx1.sendIdx["/"]=1;
+$6=_st($7)._printString();
+$ctx1.sendIdx["printString"]=1;
+$5=_st($6).__comma(" bytecodes/sec; ");
+$12=_st(r).__star((1000));
+$11=_st($12).__slash(t2);
+$10=_st($11)._printString();
+$4=_st($5).__comma($10);
+$ctx1.sendIdx[","]=2;
+$3=_st($4).__comma(" sends/sec");
+$ctx1.sendIdx[","]=1;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"tinyBenchmarks",{t1:t1,t2:t2,r:r,n1:n1,n2:n2},smalltalk.Number)})},
 args: [],
 source: "tinyBenchmarks\x0a\x09\x22Report the results of running the two tiny Squeak benchmarks.\x0a\x09ar 9/10/1999: Adjusted to run at least 1 sec to get more stable results\x22\x0a\x09\x220 tinyBenchmarks\x22\x0a\x09\x22On a 292 MHz G3 Mac: 22727272 bytecodes/sec; 984169 sends/sec\x22\x0a\x09\x22On a 400 MHz PII/Win98: 18028169 bytecodes/sec; 1081272 sends/sec\x22\x0a\x09| t1 t2 r n1 n2 |\x0a\x09n1 := 1.\x0a\x09[t1 := Date millisecondsToRun: [n1 benchmark].\x0a\x09t1 < 1000] whileTrue:[n1 := n1 * 2]. \x22Note: #benchmark's runtime is about O(n)\x22\x0a\x0a\x09n2 := 16.\x0a\x09[t2 := Date millisecondsToRun: [r := n2 benchFib].\x0a\x09t2 < 1000] whileTrue:[n2 := n2 + 1].\x0a\x09\x22Note: #benchFib's runtime is about O(k^n),\x0a\x09\x09where k is the golden number = (1 + 5 sqrt) / 2 = 1.618....\x22\x0a\x0a\x09^ ((n1 * 500000 * 1000) / t1) printString, ' bytecodes/sec; ',\x0a\x09\x09((r * 1000) / t2) printString, ' sends/sec'",

+ 47 - 25
js/Canvas.js

@@ -627,11 +627,18 @@ fn: function (aString){
 var self=this;
 var result;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-result=_st(_st("<span />"._asJQuery())._html_(_st("&".__comma(aString)).__comma(";")))._text();
-$1=_st(_st(result)._size()).__eq((1));
-if(! smalltalk.assert($1)){
-self._error_("Not an HTML entity: ".__comma(aString));
+var $2,$4,$3,$1,$5,$6;
+$2="<span />"._asJQuery();
+$4="&".__comma(aString);
+$ctx1.sendIdx[","]=2;
+$3=_st($4).__comma(";");
+$ctx1.sendIdx[","]=1;
+$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._with_(result);
 return self}, function($ctx1) {$ctx1.fill(self,"entity:",{aString:aString,result:result},smalltalk.HTMLCanvas)})},
@@ -1700,17 +1707,19 @@ var self=this;
 var clone,caret;
 function $TagBrush(){return smalltalk.TagBrush||(typeof TagBrush=="undefined"?nil:TagBrush)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3;
 clone=_st(_st(anElement)._asJQuery())._clone();
-self._with_(_st($TagBrush())._fromJQuery_canvas_(clone,self));
+$1=_st($TagBrush())._fromJQuery_canvas_(clone,self);
+$ctx1.sendIdx["fromJQuery:canvas:"]=1;
+self._with_($1);
 caret=_st(clone)._find_("[data-snippet=\x22*\x22]");
-$1=_st(_st(caret)._toArray())._isEmpty();
-if(smalltalk.assert($1)){
+$2=_st(_st(caret)._toArray())._isEmpty();
+if(smalltalk.assert($2)){
 caret=clone;
 caret;
 };
-$2=_st($TagBrush())._fromJQuery_canvas_(_st(caret)._removeAttr_("data-snippet"),self);
-return $2;
+$3=_st($TagBrush())._fromJQuery_canvas_(_st(caret)._removeAttr_("data-snippet"),self);
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"snippet:",{anElement:anElement,clone:clone,caret:caret},smalltalk.HTMLCanvas)})},
 args: ["anElement"],
 source: "snippet: anElement\x0a\x09\x22Adds clone of anElement, finds [data-snippet=\x22\x22*\x22\x22] subelement\x0a\x09and returns TagBrush as if that subelement was just added.\x0a\x09\x0a\x09Rarely needed to use directly, use `html foo` dynamically installed method\x0a\x09for a snippet named foo.\x22\x0a\x09\x0a\x09| clone caret |\x0a\x09\x0a\x09clone := anElement asJQuery clone.\x0a\x09self with: (TagBrush fromJQuery: clone canvas: self).\x0a\x09caret := clone find: '[data-snippet=\x22*\x22]'.\x0a\x09caret toArray isEmpty ifTrue: [ caret := clone ].\x0a\x09^TagBrush fromJQuery: (caret removeAttr: 'data-snippet') canvas: self",
@@ -2199,8 +2208,11 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(jQuery)._at_("browser"))._at_("msie"))._notNil();
+var $3,$2,$1;
+$3=_st(jQuery)._at_("browser");
+$2=_st($3)._at_("msie");
+$ctx1.sendIdx["at:"]=1;
+$1=_st($2)._notNil();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isMSIE",{},smalltalk.HTMLCanvas.klass)})},
 args: [],
@@ -2217,8 +2229,11 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(jQuery)._at_("browser"))._at_("mozilla"))._notNil();
+var $3,$2,$1;
+$3=_st(jQuery)._at_("browser");
+$2=_st($3)._at_("mozilla");
+$ctx1.sendIdx["at:"]=1;
+$1=_st($2)._notNil();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isMozilla",{},smalltalk.HTMLCanvas.klass)})},
 args: [],
@@ -2235,8 +2250,11 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(jQuery)._at_("browser"))._at_("opera"))._notNil();
+var $3,$2,$1;
+$3=_st(jQuery)._at_("browser");
+$2=_st($3)._at_("opera");
+$ctx1.sendIdx["at:"]=1;
+$1=_st($2)._notNil();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isOpera",{},smalltalk.HTMLCanvas.klass)})},
 args: [],
@@ -2253,8 +2271,11 @@ category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(jQuery)._at_("browser"))._at_("webkit"))._notNil();
+var $3,$2,$1;
+$3=_st(jQuery)._at_("browser");
+$2=_st($3)._at_("webkit");
+$ctx1.sendIdx["at:"]=1;
+$1=_st($2)._notNil();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isWebkit",{},smalltalk.HTMLCanvas.klass)})},
 args: [],
@@ -2645,10 +2666,12 @@ fn: function (aBlock){
 var self=this;
 var root;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 root=_st(self["@canvas"])._root();
-_st(self["@canvas"])._root_(self);
+$1=_st(self["@canvas"])._root_(self);
+$ctx1.sendIdx["root:"]=1;
 _st(aBlock)._value_(self["@canvas"]);
-_st(self["@canvas"])._root_(root);
+$2=_st(self["@canvas"])._root_(root);
 return self}, function($ctx1) {$ctx1.fill(self,"appendBlock:",{aBlock:aBlock,root:root},smalltalk.TagBrush)})},
 args: ["aBlock"],
 source: "appendBlock: aBlock\x0a\x09| root |\x0a\x09root := canvas root.\x0a\x09canvas root: self.\x0a\x09aBlock value: canvas.\x0a\x09canvas root: root",
@@ -2815,10 +2838,9 @@ category: 'adding',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._empty();
-$2=_st($1)._append_(anObject);
+var $1;
+self._empty();
+$1=self._append_(anObject);
 return self}, function($ctx1) {$ctx1.fill(self,"contents:",{anObject:anObject},smalltalk.TagBrush)})},
 args: ["anObject"],
 source: "contents: anObject\x0a\x09self\x0a\x09empty;\x0a\x09append: anObject",

+ 67 - 35
js/Compiler-AST.js

@@ -249,12 +249,16 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(self._nodes())._isEmpty();
+var $3,$2,$5,$4,$1;
+$3=self._nodes();
+$ctx1.sendIdx["nodes"]=1;
+$2=_st($3)._isEmpty();
 if(smalltalk.assert($2)){
 $1=self;
 } else {
-$1=_st(_st(self._nodes())._first())._nextChild();
+$5=self._nodes();
+$4=_st($5)._first();
+$1=_st($4)._nextChild();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nextChild",{},smalltalk.Node)})},
@@ -298,16 +302,20 @@ fn: function (aNode){
 var self=this;
 var next;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$4,$3,$2,$5;
 var $early={};
 try {
-next=_st(self._nodes())._at_ifAbsent_(_st(_st(self._nodes())._indexOf_(aNode)).__plus((1)),(function(){
+$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(){
 return smalltalk.withContext(function($ctx2) {
-$1=self;
-throw $early=[$1];
+throw $early=[self];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$2=_st(next)._nextChild();
-return $2;
+$5=_st(next)._nextChild();
+return $5;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode,next:next},smalltalk.Node)})},
@@ -564,11 +572,12 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self._shouldBeAliased())._or_((function(){
+var $2,$1;
+$2=_st(self._shouldBeAliased())._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._shouldBeInlined();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._or_((function(){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$1=_st($2)._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(self._nodes())._detect_ifNone_((function(each){
 return smalltalk.withContext(function($ctx3) {
@@ -578,6 +587,7 @@ return smalltalk.withContext(function($ctx3) {
 return false;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}))).__tild_eq(false);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
+$ctx1.sendIdx["or:"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},smalltalk.Node)})},
 args: [],
@@ -759,9 +769,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"nextChild",{},smalltalk.BlockNode)})},
 args: [],
 source: "nextChild\x0a\x09\x22Answer the receiver as we want to avoid eager evaluation\x22\x0a\x09\x0a\x09^ self",
@@ -777,9 +785,7 @@ category: 'accessing',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode},smalltalk.BlockNode)})},
 args: ["aNode"],
 source: "nextNode: aNode\x0a\x09\x22Answer the receiver as we want to avoid eager evaluation\x22\x0a\x09\x0a\x09^ self",
@@ -1179,8 +1185,19 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(self._source())._lines())._size()).__at(_st(_st(_st(_st(self._source())._lines())._last())._size()).__plus((1)));
+var $4,$3,$2,$9,$8,$7,$6,$5,$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);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"extent",{},smalltalk.MethodNode)})},
 args: [],
@@ -1563,9 +1580,11 @@ function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$4,$5,$3;
 $1=_st($SendNode())._new();
+$ctx1.sendIdx["new"]=1;
 _st($1)._selector_(self._selector());
 _st($1)._arguments_(self._arguments());
 $2=_st($1)._yourself();
+$ctx1.sendIdx["yourself"]=1;
 first=$2;
 $4=_st($CascadeNode())._new();
 _st($4)._receiver_(self._receiver());
@@ -1657,19 +1676,26 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$3;
+var $1,$3,$2,$6,$7,$5,$8,$9,$10,$4;
 $1=self._receiver();
+$ctx1.sendIdx["receiver"]=1;
 if(($receiver = $1) == nil || $receiver == null){
-$2=_st(self._arguments())._copy();
+$3=self._arguments();
+$ctx1.sendIdx["arguments"]=1;
+$2=_st($3)._copy();
 return $2;
 } else {
 $1;
 };
-$4=_st($Array())._with_(self._receiver());
-_st($4)._addAll_(self._arguments());
-$5=_st($4)._yourself();
-$3=$5;
-return $3;
+$6=$Array();
+$7=self._receiver();
+$5=_st($6)._with_($7);
+$8=$5;
+$9=self._arguments();
+_st($8)._addAll_($9);
+$10=_st($5)._yourself();
+$4=$10;
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.SendNode)})},
 args: [],
 source: "nodes\x0a\x09self receiver ifNil: [ ^ self arguments copy ].\x0a\x09\x0a\x09^ (Array with: self receiver)\x0a\x09\x09addAll: self arguments;\x0a\x09\x09yourself",
@@ -1835,21 +1861,23 @@ 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,$4,$6,$1;
+var $2,$3,$5,$6,$4,$7,$1;
 $2=_st($SendNode())._new();
 _st($2)._position_(self._position());
 $3=$2;
 $5=self._receiver();
+$ctx1.sendIdx["receiver"]=1;
 if(($receiver = $5) == nil || $receiver == null){
 $4=anObject;
 } else {
-$4=_st(self._receiver())._valueForReceiver_(anObject);
+$6=self._receiver();
+$4=_st($6)._valueForReceiver_(anObject);
 };
 _st($3)._receiver_($4);
 _st($2)._selector_(self._selector());
 _st($2)._arguments_(self._arguments());
-$6=_st($2)._yourself();
-$1=$6;
+$7=_st($2)._yourself();
+$1=$7;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"valueForReceiver:",{anObject:anObject},smalltalk.SendNode)})},
 args: ["anObject"],
@@ -2300,13 +2328,17 @@ fn: function (){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(self._source())._ifEmpty_((function(){
+var $1,$3,$4,$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)})}));
-$1=_st(_st($Smalltalk())._current())._parse_(self._source());
-return $1;
+$3=_st($Smalltalk())._current();
+$4=self._source();
+$2=_st($3)._parse_($4);
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"ast",{},smalltalk.CompiledMethod)})},
 args: [],
 source: "ast\x0a\x09self source ifEmpty: [ self error: 'Method source is empty' ].\x0a\x09\x0a\x09^ Smalltalk current parse: self source",

+ 43 - 27
js/Compiler-Core.js

@@ -11,13 +11,15 @@ category: 'accessing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$3,$4,$1;
 $2=_st(aClass)._isMetaclass();
 if(smalltalk.assert($2)){
-$1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
+$3=_st(_st(aClass)._instanceClass())._name();
+$ctx1.sendIdx["name"]=1;
+$1=_st($3).__comma(".klass");
 } else {
-$3=_st(aClass)._isNil();
-if(smalltalk.assert($3)){
+$4=_st(aClass)._isNil();
+if(smalltalk.assert($4)){
 $1="nil";
 } else {
 $1=_st(aClass)._name();
@@ -176,15 +178,17 @@ fn: function (aNode){
 var self=this;
 var ir,stream;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-_st(self._semanticAnalyzer())._visit_(aNode);
+var $1,$3,$4,$2;
+$1=_st(self._semanticAnalyzer())._visit_(aNode);
+$ctx1.sendIdx["visit:"]=1;
 ir=_st(self._translator())._visit_(aNode);
-$2=self._irTranslator();
-_st($2)._currentClass_(self._currentClass());
-_st($2)._visit_(ir);
-$3=_st($2)._contents();
-$1=$3;
-return $1;
+$ctx1.sendIdx["visit:"]=2;
+$3=self._irTranslator();
+_st($3)._currentClass_(self._currentClass());
+_st($3)._visit_(ir);
+$4=_st($3)._contents();
+$2=$4;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,ir:ir,stream:stream},smalltalk.CodeGenerator)})},
 args: ["aNode"],
 source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09^ self irTranslator\x0a\x09\x09currentClass: self currentClass;\x0a\x09\x09visit: ir;\x0a\x09\x09contents",
@@ -344,11 +348,14 @@ fn: function (aString){
 var self=this;
 function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1,$3;
 self._currentClass_($DoIt());
-self._source_(_st("doIt ^[".__comma(aString)).__comma("] value"));
-$1=self._compileNode_(self._parse_(self._source()));
-return $1;
+$2="doIt ^[".__comma(aString);
+$1=_st($2).__comma("] value");
+$ctx1.sendIdx[","]=1;
+self._source_($1);
+$3=self._compileNode_(self._parse_(self._source()));
+return $3;
 }, 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)",
@@ -364,11 +371,14 @@ category: 'compiling',
 fn: function (aString,anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1,$3;
 self._currentClass_(_st(anObject)._class());
-self._source_(_st("xxxDoIt ^[".__comma(aString)).__comma("] value"));
-$1=self._compileNode_(self._parse_(self._source()));
-return $1;
+$2="xxxDoIt ^[".__comma(aString);
+$1=_st($2).__comma("] value");
+$ctx1.sendIdx[","]=1;
+self._source_($1);
+$3=self._compileNode_(self._parse_(self._source()));
+return $3;
 }, 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)",
@@ -479,14 +489,17 @@ fn: function (aString,anObject){
 var self=this;
 var result,method;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2,$3;
 method=self._eval_(self._compileExpression_on_(aString,anObject));
 _st(method)._category_("xxxDoIt");
-_st(_st(anObject)._class())._addCompiledMethod_(method);
+$1=_st(anObject)._class();
+$ctx1.sendIdx["class"]=1;
+_st($1)._addCompiledMethod_(method);
 result=_st(anObject)._xxxDoIt();
-_st(_st(anObject)._class())._removeCompiledMethod_(method);
-$1=result;
-return $1;
+$2=_st(anObject)._class();
+_st($2)._removeCompiledMethod_(method);
+$3=result;
+return $3;
 }, 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",
@@ -540,8 +553,11 @@ category: 'compiling',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self._parse_(_st("doIt ^[".__comma(aString)).__comma("] value"));
+var $3,$2,$1;
+$3="doIt ^[".__comma(aString);
+$2=_st($3).__comma("] value");
+$ctx1.sendIdx[","]=1;
+$1=self._parse_($2);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parseExpression:",{aString:aString},smalltalk.Compiler)})},
 args: ["aString"],

+ 8 - 4
js/Compiler-Exceptions.js

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

File diff suppressed because it is too large
+ 497 - 208
js/Compiler-IR.js


+ 419 - 169
js/Compiler-Inlining.js

@@ -341,14 +341,22 @@ category: 'testing',
 fn: function (anIRAssignment){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $4,$3,$2,$6,$5,$1;
 $1=_st(_st(_st(anIRAssignment)._isInlined())._not())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(_st(anIRAssignment)._instructions())._last())._isSend())._and_((function(){
+$4=_st(anIRAssignment)._instructions();
+$ctx2.sendIdx["instructions"]=1;
+$3=_st($4)._last();
+$ctx2.sendIdx["last"]=1;
+$2=_st($3)._isSend();
+return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-return self._shouldInlineSend_(_st(_st(anIRAssignment)._instructions())._last());
+$6=_st(anIRAssignment)._instructions();
+$5=_st($6)._last();
+return self._shouldInlineSend_($5);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["and:"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shouldInlineAssignment:",{anIRAssignment:anIRAssignment},smalltalk.IRInliner)})},
 args: ["anIRAssignment"],
@@ -365,14 +373,22 @@ category: 'testing',
 fn: function (anIRReturn){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $4,$3,$2,$6,$5,$1;
 $1=_st(_st(_st(anIRReturn)._isInlined())._not())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(_st(anIRReturn)._instructions())._first())._isSend())._and_((function(){
+$4=_st(anIRReturn)._instructions();
+$ctx2.sendIdx["instructions"]=1;
+$3=_st($4)._first();
+$ctx2.sendIdx["first"]=1;
+$2=_st($3)._isSend();
+return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-return self._shouldInlineSend_(_st(_st(anIRReturn)._instructions())._first());
+$6=_st(anIRReturn)._instructions();
+$5=_st($6)._first();
+return self._shouldInlineSend_($5);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["and:"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shouldInlineReturn:",{anIRReturn:anIRReturn},smalltalk.IRInliner)})},
 args: ["anIRReturn"],
@@ -413,25 +429,34 @@ var self=this;
 var localReturn;
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5;
-$1=_st(_st(anIRNonLocalReturn)._scope())._canInlineNonLocalReturns();
+var $2,$1,$4,$3,$5,$6,$7,$8,$9,$10,$11;
+$2=_st(anIRNonLocalReturn)._scope();
+$ctx1.sendIdx["scope"]=1;
+$1=_st($2)._canInlineNonLocalReturns();
 if(smalltalk.assert($1)){
-_st(_st(_st(anIRNonLocalReturn)._scope())._methodScope())._removeNonLocalReturn_(_st(anIRNonLocalReturn)._scope());
-$2=_st($IRReturn())._new();
-_st($2)._scope_(_st(anIRNonLocalReturn)._scope());
-$3=_st($2)._yourself();
-localReturn=$3;
+$4=_st(anIRNonLocalReturn)._scope();
+$ctx1.sendIdx["scope"]=2;
+$3=_st($4)._methodScope();
+$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;
 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);
-$4=localReturn;
-return $4;
+$10=localReturn;
+return $10;
 };
-$5=smalltalk.IRInliner.superclass.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
-return $5;
+$11=smalltalk.IRInliner.superclass.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
+return $11;
 }, 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",
@@ -577,14 +602,27 @@ category: 'visiting',
 fn: function (anIRInlinedIfFalse){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._stream())._nextPutIf_with_((function(){
+var $1,$2,$4,$3,$5,$7,$6;
+$1=self._stream();
+$ctx1.sendIdx["stream"]=1;
+_st($1)._nextPutIf_with_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self._stream())._nextPutAll_("! smalltalk.assert(");
-self._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._first());
-return _st(self._stream())._nextPutAll_(")");
+$2=self._stream();
+$ctx2.sendIdx["stream"]=2;
+_st($2)._nextPutAll_("! smalltalk.assert(");
+$ctx2.sendIdx["nextPutAll:"]=1;
+$4=_st(anIRInlinedIfFalse)._instructions();
+$ctx2.sendIdx["instructions"]=1;
+$3=_st($4)._first();
+self._visit_($3);
+$ctx2.sendIdx["visit:"]=1;
+$5=self._stream();
+return _st($5)._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-return self._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._last());
+$7=_st(anIRInlinedIfFalse)._instructions();
+$6=_st($7)._last();
+return self._visit_($6);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfFalse:",{anIRInlinedIfFalse:anIRInlinedIfFalse},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfFalse"],
@@ -601,14 +639,27 @@ category: 'visiting',
 fn: function (anIRInlinedIfNil){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._stream())._nextPutIf_with_((function(){
+var $1,$2,$4,$3,$5,$7,$6;
+$1=self._stream();
+$ctx1.sendIdx["stream"]=1;
+_st($1)._nextPutIf_with_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self._stream())._nextPutAll_("($receiver = ");
-self._visit_(_st(_st(anIRInlinedIfNil)._instructions())._first());
-return _st(self._stream())._nextPutAll_(") == nil || $receiver == null");
+$2=self._stream();
+$ctx2.sendIdx["stream"]=2;
+_st($2)._nextPutAll_("($receiver = ");
+$ctx2.sendIdx["nextPutAll:"]=1;
+$4=_st(anIRInlinedIfNil)._instructions();
+$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");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-return self._visit_(_st(_st(anIRInlinedIfNil)._instructions())._last());
+$7=_st(anIRInlinedIfNil)._instructions();
+$6=_st($7)._last();
+return self._visit_($6);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNil:",{anIRInlinedIfNil:anIRInlinedIfNil},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfNil"],
@@ -625,17 +676,34 @@ category: 'visiting',
 fn: function (anIRInlinedIfNilIfNotNil){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._stream())._nextPutIfElse_with_with_((function(){
+var $1,$2,$4,$3,$5,$7,$6,$9,$8;
+$1=self._stream();
+$ctx1.sendIdx["stream"]=1;
+_st($1)._nextPutIfElse_with_with_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self._stream())._nextPutAll_("($receiver = ");
-self._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._first());
-return _st(self._stream())._nextPutAll_(") == nil || $receiver == null");
+$2=self._stream();
+$ctx2.sendIdx["stream"]=2;
+_st($2)._nextPutAll_("($receiver = ");
+$ctx2.sendIdx["nextPutAll:"]=1;
+$4=_st(anIRInlinedIfNilIfNotNil)._instructions();
+$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");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-return self._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._second());
+$7=_st(anIRInlinedIfNilIfNotNil)._instructions();
+$ctx2.sendIdx["instructions"]=2;
+$6=_st($7)._second();
+return self._visit_($6);
+$ctx2.sendIdx["visit:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-return self._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._third());
+$9=_st(anIRInlinedIfNilIfNotNil)._instructions();
+$8=_st($9)._third();
+return self._visit_($8);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNilIfNotNil:",{anIRInlinedIfNilIfNotNil:anIRInlinedIfNilIfNotNil},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfNilIfNotNil"],
@@ -652,14 +720,27 @@ category: 'visiting',
 fn: function (anIRInlinedIfTrue){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._stream())._nextPutIf_with_((function(){
+var $1,$2,$4,$3,$5,$7,$6;
+$1=self._stream();
+$ctx1.sendIdx["stream"]=1;
+_st($1)._nextPutIf_with_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self._stream())._nextPutAll_("smalltalk.assert(");
-self._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._first());
-return _st(self._stream())._nextPutAll_(")");
+$2=self._stream();
+$ctx2.sendIdx["stream"]=2;
+_st($2)._nextPutAll_("smalltalk.assert(");
+$ctx2.sendIdx["nextPutAll:"]=1;
+$4=_st(anIRInlinedIfTrue)._instructions();
+$ctx2.sendIdx["instructions"]=1;
+$3=_st($4)._first();
+self._visit_($3);
+$ctx2.sendIdx["visit:"]=1;
+$5=self._stream();
+return _st($5)._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-return self._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._last());
+$7=_st(anIRInlinedIfTrue)._instructions();
+$6=_st($7)._last();
+return self._visit_($6);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrue:",{anIRInlinedIfTrue:anIRInlinedIfTrue},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfTrue"],
@@ -676,17 +757,34 @@ category: 'visiting',
 fn: function (anIRInlinedIfTrueIfFalse){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._stream())._nextPutIfElse_with_with_((function(){
+var $1,$2,$4,$3,$5,$7,$6,$9,$8;
+$1=self._stream();
+$ctx1.sendIdx["stream"]=1;
+_st($1)._nextPutIfElse_with_with_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(self._stream())._nextPutAll_("smalltalk.assert(");
-self._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._first());
-return _st(self._stream())._nextPutAll_(")");
+$2=self._stream();
+$ctx2.sendIdx["stream"]=2;
+_st($2)._nextPutAll_("smalltalk.assert(");
+$ctx2.sendIdx["nextPutAll:"]=1;
+$4=_st(anIRInlinedIfTrueIfFalse)._instructions();
+$ctx2.sendIdx["instructions"]=1;
+$3=_st($4)._first();
+self._visit_($3);
+$ctx2.sendIdx["visit:"]=1;
+$5=self._stream();
+return _st($5)._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-return self._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._second());
+$7=_st(anIRInlinedIfTrueIfFalse)._instructions();
+$ctx2.sendIdx["instructions"]=2;
+$6=_st($7)._second();
+return self._visit_($6);
+$ctx2.sendIdx["visit:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-return self._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._third());
+$9=_st(anIRInlinedIfTrueIfFalse)._instructions();
+$8=_st($9)._third();
+return self._visit_($8);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrueIfFalse:",{anIRInlinedIfTrueIfFalse:anIRInlinedIfTrueIfFalse},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfTrueIfFalse"],
@@ -703,11 +801,15 @@ category: 'visiting',
 fn: function (anIRInlinedReturn){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._stream())._nextPutStatementWith_((function(){
+var $1,$2;
+$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)})}));
-_st(self._stream())._nextPutNonLocalReturnWith_((function(){
+$2=self._stream();
+_st($2)._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)})},
@@ -807,15 +909,24 @@ function $IRInlinedIfNilIfNotNil(){return smalltalk.IRInlinedIfNilIfNotNil||(typ
 function $IRClosure(){return smalltalk.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}
 function $IRBlockSequence(){return smalltalk.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
-$2=_st($IRClosure())._new();
-_st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
-$3=_st($IRBlockSequence())._new();
-_st($3)._add_(_st(_st(self._send())._instructions())._first());
-$4=_st($3)._yourself();
-_st($2)._add_($4);
-$5=_st($2)._yourself();
-$1=self._inlinedSend_with_with_(_st($IRInlinedIfNilIfNotNil())._new(),anIRInstruction,$5);
+var $2,$3,$5,$6,$8,$9,$7,$10,$4,$1;
+$2=_st($IRInlinedIfNilIfNotNil())._new();
+$ctx1.sendIdx["new"]=1;
+$3=anIRInstruction;
+$5=_st($IRClosure())._new();
+$ctx1.sendIdx["new"]=2;
+_st($5)._scope_(_st(_st(anIRInstruction)._scope())._copy());
+$6=$5;
+$8=_st($IRBlockSequence())._new();
+_st($8)._add_(_st(_st(self._send())._instructions())._first());
+$9=_st($8)._yourself();
+$ctx1.sendIdx["yourself"]=1;
+$7=$9;
+_st($6)._add_($7);
+$ctx1.sendIdx["add:"]=1;
+$10=_st($5)._yourself();
+$4=$10;
+$1=self._inlinedSend_with_with_($2,$3,$4);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifNil:",{anIRInstruction:anIRInstruction},smalltalk.IRSendInliner)})},
 args: ["anIRInstruction"],
@@ -854,15 +965,23 @@ function $IRInlinedIfNilIfNotNil(){return smalltalk.IRInlinedIfNilIfNotNil||(typ
 function $IRClosure(){return smalltalk.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}
 function $IRBlockSequence(){return smalltalk.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
-$2=_st($IRClosure())._new();
-_st($2)._scope_(_st(_st(anIRInstruction)._scope())._copy());
-$3=_st($IRBlockSequence())._new();
-_st($3)._add_(_st(_st(self._send())._instructions())._first());
-$4=_st($3)._yourself();
-_st($2)._add_($4);
-$5=_st($2)._yourself();
-$1=self._inlinedSend_with_with_(_st($IRInlinedIfNilIfNotNil())._new(),$5,anIRInstruction);
+var $2,$4,$5,$7,$8,$6,$9,$3,$1;
+$2=_st($IRInlinedIfNilIfNotNil())._new();
+$ctx1.sendIdx["new"]=1;
+$4=_st($IRClosure())._new();
+$ctx1.sendIdx["new"]=2;
+_st($4)._scope_(_st(_st(anIRInstruction)._scope())._copy());
+$5=$4;
+$7=_st($IRBlockSequence())._new();
+_st($7)._add_(_st(_st(self._send())._instructions())._first());
+$8=_st($7)._yourself();
+$ctx1.sendIdx["yourself"]=1;
+$6=$8;
+_st($5)._add_($6);
+$ctx1.sendIdx["add:"]=1;
+$9=_st($4)._yourself();
+$3=$9;
+$1=self._inlinedSend_with_with_($2,$3,anIRInstruction);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{anIRInstruction:anIRInstruction},smalltalk.IRSendInliner)})},
 args: ["anIRInstruction"],
@@ -941,54 +1060,114 @@ 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,$4,$5,$6,$7,$8,$9,$10;
+var $2,$3,$1,$4,$6,$8,$9,$7,$10,$12,$13,$15,$17,$18,$19,$20,$16,$14,$21,$23,$25,$26,$27,$28,$24,$22,$29,$11,$5,$30,$32,$31,$35,$34,$36,$33,$37,$40,$39,$38,$41,$42,$43;
 inlinedClosure=self._inlinedClosure();
-_st(inlinedClosure)._scope_(_st(anIRClosure)._scope());
-_st(_st(anIRClosure)._tempDeclarations())._do_((function(each){
+$2=inlinedClosure;
+$3=_st(anIRClosure)._scope();
+$ctx1.sendIdx["scope"]=1;
+$1=_st($2)._scope_($3);
+$ctx1.sendIdx["scope:"]=1;
+$4=_st(_st(anIRClosure)._tempDeclarations())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(inlinedClosure)._add_(each);
+$ctx2.sendIdx["add:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
+$ctx1.sendIdx["do:"]=1;
 sequence=self._inlinedSequence();
-_st(_st(anIRClosure)._arguments())._do_((function(each){
+$5=_st(_st(anIRClosure)._arguments())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$1=_st($IRTempDeclaration())._new();
-_st($1)._name_(each);
-$2=_st($1)._yourself();
-_st(inlinedClosure)._add_($2);
-$3=_st($IRAssignment())._new();
-$4=_st($AliasVar())._new();
-_st($4)._scope_(_st(inlinedClosure)._scope());
-_st($4)._name_(each);
-$5=_st($4)._yourself();
-_st($3)._add_(_st(_st($IRVariable())._new())._variable_($5));
-$6=_st($AliasVar())._new();
-_st($6)._scope_(_st(inlinedClosure)._scope());
-_st($6)._name_("$receiver");
-$7=_st($6)._yourself();
-_st($3)._add_(_st(_st($IRVariable())._new())._variable_($7));
-$8=_st($3)._yourself();
-return _st(sequence)._add_($8);
+$6=inlinedClosure;
+$8=_st($IRTempDeclaration())._new();
+$ctx2.sendIdx["new"]=1;
+_st($8)._name_(each);
+$ctx2.sendIdx["name:"]=1;
+$9=_st($8)._yourself();
+$ctx2.sendIdx["yourself"]=1;
+$7=$9;
+_st($6)._add_($7);
+$ctx2.sendIdx["add:"]=2;
+$10=sequence;
+$12=_st($IRAssignment())._new();
+$ctx2.sendIdx["new"]=2;
+$13=$12;
+$15=_st($IRVariable())._new();
+$ctx2.sendIdx["new"]=3;
+$17=_st($AliasVar())._new();
+$ctx2.sendIdx["new"]=4;
+$18=$17;
+$19=_st(inlinedClosure)._scope();
+$ctx2.sendIdx["scope"]=2;
+_st($18)._scope_($19);
+$ctx2.sendIdx["scope:"]=2;
+_st($17)._name_(each);
+$ctx2.sendIdx["name:"]=2;
+$20=_st($17)._yourself();
+$ctx2.sendIdx["yourself"]=2;
+$16=$20;
+$14=_st($15)._variable_($16);
+$ctx2.sendIdx["variable:"]=1;
+_st($13)._add_($14);
+$ctx2.sendIdx["add:"]=4;
+$21=$12;
+$23=_st($IRVariable())._new();
+$ctx2.sendIdx["new"]=5;
+$25=_st($AliasVar())._new();
+$26=$25;
+$27=_st(inlinedClosure)._scope();
+_st($26)._scope_($27);
+_st($25)._name_("$receiver");
+$28=_st($25)._yourself();
+$ctx2.sendIdx["yourself"]=3;
+$24=$28;
+$22=_st($23)._variable_($24);
+_st($21)._add_($22);
+$ctx2.sendIdx["add:"]=5;
+$29=_st($12)._yourself();
+$11=$29;
+return _st($10)._add_($11);
+$ctx2.sendIdx["add:"]=3;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-_st(inlinedClosure)._add_(sequence);
-statements=_st(_st(_st(anIRClosure)._instructions())._last())._instructions();
+$ctx1.sendIdx["do:"]=2;
+$30=_st(inlinedClosure)._add_(sequence);
+$ctx1.sendIdx["add:"]=6;
+$32=_st(anIRClosure)._instructions();
+$ctx1.sendIdx["instructions"]=2;
+$31=_st($32)._last();
+$ctx1.sendIdx["last"]=1;
+statements=_st($31)._instructions();
+$ctx1.sendIdx["instructions"]=1;
 _st(statements)._ifNotEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(_st(statements)._allButLast())._do_((function(each){
 return smalltalk.withContext(function($ctx3) {
 return _st(sequence)._add_(each);
+$ctx3.sendIdx["add:"]=7;
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,4)})}));
-$9=_st(_st(_st(statements)._last())._isReturn())._and_((function(){
+$35=_st(statements)._last();
+$ctx2.sendIdx["last"]=2;
+$34=_st($35)._isReturn();
+$33=_st($34)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-return _st(_st(statements)._last())._isBlockReturn();
+$36=_st(statements)._last();
+$ctx3.sendIdx["last"]=3;
+return _st($36)._isBlockReturn();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
-if(smalltalk.assert($9)){
-return _st(sequence)._add_(_st(_st(_st(statements)._last())._instructions())._first());
+if(smalltalk.assert($33)){
+$37=sequence;
+$40=_st(statements)._last();
+$ctx2.sendIdx["last"]=4;
+$39=_st($40)._instructions();
+$38=_st($39)._first();
+return _st($37)._add_($38);
+$ctx2.sendIdx["add:"]=8;
 } else {
-return _st(sequence)._add_(_st(statements)._last());
+$41=sequence;
+$42=_st(statements)._last();
+return _st($41)._add_($42);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$10=inlinedClosure;
-return $10;
+$43=inlinedClosure;
+return $43;
 }, 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",
@@ -1004,9 +1183,15 @@ category: 'inlining',
 fn: function (anIRSend){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $3,$2,$6,$5,$4,$1;
 self._send_(anIRSend);
-$1=self._perform_withArguments_(_st(self._send())._selector(),_st(_st(self._send())._instructions())._allButFirst());
+$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);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inlineSend:",{anIRSend:anIRSend},smalltalk.IRSendInliner)})},
 args: ["anIRSend"],
@@ -1043,22 +1228,30 @@ fn: function (inlinedSend,anIRInstruction){
 var self=this;
 var inlinedClosure;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5;
-$1=_st(anIRInstruction)._isClosure();
-if(! smalltalk.assert($1)){
-self._inliningError_("Message argument should be a block");
-};
-$2=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
+var $2,$1,$4,$3,$5,$6,$9,$8,$7,$10,$11,$12;
+$2=_st(anIRInstruction)._isClosure();
 if(! smalltalk.assert($2)){
-self._inliningError_("Inlined block should have zero argument");
+$1=self._inliningError_("Message argument should be a block");
+$ctx1.sendIdx["inliningError:"]=1;
+};
+$4=_st(_st(_st(anIRInstruction)._arguments())._size()).__eq((0));
+if(! smalltalk.assert($4)){
+$3=self._inliningError_("Inlined block should have zero argument");
 };
 inlinedClosure=_st(self._translator())._visit_(self._inlineClosure_(anIRInstruction));
-$3=inlinedSend;
-_st($3)._add_(_st(_st(self._send())._instructions())._first());
-$4=_st($3)._add_(inlinedClosure);
-_st(self._send())._replaceWith_(inlinedSend);
 $5=inlinedSend;
-return $5;
+$6=$5;
+$9=self._send();
+$ctx1.sendIdx["send"]=1;
+$8=_st($9)._instructions();
+$7=_st($8)._first();
+_st($6)._add_($7);
+$ctx1.sendIdx["add:"]=1;
+$10=_st($5)._add_(inlinedClosure);
+$11=self._send();
+_st($11)._replaceWith_(inlinedSend);
+$12=inlinedSend;
+return $12;
 }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,inlinedClosure:inlinedClosure},smalltalk.IRSendInliner)})},
 args: ["inlinedSend", "anIRInstruction"],
 source: "inlinedSend: inlinedSend with: anIRInstruction\x0a\x09| inlinedClosure |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x0a\x09^ inlinedSend",
@@ -1075,24 +1268,41 @@ fn: function (inlinedSend,anIRInstruction,anotherIRInstruction){
 var self=this;
 var inlinedClosure1,inlinedClosure2;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5;
-$1=_st(anIRInstruction)._isClosure();
-if(! smalltalk.assert($1)){
-self._inliningError_("Message argument should be a block");
-};
-$2=_st(anotherIRInstruction)._isClosure();
+var $2,$1,$4,$3,$5,$6,$7,$8,$9,$10,$13,$12,$11,$14,$15,$16;
+$2=_st(anIRInstruction)._isClosure();
+$ctx1.sendIdx["isClosure"]=1;
 if(! smalltalk.assert($2)){
-self._inliningError_("Message argument should be a block");
+$1=self._inliningError_("Message argument should be a block");
+$ctx1.sendIdx["inliningError:"]=1;
 };
-inlinedClosure1=_st(self._translator())._visit_(self._inlineClosure_(anIRInstruction));
-inlinedClosure2=_st(self._translator())._visit_(self._inlineClosure_(anotherIRInstruction));
-$3=inlinedSend;
-_st($3)._add_(_st(_st(self._send())._instructions())._first());
-_st($3)._add_(inlinedClosure1);
-$4=_st($3)._add_(inlinedClosure2);
-_st(self._send())._replaceWith_(inlinedSend);
-$5=inlinedSend;
-return $5;
+$4=_st(anotherIRInstruction)._isClosure();
+if(! smalltalk.assert($4)){
+$3=self._inliningError_("Message argument should be a block");
+};
+$5=self._translator();
+$ctx1.sendIdx["translator"]=1;
+$6=self._inlineClosure_(anIRInstruction);
+$ctx1.sendIdx["inlineClosure:"]=1;
+inlinedClosure1=_st($5)._visit_($6);
+$ctx1.sendIdx["visit:"]=1;
+$7=self._translator();
+$8=self._inlineClosure_(anotherIRInstruction);
+inlinedClosure2=_st($7)._visit_($8);
+$9=inlinedSend;
+$10=$9;
+$13=self._send();
+$ctx1.sendIdx["send"]=1;
+$12=_st($13)._instructions();
+$11=_st($12)._first();
+_st($10)._add_($11);
+$ctx1.sendIdx["add:"]=1;
+_st($9)._add_(inlinedClosure1);
+$ctx1.sendIdx["add:"]=2;
+$14=_st($9)._add_(inlinedClosure2);
+$15=self._send();
+_st($15)._replaceWith_(inlinedSend);
+$16=inlinedSend;
+return $16;
 }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction,inlinedClosure1:inlinedClosure1,inlinedClosure2:inlinedClosure2},smalltalk.IRSendInliner)})},
 args: ["inlinedSend", "anIRInstruction", "anotherIRInstruction"],
 source: "inlinedSend: inlinedSend with: anIRInstruction with: anotherIRInstruction\x0a\x09| inlinedClosure1 inlinedClosure2 |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anotherIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x0a\x09inlinedClosure1 := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x09inlinedClosure2 := self translator visit: (self inlineClosure: anotherIRInstruction).\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure1;\x0a\x09\x09add: inlinedClosure2.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09^ inlinedSend",
@@ -1231,17 +1441,17 @@ category: 'accessing',
 fn: function (anIRInstruction){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $2,$1,$3;
 var $early={};
 try {
-$1=_st(self._inlinedSelectors())._includes_(_st(anIRInstruction)._selector());
-if(! smalltalk.assert($1)){
+$2=_st(self._inlinedSelectors())._includes_(_st(anIRInstruction)._selector());
+if(! smalltalk.assert($2)){
 return false;
 };
 _st(_st(_st(anIRInstruction)._instructions())._allButFirst())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$2=_st(each)._isClosure();
-if(! smalltalk.assert($2)){
+$3=_st(each)._isClosure();
+if(! smalltalk.assert($3)){
 throw $early=[false];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
@@ -1302,17 +1512,21 @@ var self=this;
 var inlinedAssignment;
 function $IRInlinedAssignment(){return smalltalk.IRInlinedAssignment||(typeof IRInlinedAssignment=="undefined"?nil:IRInlinedAssignment)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$3,$2,$4;
 self._assignment_(anIRAssignment);
 inlinedAssignment=_st($IRInlinedAssignment())._new();
-_st(_st(anIRAssignment)._instructions())._do_((function(each){
+$1=_st(anIRAssignment)._instructions();
+$ctx1.sendIdx["instructions"]=1;
+_st($1)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(inlinedAssignment)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 _st(anIRAssignment)._replaceWith_(inlinedAssignment);
-self._inlineSend_(_st(_st(inlinedAssignment)._instructions())._last());
-$1=inlinedAssignment;
-return $1;
+$3=_st(inlinedAssignment)._instructions();
+$2=_st($3)._last();
+self._inlineSend_($2);
+$4=inlinedAssignment;
+return $4;
 }, 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",
@@ -1330,22 +1544,39 @@ var self=this;
 var inlinedClosure,statements;
 function $IRAssignment(){return smalltalk.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $2,$1,$4,$3,$5,$7,$8,$10,$9,$11,$13,$12,$14,$6,$15;
 inlinedClosure=smalltalk.IRAssignmentInliner.superclass.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
-statements=_st(_st(_st(inlinedClosure)._instructions())._last())._instructions();
+$2=_st(inlinedClosure)._instructions();
+$ctx1.sendIdx["instructions"]=2;
+$1=_st($2)._last();
+$ctx1.sendIdx["last"]=1;
+statements=_st($1)._instructions();
+$ctx1.sendIdx["instructions"]=1;
 _st(statements)._ifNotEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(_st(statements)._last())._canBeAssigned();
-if(smalltalk.assert($1)){
-$2=_st($IRAssignment())._new();
-_st($2)._add_(_st(_st(self._assignment())._instructions())._first());
-_st($2)._add_(_st(_st(statements)._last())._copy());
-$3=_st($2)._yourself();
-return _st(_st(statements)._last())._replaceWith_($3);
+$4=_st(statements)._last();
+$ctx2.sendIdx["last"]=2;
+$3=_st($4)._canBeAssigned();
+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);
+$ctx2.sendIdx["add:"]=1;
+$11=$7;
+$13=_st(statements)._last();
+$12=_st($13)._copy();
+_st($11)._add_($12);
+$14=_st($7)._yourself();
+$6=$14;
+return _st($5)._replaceWith_($6);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$4=inlinedClosure;
-return $4;
+$15=inlinedClosure;
+return $15;
 }, 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",
@@ -1367,21 +1598,33 @@ var self=this;
 var closure,statements;
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $2,$1,$4,$3,$5,$7,$8,$10,$9,$11,$6,$12;
 closure=smalltalk.IRReturnInliner.superclass.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
-statements=_st(_st(_st(closure)._instructions())._last())._instructions();
+$2=_st(closure)._instructions();
+$1=_st($2)._last();
+$ctx1.sendIdx["last"]=1;
+statements=_st($1)._instructions();
+$ctx1.sendIdx["instructions"]=1;
 _st(statements)._ifNotEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(_st(statements)._last())._isReturn();
-if(! smalltalk.assert($1)){
-$2=_st($IRReturn())._new();
-_st($2)._add_(_st(_st(statements)._last())._copy());
-$3=_st($2)._yourself();
-return _st(_st(statements)._last())._replaceWith_($3);
+$4=_st(statements)._last();
+$ctx2.sendIdx["last"]=2;
+$3=_st($4)._isReturn();
+if(! smalltalk.assert($3)){
+$5=_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);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$4=closure;
-return $4;
+$12=closure;
+return $12;
 }, 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",
@@ -1398,16 +1641,20 @@ fn: function (anIRReturn){
 var self=this;
 var return_;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$3,$2,$4;
 return_=self._inlinedReturn();
-_st(_st(anIRReturn)._instructions())._do_((function(each){
+$1=_st(anIRReturn)._instructions();
+$ctx1.sendIdx["instructions"]=1;
+_st($1)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(return_)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 _st(anIRReturn)._replaceWith_(return_);
-self._inlineSend_(_st(_st(return_)._instructions())._last());
-$1=return_;
-return $1;
+$3=_st(return_)._instructions();
+$2=_st($3)._last();
+self._inlineSend_($2);
+$4=return_;
+return $4;
 }, 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",
@@ -1447,16 +1694,19 @@ fn: function (aNode){
 var self=this;
 var ir,stream;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-_st(self._semanticAnalyzer())._visit_(aNode);
+var $1,$2,$4,$5,$3;
+$1=_st(self._semanticAnalyzer())._visit_(aNode);
+$ctx1.sendIdx["visit:"]=1;
 ir=_st(self._translator())._visit_(aNode);
-_st(self._inliner())._visit_(ir);
-$2=self._irTranslator();
-_st($2)._currentClass_(self._currentClass());
-_st($2)._visit_(ir);
-$3=_st($2)._contents();
-$1=$3;
-return $1;
+$ctx1.sendIdx["visit:"]=2;
+$2=_st(self._inliner())._visit_(ir);
+$ctx1.sendIdx["visit:"]=3;
+$4=self._irTranslator();
+_st($4)._currentClass_(self._currentClass());
+_st($4)._visit_(ir);
+$5=_st($4)._contents();
+$3=$5;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,ir:ir,stream:stream},smalltalk.InliningCodeGenerator)})},
 args: ["aNode"],
 source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09self inliner visit: ir.\x0a\x0a\x09^ self irTranslator\x0a\x09\x09currentClass: self currentClass;\x0a\x09\x09visit: ir;\x0a\x09\x09contents",

+ 217 - 91
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;
+var $1,$2,$3,$4,$5,$7,$6;
 context=_st(self["@outerContext"])._newBlockContext();
 $1=_st(_st(_st(self["@node"])._nodes())._first())._copy();
 _st($1)._parent_(nil);
@@ -198,11 +198,15 @@ return nil;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})));
 }, function($ctx2) {$ctx2.fillBlock({each:each,index:index},$ctx1,1)})}));
 $3=_st(context)._interpreter();
+$ctx1.sendIdx["interpreter"]=1;
 _st($3)._node_(_st(sequenceNode)._nextChild());
 $4=_st($3)._proceed();
-_st(_st(self["@outerContext"])._interpreter())._setNonLocalReturnFromContext_(context);
-$5=_st(_st(context)._interpreter())._pop();
-return $5;
+$5=_st(self["@outerContext"])._interpreter();
+$ctx1.sendIdx["interpreter"]=2;
+_st($5)._setNonLocalReturnFromContext_(context);
+$7=_st(context)._interpreter();
+$6=_st($7)._pop();
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection,context:context,sequenceNode:sequenceNode},smalltalk.AIBlockClosure)})},
 args: ["aCollection"],
 source: "valueWithPossibleArguments: aCollection\x0a\x09| context sequenceNode |\x0a\x09context := outerContext newBlockContext.\x0a\x0a\x09\x22Interpret a copy of the sequence node to avoid creating a new AIBlockClosure\x22\x0a\x09sequenceNode := node nodes first copy\x0a\x09\x09parent: nil;\x0a\x09\x09yourself.\x0a\x0a\x09\x22Populate the arguments into the context locals\x22\x09\x0a\x09node parameters withIndexDo: [ :each :index |\x0a\x09\x09context localAt: each put: (aCollection at: index ifAbsent: [ nil ]) ].\x0a\x0a\x09\x22Interpret the first node of the BlockSequenceNode\x22\x0a\x09context interpreter\x0a\x09\x09node: sequenceNode nextChild;\x0a\x09\x09proceed.\x0a\x09\x09\x0a\x09outerContext interpreter\x0a\x09\x09setNonLocalReturnFromContext: context.\x0a\x09\x09\x0a\x09^ context interpreter pop",
@@ -340,8 +344,15 @@ fn: function (){
 var self=this;
 function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
 return smalltalk.withContext(function($ctx1) { 
-self["@ast"]=_st(self._method())._ast();
-_st(_st($SemanticAnalyzer())._on_(_st(self._method())._methodClass()))._visit_(self["@ast"]);
+var $1,$3,$5,$4,$2;
+$1=self._method();
+$ctx1.sendIdx["method"]=1;
+self["@ast"]=_st($1)._ast();
+$3=$SemanticAnalyzer();
+$5=self._method();
+$4=_st($5)._methodClass();
+$2=_st($3)._on_($4);
+_st($2)._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",
@@ -357,14 +368,14 @@ category: 'initialization',
 fn: function (aMethodContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
-$1=self;
-_st($1)._index_(_st(aMethodContext)._index());
-_st($1)._receiver_(_st(aMethodContext)._receiver());
-$2=_st($1)._selector_(_st(aMethodContext)._selector());
+var $1,$3,$4,$6,$7,$5,$8,$9,$2;
+self._index_(_st(aMethodContext)._index());
+self._receiver_(_st(aMethodContext)._receiver());
+$1=self._selector_(_st(aMethodContext)._selector());
 $3=_st(aMethodContext)._outerContext();
+$ctx1.sendIdx["outerContext"]=1;
 if(($receiver = $3) == nil || $receiver == null){
-$3;
+$2=$3;
 } else {
 var outer;
 outer=$receiver;
@@ -372,11 +383,17 @@ $4=_st(outer)._methodContext();
 if(($receiver = $4) == nil || $receiver == null){
 $4;
 } else {
-self._outerContext_(_st(self._class())._fromMethodContext_(_st(aMethodContext)._outerContext()));
+$6=self._class();
+$7=_st(aMethodContext)._outerContext();
+$5=_st($6)._fromMethodContext_($7);
+self._outerContext_($5);
 };
-_st(_st(aMethodContext)._locals())._keysAndValuesDo_((function(key,value){
+$8=_st(aMethodContext)._locals();
+$ctx1.sendIdx["locals"]=1;
+$2=_st($8)._keysAndValuesDo_((function(key,value){
 return smalltalk.withContext(function($ctx2) {
-return _st(self._locals())._at_put_(key,value);
+$9=self._locals();
+return _st($9)._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)})},
@@ -395,15 +412,20 @@ fn: function (){
 var self=this;
 function $ASTInterpreter(){return smalltalk.ASTInterpreter||(typeof ASTInterpreter=="undefined"?nil:ASTInterpreter)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$5,$4,$7,$6,$3;
 $1=_st($ASTInterpreter())._new();
 _st($1)._context_(self);
 _st($1)._node_(self._retrieveNode());
 $2=_st($1)._yourself();
 self["@interpreter"]=$2;
-$3=_st(_st(self._innerContext())._notNil())._and_((function(){
+$5=self._innerContext();
+$ctx1.sendIdx["innerContext"]=1;
+$4=_st($5)._notNil();
+$3=_st($4)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(self._innerContext())._isBlockContext())._not();
+$7=self._innerContext();
+$6=_st($7)._isBlockContext();
+return _st($6)._not();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 if(smalltalk.assert($3)){
 self._setupInterpreter_(self["@interpreter"]);
@@ -611,12 +633,19 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$5,$4,$3,$7,$6,$1;
 $2=self._methodContext();
+$ctx1.sendIdx["methodContext"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1=$2;
 } else {
-$1=_st(_st(_st(self._methodContext())._receiver())._class())._lookupSelector_(_st(self._methodContext())._selector());
+$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);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.AIContext)})},
@@ -725,16 +754,19 @@ fn: function (){
 var self=this;
 function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$1;
+var $2,$3,$4,$5,$6,$1;
 $2=self._ast();
+$ctx1.sendIdx["ast"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1=$2;
 } else {
 $3=_st($ASTPCNodeVisitor())._new();
 _st($3)._context_(self);
-_st($3)._visit_(self._ast());
-$4=_st($3)._currentNode();
-$1=$4;
+$4=$3;
+$5=self._ast();
+_st($4)._visit_($5);
+$6=_st($3)._currentNode();
+$1=$6;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"retrieveNode",{},smalltalk.AIContext)})},
@@ -786,11 +818,20 @@ category: 'interpreting',
 fn: function (anInterpreter){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(_st(self._innerContext())._arguments())._reversed())._do_((function(each){
+var $3,$2,$1,$5,$7,$6,$4;
+$3=self._innerContext();
+$ctx1.sendIdx["innerContext"]=1;
+$2=_st($3)._arguments();
+$1=_st($2)._reversed();
+_st($1)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(anInterpreter)._push_(each);
+$ctx2.sendIdx["push:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-_st(anInterpreter)._push_(_st(self._innerContext())._receiver());
+$5=anInterpreter;
+$7=self._innerContext();
+$6=_st($7)._receiver();
+$4=_st($5)._push_($6);
 return self}, function($ctx1) {$ctx1.fill(self,"setupInterpreter:",{anInterpreter:anInterpreter},smalltalk.AIContext)})},
 args: ["anInterpreter"],
 source: "setupInterpreter: anInterpreter\x0a\x09\x22Push the send args and receiver to the interpreter stack\x22\x0a\x09\x0a\x09self innerContext arguments reversed do: [ :each | \x0a\x09\x09anInterpreter push: each ].\x0a\x09\x09\x0a\x09anInterpreter push: (self innerContext receiver)",
@@ -1132,12 +1173,19 @@ category: 'private',
 fn: function (aNode,anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$3,$2,$4,$5,$6;
 $1=_st(_st(aNode)._binding())._isInstanceVar();
 if(smalltalk.assert($1)){
-_st(_st(self._context())._receiver())._instVarAt_put_(_st(aNode)._value(),anObject);
+$3=self._context();
+$ctx1.sendIdx["context"]=1;
+$2=_st($3)._receiver();
+$4=_st(aNode)._value();
+$ctx1.sendIdx["value"]=1;
+_st($2)._instVarAt_put_($4,anObject);
 } else {
-_st(self._context())._localAt_put_(_st(aNode)._value(),anObject);
+$5=self._context();
+$6=_st(aNode)._value();
+_st($5)._localAt_put_($6,anObject);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject},smalltalk.ASTInterpreter)})},
 args: ["aNode", "anObject"],
@@ -1212,26 +1260,40 @@ 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 $1,$2,$3;
+var $3,$2,$1,$4,$5,$7,$10,$9,$8,$6;
 source=_st($String())._streamContents_((function(str){
 return smalltalk.withContext(function($ctx2) {
 _st(str)._nextPutAll_("(function(");
-_st(_st(_st(self._context())._locals())._keys())._do_separatedBy_((function(each){
+$ctx2.sendIdx["nextPutAll:"]=1;
+$3=self._context();
+$ctx2.sendIdx["context"]=1;
+$2=_st($3)._locals();
+$ctx2.sendIdx["locals"]=1;
+$1=_st($2)._keys();
+_st($1)._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx3) {
 return _st(str)._nextPutAll_(each);
+$ctx3.sendIdx["nextPutAll:"]=2;
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}),(function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(str)._nextPutAll_(",");
+$ctx3.sendIdx["nextPutAll:"]=3;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
-$1=str;
-_st($1)._nextPutAll_("){ return (function() {");
-_st($1)._nextPutAll_(aString);
-$2=_st($1)._nextPutAll_("})() })");
-return $2;
+$4=str;
+_st($4)._nextPutAll_("){ return (function() {");
+$ctx2.sendIdx["nextPutAll:"]=4;
+_st($4)._nextPutAll_(aString);
+$ctx2.sendIdx["nextPutAll:"]=5;
+$5=_st($4)._nextPutAll_("})() })");
+return $5;
 }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)})}));
 function_=_st(_st($Compiler())._new())._eval_(source);
-$3=_st(function_)._valueWithPossibleArguments_(_st(_st(self._context())._locals())._values());
-return $3;
+$7=function_;
+$10=self._context();
+$9=_st($10)._locals();
+$8=_st($9)._values();
+$6=_st($7)._valueWithPossibleArguments_($8);
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,source:source,function_:function_},smalltalk.ASTInterpreter)})},
 args: ["aString"],
 source: "eval: aString\x0a\x09\x22Evaluate aString as JS source inside an JS function.\x0a\x09aString is not sandboxed.\x22\x0a\x09\x0a\x09| source function |\x0a\x09\x0a\x09source := String streamContents: [ :str |\x0a\x09\x09str nextPutAll: '(function('.\x0a\x09\x09self context locals keys\x0a\x09\x09\x09do: [ :each | str nextPutAll: each ]\x0a\x09\x09\x09separatedBy: [ str nextPutAll: ',' ].\x0a\x09\x09str\x0a\x09\x09\x09nextPutAll: '){ return (function() {';\x0a\x09\x09\x09nextPutAll: aString;\x0a\x09\x09\x09nextPutAll: '})() })' ].\x0a\x09\x09\x09\x0a\x09function := Compiler new eval: source.\x0a\x09\x0a\x09^ function valueWithPossibleArguments: self context locals values",
@@ -1397,15 +1459,18 @@ category: 'stack',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$3,$2;
 var $early={};
 try {
-_st(self._stack())._ifEmpty_((function(){
+$1=self._stack();
+$ctx1.sendIdx["stack"]=1;
+_st($1)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
 throw $early=[nil];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$1=_st(self._stack())._last();
-return $1;
+$3=self._stack();
+$2=_st($3)._last();
+return $2;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"peek",{},smalltalk.ASTInterpreter)})},
@@ -1558,7 +1623,7 @@ fn: function (aMessage,anObject,aBoolean){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6;
+var $1,$2,$4,$3,$5,$8,$7,$6,$9,$10;
 var $early={};
 try {
 $1=aBoolean;
@@ -1566,20 +1631,27 @@ if(! smalltalk.assert($1)){
 $2=_st(aMessage)._sendTo_(anObject);
 return $2;
 };
-$3=_st(_st(anObject)._class())._superclass();
+$4=_st(anObject)._class();
+$ctx1.sendIdx["class"]=1;
+$3=_st($4)._superclass();
+$ctx1.sendIdx["superclass"]=1;
 if(($receiver = $3) == nil || $receiver == null){
-$4=self._messageNotUnderstood_receiver_(aMessage,anObject);
-return $4;
+$5=self._messageNotUnderstood_receiver_(aMessage,anObject);
+$ctx1.sendIdx["messageNotUnderstood:receiver:"]=1;
+return $5;
 } else {
 $3;
 };
-method=_st(_st(_st(_st(anObject)._class())._superclass())._methodDictionary())._at_ifAbsent_(_st(aMessage)._selector(),(function(){
+$8=_st(anObject)._class();
+$7=_st($8)._superclass();
+$6=_st($7)._methodDictionary();
+method=_st($6)._at_ifAbsent_(_st(aMessage)._selector(),(function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._messageNotUnderstood_receiver_(aMessage,anObject);
-throw $early=[$5];
+$9=self._messageNotUnderstood_receiver_(aMessage,anObject);
+throw $early=[$9];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$6=_st(method)._sendTo_arguments_(anObject,_st(aMessage)._arguments());
-return $6;
+$10=_st(method)._sendTo_arguments_(anObject,_st(aMessage)._arguments());
+return $10;
 }
 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)})},
@@ -1597,12 +1669,16 @@ category: 'interpreting',
 fn: function (aContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(aContext)._interpreter())._hasReturned();
+var $2,$1,$4,$3;
+$2=_st(aContext)._interpreter();
+$ctx1.sendIdx["interpreter"]=1;
+$1=_st($2)._hasReturned();
 if(smalltalk.assert($1)){
 self["@returned"]=true;
 self["@returned"];
-self._returnValue_(_st(_st(aContext)._interpreter())._returnValue());
+$4=_st(aContext)._interpreter();
+$3=_st($4)._returnValue();
+self._returnValue_($3);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"setNonLocalReturnFromContext:",{aContext:aContext},smalltalk.ASTInterpreter)})},
 args: ["aContext"],
@@ -1660,10 +1736,9 @@ category: 'interpreting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._interpret();
-$2=_st($1)._next();
+var $1;
+self._interpret();
+$1=self._next();
 return self}, function($ctx1) {$ctx1.fill(self,"step",{},smalltalk.ASTInterpreter)})},
 args: [],
 source: "step\x0a\x09self \x0a\x09\x09interpret; \x0a\x09\x09next",
@@ -1679,7 +1754,9 @@ category: 'interpreting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._step();
+var $1;
+$1=self._step();
+$ctx1.sendIdx["step"]=1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._node())._isSteppingNode();
@@ -1723,8 +1800,10 @@ fn: function (aNode){
 var self=this;
 var poppedValue;
 return smalltalk.withContext(function($ctx1) { 
+var $1;
 poppedValue=self._pop();
-self._pop();
+$ctx1.sendIdx["pop"]=1;
+$1=self._pop();
 self._push_(poppedValue);
 self._assign_to_(_st(aNode)._left(),poppedValue);
 return self}, function($ctx1) {$ctx1.fill(self,"visitAssignmentNode:",{aNode:aNode,poppedValue:poppedValue},smalltalk.ASTInterpreter)})},
@@ -1786,13 +1865,17 @@ var associations,hashedCollection;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 associations=_st($OrderedCollection())._new();
+$ctx1.sendIdx["new"]=1;
 hashedCollection=_st($HashedCollection())._new();
-_st(_st(aNode)._nodes())._do_((function(each){
+$1=_st(_st(aNode)._nodes())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(associations)._add_(self._pop());
+$ctx2.sendIdx["add:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-_st(_st(associations)._reversed())._do_((function(each){
+$ctx1.sendIdx["do:"]=1;
+$2=_st(_st(associations)._reversed())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(hashedCollection)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
@@ -1866,6 +1949,7 @@ var $1;
 args=_st(_st(aNode)._arguments())._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._pop();
+$ctx2.sendIdx["pop"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 receiver=self._pop();
 message=self._messageFromSendNode_arguments_(aNode,_st(args)._reversed());
@@ -1876,6 +1960,7 @@ return _st(_st(aNode)._isLastChild())._not();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 if(smalltalk.assert($1)){
 self._push_(receiver);
+$ctx1.sendIdx["push:"]=1;
 } else {
 self._push_(result);
 };
@@ -1912,32 +1997,56 @@ 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 $1,$2,$3,$5,$6,$4;
-$1=_st(_st(aNode)._binding())._isUnknownVar();
-if(smalltalk.assert($1)){
-$2=self._push_(_st(_st($PlatformInterface())._globals())._at_ifAbsent_(_st(aNode)._value(),(function(){
+var $3,$2,$6,$7,$5,$4,$1,$11,$10,$13,$12,$14,$15,$16,$18,$17,$19,$20,$21,$22,$9,$8;
+$3=_st(aNode)._binding();
+$ctx1.sendIdx["binding"]=1;
+$2=_st($3)._isUnknownVar();
+if(smalltalk.assert($2)){
+$6=_st($PlatformInterface())._globals();
+$ctx1.sendIdx["globals"]=1;
+$7=_st(aNode)._value();
+$ctx1.sendIdx["value"]=1;
+$5=_st($6)._at_ifAbsent_($7,(function(){
 return smalltalk.withContext(function($ctx2) {
 return self._error_("Unknown variable");
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})})));
-return $2;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
+$ctx1.sendIdx["at:ifAbsent:"]=1;
+$4=self._push_($5);
+$ctx1.sendIdx["push:"]=1;
+return $4;
 };
-$3=self;
-$5=_st(_st(aNode)._binding())._isInstanceVar();
-if(smalltalk.assert($5)){
-$4=_st(_st(self._context())._receiver())._instVarAt_(_st(aNode)._value());
+$11=_st(aNode)._binding();
+$10=_st($11)._isInstanceVar();
+if(smalltalk.assert($10)){
+$13=self._context();
+$ctx1.sendIdx["context"]=1;
+$12=_st($13)._receiver();
+$14=_st(aNode)._value();
+$ctx1.sendIdx["value"]=2;
+$9=_st($12)._instVarAt_($14);
 } else {
-$4=_st(self._context())._localAt_ifAbsent_(_st(aNode)._value(),(function(){
+$15=self._context();
+$16=_st(aNode)._value();
+$ctx1.sendIdx["value"]=3;
+$9=_st($15)._localAt_ifAbsent_($16,(function(){
 return smalltalk.withContext(function($ctx2) {
-$6=_st(_st(aNode)._value())._isCapitalized();
-if(smalltalk.assert($6)){
-return _st(_st($Smalltalk())._current())._at_ifAbsent_(_st(aNode)._value(),(function(){
+$18=_st(aNode)._value();
+$ctx2.sendIdx["value"]=4;
+$17=_st($18)._isCapitalized();
+if(smalltalk.assert($17)){
+$19=_st($Smalltalk())._current();
+$20=_st(aNode)._value();
+$ctx2.sendIdx["value"]=5;
+return _st($19)._at_ifAbsent_($20,(function(){
 return smalltalk.withContext(function($ctx3) {
-return _st(_st($PlatformInterface())._globals())._at_(_st(aNode)._value());
+$21=_st($PlatformInterface())._globals();
+$22=_st(aNode)._value();
+return _st($21)._at_($22);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
 };
-_st($3)._push_($4);
+$8=self._push_($9);
 return self}, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode},smalltalk.ASTInterpreter)})},
 args: ["aNode"],
 source: "visitVariableNode: aNode\x0a\x09aNode binding isUnknownVar ifTrue: [\x0a\x09\x09^ self push: (PlatformInterface globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].\x0a\x09\x09\x0a\x09self push: (aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode value ]\x0a\x09\x09ifFalse: [ self context \x0a\x09\x09\x09localAt: aNode value\x0a\x09\x09\x09ifAbsent: [\x0a\x09\x09\x09\x09aNode value isCapitalized\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09Smalltalk current \x0a\x09\x09\x09\x09\x09\x09\x09at: aNode value \x0a\x09\x09\x09\x09\x09\x09\x09ifAbsent: [ PlatformInterface globals at: aNode value ]]]])",
@@ -2131,18 +2240,23 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st(_st(_st(aNode)._parent())._isSendNode())._and_((function(){
+var $3,$2,$4,$1,$5;
+$3=_st(aNode)._parent();
+$ctx1.sendIdx["parent"]=1;
+$2=_st($3)._isSendNode();
+$1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(aNode)._parent())._shouldBeInlined();
+$4=_st(aNode)._parent();
+return _st($4)._shouldBeInlined();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 if(smalltalk.assert($1)){
 smalltalk.ASTPCNodeVisitor.superclass.fn.prototype._visitBlockNode_.apply(_st(self), [aNode]);
 } else {
-$2=_st(self._blockIndex()).__gt_eq(_st(self._context())._index());
-if(! smalltalk.assert($2)){
+$5=_st(self._blockIndex()).__gt_eq(_st(self._context())._index());
+if(! smalltalk.assert($5)){
 self._increaseBlockIndex();
 smalltalk.ASTPCNodeVisitor.superclass.fn.prototype._visitBlockNode_.apply(_st(self), [aNode]);
+$ctx1.sendIdx["visitBlockNode:"]=1;
 };
 };
 return self}, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode},smalltalk.ASTPCNodeVisitor)})},
@@ -2176,17 +2290,29 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $3,$5,$4,$2,$6,$8,$10,$9,$7,$12,$11,$1;
 smalltalk.ASTPCNodeVisitor.superclass.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
-$1=_st(self._pc()).__eq(_st(self._context())._pc());
-if(! smalltalk.assert($1)){
-$2=_st(aNode)._shouldBeInlined();
+$3=self._pc();
+$ctx1.sendIdx["pc"]=1;
+$5=self._context();
+$ctx1.sendIdx["context"]=1;
+$4=_st($5)._pc();
+$ctx1.sendIdx["pc"]=2;
+$2=_st($3).__eq($4);
+$ctx1.sendIdx["="]=1;
 if(! smalltalk.assert($2)){
-$3=_st(self._blockIndex()).__eq(_st(self._context())._index());
-if(smalltalk.assert($3)){
-self._pc_(_st(self._pc()).__plus((1)));
+$6=_st(aNode)._shouldBeInlined();
+if(! smalltalk.assert($6)){
+$8=self._blockIndex();
+$10=self._context();
+$9=_st($10)._index();
+$7=_st($8).__eq($9);
+if(smalltalk.assert($7)){
+$12=self._pc();
+$11=_st($12).__plus((1));
+self._pc_($11);
 self["@currentNode"]=aNode;
-self["@currentNode"];
+$1=self["@currentNode"];
 };
 };
 };

+ 173 - 86
js/Compiler-Semantic.js

@@ -12,8 +12,13 @@ fn: function (aString){
 var self=this;
 function $ArgVar(){return smalltalk.ArgVar||(typeof ArgVar=="undefined"?nil:ArgVar)}
 return smalltalk.withContext(function($ctx1) { 
-_st(self._args())._at_put_(aString,_st($ArgVar())._on_(aString));
-_st(_st(self._args())._at_(aString))._scope_(self);
+var $1,$3,$2;
+$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);
 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",
@@ -30,8 +35,13 @@ fn: function (aString){
 var self=this;
 function $TempVar(){return smalltalk.TempVar||(typeof TempVar=="undefined"?nil:TempVar)}
 return smalltalk.withContext(function($ctx1) { 
-_st(self._temps())._at_put_(aString,_st($TempVar())._on_(aString));
-_st(_st(self._temps())._at_(aString))._scope_(self);
+var $1,$3,$2;
+$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);
 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",
@@ -65,8 +75,11 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self._args())._keys()).__comma(_st(self._temps())._keys());
+var $2,$3,$1;
+$2=_st(self._args())._keys();
+$ctx1.sendIdx["keys"]=1;
+$3=_st(self._temps())._keys();
+$1=_st($2).__comma($3);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"allVariableNames",{},smalltalk.LexicalScope)})},
 args: [],
@@ -108,17 +121,27 @@ category: 'accessing',
 fn: function (aStringOrNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._pseudoVars())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
+var $2,$3,$4,$5,$6,$7,$1;
+$2=self._pseudoVars();
+$3=_st(aStringOrNode)._value();
+$ctx1.sendIdx["value"]=1;
+$1=_st($2)._at_ifAbsent_($3,(function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(self._args())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
+$4=self._args();
+$5=_st(aStringOrNode)._value();
+$ctx2.sendIdx["value"]=2;
+return _st($4)._at_ifAbsent_($5,(function(){
 return smalltalk.withContext(function($ctx3) {
-return _st(self._temps())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
+$6=self._temps();
+$7=_st(aStringOrNode)._value();
+return _st($6)._at_ifAbsent_($7,(function(){
 return smalltalk.withContext(function($ctx4) {
 return nil;
 }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+$ctx2.sendIdx["at:ifAbsent:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["at:ifAbsent:"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"bindingFor:",{aStringOrNode:aStringOrNode},smalltalk.LexicalScope)})},
 args: ["aStringOrNode"],
@@ -247,10 +270,14 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self._instruction())._notNil())._and_((function(){
+var $3,$2,$4,$1;
+$3=self._instruction();
+$ctx1.sendIdx["instruction"]=1;
+$2=_st($3)._notNil();
+$1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(self._instruction())._isInlined();
+$4=self._instruction();
+return _st($4)._isInlined();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.LexicalScope)})},
@@ -285,22 +312,24 @@ fn: function (aNode){
 var self=this;
 var lookup;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$3,$4;
 lookup=self._bindingFor_(aNode);
 $1=lookup;
 if(($receiver = $1) == nil || $receiver == null){
 $2=self._outerScope();
+$ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 lookup=$2;
 } else {
-lookup=_st(self._outerScope())._lookupVariable_(aNode);
+$3=self._outerScope();
+lookup=_st($3)._lookupVariable_(aNode);
 };
 lookup;
 } else {
 $1;
 };
-$3=lookup;
-return $3;
+$4=lookup;
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"lookupVariable:",{aNode:aNode,lookup:lookup},smalltalk.LexicalScope)})},
 args: ["aNode"],
 source: "lookupVariable: aNode\x0a\x09| lookup |\x0a\x09lookup := (self bindingFor: aNode).\x0a\x09lookup ifNil: [\x0a\x09\x09lookup := self outerScope ifNotNil: [\x0a\x09\x09\x09(self outerScope lookupVariable: aNode) ]].\x0a\x09^ lookup",
@@ -316,12 +345,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$3,$1;
 $2=self._outerScope();
+$ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1=$2;
 } else {
-$1=_st(self._outerScope())._methodScope();
+$3=self._outerScope();
+$1=_st($3)._methodScope();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methodScope",{},smalltalk.LexicalScope)})},
@@ -425,8 +456,9 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2,$4,$3,$7,$6,$5;
 $1=self._outerScope();
+$ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 return (1);
 } else {
@@ -434,11 +466,16 @@ $1;
 };
 $2=self._isInlined();
 if(smalltalk.assert($2)){
-$3=_st(self._outerScope())._scopeLevel();
+$4=self._outerScope();
+$ctx1.sendIdx["outerScope"]=2;
+$3=_st($4)._scopeLevel();
+$ctx1.sendIdx["scopeLevel"]=1;
 return $3;
 };
-$4=_st(_st(self._outerScope())._scopeLevel()).__plus((1));
-return $4;
+$7=self._outerScope();
+$6=_st($7)._scopeLevel();
+$5=_st($6).__plus((1));
+return $5;
 }, function($ctx1) {$ctx1.fill(self,"scopeLevel",{},smalltalk.LexicalScope)})},
 args: [],
 source: "scopeLevel\x0a\x09self outerScope ifNil: [ ^ 1 ].\x0a\x09self isInlined ifTrue: [ ^ self outerScope scopeLevel ].\x0a\x09\x0a\x09^ self outerScope scopeLevel + 1",
@@ -484,8 +521,13 @@ fn: function (aString){
 var self=this;
 function $InstanceVar(){return smalltalk.InstanceVar||(typeof InstanceVar=="undefined"?nil:InstanceVar)}
 return smalltalk.withContext(function($ctx1) { 
-_st(self._iVars())._at_put_(aString,_st($InstanceVar())._on_(aString));
-_st(_st(self._iVars())._at_(aString))._scope_(self);
+var $1,$3,$2;
+$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);
 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",
@@ -693,9 +735,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"methodScope",{},smalltalk.MethodLexicalScope)})},
 args: [],
 source: "methodScope\x0a\x09^ self",
@@ -1110,8 +1150,10 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st("$".__comma(self._name())).__comma("()");
+var $2,$1;
+$2="$".__comma(self._name());
+$1=_st($2).__comma("()");
+$ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.ClassRefVar)})},
 args: [],
@@ -1148,8 +1190,10 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st("self[\x22@".__comma(self._name())).__comma("\x22]");
+var $2,$1;
+$2="self[\x22@".__comma(self._name());
+$1=_st($2).__comma("\x22]");
+$ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.InstanceVar)})},
 args: [],
@@ -1312,19 +1356,25 @@ var identifier;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $UnknownVariableError(){return smalltalk.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$3,$4,$5,$6,$7;
 identifier=_st(aNode)._value();
+$ctx1.sendIdx["value"]=1;
 $1=_st(_st(_st(_st(_st($Smalltalk())._current())._globalJsVariables())._includes_(identifier))._not())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._isVariableGloballyUndefined_(identifier);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 if(smalltalk.assert($1)){
 $2=_st($UnknownVariableError())._new();
-_st($2)._variableName_(_st(aNode)._value());
-$3=_st($2)._signal();
-$3;
+$3=$2;
+$4=_st(aNode)._value();
+$ctx1.sendIdx["value"]=2;
+_st($3)._variableName_($4);
+$5=_st($2)._signal();
+$5;
 } else {
-_st(_st(_st(self["@currentScope"])._methodScope())._unknownVariables())._add_(_st(aNode)._value());
+$6=_st(_st(self["@currentScope"])._methodScope())._unknownVariables();
+$7=_st(aNode)._value();
+_st($6)._add_($7);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"errorUnknownVariable:",{aNode:aNode,identifier:identifier},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
@@ -1631,11 +1681,15 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $3,$2,$1,$4;
 smalltalk.SemanticAnalyzer.superclass.fn.prototype._visitCascadeNode_.apply(_st(self), [aNode]);
-$1=_st(_st(_st(aNode)._nodes())._first())._superSend();
+$3=_st(aNode)._nodes();
+$ctx1.sendIdx["nodes"]=1;
+$2=_st($3)._first();
+$1=_st($2)._superSend();
 if(smalltalk.assert($1)){
-_st(_st(aNode)._nodes())._do_((function(each){
+$4=_st(aNode)._nodes();
+_st($4)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._superSend_(true);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
@@ -1655,24 +1709,25 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3,$4;
 self._pushScope_(self._newMethodScope());
 _st(aNode)._scope_(self["@currentScope"]);
 _st(self["@currentScope"])._node_(aNode);
-_st(_st(self._theClass())._allInstanceVariableNames())._do_((function(each){
+$1=_st(_st(self._theClass())._allInstanceVariableNames())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self["@currentScope"])._addIVar_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-_st(_st(aNode)._arguments())._do_((function(each){
+$ctx1.sendIdx["do:"]=1;
+$2=_st(_st(aNode)._arguments())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 self._validateVariableScope_(each);
 return _st(self["@currentScope"])._addArg_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 smalltalk.SemanticAnalyzer.superclass.fn.prototype._visitMethodNode_.apply(_st(self), [aNode]);
-$1=aNode;
-_st($1)._classReferences_(self._classReferences());
-_st($1)._sendIndexes_(self._messageSends());
-$2=_st($1)._superSends_(_st(self._superSends())._keys());
+$3=aNode;
+_st($3)._classReferences_(self._classReferences());
+_st($3)._sendIndexes_(self._messageSends());
+$4=_st($3)._superSends_(_st(self._superSends())._keys());
 self._popScope();
 return self}, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
@@ -1715,46 +1770,65 @@ 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 $1,$2,$4,$5,$3,$7,$8,$6,$9,$11,$12,$10,$15,$16,$14,$13,$17,$20,$21,$19,$18;
-$1=_st(_st(_st(aNode)._receiver())._value()).__eq("super");
+var $3,$2,$1,$4,$5,$6,$8,$9,$7,$11,$12,$10,$13,$15,$16,$14,$19,$20,$18,$17,$21,$24,$25,$23,$22;
+$3=_st(aNode)._receiver();
+$ctx1.sendIdx["receiver"]=1;
+$2=_st($3)._value();
+$1=_st($2).__eq("super");
 if(smalltalk.assert($1)){
 _st(aNode)._superSend_(true);
-$2=_st(aNode)._receiver();
-_st($2)._value_("self");
-_st(self._superSends())._at_ifAbsentPut_(_st(aNode)._selector(),(function(){
+$4=_st(aNode)._receiver();
+$ctx1.sendIdx["receiver"]=2;
+_st($4)._value_("self");
+$5=self._superSends();
+$ctx1.sendIdx["superSends"]=1;
+$6=_st(aNode)._selector();
+$ctx1.sendIdx["selector"]=1;
+_st($5)._at_ifAbsentPut_($6,(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st($Set())._new();
+$ctx2.sendIdx["new"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$4=self._superSends();
-$5=_st(aNode)._selector();
-$3=_st($4)._at_($5);
-_st($3)._add_(aNode);
+$ctx1.sendIdx["at:ifAbsentPut:"]=1;
+$8=self._superSends();
+$9=_st(aNode)._selector();
+$ctx1.sendIdx["selector"]=2;
+$7=_st($8)._at_($9);
+$ctx1.sendIdx["at:"]=1;
+_st($7)._add_(aNode);
+$ctx1.sendIdx["add:"]=1;
 } else {
-$7=_st($IRSendInliner())._inlinedSelectors();
-$8=_st(aNode)._selector();
-$6=_st($7)._includes_($8);
-if(smalltalk.assert($6)){
+$11=_st($IRSendInliner())._inlinedSelectors();
+$12=_st(aNode)._selector();
+$ctx1.sendIdx["selector"]=3;
+$10=_st($11)._includes_($12);
+if(smalltalk.assert($10)){
 _st(aNode)._shouldBeInlined_(true);
-$9=_st(aNode)._receiver();
-_st($9)._shouldBeAliased_(true);
+$13=_st(aNode)._receiver();
+_st($13)._shouldBeAliased_(true);
 };
 };
-$11=self._messageSends();
-$12=_st(aNode)._selector();
-$10=_st($11)._at_ifAbsentPut_($12,(function(){
+$15=self._messageSends();
+$ctx1.sendIdx["messageSends"]=1;
+$16=_st(aNode)._selector();
+$ctx1.sendIdx["selector"]=4;
+$14=_st($15)._at_ifAbsentPut_($16,(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st($Set())._new();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
-$15=self._messageSends();
-$16=_st(aNode)._selector();
-$14=_st($15)._at_($16);
-$13=_st($14)._add_(aNode);
-$17=aNode;
-$20=self._messageSends();
-$21=_st(aNode)._selector();
-$19=_st($20)._at_($21);
-$18=_st($19)._size();
-_st($17)._index_($18);
+$19=self._messageSends();
+$ctx1.sendIdx["messageSends"]=2;
+$20=_st(aNode)._selector();
+$ctx1.sendIdx["selector"]=5;
+$18=_st($19)._at_($20);
+$ctx1.sendIdx["at:"]=2;
+$17=_st($18)._add_(aNode);
+$21=aNode;
+$24=self._messageSends();
+$25=_st(aNode)._selector();
+$23=_st($24)._at_($25);
+$22=_st($23)._size();
+_st($21)._index_($22);
 smalltalk.SemanticAnalyzer.superclass.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
 return self}, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
@@ -1795,24 +1869,37 @@ 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,$2,$3,$4,$5,$6;
+var $1,$3,$2,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13;
 binding=_st(self["@currentScope"])._lookupVariable_(aNode);
 $1=binding;
 if(($receiver = $1) == nil || $receiver == null){
-$2=_st(_st(aNode)._value())._isCapitalized();
+$3=_st(aNode)._value();
+$ctx1.sendIdx["value"]=1;
+$2=_st($3)._isCapitalized();
 if(smalltalk.assert($2)){
-$3=_st($ClassRefVar())._new();
-_st($3)._name_(_st(aNode)._value());
-$4=_st($3)._yourself();
-binding=$4;
+$4=_st($ClassRefVar())._new();
+$ctx1.sendIdx["new"]=1;
+$5=$4;
+$6=_st(aNode)._value();
+$ctx1.sendIdx["value"]=2;
+_st($5)._name_($6);
+$ctx1.sendIdx["name:"]=1;
+$7=_st($4)._yourself();
+$ctx1.sendIdx["yourself"]=1;
+binding=$7;
 binding;
-_st(self._classReferences())._add_(_st(aNode)._value());
+$8=self._classReferences();
+$9=_st(aNode)._value();
+$ctx1.sendIdx["value"]=3;
+_st($8)._add_($9);
 } else {
 self._errorUnknownVariable_(aNode);
-$5=_st($UnknownVar())._new();
-_st($5)._name_(_st(aNode)._value());
-$6=_st($5)._yourself();
-binding=$6;
+$10=_st($UnknownVar())._new();
+$11=$10;
+$12=_st(aNode)._value();
+_st($11)._name_($12);
+$13=_st($10)._yourself();
+binding=$13;
 binding;
 };
 } else {

+ 404 - 121
js/Compiler-Tests.js

@@ -90,15 +90,20 @@ 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,$4,$5,$1;
+var $2,$3,$5,$6,$4,$7,$1;
 $2=_st($ASTPCNodeVisitor())._new();
+$ctx1.sendIdx["new"]=1;
 _st($2)._pc_((0));
-$3=_st($AIContext())._new();
-_st($3)._pc_(anInteger);
-$4=_st($3)._yourself();
-_st($2)._context_($4);
-$5=_st($2)._yourself();
-$1=$5;
+$ctx1.sendIdx["pc:"]=1;
+$3=$2;
+$5=_st($AIContext())._new();
+_st($5)._pc_(anInteger);
+$6=_st($5)._yourself();
+$ctx1.sendIdx["yourself"]=1;
+$4=$6;
+_st($3)._context_($4);
+$7=_st($2)._yourself();
+$1=$7;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"astPCNodeVisitorForPC:",{anInteger:anInteger},smalltalk.ASTPCNodeVisitorTest)})},
 args: ["anInteger"],
@@ -163,17 +168,27 @@ var self=this;
 var ast;
 function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $4,$5,$3,$2,$1,$9,$10,$8,$7,$6;
 ast=self._parse_forClass_("foo true ifTrue: [ self asString yourself ]. ^ self asBoolean",$Object());
-$1=self._astPCNodeVisitorForPC_((2));
-_st($1)._visit_(ast);
-$2=_st($1)._currentNode();
-self._assert_equals_(_st($2)._selector(),"yourself");
+$ctx1.sendIdx["parse:forClass:"]=1;
+$4=self._astPCNodeVisitorForPC_((2));
+$ctx1.sendIdx["astPCNodeVisitorForPC:"]=1;
+_st($4)._visit_(ast);
+$ctx1.sendIdx["visit:"]=1;
+$5=_st($4)._currentNode();
+$ctx1.sendIdx["currentNode"]=1;
+$3=$5;
+$2=_st($3)._selector();
+$ctx1.sendIdx["selector"]=1;
+$1=self._assert_equals_($2,"yourself");
+$ctx1.sendIdx["assert:equals:"]=1;
 ast=self._parse_forClass_("foo true ifTrue: [ self asString yourself ]. ^ self asBoolean",$Object());
-$3=self._astPCNodeVisitorForPC_((3));
-_st($3)._visit_(ast);
-$4=_st($3)._currentNode();
-self._assert_equals_(_st($4)._selector(),"asBoolean");
+$9=self._astPCNodeVisitorForPC_((3));
+_st($9)._visit_(ast);
+$10=_st($9)._currentNode();
+$8=$10;
+$7=_st($8)._selector();
+$6=self._assert_equals_($7,"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 astPCNodeVisitorForPC: 2)\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 astPCNodeVisitorForPC: 3)\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) selector equals: 'asBoolean'",
@@ -297,10 +312,16 @@ fn: function (aString,anObject,aResult){
 var self=this;
 var method,result;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3,$4;
 self["@receiver"]=anObject;
-method=_st(self._compiler())._install_forClass_category_(aString,_st(anObject)._class(),"tests");
+$1=self._compiler();
+$2=aString;
+$3=_st(anObject)._class();
+$ctx1.sendIdx["class"]=1;
+method=_st($1)._install_forClass_category_($2,$3,"tests");
 result=_st(self["@receiver"])._perform_(_st(method)._selector());
-_st(_st(anObject)._class())._removeCompiledMethod_(method);
+$4=_st(anObject)._class();
+_st($4)._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"],
@@ -350,9 +371,12 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo | a | a := true ifTrue: [ 1 ]. ^ a",(1));
-self._should_return_("foo | a | a := false ifTrue: [ 1 ]. ^ a",nil);
-self._should_return_("foo | a | ^ a := true ifTrue: [ 1 ]",(1));
+var $1,$2,$3;
+$1=self._should_return_("foo | a | a := true ifTrue: [ 1 ]. ^ a",(1));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo | a | a := false ifTrue: [ 1 ]. ^ a",nil);
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo | a | ^ a := true ifTrue: [ 1 ]",(1));
 return self}, function($ctx1) {$ctx1.fill(self,"testAssignment",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testAssignment\x0a\x09self should: 'foo | a | a := true ifTrue: [ 1 ]. ^ a' return: 1.\x0a\x09self should: 'foo | a | a := false ifTrue: [ 1 ]. ^ a' return: nil.\x0a\x0a\x09self should: 'foo | a | ^ a := true ifTrue: [ 1 ]' return: 1",
@@ -368,8 +392,10 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("\x5c arg ^ 4",(4));
-self._should_return_("\x5c\x5c arg ^ 42",(42));
+var $1,$2;
+$1=self._should_return_("\x5c arg ^ 4",(4));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("\x5c\x5c arg ^ 42",(42));
 return self}, function($ctx1) {$ctx1.fill(self,"testBackslashSelectors",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testBackslashSelectors\x0a\x09\x0a\x09self should: '\x5c arg ^ 4' return: 4.\x0a\x09self should: '\x5c\x5c arg ^ 42' return: 42",
@@ -385,9 +411,12 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ #(1 2 3) collect: [ :each | true ifTrue: [ each + 1 ] ]",[(2), (3), (4)]);
-self._should_return_("foo ^ #(1 2 3) collect: [ :each | false ifFalse: [ each + 1 ] ]",[(2), (3), (4)]);
-self._should_return_("foo ^ #(1 2 3) collect: [ :each | each odd ifTrue: [ each + 1 ] ifFalse: [ each - 1 ] ]",[(2), (1), (4)]);
+var $1,$2,$3;
+$1=self._should_return_("foo ^ #(1 2 3) collect: [ :each | true ifTrue: [ each + 1 ] ]",[(2), (3), (4)]);
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ #(1 2 3) collect: [ :each | false ifFalse: [ each + 1 ] ]",[(2), (3), (4)]);
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ #(1 2 3) collect: [ :each | each odd ifTrue: [ each + 1 ] ifFalse: [ each - 1 ] ]",[(2), (1), (4)]);
 return self}, function($ctx1) {$ctx1.fill(self,"testBlockReturn",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testBlockReturn\x0a\x09self should: 'foo ^ #(1 2 3) collect: [ :each | true ifTrue: [ each + 1 ] ]' return: #(2 3 4).\x0a\x09self should: 'foo ^ #(1 2 3) collect: [ :each | false ifFalse: [ each + 1 ] ]' return: #(2 3 4).\x0a\x09self should: 'foo ^ #(1 2 3) collect: [ :each | each odd ifTrue: [ each + 1 ] ifFalse: [ each - 1 ] ]' return: #(2 1 4).",
@@ -435,7 +464,12 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := 'foo'->1.\x0a\x09^ #{ x. (true ifTrue: [ x := 'bar'->2 ]) }\x0a",smalltalk.HashedCollection._from_(["foo".__minus_gt((1)),"bar".__minus_gt((2))]));
+var $2,$3,$1;
+$2="foo".__minus_gt((1));
+$ctx1.sendIdx["->"]=1;
+$3="bar".__minus_gt((2));
+$1=smalltalk.HashedCollection._from_([$2,$3]);
+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: [],
 source: "testDynamicDictionaryElementsOrdered\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := ''foo''->1.\x0a\x09^ #{ x. (true ifTrue: [ x := ''bar''->2 ]) }\x0a' return: #{'foo'->1. 'bar'->2}.",
@@ -452,9 +486,12 @@ fn: function (){
 var self=this;
 function $BlockClosure(){return smalltalk.BlockClosure||(typeof BlockClosure=="undefined"?nil:BlockClosure)}
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ eval class",$BlockClosure());
-self._should_return_("foo ^ Math cos: 0",(1));
-self._should_return_("foo ^ NonExistingVar",nil);
+var $1,$2,$3;
+$1=self._should_return_("foo ^ eval class",$BlockClosure());
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ Math cos: 0",(1));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ NonExistingVar",nil);
 return self}, function($ctx1) {$ctx1.fill(self,"testGlobalVar",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testGlobalVar\x0a\x09self should: 'foo ^ eval class' return: BlockClosure.\x0a\x09self should: 'foo ^ Math cos: 0' return: 1.\x0a\x09self should: 'foo ^ NonExistingVar' return: nil",
@@ -471,10 +508,33 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",["foo".__minus_gt($Array()),"bar".__minus_gt((2))]);
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",["foo".__minus_gt((1)),"bar".__minus_gt((2))]);
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",["foo".__minus_gt((1)),"bar".__minus_gt((2))]);
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ #{ 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",smalltalk.HashedCollection._from_(["foo".__minus_gt((1)),"bar".__minus_gt((2))]));
+var $3,$4,$2,$1,$7,$8,$6,$5,$11,$12,$10,$9,$15,$16,$14,$13;
+$3="foo".__minus_gt($Array());
+$ctx1.sendIdx["->"]=1;
+$4="bar".__minus_gt((2));
+$ctx1.sendIdx["->"]=2;
+$2=[$3,$4];
+$1=self._should_return_("foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",$2);
+$ctx1.sendIdx["should:return:"]=1;
+$7="foo".__minus_gt((1));
+$ctx1.sendIdx["->"]=3;
+$8="bar".__minus_gt((2));
+$ctx1.sendIdx["->"]=4;
+$6=[$7,$8];
+$5=self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",$6);
+$ctx1.sendIdx["should:return:"]=2;
+$11="foo".__minus_gt((1));
+$ctx1.sendIdx["->"]=5;
+$12="bar".__minus_gt((2));
+$ctx1.sendIdx["->"]=6;
+$10=[$11,$12];
+$9=self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",$10);
+$ctx1.sendIdx["should:return:"]=3;
+$15="foo".__minus_gt((1));
+$ctx1.sendIdx["->"]=7;
+$16="bar".__minus_gt((2));
+$14=smalltalk.HashedCollection._from_([$15,$16]);
+$13=self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ #{ 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",$14);
 return self}, function($ctx1) {$ctx1.fill(self,"testInnerTemporalDependentElementsOrdered",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testInnerTemporalDependentElementsOrdered\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])\x0a' return: {'foo'->Array. 'bar'->2}.\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])\x0a' return: {'foo'->1. 'bar'->2}.\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: {'foo'->1. 'bar'->2}.\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ #{ ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: #{'foo'->1. 'bar'->2}.",
@@ -506,16 +566,30 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ 1",(1));
-self._should_return_("foo ^ 'hello'","hello");
-self._should_return_("foo ^ #(1 2 3 4)",[(1), (2), (3), (4)]);
-self._should_return_("foo ^ {1. [:x | x ] value: 2. 3. [4] value}",[(1), (2), (3), (4)]);
-self._should_return_("foo ^ true",true);
-self._should_return_("foo ^ false",false);
-self._should_return_("foo ^ #{1->2. 3->4}",smalltalk.HashedCollection._from_([(1).__minus_gt((2)),(3).__minus_gt((4))]));
-self._should_return_("foo ^ #hello","hello");
-self._should_return_("foo ^ -123.456",(-123.456));
-self._should_return_("foo ^ -2.5e4",(-25000));
+var $1,$2,$3,$4,$5,$6,$9,$10,$8,$7,$11,$12,$13;
+$1=self._should_return_("foo ^ 1",(1));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ 'hello'","hello");
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ #(1 2 3 4)",[(1), (2), (3), (4)]);
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo ^ {1. [:x | x ] value: 2. 3. [4] value}",[(1), (2), (3), (4)]);
+$ctx1.sendIdx["should:return:"]=4;
+$5=self._should_return_("foo ^ true",true);
+$ctx1.sendIdx["should:return:"]=5;
+$6=self._should_return_("foo ^ false",false);
+$ctx1.sendIdx["should:return:"]=6;
+$9=(1).__minus_gt((2));
+$ctx1.sendIdx["->"]=1;
+$10=(3).__minus_gt((4));
+$8=smalltalk.HashedCollection._from_([$9,$10]);
+$7=self._should_return_("foo ^ #{1->2. 3->4}",$8);
+$ctx1.sendIdx["should:return:"]=7;
+$11=self._should_return_("foo ^ #hello","hello");
+$ctx1.sendIdx["should:return:"]=8;
+$12=self._should_return_("foo ^ -123.456",(-123.456));
+$ctx1.sendIdx["should:return:"]=9;
+$13=self._should_return_("foo ^ -2.5e4",(-25000));
 return self}, function($ctx1) {$ctx1.fill(self,"testLiterals",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testLiterals\x0a\x09self should: 'foo ^ 1' return: 1.\x0a\x09self should: 'foo ^ ''hello''' return: 'hello'.\x0a\x09self should: 'foo ^ #(1 2 3 4)' return: #(1 2 3 4).\x0a\x09self should: 'foo ^ {1. [:x | x ] value: 2. 3. [4] value}' return: #(1 2 3 4).\x0a\x09self should: 'foo ^ true' return: true.\x0a\x09self should: 'foo ^ false' return: false.\x0a\x09self should: 'foo ^ #{1->2. 3->4}' return: #{1->2. 3->4}.\x0a\x09self should: 'foo ^ #hello' return: #hello.\x0a\x09self should: 'foo ^ -123.456' return: -123.456.\x0a\x09self should: 'foo ^ -2.5e4' return: -25000.",
@@ -531,11 +605,16 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ 1",(1));
-self._should_return_("foo ^ 1 + 1",(2));
-self._should_return_("foo ",self["@receiver"]);
-self._should_return_("foo self asString",self["@receiver"]);
-self._should_return_("foo | a b | a := 1. b := 2. ^ a + b",(3));
+var $1,$2,$3,$4,$5;
+$1=self._should_return_("foo ^ 1",(1));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ 1 + 1",(2));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ",self["@receiver"]);
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo self asString",self["@receiver"]);
+$ctx1.sendIdx["should:return:"]=4;
+$5=self._should_return_("foo | a b | a := 1. b := 2. ^ a + b",(3));
 return self}, function($ctx1) {$ctx1.fill(self,"testLocalReturn",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testLocalReturn\x0a\x09self should: 'foo ^ 1' return: 1.\x0a\x09self should: 'foo ^ 1 + 1' return: 2.\x0a\x09self should: 'foo ' return: receiver.\x0a\x09self should: 'foo self asString' return: receiver.\x0a\x09self should: 'foo | a b | a := 1. b := 2. ^ a + b' return: 3",
@@ -551,11 +630,16 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ 1 asString","1");
-self._should_return_("foo ^ 1 + 1",(2));
-self._should_return_("foo ^ 1 + 2 * 3",(9));
-self._should_return_("foo ^ 1 to: 3",[(1), (2), (3)]);
-self._should_return_("foo ^ 1 to: 5 by: 2",[(1), (3), (5)]);
+var $1,$2,$3,$4,$5;
+$1=self._should_return_("foo ^ 1 asString","1");
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ 1 + 1",(2));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ 1 + 2 * 3",(9));
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo ^ 1 to: 3",[(1), (2), (3)]);
+$ctx1.sendIdx["should:return:"]=4;
+$5=self._should_return_("foo ^ 1 to: 5 by: 2",[(1), (3), (5)]);
 return self}, function($ctx1) {$ctx1.fill(self,"testMessageSends",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testMessageSends\x0a\x09self should: 'foo ^ 1 asString' return: '1'.\x0a\x0a\x09self should: 'foo ^ 1 + 1' return: 2.\x0a\x09self should: 'foo ^ 1 + 2 * 3' return: 9.\x0a\x0a\x09self should: 'foo ^ 1 to: 3' return: #(1 2 3).\x0a\x09self should: 'foo ^ 1 to: 5 by: 2' return: #(1 3 5)",
@@ -603,10 +687,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ true ifTrue: [ false ifFalse: [ 1 ] ]",(1));
-self._should_return_("foo ^ true ifTrue: [ false ifTrue: [ 1 ] ]",nil);
-self._should_return_("foo true ifTrue: [ false ifFalse: [ ^ 1 ] ]",(1));
-self._should_return_("foo true ifTrue: [ false ifTrue: [ ^ 1 ] ]",self["@receiver"]);
+var $1,$2,$3,$4;
+$1=self._should_return_("foo ^ true ifTrue: [ false ifFalse: [ 1 ] ]",(1));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ true ifTrue: [ false ifTrue: [ 1 ] ]",nil);
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo true ifTrue: [ false ifFalse: [ ^ 1 ] ]",(1));
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo true ifTrue: [ false ifTrue: [ ^ 1 ] ]",self["@receiver"]);
 return self}, function($ctx1) {$ctx1.fill(self,"testNestedIfTrue",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testNestedIfTrue\x0a\x09self should: 'foo ^ true ifTrue: [ false ifFalse: [ 1 ] ]' return: 1.\x0a\x09self should: 'foo ^ true ifTrue: [ false ifTrue: [ 1 ] ]' return: nil.\x0a\x0a\x09self should: 'foo true ifTrue: [ false ifFalse: [ ^ 1 ] ]' return: 1.\x0a\x09self should: 'foo true ifTrue: [ false ifTrue: [ ^ 1 ] ]' return: receiver.",
@@ -639,10 +727,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo [ ^ 1 ] value",(1));
-self._should_return_("foo [ ^ 1 + 1 ] value",(2));
-self._should_return_("foo | a b | a := 1. b := 2. [ ^ a + b ] value. self halt",(3));
-self._should_return_("foo [ :x | ^ x + x ] value: 4. ^ 2",(8));
+var $1,$2,$3,$4;
+$1=self._should_return_("foo [ ^ 1 ] value",(1));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo [ ^ 1 + 1 ] value",(2));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo | a b | a := 1. b := 2. [ ^ a + b ] value. self halt",(3));
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo [ :x | ^ x + x ] value: 4. ^ 2",(8));
 return self}, function($ctx1) {$ctx1.fill(self,"testNonLocalReturn",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testNonLocalReturn\x0a\x09self should: 'foo [ ^ 1 ] value' return: 1.\x0a\x09self should: 'foo [ ^ 1 + 1 ] value' return: 2.\x0a\x09self should: 'foo | a b | a := 1. b := 2. [ ^ a + b ] value. self halt' return: 3.\x0a\x09self should: 'foo [ :x | ^ x + x ] value: 4. ^ 2' return: 8",
@@ -658,8 +750,10 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^Object",_st(smalltalk)._at_("Object"));
-self._should_return_("foo ^NonExistent",nil);
+var $1,$2;
+$1=self._should_return_("foo ^Object",_st(smalltalk)._at_("Object"));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^NonExistent",nil);
 return self}, function($ctx1) {$ctx1.fill(self,"testPascalCaseGlobal",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testPascalCaseGlobal\x0a\x09self should: 'foo ^Object' return: (smalltalk at: 'Object').\x0a\x09self should: 'foo ^NonExistent' return: nil",
@@ -676,8 +770,10 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: x with: (true ifTrue: [ x := 2 ])\x0a",[(1), (2)]);
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: x with: (true ifTrue: [ x := 2 ])\x0a",[$Array(),(2)]);
+var $1,$2;
+$1=self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: x with: (true ifTrue: [ x := 2 ])\x0a",[(1), (2)]);
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: x with: (true ifTrue: [ x := 2 ])\x0a",[$Array(),(2)]);
 return self}, function($ctx1) {$ctx1.fill(self,"testSendReceiverAndArgumentsOrdered",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testSendReceiverAndArgumentsOrdered\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: x with: (true ifTrue: [ x := 2 ])\x0a' return: #(1 2).\x0a\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: x with: (true ifTrue: [ x := 2 ])\x0a' return: {Array. 2}.",
@@ -709,12 +805,18 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo | a | ^ a",nil);
-self._should_return_("foo | AVariable | ^ AVariable",nil);
-self._should_return_("foo | a b c | ^ c",nil);
-self._should_return_("foo | a | [ | d | ^ d ] value",nil);
-self._should_return_("foo | a | a:= 1. ^ a",(1));
-self._should_return_("foo | AVariable | AVariable := 1. ^ AVariable",(1));
+var $1,$2,$3,$4,$5,$6;
+$1=self._should_return_("foo | a | ^ a",nil);
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo | AVariable | ^ AVariable",nil);
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo | a b c | ^ c",nil);
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo | a | [ | d | ^ d ] value",nil);
+$ctx1.sendIdx["should:return:"]=4;
+$5=self._should_return_("foo | a | a:= 1. ^ a",(1));
+$ctx1.sendIdx["should:return:"]=5;
+$6=self._should_return_("foo | AVariable | AVariable := 1. ^ AVariable",(1));
 return self}, function($ctx1) {$ctx1.fill(self,"testTempVariables",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testTempVariables\x0a\x09self should: 'foo | a | ^ a' return: nil.\x0a\x09self should: 'foo | AVariable | ^ AVariable' return: nil.\x0a\x09self should: 'foo | a b c | ^ c' return: nil.\x0a\x09self should: 'foo | a | [ | d | ^ d ] value' return: nil.\x0a\x09\x0a\x09self should: 'foo | a | a:= 1. ^ a' return: 1.\x0a\x09self should: 'foo | AVariable | AVariable := 1. ^ AVariable' return: 1.\x09",
@@ -746,10 +848,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo true ifFalse: [ ^ 1 ]",self["@receiver"]);
-self._should_return_("foo false ifFalse: [ ^ 2 ]",(2));
-self._should_return_("foo ^ true ifFalse: [ 1 ]",nil);
-self._should_return_("foo ^ false ifFalse: [ 2 ]",(2));
+var $1,$2,$3,$4;
+$1=self._should_return_("foo true ifFalse: [ ^ 1 ]",self["@receiver"]);
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo false ifFalse: [ ^ 2 ]",(2));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ true ifFalse: [ 1 ]",nil);
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo ^ false ifFalse: [ 2 ]",(2));
 return self}, function($ctx1) {$ctx1.fill(self,"testifFalse",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testifFalse\x0a\x09self should: 'foo true ifFalse: [ ^ 1 ]' return: receiver.\x0a\x09self should: 'foo false ifFalse: [ ^ 2 ]' return: 2.\x0a\x09\x0a\x09self should: 'foo ^ true ifFalse: [ 1 ]' return: nil.\x0a\x09self should: 'foo ^ false ifFalse: [ 2 ]' return: 2.",
@@ -765,10 +871,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo true ifFalse: [ ^ 1 ] ifTrue: [ ^ 2 ]",(2));
-self._should_return_("foo false ifFalse: [ ^ 2 ] ifTrue: [ ^1 ]",(2));
-self._should_return_("foo ^ true ifFalse: [ 1 ] ifTrue: [ 2 ]",(2));
-self._should_return_("foo ^ false ifFalse: [ 2 ] ifTrue: [ 1 ]",(2));
+var $1,$2,$3,$4;
+$1=self._should_return_("foo true ifFalse: [ ^ 1 ] ifTrue: [ ^ 2 ]",(2));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo false ifFalse: [ ^ 2 ] ifTrue: [ ^1 ]",(2));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ true ifFalse: [ 1 ] ifTrue: [ 2 ]",(2));
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo ^ false ifFalse: [ 2 ] ifTrue: [ 1 ]",(2));
 return self}, function($ctx1) {$ctx1.fill(self,"testifFalseIfTrue",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testifFalseIfTrue\x0a\x09self should: 'foo true ifFalse: [ ^ 1 ] ifTrue: [ ^ 2 ]' return: 2.\x0a\x09self should: 'foo false ifFalse: [ ^ 2 ] ifTrue: [ ^1 ]' return: 2.\x0a\x09\x0a\x09self should: 'foo ^ true ifFalse: [ 1 ] ifTrue: [ 2 ]' return: 2.\x0a\x09self should: 'foo ^ false ifFalse: [ 2 ] ifTrue: [ 1 ]' return: 2.",
@@ -784,10 +894,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ 1 ifNil: [ 2 ]",(1));
-self._should_return_("foo ^ nil ifNil: [ 2 ]",(2));
-self._should_return_("foo 1 ifNil: [ ^ 2 ]",self["@receiver"]);
-self._should_return_("foo nil ifNil: [ ^ 2 ]",(2));
+var $1,$2,$3,$4;
+$1=self._should_return_("foo ^ 1 ifNil: [ 2 ]",(1));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ nil ifNil: [ 2 ]",(2));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo 1 ifNil: [ ^ 2 ]",self["@receiver"]);
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo nil ifNil: [ ^ 2 ]",(2));
 return self}, function($ctx1) {$ctx1.fill(self,"testifNil",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testifNil\x0a\x09self should: 'foo ^ 1 ifNil: [ 2 ]' return: 1.\x0a\x09self should: 'foo ^ nil ifNil: [ 2 ]' return: 2.\x0a\x0a\x09self should: 'foo 1 ifNil: [ ^ 2 ]' return: receiver.\x0a\x09self should: 'foo nil ifNil: [ ^ 2 ]' return: 2.",
@@ -803,10 +917,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ 1 ifNil: [ 2 ] ifNotNil: [ 3 ]",(3));
-self._should_return_("foo ^ nil ifNil: [ 2 ] ifNotNil: [ 3 ]",(2));
-self._should_return_("foo 1 ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]",(3));
-self._should_return_("foo nil ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]",(2));
+var $1,$2,$3,$4;
+$1=self._should_return_("foo ^ 1 ifNil: [ 2 ] ifNotNil: [ 3 ]",(3));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ nil ifNil: [ 2 ] ifNotNil: [ 3 ]",(2));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo 1 ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]",(3));
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo nil ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]",(2));
 return self}, function($ctx1) {$ctx1.fill(self,"testifNilIfNotNil",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testifNilIfNotNil\x0a\x09self should: 'foo ^ 1 ifNil: [ 2 ] ifNotNil: [ 3 ]' return: 3.\x0a\x09self should: 'foo ^ nil ifNil: [ 2 ] ifNotNil: [ 3 ]' return: 2.\x0a\x0a\x09self should: 'foo 1 ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]' return: 3.\x0a\x09self should: 'foo nil ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]' return: 2.",
@@ -822,10 +940,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ 1 ifNotNil: [ 2 ]",(2));
-self._should_return_("foo ^ nil ifNotNil: [ 2 ]",nil);
-self._should_return_("foo 1 ifNotNil: [ ^ 2 ]",(2));
-self._should_return_("foo nil ifNotNil: [ ^ 2 ]",self["@receiver"]);
+var $1,$2,$3,$4;
+$1=self._should_return_("foo ^ 1 ifNotNil: [ 2 ]",(2));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ nil ifNotNil: [ 2 ]",nil);
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo 1 ifNotNil: [ ^ 2 ]",(2));
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo nil ifNotNil: [ ^ 2 ]",self["@receiver"]);
 return self}, function($ctx1) {$ctx1.fill(self,"testifNotNil",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testifNotNil\x0a\x09self should: 'foo ^ 1 ifNotNil: [ 2 ]' return: 2.\x0a\x09self should: 'foo ^ nil ifNotNil: [ 2 ]' return: nil.\x0a\x0a\x09self should: 'foo 1 ifNotNil: [ ^ 2 ]' return: 2.\x0a\x09self should: 'foo nil ifNotNil: [ ^ 2 ]' return: receiver.",
@@ -841,12 +963,18 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo ^ 1 ifNotNil: [ :val | val + 2 ]",(3));
-self._should_return_("foo ^ nil ifNotNil: [ :val | val + 2 ]",nil);
-self._should_return_("foo ^ 1 ifNil: [ 5 ] ifNotNil: [ :val | val + 2 ]",(3));
-self._should_return_("foo ^ nil ifNil: [ 5 ] ifNotNil: [ :val | val + 2 ]",(5));
-self._should_return_("foo ^ 1 ifNotNil: [ :val | val + 2 ] ifNil: [ 5 ]",(3));
-self._should_return_("foo ^ nil ifNotNil: [ :val | val + 2 ] ifNil: [ 5 ]",(5));
+var $1,$2,$3,$4,$5,$6;
+$1=self._should_return_("foo ^ 1 ifNotNil: [ :val | val + 2 ]",(3));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo ^ nil ifNotNil: [ :val | val + 2 ]",nil);
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ 1 ifNil: [ 5 ] ifNotNil: [ :val | val + 2 ]",(3));
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo ^ nil ifNil: [ 5 ] ifNotNil: [ :val | val + 2 ]",(5));
+$ctx1.sendIdx["should:return:"]=4;
+$5=self._should_return_("foo ^ 1 ifNotNil: [ :val | val + 2 ] ifNil: [ 5 ]",(3));
+$ctx1.sendIdx["should:return:"]=5;
+$6=self._should_return_("foo ^ nil ifNotNil: [ :val | val + 2 ] ifNil: [ 5 ]",(5));
 return self}, function($ctx1) {$ctx1.fill(self,"testifNotNilWithArgument",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testifNotNilWithArgument\x0a\x09self should: 'foo ^ 1 ifNotNil: [ :val | val + 2 ]' return: 3.\x0a\x09self should: 'foo ^ nil ifNotNil: [ :val | val + 2 ]' return: nil.\x0a\x09\x0a\x09self should: 'foo ^ 1 ifNil: [ 5 ] ifNotNil: [ :val | val + 2 ]' return: 3.\x0a\x09self should: 'foo ^ nil ifNil: [ 5 ] ifNotNil: [ :val | val + 2 ]' return: 5.\x0a\x09\x0a\x09self should: 'foo ^ 1 ifNotNil: [ :val | val + 2 ] ifNil: [ 5 ]' return: 3.\x0a\x09self should: 'foo ^ nil ifNotNil: [ :val | val + 2 ] ifNil: [ 5 ]' return: 5",
@@ -862,10 +990,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo false ifTrue: [ ^ 1 ]",self["@receiver"]);
-self._should_return_("foo true ifTrue: [ ^ 2 ]",(2));
-self._should_return_("foo ^ false ifTrue: [ 1 ]",nil);
-self._should_return_("foo ^ true ifTrue: [ 2 ]",(2));
+var $1,$2,$3,$4;
+$1=self._should_return_("foo false ifTrue: [ ^ 1 ]",self["@receiver"]);
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo true ifTrue: [ ^ 2 ]",(2));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ false ifTrue: [ 1 ]",nil);
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo ^ true ifTrue: [ 2 ]",(2));
 return self}, function($ctx1) {$ctx1.fill(self,"testifTrue",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testifTrue\x0a\x09self should: 'foo false ifTrue: [ ^ 1 ]' return: receiver.\x0a\x09self should: 'foo true ifTrue: [ ^ 2 ]' return: 2.\x0a\x09\x0a\x09self should: 'foo ^ false ifTrue: [ 1 ]' return: nil.\x0a\x09self should: 'foo ^ true ifTrue: [ 2 ]' return: 2.",
@@ -881,10 +1013,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._should_return_("foo false ifTrue: [ ^ 1 ] ifFalse: [ ^2 ]",(2));
-self._should_return_("foo true ifTrue: [ ^ 1 ] ifFalse: [ ^ 2 ]",(1));
-self._should_return_("foo ^ false ifTrue: [ 2 ] ifFalse: [ 1 ]",(1));
-self._should_return_("foo ^ true ifTrue: [ 2 ] ifFalse: [ 1 ]",(2));
+var $1,$2,$3,$4;
+$1=self._should_return_("foo false ifTrue: [ ^ 1 ] ifFalse: [ ^2 ]",(2));
+$ctx1.sendIdx["should:return:"]=1;
+$2=self._should_return_("foo true ifTrue: [ ^ 1 ] ifFalse: [ ^ 2 ]",(1));
+$ctx1.sendIdx["should:return:"]=2;
+$3=self._should_return_("foo ^ false ifTrue: [ 2 ] ifFalse: [ 1 ]",(1));
+$ctx1.sendIdx["should:return:"]=3;
+$4=self._should_return_("foo ^ true ifTrue: [ 2 ] ifFalse: [ 1 ]",(2));
 return self}, function($ctx1) {$ctx1.fill(self,"testifTrueIfFalse",{},smalltalk.CodeGeneratorTest)})},
 args: [],
 source: "testifTrueIfFalse\x0a\x09self should: 'foo false ifTrue: [ ^ 1 ] ifFalse: [ ^2 ]' return: 2.\x0a\x09self should: 'foo true ifTrue: [ ^ 1 ] ifFalse: [ ^ 2 ]' return: 1.\x0a\x09\x0a\x09self should: 'foo ^ false ifTrue: [ 2 ] ifFalse: [ 1 ]' return: 1.\x0a\x09self should: 'foo ^ true ifTrue: [ 2 ] ifFalse: [ 1 ]' return: 2.",
@@ -950,6 +1086,7 @@ function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$4,$5,$3;
 interpreter=_st($ASTInterpreter())._new();
+$ctx1.sendIdx["new"]=1;
 $1=_st($AIContext())._new();
 _st($1)._receiver_(anObject);
 _st($1)._interpreter_(interpreter);
@@ -1062,14 +1199,18 @@ 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;
+var $1,$2,$3,$4,$5,$6;
 $1=_st($VariableNode())._new();
+$ctx1.sendIdx["new"]=1;
 _st($1)._value_("Object");
 $2=_st($1)._yourself();
 node=$2;
 $3=_st($SemanticAnalyzer())._new();
-_st($3)._pushScope_(_st($MethodLexicalScope())._new());
-$4=_st($3)._visit_(node);
+$ctx1.sendIdx["new"]=2;
+$4=$3;
+$5=_st($MethodLexicalScope())._new();
+_st($4)._pushScope_($5);
+$6=_st($3)._visit_(node);
 self._assert_(_st(_st(node)._binding())._isClassRefVar());
 return self}, function($ctx1) {$ctx1.fill(self,"testClassRefVar",{node:node},smalltalk.ScopeVarTest)})},
 args: [],
@@ -1091,6 +1232,7 @@ function $MethodLexicalScope(){return smalltalk.MethodLexicalScope||(typeof Meth
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 $1=_st($VariableNode())._new();
+$ctx1.sendIdx["new"]=1;
 _st($1)._value_("bzzz");
 $2=_st($1)._yourself();
 node=$2;
@@ -1115,16 +1257,20 @@ 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;
+var $1,$2,$5,$4,$3;
 pseudoVars=["self", "super", "true", "false", "nil"];
 _st(pseudoVars)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 $1=_st($VariableNode())._new();
+$ctx2.sendIdx["new"]=1;
 _st($1)._value_(each);
 $2=_st($1)._yourself();
 node=$2;
 node;
-return self._assert_(_st(_st(_st($MethodLexicalScope())._new())._bindingFor_(node))._isPseudoVar());
+$5=_st($MethodLexicalScope())._new();
+$4=_st($5)._bindingFor_(node);
+$3=_st($4)._isPseudoVar();
+return self._assert_($3);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"testPseudoVar",{node:node,pseudoVars:pseudoVars},smalltalk.ScopeVarTest)})},
 args: [],
@@ -1146,6 +1292,7 @@ function $MethodLexicalScope(){return smalltalk.MethodLexicalScope||(typeof Meth
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 $1=_st($VariableNode())._new();
+$ctx1.sendIdx["new"]=1;
 _st($1)._value_("bzzz");
 $2=_st($1)._yourself();
 node=$2;
@@ -1170,12 +1317,16 @@ 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;
+var $1,$2,$5,$4,$3;
 $1=_st($VariableNode())._new();
+$ctx1.sendIdx["new"]=1;
 _st($1)._value_("bzzz");
 $2=_st($1)._yourself();
 node=$2;
-self._assert_(_st(_st(_st($MethodLexicalScope())._new())._bindingFor_(node))._isNil());
+$5=_st($MethodLexicalScope())._new();
+$4=_st($5)._bindingFor_(node);
+$3=_st($4)._isNil();
+self._assert_($3);
 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",
@@ -1276,10 +1427,20 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
+var $6,$5,$4,$3,$2,$7,$1;
 src="foo | a | a + 1. [ | b | b := a ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-self._deny_(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._scope()).__eq_eq(_st(ast)._scope()));
+$6=_st(ast)._nodes();
+$5=_st($6)._first();
+$4=_st($5)._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);
+self._deny_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"testScope",{src:src,ast:ast},smalltalk.SemanticAnalyzerTest)})},
 args: [],
 source: "testScope\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ | b | b := a ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self deny: ast nodes first nodes last scope == ast scope.",
@@ -1296,10 +1457,28 @@ 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;
 src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-self._deny_(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._nodes())._first())._nodes())._first())._scope()).__eq_eq(_st(ast)._scope()));
+$10=_st(ast)._nodes();
+$9=_st($10)._first();
+$8=_st($9)._nodes();
+$ctx1.sendIdx["nodes"]=3;
+$7=_st($8)._last();
+$6=_st($7)._nodes();
+$ctx1.sendIdx["nodes"]=2;
+$5=_st($6)._first();
+$ctx1.sendIdx["first"]=2;
+$4=_st($5)._nodes();
+$ctx1.sendIdx["nodes"]=1;
+$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);
+self._deny_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"testScope2",{src:src,ast:ast},smalltalk.SemanticAnalyzerTest)})},
 args: [],
 source: "testScope2\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self deny: ast nodes first nodes last nodes first nodes first scope == ast scope.",
@@ -1316,11 +1495,32 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
+var $3,$2,$1,$14,$13,$12,$11,$10,$9,$8,$7,$6,$5,$4;
 src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-self._assert_equals_(_st(_st(ast)._scope())._scopeLevel(),(1));
-self._assert_equals_(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._nodes())._first())._nodes())._first())._scope())._scopeLevel(),(3));
+$3=_st(ast)._scope();
+$ctx1.sendIdx["scope"]=1;
+$2=_st($3)._scopeLevel();
+$ctx1.sendIdx["scopeLevel"]=1;
+$1=self._assert_equals_($2,(1));
+$ctx1.sendIdx["assert:equals:"]=1;
+$14=_st(ast)._nodes();
+$13=_st($14)._first();
+$12=_st($13)._nodes();
+$ctx1.sendIdx["nodes"]=3;
+$11=_st($12)._last();
+$10=_st($11)._nodes();
+$ctx1.sendIdx["nodes"]=2;
+$9=_st($10)._first();
+$ctx1.sendIdx["first"]=2;
+$8=_st($9)._nodes();
+$ctx1.sendIdx["nodes"]=1;
+$7=_st($8)._first();
+$ctx1.sendIdx["first"]=1;
+$6=_st($7)._scope();
+$5=_st($6)._scopeLevel();
+$4=self._assert_equals_($5,(3));
 return self}, function($ctx1) {$ctx1.fill(self,"testScopeLevel",{src:src,ast:ast},smalltalk.SemanticAnalyzerTest)})},
 args: [],
 source: "testScopeLevel\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self assert: ast scope scopeLevel equals: 1.\x0a\x09self assert: ast nodes first nodes last nodes first nodes first scope scopeLevel equals: 3",
@@ -1486,13 +1686,96 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
+var $8,$7,$6,$5,$4,$3,$2,$1,$17,$16,$15,$14,$13,$12,$11,$18,$10,$9,$30,$29,$28,$27,$26,$25,$24,$23,$22,$21,$20,$19,$43,$42,$41,$40,$39,$38,$37,$36,$35,$34,$33,$48,$47,$46,$45,$44,$32,$31;
 src="foo | a | a + 1. [ | b | b := a ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-self._assert_(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._first())._receiver())._binding())._isTempVar());
-self._assert_(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._first())._receiver())._binding())._scope()).__eq_eq(_st(ast)._scope()));
-self._assert_(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._nodes())._first())._nodes())._first())._left())._binding())._isTempVar());
-self._assert_(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._nodes())._first())._nodes())._first())._left())._binding())._scope()).__eq_eq(_st(_st(_st(_st(_st(ast)._nodes())._first())._nodes())._last())._scope()));
+$8=_st(ast)._nodes();
+$ctx1.sendIdx["nodes"]=2;
+$7=_st($8)._first();
+$ctx1.sendIdx["first"]=2;
+$6=_st($7)._nodes();
+$ctx1.sendIdx["nodes"]=1;
+$5=_st($6)._first();
+$ctx1.sendIdx["first"]=1;
+$4=_st($5)._receiver();
+$ctx1.sendIdx["receiver"]=1;
+$3=_st($4)._binding();
+$ctx1.sendIdx["binding"]=1;
+$2=_st($3)._isTempVar();
+$ctx1.sendIdx["isTempVar"]=1;
+$1=self._assert_($2);
+$ctx1.sendIdx["assert:"]=1;
+$17=_st(ast)._nodes();
+$ctx1.sendIdx["nodes"]=4;
+$16=_st($17)._first();
+$ctx1.sendIdx["first"]=4;
+$15=_st($16)._nodes();
+$ctx1.sendIdx["nodes"]=3;
+$14=_st($15)._first();
+$ctx1.sendIdx["first"]=3;
+$13=_st($14)._receiver();
+$12=_st($13)._binding();
+$ctx1.sendIdx["binding"]=2;
+$11=_st($12)._scope();
+$ctx1.sendIdx["scope"]=1;
+$18=_st(ast)._scope();
+$ctx1.sendIdx["scope"]=2;
+$10=_st($11).__eq_eq($18);
+$ctx1.sendIdx["=="]=1;
+$9=self._assert_($10);
+$ctx1.sendIdx["assert:"]=2;
+$30=_st(ast)._nodes();
+$ctx1.sendIdx["nodes"]=8;
+$29=_st($30)._first();
+$ctx1.sendIdx["first"]=7;
+$28=_st($29)._nodes();
+$ctx1.sendIdx["nodes"]=7;
+$27=_st($28)._last();
+$ctx1.sendIdx["last"]=1;
+$26=_st($27)._nodes();
+$ctx1.sendIdx["nodes"]=6;
+$25=_st($26)._first();
+$ctx1.sendIdx["first"]=6;
+$24=_st($25)._nodes();
+$ctx1.sendIdx["nodes"]=5;
+$23=_st($24)._first();
+$ctx1.sendIdx["first"]=5;
+$22=_st($23)._left();
+$ctx1.sendIdx["left"]=1;
+$21=_st($22)._binding();
+$ctx1.sendIdx["binding"]=3;
+$20=_st($21)._isTempVar();
+$19=self._assert_($20);
+$ctx1.sendIdx["assert:"]=3;
+$43=_st(ast)._nodes();
+$ctx1.sendIdx["nodes"]=12;
+$42=_st($43)._first();
+$ctx1.sendIdx["first"]=10;
+$41=_st($42)._nodes();
+$ctx1.sendIdx["nodes"]=11;
+$40=_st($41)._last();
+$ctx1.sendIdx["last"]=2;
+$39=_st($40)._nodes();
+$ctx1.sendIdx["nodes"]=10;
+$38=_st($39)._first();
+$ctx1.sendIdx["first"]=9;
+$37=_st($38)._nodes();
+$ctx1.sendIdx["nodes"]=9;
+$36=_st($37)._first();
+$ctx1.sendIdx["first"]=8;
+$35=_st($36)._left();
+$34=_st($35)._binding();
+$33=_st($34)._scope();
+$ctx1.sendIdx["scope"]=3;
+$48=_st(ast)._nodes();
+$47=_st($48)._first();
+$46=_st($47)._nodes();
+$ctx1.sendIdx["nodes"]=13;
+$45=_st($46)._last();
+$44=_st($45)._scope();
+$32=_st($33).__eq_eq($44);
+$31=self._assert_($32);
 return self}, function($ctx1) {$ctx1.fill(self,"testVariablesLookup",{src:src,ast:ast},smalltalk.SemanticAnalyzerTest)})},
 args: [],
 source: "testVariablesLookup\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ | b | b := a ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09\x22Binding for `a` in the message send\x22\x0a\x09self assert: ast nodes first nodes first receiver binding isTempVar.\x0a\x09self assert: ast nodes first nodes first receiver binding scope == ast scope.\x0a\x0a\x09\x22Binding for `b`\x22\x0a\x09self assert: ast nodes first nodes last nodes first nodes first left binding isTempVar.\x0a\x09self assert: ast nodes first nodes last nodes first nodes first left binding scope == ast nodes first nodes last scope.",

+ 4 - 0
js/Examples.js

@@ -71,14 +71,18 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2,$3,$4,$5,$6;
 $1=_st(html)._h1();
 _st($1)._with_(_st(self["@count"])._asString());
+$ctx1.sendIdx["with:"]=1;
 $2=_st($1)._yourself();
 self["@header"]=$2;
 $3=_st(html)._button();
+$ctx1.sendIdx["button"]=1;
 _st($3)._with_("++");
+$ctx1.sendIdx["with:"]=2;
 $4=_st($3)._onClick_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._increase();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["onClick:"]=1;
 $5=_st(html)._button();
 _st($5)._with_("--");
 $6=_st($5)._onClick_((function(){

File diff suppressed because it is too large
+ 334 - 191
js/Helios-Browser.js


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

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

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

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

+ 14 - 6
js/Helios-Commands-Tools.js

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

File diff suppressed because it is too large
+ 387 - 167
js/Helios-Core.js


+ 113 - 24
js/Helios-Debugger.js

@@ -46,10 +46,14 @@ 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;
+var $2,$3,$1,$4,$5,$6,$7,$8;
 variables=_st($Dictionary())._new();
 inspectedContext=self._context();
-_st(variables)._addAll_(_st(inspectedContext)._locals());
+$2=variables;
+$3=_st(inspectedContext)._locals();
+$ctx1.sendIdx["locals"]=1;
+$1=_st($2)._addAll_($3);
+$ctx1.sendIdx["addAll:"]=1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(inspectedContext)._notNil())._and_((function(){
@@ -60,16 +64,18 @@ return _st(inspectedContext)._isBlockContext();
 return smalltalk.withContext(function($ctx2) {
 inspectedContext=_st(inspectedContext)._outerContext();
 inspectedContext;
-$1=inspectedContext;
-if(($receiver = $1) == nil || $receiver == null){
-return $1;
+$4=inspectedContext;
+if(($receiver = $4) == nil || $receiver == null){
+return $4;
 } else {
-return _st(variables)._addAll_(_st(inspectedContext)._locals());
+$5=variables;
+$6=_st(inspectedContext)._locals();
+return _st($5)._addAll_($6);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$2=anInspector;
-_st($2)._setLabel_("Context");
-$3=_st($2)._setVariables_(variables);
+$7=anInspector;
+_st($7)._setLabel_("Context");
+$8=_st($7)._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",
@@ -224,8 +230,16 @@ 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) { 
-_st(_st(self._model())._announcer())._on_send_to_($HLDebuggerContextSelected(),"onContextSelected:",self);
-_st(_st(self._model())._announcer())._on_send_to_($HLDebuggerStepped(),"onContextSelected:",self);
+var $3,$2,$1,$6,$5,$4;
+$3=self._model();
+$ctx1.sendIdx["model"]=1;
+$2=_st($3)._announcer();
+$ctx1.sendIdx["announcer"]=1;
+$1=_st($2)._on_send_to_($HLDebuggerContextSelected(),"onContextSelected:",self);
+$ctx1.sendIdx["on:send:to:"]=1;
+$6=self._model();
+$5=_st($6)._announcer();
+$4=_st($5)._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",
@@ -278,7 +292,17 @@ 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) { 
-_st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._stackListWidget(),_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget()))));
+var $2,$4,$6,$7,$8,$5,$3,$1;
+$2=html;
+$4=$HLContainer();
+$6=$HLHorizontalSplitter();
+$7=self._stackListWidget();
+$8=_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget());
+$5=_st($6)._with_with_($7,$8);
+$ctx1.sendIdx["with:with:"]=1;
+$3=_st($4)._with_($5);
+$1=_st($2)._with_($3);
+$ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLDebugger)})},
 args: ["html"],
 source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter\x0a\x09\x09with: self stackListWidget\x0a\x09\x09with: (HLVerticalSplitter\x0a\x09\x09\x09with: self codeWidget\x0a\x09\x09\x09with: self inspectorWidget)))",
@@ -322,8 +346,10 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-smalltalk.HLDebugger.superclass.fn.prototype._unregister.apply(_st(self), []);
-_st(self._inspectorWidget())._unregister();
+var $1,$2;
+$1=smalltalk.HLDebugger.superclass.fn.prototype._unregister.apply(_st(self), []);
+$ctx1.sendIdx["unregister"]=1;
+$2=_st(self._inspectorWidget())._unregister();
 return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLDebugger)})},
 args: [],
 source: "unregister\x0a\x09super unregister.\x0a\x09self inspectorWidget unregister",
@@ -482,18 +508,58 @@ fn: function (aNode){
 var self=this;
 var token;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$7,$6,$5,$4,$10,$9,$8,$3,$14,$13,$12,$11,$15,$20,$19,$18,$17,$21,$16,$26,$25,$24,$23,$27,$22;
 $1=aNode;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-token=_st(self._editor())._getTokenAt_(smalltalk.HashedCollection._from_(["line".__minus_gt(_st(_st(_st(aNode)._position())._x()).__minus((1))),"ch".__minus_gt(_st(_st(aNode)._position())._y())]));
+$2=self._editor();
+$ctx1.sendIdx["editor"]=1;
+$7=_st(aNode)._position();
+$ctx1.sendIdx["position"]=1;
+$6=_st($7)._x();
+$ctx1.sendIdx["x"]=1;
+$5=_st($6).__minus((1));
+$ctx1.sendIdx["-"]=1;
+$4="line".__minus_gt($5);
+$ctx1.sendIdx["->"]=1;
+$10=_st(aNode)._position();
+$ctx1.sendIdx["position"]=2;
+$9=_st($10)._y();
+$8="ch".__minus_gt($9);
+$ctx1.sendIdx["->"]=2;
+$3=smalltalk.HashedCollection._from_([$4,$8]);
+token=_st($2)._getTokenAt_($3);
 token;
-$2=self;
-_st($2)._clearHighlight();
-$3=_st($2)._addStopAt_(_st(_st(_st(aNode)._position())._x()).__minus((1)));
-$3;
-_st(self._editor())._setSelection_to_(smalltalk.HashedCollection._from_(["line".__minus_gt(_st(_st(_st(aNode)._position())._x()).__minus((1))),"ch".__minus_gt(_st(token)._start())]),smalltalk.HashedCollection._from_(["line".__minus_gt(_st(_st(_st(aNode)._position())._x()).__minus((1))),"ch".__minus_gt(_st(token)._end())]));
+self._clearHighlight();
+$14=_st(aNode)._position();
+$ctx1.sendIdx["position"]=3;
+$13=_st($14)._x();
+$ctx1.sendIdx["x"]=2;
+$12=_st($13).__minus((1));
+$ctx1.sendIdx["-"]=2;
+$11=self._addStopAt_($12);
+$11;
+$15=self._editor();
+$20=_st(aNode)._position();
+$ctx1.sendIdx["position"]=4;
+$19=_st($20)._x();
+$ctx1.sendIdx["x"]=3;
+$18=_st($19).__minus((1));
+$ctx1.sendIdx["-"]=3;
+$17="line".__minus_gt($18);
+$ctx1.sendIdx["->"]=3;
+$21="ch".__minus_gt(_st(token)._start());
+$ctx1.sendIdx["->"]=4;
+$16=smalltalk.HashedCollection._from_([$17,$21]);
+$26=_st(aNode)._position();
+$25=_st($26)._x();
+$24=_st($25).__minus((1));
+$23="line".__minus_gt($24);
+$ctx1.sendIdx["->"]=5;
+$27="ch".__minus_gt(_st(token)._end());
+$22=smalltalk.HashedCollection._from_([$23,$27]);
+_st($15)._setSelection_to_($16,$22);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token},smalltalk.HLDebuggerCodeWidget)})},
 args: ["aNode"],
@@ -513,10 +579,23 @@ 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 $3,$2,$1,$6,$5,$4,$9,$8,$7;
 smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._observeBrowserModel.apply(_st(self), []);
-_st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerContextSelected(),"onContextSelected",self);
-_st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerStepped(),"onContextSelected",self);
-_st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerWhere(),"onContextSelected",self);
+$3=self._browserModel();
+$ctx1.sendIdx["browserModel"]=1;
+$2=_st($3)._announcer();
+$ctx1.sendIdx["announcer"]=1;
+$1=_st($2)._on_send_to_($HLDebuggerContextSelected(),"onContextSelected",self);
+$ctx1.sendIdx["on:send:to:"]=1;
+$6=self._browserModel();
+$ctx1.sendIdx["browserModel"]=2;
+$5=_st($6)._announcer();
+$ctx1.sendIdx["announcer"]=2;
+$4=_st($5)._on_send_to_($HLDebuggerStepped(),"onContextSelected",self);
+$ctx1.sendIdx["on:send:to:"]=2;
+$9=self._browserModel();
+$8=_st($9)._announcer();
+$7=_st($8)._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",
@@ -916,23 +995,32 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$3,$4,$5,$6,$7,$8,$2;
 $1=_st(html)._div();
 _st($1)._class_("debugger_bar");
+$ctx1.sendIdx["class:"]=1;
 $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._button();
+$ctx2.sendIdx["button"]=1;
 _st($3)._class_("btn restart");
+$ctx2.sendIdx["class:"]=2;
 _st($3)._with_("Restart");
+$ctx2.sendIdx["with:"]=2;
 $4=_st($3)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._restart();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+$ctx2.sendIdx["onClick:"]=1;
 $4;
 $5=_st(html)._button();
+$ctx2.sendIdx["button"]=2;
 _st($5)._class_("btn where");
+$ctx2.sendIdx["class:"]=3;
 _st($5)._with_("Where");
+$ctx2.sendIdx["with:"]=3;
 $6=_st($5)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._where();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
+$ctx2.sendIdx["onClick:"]=2;
 $6;
 $7=_st(html)._button();
 _st($7)._class_("btn stepOver");
@@ -943,6 +1031,7 @@ return self._stepOver();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
 return $8;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLStackListWidget)})},
 args: ["html"],
 source: "renderButtonsOn: html\x0a\x09html div \x0a\x09\x09class: 'debugger_bar'; \x0a\x09\x09with: [\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn restart';\x0a\x09\x09\x09\x09with: 'Restart';\x0a\x09\x09\x09\x09onClick: [ self restart ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn where';\x0a\x09\x09\x09\x09with: 'Where';\x0a\x09\x09\x09\x09onClick: [ self where ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn stepOver';\x0a\x09\x09\x09\x09with: 'Step over';\x0a\x09\x09\x09\x09onClick: [ self stepOver ] ]",

+ 29 - 12
js/Helios-Inspector.js

@@ -797,11 +797,10 @@ category: 'actions',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 _st(self._model())._inspect_on_(anObject,self);
-$1=self;
-_st($1)._refreshVariablesWidget();
-$2=_st($1)._refreshDisplayWidget();
+self._refreshVariablesWidget();
+$1=self._refreshDisplayWidget();
 return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspectorWidget)})},
 args: ["anObject"],
 source: "inspect: anObject\x0a\x09self model inspect: anObject on: self.\x0a    \x0a\x09self \x0a    \x09refreshVariablesWidget;\x0a\x09\x09refreshDisplayWidget",
@@ -894,13 +893,12 @@ category: 'accessing',
 fn: function (aModel){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 self["@model"]=aModel;
 _st(self._codeWidget())._model_(_st(aModel)._code());
-$1=self;
-_st($1)._observeCodeWidget();
-_st($1)._observeVariablesWidget();
-$2=_st($1)._observeModel();
+self._observeCodeWidget();
+self._observeVariablesWidget();
+$1=self._observeModel();
 return self}, function($ctx1) {$ctx1.fill(self,"model:",{aModel:aModel},smalltalk.HLInspectorWidget)})},
 args: ["aModel"],
 source: "model: aModel\x0a\x09model := aModel. \x0a    self codeWidget model: aModel code.\x0a    \x0a    self \x0a        observeCodeWidget;\x0a    \x09observeVariablesWidget;\x0a        observeModel",
@@ -1123,7 +1121,13 @@ 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) { 
-_st(html)._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget()),self._codeWidget()));
+var $1,$3,$4,$2;
+$1=html;
+$3=$HLHorizontalSplitter();
+$4=_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget());
+$2=_st($3)._with_with_($4,self._codeWidget());
+$ctx1.sendIdx["with:with:"]=1;
+_st($1)._with_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorWidget)})},
 args: ["html"],
 source: "renderContentOn: html\x0a   \x09html with: (HLHorizontalSplitter\x0a    \x09with: (HLVerticalSplitter \x0a            with: self variablesWidget\x0a            with: self displayWidget)\x0a        with: self codeWidget)",
@@ -1239,8 +1243,21 @@ 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) { 
-_st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget()),self._codeWidget())));
-_st(self._variablesWidget())._focus();
+var $2,$4,$6,$8,$9,$7,$5,$3,$1,$10;
+$2=html;
+$4=$HLContainer();
+$6=$HLHorizontalSplitter();
+$8=$HLVerticalSplitter();
+$9=self._variablesWidget();
+$ctx1.sendIdx["variablesWidget"]=1;
+$7=_st($8)._with_with_($9,self._displayWidget());
+$5=_st($6)._with_with_($7,self._codeWidget());
+$ctx1.sendIdx["with:with:"]=1;
+$3=_st($4)._with_($5);
+$1=_st($2)._with_($3);
+$ctx1.sendIdx["with:"]=1;
+$10=self._variablesWidget();
+_st($10)._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",

+ 161 - 78
js/Helios-KeyBindings.js

@@ -313,21 +313,37 @@ fn: function (){
 var self=this;
 function $HLBindingInput(){return smalltalk.HLBindingInput||(typeof HLBindingInput=="undefined"?nil:HLBindingInput)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
+var $2,$3,$5,$4,$6,$8,$7,$9,$11,$10,$12,$14,$13,$15,$16,$17,$1;
 $2=_st($HLBindingInput())._new();
-_st($2)._label_(_st(self._command())._inputLabel());
-_st($2)._ghostText_(_st(self._command())._displayLabel());
-_st($2)._defaultValue_(_st(self._command())._defaultInput());
-_st($2)._inputCompletion_(_st(self._command())._inputCompletion());
+$3=$2;
+$5=self._command();
+$ctx1.sendIdx["command"]=1;
+$4=_st($5)._inputLabel();
+_st($3)._label_($4);
+$6=$2;
+$8=self._command();
+$ctx1.sendIdx["command"]=2;
+$7=_st($8)._displayLabel();
+_st($6)._ghostText_($7);
+$9=$2;
+$11=self._command();
+$ctx1.sendIdx["command"]=3;
+$10=_st($11)._defaultInput();
+_st($9)._defaultValue_($10);
+$12=$2;
+$14=self._command();
+$ctx1.sendIdx["command"]=4;
+$13=_st($14)._inputCompletion();
+_st($12)._inputCompletion_($13);
 _st($2)._callback_((function(val){
 return smalltalk.withContext(function($ctx2) {
-$3=self._command();
-_st($3)._input_(val);
-$4=_st($3)._execute();
-return $4;
+$15=self._command();
+_st($15)._input_(val);
+$16=_st($15)._execute();
+return $16;
 }, function($ctx2) {$ctx2.fillBlock({val:val},$ctx1,1)})}));
-$5=_st($2)._yourself();
-$1=$5;
+$17=_st($2)._yourself();
+$1=$17;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputBinding",{},smalltalk.HLBindingAction)})},
 args: [],
@@ -345,20 +361,30 @@ fn: function (){
 var self=this;
 function $HLBindingActionInputWidget(){return smalltalk.HLBindingActionInputWidget||(typeof HLBindingActionInputWidget=="undefined"?nil:HLBindingActionInputWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
+var $2,$3,$5,$4,$6,$8,$7,$9,$11,$10,$12,$13,$1;
 $2=_st($HLBindingActionInputWidget())._new();
-_st($2)._ghostText_(_st(self._command())._displayLabel());
-_st($2)._defaultValue_(_st(self._command())._defaultInput());
-_st($2)._inputCompletion_(_st(self._command())._inputCompletion());
+$3=$2;
+$5=self._command();
+$ctx1.sendIdx["command"]=1;
+$4=_st($5)._displayLabel();
+_st($3)._ghostText_($4);
+$6=$2;
+$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)._callback_((function(value){
 return smalltalk.withContext(function($ctx2) {
-$3=self;
-_st($3)._input_(value);
-$4=_st($3)._executeCommand();
-return $4;
+self._input_(value);
+$12=self._executeCommand();
+return $12;
 }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,1)})}));
-$5=_st($2)._yourself();
-$1=$5;
+$13=_st($2)._yourself();
+$1=$13;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputWidget",{},smalltalk.HLBindingAction)})},
 args: [],
@@ -499,12 +525,11 @@ fn: function (aString,aBinding){
 var self=this;
 var binding;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 binding=self._at_(aString);
 $1=binding;
 if(($receiver = $1) == nil || $receiver == null){
-$2=self;
-return $2;
+return self;
 } else {
 $1;
 };
@@ -927,11 +952,10 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self["@wrapper"];
 if(($receiver = $1) == nil || $receiver == null){
-$2=self;
-return $2;
+return self;
 } else {
 $1;
 };
@@ -952,41 +976,53 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$6,$5,$7,$8,$3;
+var $1,$2,$4,$6,$8,$10,$9,$7,$5,$11,$12,$13,$3,$14;
 $1=self["@wrapper"];
 if(($receiver = $1) == nil || $receiver == null){
 self["@wrapper"]=_st(html)._span();
+$ctx1.sendIdx["span"]=1;
 self["@wrapper"];
 } else {
 $1;
 };
 $2=self["@wrapper"];
 _st($2)._class_(self._status());
+$ctx1.sendIdx["class:"]=1;
 $3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 $4=_st(html)._input();
 _st($4)._placeholder_(self._ghostText());
 _st($4)._value_(self._defaultValue());
-$5=_st($4)._onKeyDown_(_st((function(event){
+$6=$4;
+$7=_st((function(event){
 return smalltalk.withContext(function($ctx3) {
-$6=_st(_st(event)._which()).__eq((13));
-if(smalltalk.assert($6)){
-return self._evaluate_(_st(_st(self["@input"])._asJQuery())._val());
+$8=_st(_st(event)._which()).__eq((13));
+if(smalltalk.assert($8)){
+$10=_st(self["@input"])._asJQuery();
+$ctx3.sendIdx["asJQuery"]=1;
+$9=_st($10)._val();
+return self._evaluate_($9);
 };
-}, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,3)})}))._yourself());
+}, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,3)})}))._yourself();
+$ctx2.sendIdx["yourself"]=1;
+$5=_st($6)._onKeyDown_($7);
 self["@input"]=$5;
 self["@input"];
-_st(_st(self["@input"])._asJQuery())._typeahead_(smalltalk.HashedCollection._from_(["source".__minus_gt(self._inputCompletion())]));
-$7=_st(html)._span();
-_st($7)._class_("help-inline");
-_st($7)._with_(self._message());
-$8=_st($7)._yourself();
-self["@messageTag"]=$8;
+$11=_st(self["@input"])._asJQuery();
+$ctx2.sendIdx["asJQuery"]=2;
+_st($11)._typeahead_(smalltalk.HashedCollection._from_(["source".__minus_gt(self._inputCompletion())]));
+$12=_st(html)._span();
+_st($12)._class_("help-inline");
+_st($12)._with_(self._message());
+$13=_st($12)._yourself();
+self["@messageTag"]=$13;
 return self["@messageTag"];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
+$ctx1.sendIdx["with:"]=1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(self["@input"])._asJQuery())._focus();
+$14=_st(self["@input"])._asJQuery();
+return _st($14)._focus();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLBindingActionInputWidget)})},
 args: ["html"],
@@ -1095,11 +1131,10 @@ category: 'actions',
 fn: function (aBinding){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(aBinding)._isActive();
 if(! smalltalk.assert($1)){
-$2=self;
-return $2;
+return self;
 };
 self._selectBinding_(aBinding);
 _st(aBinding)._apply();
@@ -1171,15 +1206,25 @@ 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,$3;
+var $1,$2,$4,$3,$5,$7,$6,$8,$9;
 $1=_st($HLBindingGroup())._new();
-_st($1)._add_(_st(_st($HLCloseTabCommand())._new())._asBinding());
-_st($1)._add_(_st(_st($HLSwitchTabCommand())._new())._asBinding());
-$2=_st($1)._yourself();
-group=$2;
+$ctx1.sendIdx["new"]=1;
+$2=$1;
+$4=_st($HLCloseTabCommand())._new();
+$ctx1.sendIdx["new"]=2;
+$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($HLOpenCommand())._registerConcreteClassesOn_(group);
-$3=group;
-return $3;
+$9=group;
+return $9;
 }, 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",
@@ -1227,10 +1272,16 @@ category: 'events',
 fn: function (event){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st(_st(_st(event)._which()).__eq(self._escapeKey()))._or_((function(){
+var $3,$2,$5,$4,$1,$6;
+$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) {
-return _st(_st(_st(event)._which()).__eq((71)))._and_((function(){
+$5=_st(event)._which();
+$4=_st($5).__eq((71));
+return _st($4)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(event)._ctrlKey();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
@@ -1240,8 +1291,8 @@ self._deactivate();
 _st(event)._preventDefault();
 return false;
 };
-$2=self._handleBindingFor_(event);
-return $2;
+$6=self._handleBindingFor_(event);
+return $6;
 }, 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",
@@ -1283,11 +1334,11 @@ category: 'events',
 fn: function (event){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st(_st(event)._which()).__eq(self._activationKey());
-if(smalltalk.assert($1)){
-$2=_st(event)._ctrlKey();
+var $2,$3,$1;
+$2=_st(_st(event)._which()).__eq(self._activationKey());
 if(smalltalk.assert($2)){
+$3=_st(event)._ctrlKey();
+if(smalltalk.assert($3)){
 self._activate();
 _st(event)._preventDefault();
 return false;
@@ -1389,11 +1440,10 @@ category: 'actions',
 fn: function (aBinding){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(aBinding).__eq(self["@selectedBinding"]);
 if(smalltalk.assert($1)){
-$2=self;
-return $2;
+return self;
 };
 self["@selectedBinding"]=aBinding;
 _st(self._helper())._refresh();
@@ -1618,12 +1668,16 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$3,$4,$5,$6,$2;
 $1=_st(html)._span();
+$ctx1.sendIdx["span"]=1;
 _st($1)._class_("command");
+$ctx1.sendIdx["class:"]=1;
 $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._span();
 _st($3)._class_("label");
+$ctx2.sendIdx["class:"]=2;
 $4=_st($3)._with_(_st(_st(aBinding)._shortcut())._asLowercase());
+$ctx2.sendIdx["with:"]=2;
 $4;
 $5=_st(html)._a();
 _st($5)._class_("action");
@@ -1634,6 +1688,7 @@ return _st(self._keyBinder())._applyBinding_(aBinding);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 return $6;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderBindingActionFor:on:",{aBinding:aBinding,html:html},smalltalk.HLKeyBinderHelperWidget)})},
 args: ["aBinding", "html"],
 source: "renderBindingActionFor: aBinding on: html\x0a\x09html span class: 'command'; with: [\x0a\x09\x09html span \x0a\x09\x09\x09class: 'label'; \x0a\x09\x09\x09with: aBinding shortcut asLowercase.\x0a  \x09\x09html a \x0a        \x09class: 'action'; \x0a            with: aBinding displayLabel;\x0a  \x09\x09\x09onClick: [ self keyBinder applyBinding: aBinding ] ]",
@@ -1649,9 +1704,13 @@ category: 'rendering',
 fn: function (aBindingGroup,html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 _st(_st(_st(aBindingGroup)._activeBindings())._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(a)._key()).__lt(_st(b)._key());
+$1=_st(a)._key();
+$ctx2.sendIdx["key"]=1;
+$2=_st(b)._key();
+return _st($1).__lt($2);
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._renderBindingActionFor_on_(each,html);
@@ -1674,6 +1733,7 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2;
 $1=_st(html)._a();
 _st($1)._class_("close");
+$ctx1.sendIdx["class:"]=1;
 _st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(html)._tag_("i"))._class_("icon-remove");
@@ -1715,6 +1775,7 @@ return _st(self._keyBinder())._activate();
 }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
 return $4;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+$ctx2.sendIdx["with:"]=1;
 return $2;
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}))._appendToJQuery_("body"._asJQuery());
 return self}, function($ctx1) {$ctx1.fill(self,"renderCog",{},smalltalk.HLKeyBinderHelperWidget)})},
@@ -1734,6 +1795,7 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$3,$4,$2;
 $1=_st(html)._div();
+$ctx1.sendIdx["div"]=1;
 _st($1)._class_(self._cssClass());
 $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -1747,6 +1809,7 @@ return self._renderSelectedBindingOn_(html);
 $4;
 return self._renderCloseOn_(html);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLKeyBinderHelperWidget)})},
 args: ["html"],
 source: "renderContentOn: html\x0a\x09html div class: self cssClass; with: [\x0a      \x09self renderLabelOn:html.\x0a\x09\x09html div\x0a\x09\x09\x09id: self mainId;\x0a\x09\x09\x09with: [ self renderSelectedBindingOn: html ].\x0a\x09\x09self renderCloseOn: html ]",
@@ -1804,18 +1867,28 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-_st("#helper"._asJQuery())._remove();
-_st((function(html){
+var $1,$3,$5,$7,$6,$4,$2,$8,$9;
+$1="#helper"._asJQuery();
+$ctx1.sendIdx["asJQuery"]=1;
+_st($1)._remove();
+$2=(function(html){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(html)._div();
-_st($1)._id_("helper");
-$2=_st($1)._with_(_st("Press ".__comma(_st(self._keyBinder())._activationKeyLabel())).__comma(" to start"));
-return $2;
-}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}))._appendToJQuery_("body"._asJQuery());
+$3=_st(html)._div();
+_st($3)._id_("helper");
+$5=$3;
+$7="Press ".__comma(_st(self._keyBinder())._activationKeyLabel());
+$6=_st($7).__comma(" to start");
+$ctx2.sendIdx[","]=1;
+$4=_st($5)._with_($6);
+return $4;
+}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
+$8="body"._asJQuery();
+$ctx1.sendIdx["asJQuery"]=2;
+_st($2)._appendToJQuery_($8);
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st("#helper"._asJQuery())._fadeOut_((1000));
+$9="#helper"._asJQuery();
+return _st($9)._fadeOut_((1000));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((2000));
 return self}, function($ctx1) {$ctx1.fill(self,"renderStart",{},smalltalk.HLKeyBinderHelperWidget)})},
 args: [],
@@ -1883,8 +1956,19 @@ category: 'actions',
 fn: function (aWidget){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st("#".__comma(self._mainId()))._asJQuery())._empty();
-_st(aWidget)._appendToJQuery_(_st("#".__comma(self._mainId()))._asJQuery());
+var $3,$2,$1,$4,$7,$6,$5;
+$3=self._mainId();
+$ctx1.sendIdx["mainId"]=1;
+$2="#".__comma($3);
+$ctx1.sendIdx[","]=1;
+$1=_st($2)._asJQuery();
+$ctx1.sendIdx["asJQuery"]=1;
+_st($1)._empty();
+$4=aWidget;
+$7=self._mainId();
+$6="#".__comma($7);
+$5=_st($6)._asJQuery();
+_st($4)._appendToJQuery_($5);
 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",
@@ -2086,10 +2170,9 @@ category: 'binding',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._unbindKeys();
-$2=_st($1)._bindKeys();
+var $1;
+self._unbindKeys();
+$1=self._bindKeys();
 return self}, function($ctx1) {$ctx1.fill(self,"rebindKeys",{},smalltalk.HLRepeatedKeyDownHandler)})},
 args: [],
 source: "rebindKeys\x0a\x09self \x0a\x09\x09unbindKeys;\x0a\x09\x09bindKeys",

+ 127 - 24
js/Helios-Layout.js

@@ -169,24 +169,33 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$5,$6,$2;
+var $1,$3,$4,$5,$6,$7,$2;
 $1=_st(html)._div();
+$ctx1.sendIdx["div"]=1;
 _st($1)._class_(self._panesCssClass());
+$ctx1.sendIdx["class:"]=1;
 $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._div();
+$ctx2.sendIdx["div"]=2;
 _st($3)._class_("pane");
+$ctx2.sendIdx["class:"]=2;
 $4=_st($3)._with_(self._firstWidget());
+$ctx2.sendIdx["with:"]=2;
 self["@firstPane"]=$4;
 self["@firstPane"];
-self["@splitter"]=_st(_st(html)._div())._class_(self._cssClass());
-self["@splitter"];
 $5=_st(html)._div();
-_st($5)._class_("pane");
-$6=_st($5)._with_(self._secondWidget());
-self["@secondPane"]=$6;
+$ctx2.sendIdx["div"]=3;
+self["@splitter"]=_st($5)._class_(self._cssClass());
+$ctx2.sendIdx["class:"]=3;
+self["@splitter"];
+$6=_st(html)._div();
+_st($6)._class_("pane");
+$7=_st($6)._with_(self._secondWidget());
+self["@secondPane"]=$7;
 return self["@secondPane"];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["with:"]=1;
 self._setupSplitter();
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLSplitter)})},
 args: ["html"],
@@ -345,14 +354,46 @@ fn: function (anInteger){
 var self=this;
 var container,size,offset,percentage;
 return smalltalk.withContext(function($ctx1) { 
-container=_st(_st(self["@firstPane"])._asJQuery())._parent();
-offset=_st(_st(_st(self["@firstPane"])._asJQuery())._offset())._top();
+var $1,$3,$2,$6,$7,$5,$4,$9,$11,$10,$8,$13,$16,$15,$14,$12,$18,$21,$20,$19,$17;
+$1=_st(self["@firstPane"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=1;
+container=_st($1)._parent();
+$3=_st(self["@firstPane"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=2;
+$2=_st($3)._offset();
+offset=_st($2)._top();
 size=_st(container)._height();
-percentage=_st(_st(_st(size).__minus(_st(anInteger).__minus(offset))).__slash(size)).__star((100));
+$6=size;
+$7=_st(anInteger).__minus(offset);
+$ctx1.sendIdx["-"]=2;
+$5=_st($6).__minus($7);
+$ctx1.sendIdx["-"]=1;
+$4=_st($5).__slash(size);
+percentage=_st($4).__star((100));
 percentage=(80)._min_(_st(percentage)._max_((20)));
-_st(_st(self["@firstPane"])._asJQuery())._css_put_("bottom",_st(_st(percentage)._asString()).__comma("%"));
-_st(_st(self["@splitter"])._asJQuery())._css_put_("top",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
-_st(_st(self["@secondPane"])._asJQuery())._css_put_("top",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
+$9=_st(self["@firstPane"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=3;
+$11=_st(percentage)._asString();
+$ctx1.sendIdx["asString"]=1;
+$10=_st($11).__comma("%");
+$ctx1.sendIdx[","]=1;
+$8=_st($9)._css_put_("bottom",$10);
+$ctx1.sendIdx["css:put:"]=1;
+$13=_st(self["@splitter"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=4;
+$16=(100).__minus(percentage);
+$ctx1.sendIdx["-"]=3;
+$15=_st($16)._asString();
+$ctx1.sendIdx["asString"]=2;
+$14=_st($15).__comma("%");
+$ctx1.sendIdx[","]=2;
+$12=_st($13)._css_put_("top",$14);
+$ctx1.sendIdx["css:put:"]=2;
+$18=_st(self["@secondPane"])._asJQuery();
+$21=(100).__minus(percentage);
+$20=_st($21)._asString();
+$19=_st($20).__comma("%");
+$17=_st($18)._css_put_("top",$19);
 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, '%'",
@@ -368,13 +409,28 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self["@splitter"])._asJQuery())._draggable_(smalltalk.HashedCollection._from_(["axis".__minus_gt("y"),"containment".__minus_gt(_st(_st(self["@splitter"])._asJQuery())._parent()),"helper".__minus_gt("clone"),"start".__minus_gt((function(e,ui){
+var $1,$3,$6,$5,$4,$7,$8,$9,$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);
+$ctx1.sendIdx["->"]=2;
+$7="helper".__minus_gt("clone");
+$ctx1.sendIdx["->"]=3;
+$8="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)})})),"drag".__minus_gt((function(e,ui){
+}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,1)})}));
+$ctx1.sendIdx["->"]=4;
+$9="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)})}))]));
+}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}));
+$2=smalltalk.HashedCollection._from_([$3,$4,$7,$8,$9]);
+_st($1)._draggable_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLHorizontalSplitter)})},
 args: [],
 source: "setupSplitter\x0a\x09splitter asJQuery draggable: #{ \x0a    \x09'axis' -> 'y'. \x0a        'containment' -> splitter asJQuery parent.\x0a        'helper' -> 'clone'.\x0a        'start' -> [ :e :ui | self startResizing: ui helper ].\x0a        'drag' -> [ :e :ui | self resize: ui offset top ] }",
@@ -462,14 +518,46 @@ fn: function (anInteger){
 var self=this;
 var container,size,offset,percentage;
 return smalltalk.withContext(function($ctx1) { 
-container=_st(_st(self["@firstPane"])._asJQuery())._parent();
-offset=_st(_st(_st(self["@firstPane"])._asJQuery())._offset())._left();
+var $1,$3,$2,$6,$7,$5,$4,$9,$11,$10,$8,$13,$16,$15,$14,$12,$18,$21,$20,$19,$17;
+$1=_st(self["@firstPane"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=1;
+container=_st($1)._parent();
+$3=_st(self["@firstPane"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=2;
+$2=_st($3)._offset();
+offset=_st($2)._left();
 size=_st(container)._width();
-percentage=_st(_st(_st(size).__minus(_st(anInteger).__minus(offset))).__slash(size)).__star((100));
+$6=size;
+$7=_st(anInteger).__minus(offset);
+$ctx1.sendIdx["-"]=2;
+$5=_st($6).__minus($7);
+$ctx1.sendIdx["-"]=1;
+$4=_st($5).__slash(size);
+percentage=_st($4).__star((100));
 percentage=(80)._min_(_st(percentage)._max_((20)));
-_st(_st(self["@firstPane"])._asJQuery())._css_put_("right",_st(_st(percentage)._asString()).__comma("%"));
-_st(_st(self["@splitter"])._asJQuery())._css_put_("left",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
-_st(_st(self["@secondPane"])._asJQuery())._css_put_("left",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
+$9=_st(self["@firstPane"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=3;
+$11=_st(percentage)._asString();
+$ctx1.sendIdx["asString"]=1;
+$10=_st($11).__comma("%");
+$ctx1.sendIdx[","]=1;
+$8=_st($9)._css_put_("right",$10);
+$ctx1.sendIdx["css:put:"]=1;
+$13=_st(self["@splitter"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=4;
+$16=(100).__minus(percentage);
+$ctx1.sendIdx["-"]=3;
+$15=_st($16)._asString();
+$ctx1.sendIdx["asString"]=2;
+$14=_st($15).__comma("%");
+$ctx1.sendIdx[","]=2;
+$12=_st($13)._css_put_("left",$14);
+$ctx1.sendIdx["css:put:"]=2;
+$18=_st(self["@secondPane"])._asJQuery();
+$21=(100).__minus(percentage);
+$20=_st($21)._asString();
+$19=_st($20).__comma("%");
+$17=_st($18)._css_put_("left",$19);
 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, '%'",
@@ -485,13 +573,28 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self["@splitter"])._asJQuery())._draggable_(smalltalk.HashedCollection._from_(["axis".__minus_gt("x"),"containment".__minus_gt(_st(_st(self["@splitter"])._asJQuery())._parent()),"helper".__minus_gt("clone"),"start".__minus_gt((function(e,ui){
+var $1,$3,$6,$5,$4,$7,$8,$9,$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);
+$ctx1.sendIdx["->"]=2;
+$7="helper".__minus_gt("clone");
+$ctx1.sendIdx["->"]=3;
+$8="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)})})),"drag".__minus_gt((function(e,ui){
+}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,1)})}));
+$ctx1.sendIdx["->"]=4;
+$9="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)})}))]));
+}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}));
+$2=smalltalk.HashedCollection._from_([$3,$4,$7,$8,$9]);
+_st($1)._draggable_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLVerticalSplitter)})},
 args: [],
 source: "setupSplitter\x0a\x09splitter asJQuery draggable: #{ \x0a    \x09'axis' -> 'x'. \x0a        'containment' -> splitter asJQuery parent.\x0a        'helper' -> 'clone'.\x0a        'start' -> [ :e :ui | self startResizing: ui helper ].\x0a        'drag' -> [ :e :ui | self resize: (ui offset left) ] }",

+ 53 - 26
js/Helios-References.js

@@ -10,10 +10,9 @@ category: 'initialization',
 fn: function (aCompiledMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._selector_(_st(aCompiledMethod)._selector());
-$2=_st($1)._methodClass_(_st(aCompiledMethod)._methodClass());
+var $1;
+self._selector_(_st(aCompiledMethod)._selector());
+$1=self._methodClass_(_st(aCompiledMethod)._methodClass());
 return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethod:",{aCompiledMethod:aCompiledMethod},smalltalk.HLMethodReference)})},
 args: ["aCompiledMethod"],
 source: "initializeFromMethod: aCompiledMethod\x0a\x09self\x0a\x09\x09selector: aCompiledMethod selector;\x0a\x09\x09methodClass: aCompiledMethod methodClass",
@@ -299,8 +298,26 @@ 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) { 
-_st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._sendersListWidget(),self._implementorsListWidget()),_st($HLVerticalSplitter())._with_with_(self._classReferencesListWidget(),self._regexpListWidget())),self._sourceCodeWidget())));
-_st(self._sendersListWidget())._focus();
+var $2,$4,$6,$8,$10,$11,$9,$12,$7,$5,$3,$1,$13;
+$2=html;
+$4=$HLContainer();
+$6=$HLHorizontalSplitter();
+$8=$HLVerticalSplitter();
+$10=$HLVerticalSplitter();
+$11=self._sendersListWidget();
+$ctx1.sendIdx["sendersListWidget"]=1;
+$9=_st($10)._with_with_($11,self._implementorsListWidget());
+$ctx1.sendIdx["with:with:"]=3;
+$12=_st($HLVerticalSplitter())._with_with_(self._classReferencesListWidget(),self._regexpListWidget());
+$7=_st($8)._with_with_($9,$12);
+$ctx1.sendIdx["with:with:"]=2;
+$5=_st($6)._with_with_($7,self._sourceCodeWidget());
+$ctx1.sendIdx["with:with:"]=1;
+$3=_st($4)._with_($5);
+$1=_st($2)._with_($3);
+$ctx1.sendIdx["with:"]=1;
+$13=self._sendersListWidget();
+_st($13)._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",
@@ -512,6 +529,7 @@ _st($1)._on_do_($HLSearchReferences(),(function(ann){
 return smalltalk.withContext(function($ctx2) {
 return self._onSearchReferences_(_st(ann)._searchString());
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)})}));
+$ctx1.sendIdx["on:do:"]=1;
 $2=_st($1)._on_do_($HLMethodSelected(),(function(ann){
 return smalltalk.withContext(function($ctx2) {
 return self._onMethodSelected_(_st(ann)._item());
@@ -531,27 +549,30 @@ category: 'reactions',
 fn: function (aMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5;
+var $1,$2,$3,$4,$6,$5;
 var $early={};
 try {
 $1=aMethod;
 if(($receiver = $1) == nil || $receiver == null){
-$2=self;
-return $2;
+return self;
 } else {
 $1;
 };
 _st(self._items())._detect_ifNone_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(each).__eq(_st(aMethod)._selector());
+$2=each;
+$3=_st(aMethod)._selector();
+$ctx2.sendIdx["selector"]=1;
+return _st($2).__eq($3);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$3=self;
-throw $early=[$3];
+throw $early=[self];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$4=self;
-_st($4)._selectedItem_(_st(aMethod)._selector());
-$5=_st($4)._activateItem_(_st(aMethod)._selector());
+$4=_st(aMethod)._selector();
+$ctx1.sendIdx["selector"]=2;
+self._selectedItem_($4);
+$6=_st(aMethod)._selector();
+$5=self._activateItem_($6);
 return self}
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
@@ -585,7 +606,12 @@ category: 'rendering',
 fn: function (aMethod,html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(html)._with_(_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector()));
+var $1,$3,$2;
+$1=html;
+$3=_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #");
+$2=_st($3).__comma(_st(aMethod)._selector());
+$ctx1.sendIdx[","]=1;
+_st($1)._with_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},
 args: ["aMethod", "html"],
 source: "renderItemLabel: aMethod on: html\x0a\x09html with: aMethod methodClass name, ' >> #', aMethod selector",
@@ -830,20 +856,21 @@ var self=this;
 var references;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $2,$1,$3;
 references=_st($OrderedCollection())._new();
-_st(self._classesAndMetaclasses())._do_((function(each){
+$1=_st(self._classesAndMetaclasses())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(_st(each)._methodDictionary())._values())._do_((function(method){
 return smalltalk.withContext(function($ctx3) {
-$1=_st(_st(method)._referencedClasses())._includes_(aString);
-if(smalltalk.assert($1)){
+$2=_st(_st(method)._referencedClasses())._includes_(aString);
+if(smalltalk.assert($2)){
 return _st(references)._add_(method);
 };
 }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$2=references;
-return $2;
+$ctx1.sendIdx["do:"]=1;
+$3=references;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"classReferencesOf:",{aString:aString,references:references},smalltalk.HLReferencesModel)})},
 args: ["aString"],
 source: "classReferencesOf: aString\x0a\x09\x22Answer all methods referencing the class named aString\x22\x0a\x09\x0a\x09| references |\x0a\x09\x0a\x09references := OrderedCollection new.\x0a\x09\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary values do: [ :method |\x0a\x09\x09\x09(method referencedClasses includes: aString) ifTrue: [\x0a\x09\x09\x09\x09references add: method ] ] ].\x0a\x09\x09\x09\x09\x0a\x09^ references",
@@ -1054,10 +1081,9 @@ category: 'cache',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._updateClassesAndMetaclassesCache();
-$2=_st($1)._updateMethodsCache();
+var $1;
+self._updateClassesAndMetaclassesCache();
+$1=self._updateMethodsCache();
 return self}, function($ctx1) {$ctx1.fill(self,"updateCaches",{},smalltalk.HLReferencesModel)})},
 args: [],
 source: "updateCaches\x0a\x09self \x0a\x09\x09updateClassesAndMetaclassesCache;\x0a\x09\x09updateMethodsCache",
@@ -1079,6 +1105,7 @@ self["@classesAndMetaclassesCache"]=_st(_st(self._environment())._classes())._in
 return smalltalk.withContext(function($ctx2) {
 $1=acc;
 _st($1)._add_(each);
+$ctx2.sendIdx["add:"]=1;
 _st($1)._add_(_st(each)._class());
 $2=_st($1)._yourself();
 return $2;

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

@@ -12,8 +12,13 @@ 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) { 
-self._assert_(_st(_st($HLCodeWidget())._pcKeyMap())._isKindOf_($HashedCollection()));
-self._assert_(_st(_st($HLCodeWidget())._macKeyMap())._isKindOf_($HashedCollection()));
+var $2,$1,$4,$3;
+$2=_st(_st($HLCodeWidget())._pcKeyMap())._isKindOf_($HashedCollection());
+$ctx1.sendIdx["isKindOf:"]=1;
+$1=self._assert_($2);
+$ctx1.sendIdx["assert:"]=1;
+$4=_st(_st($HLCodeWidget())._macKeyMap())._isKindOf_($HashedCollection());
+$3=self._assert_($4);
 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)",

+ 436 - 117
js/Helios-Workspace.js

@@ -242,8 +242,12 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._editor())._at_put_("amberCodeWidget",self);
-_st(self._editor())._on_do_("change",(function(){
+var $1,$2;
+$1=self._editor();
+$ctx1.sendIdx["editor"]=1;
+_st($1)._at_put_("amberCodeWidget",self);
+$2=self._editor();
+_st($2)._on_do_("change",(function(){
 return smalltalk.withContext(function($ctx2) {
 return self._onChange();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -347,12 +351,22 @@ 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 $1;
-_st(_st(self._model())._announcer())._announce_(_st($HLDoItRequested())._on_(self["@model"]));
+var $3,$2,$4,$1,$7,$6,$8,$5,$9;
+$3=self._model();
+$ctx1.sendIdx["model"]=1;
+$2=_st($3)._announcer();
+$ctx1.sendIdx["announcer"]=1;
+$4=_st($HLDoItRequested())._on_(self["@model"]);
+$ctx1.sendIdx["on:"]=1;
+$1=_st($2)._announce_($4);
+$ctx1.sendIdx["announce:"]=1;
 result=_st(self["@model"])._doIt_(self._currentLineOrSelection());
-_st(_st(self._model())._announcer())._announce_(_st($HLDoItExecuted())._on_(self["@model"]));
-$1=result;
-return $1;
+$7=self._model();
+$6=_st($7)._announcer();
+$8=_st($HLDoItExecuted())._on_(self["@model"]);
+$5=_st($6)._announce_($8);
+$9=result;
+return $9;
 }, 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",
@@ -386,8 +400,28 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=smalltalk.HashedCollection._from_(["theme".__minus_gt("amber"),"lineNumbers".__minus_gt(true),"enterMode".__minus_gt("flat"),"indentWithTabs".__minus_gt(true),"indentUnit".__minus_gt((4)),"matchBrackets".__minus_gt(true),"electricChars".__minus_gt(false),"keyMap".__minus_gt("Amber"),"extraKeys".__minus_gt(smalltalk.HashedCollection._from_(["Shift-Space".__minus_gt("autocomplete")]))]);
+var $2,$3,$4,$5,$6,$7,$8,$9,$12,$11,$10,$1;
+$2="theme".__minus_gt("amber");
+$ctx1.sendIdx["->"]=1;
+$3="lineNumbers".__minus_gt(true);
+$ctx1.sendIdx["->"]=2;
+$4="enterMode".__minus_gt("flat");
+$ctx1.sendIdx["->"]=3;
+$5="indentWithTabs".__minus_gt(true);
+$ctx1.sendIdx["->"]=4;
+$6="indentUnit".__minus_gt((4));
+$ctx1.sendIdx["->"]=5;
+$7="matchBrackets".__minus_gt(true);
+$ctx1.sendIdx["->"]=6;
+$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);
+$ctx1.sendIdx["->"]=9;
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"editorOptions",{},smalltalk.HLCodeWidget)})},
 args: [],
@@ -456,8 +490,13 @@ var self=this;
 var newInspector;
 function $HLInspectItRequested(){return smalltalk.HLInspectItRequested||(typeof HLInspectItRequested=="undefined"?nil:HLInspectItRequested)}
 return smalltalk.withContext(function($ctx1) { 
-_st(_st(self._model())._announcer())._announce_(_st($HLInspectItRequested())._on_(self["@model"]));
-_st(self._model())._inspect_(self._doIt());
+var $2,$1,$3;
+$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());
 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",
@@ -474,13 +513,18 @@ fn: function (anEditor,aToken){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$3,$4,$5,$1;
 $1=_st(_st(_st(_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value())._asArray())._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(each)._includesSubString_(_st(aToken)._string());
+$2=each;
+$3=_st(aToken)._string();
+$ctx2.sendIdx["string"]=1;
+return _st($2)._includesSubString_($3);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._reject_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(each).__eq(_st(aToken)._string());
+$4=each;
+$5=_st(aToken)._string();
+return _st($4).__eq($5);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageHintFor:token:",{anEditor:anEditor,aToken:aToken},smalltalk.HLCodeWidget)})},
@@ -620,21 +664,59 @@ var self=this;
 var start,stop,currentLine;
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-currentLine=_st(_st(self["@editor"])._getCursor_(false))._line();
+var $1,$2,$4,$6,$5,$3,$7,$8,$9,$10,$12,$13,$11,$14,$16,$19,$20,$18,$17,$15,$21,$25,$24,$23,$22,$26,$27,$28;
+$1=_st(self["@editor"])._getCursor_(false);
+$ctx1.sendIdx["getCursor:"]=1;
+currentLine=_st($1)._line();
 start=_st($HashedCollection())._new();
-_st(start)._at_put_("line",currentLine);
-_st(start)._at_put_("ch",_st(_st(self["@editor"])._getCursor_(false))._ch());
-_st(_st(self["@editor"])._getSelection())._ifEmpty_((function(){
+$ctx1.sendIdx["new"]=1;
+$2=_st(start)._at_put_("line",currentLine);
+$ctx1.sendIdx["at:put:"]=1;
+$4=start;
+$6=_st(self["@editor"])._getCursor_(false);
+$ctx1.sendIdx["getCursor:"]=2;
+$5=_st($6)._ch();
+$3=_st($4)._at_put_("ch",$5);
+$ctx1.sendIdx["at:put:"]=2;
+$7=_st(self["@editor"])._getSelection();
+$ctx1.sendIdx["getSelection"]=1;
+_st($7)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-_st(start)._at_put_("ch",_st(_st(self["@editor"])._getLine_(currentLine))._size());
-return _st(self["@editor"])._setSelection_end_(smalltalk.HashedCollection._from_(["line".__minus_gt(currentLine),"ch".__minus_gt((0))]),start);
+$8=start;
+$9=_st(_st(self["@editor"])._getLine_(currentLine))._size();
+$ctx2.sendIdx["size"]=1;
+_st($8)._at_put_("ch",$9);
+$ctx2.sendIdx["at:put:"]=3;
+$10=self["@editor"];
+$12="line".__minus_gt(currentLine);
+$ctx2.sendIdx["->"]=1;
+$13="ch".__minus_gt((0));
+$11=smalltalk.HashedCollection._from_([$12,$13]);
+return _st($10)._setSelection_end_($11,start);
+$ctx2.sendIdx["setSelection:end:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 stop=_st($HashedCollection())._new();
-_st(stop)._at_put_("line",currentLine);
-_st(stop)._at_put_("ch",_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2)));
-_st(self["@editor"])._replaceSelection_(_st(_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString)).__comma(" "));
-_st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
-_st(self["@editor"])._setSelection_end_(stop,start);
+$14=_st(stop)._at_put_("line",currentLine);
+$ctx1.sendIdx["at:put:"]=4;
+$16=stop;
+$19=_st(start)._at_("ch");
+$20=_st(aString)._size();
+$18=_st($19).__plus($20);
+$17=_st($18).__plus((2));
+$ctx1.sendIdx["+"]=1;
+$15=_st($16)._at_put_("ch",$17);
+$21=self["@editor"];
+$25=_st(self["@editor"])._getSelection();
+$24=_st($25).__comma(" ");
+$23=_st($24).__comma(aString);
+$ctx1.sendIdx[","]=2;
+$22=_st($23).__comma(" ");
+$ctx1.sendIdx[","]=1;
+_st($21)._replaceSelection_($22);
+$26=self["@editor"];
+$27=_st(self["@editor"])._getCursor_(true);
+_st($26)._setCursor_($27);
+$28=_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"],
 source: "print: aString\x0a\x09| start stop currentLine |\x0a    currentLine := (editor getCursor: false) line.\x0a\x09start := HashedCollection new.\x0a\x09start at: 'line' put: currentLine.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a    (editor getSelection) ifEmpty: [\x0a    \x09\x22select current line if selection is empty\x22\x0a    \x09start at: 'ch' put: (editor getLine: currentLine) size.\x0a        editor setSelection: #{'line' -> currentLine. 'ch' -> 0} end: start.\x0a    ].\x0a\x09stop := HashedCollection new.\x0a\x09stop at: 'line' put: currentLine.\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
@@ -707,19 +789,27 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3,$4,$5,$6;
 $1=_st(html)._button();
+$ctx1.sendIdx["button"]=1;
 _st($1)._class_("button");
+$ctx1.sendIdx["class:"]=1;
 _st($1)._with_("DoIt");
+$ctx1.sendIdx["with:"]=1;
 $2=_st($1)._onClick_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._doIt();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["onClick:"]=1;
 $3=_st(html)._button();
+$ctx1.sendIdx["button"]=2;
 _st($3)._class_("button");
+$ctx1.sendIdx["class:"]=2;
 _st($3)._with_("PrintIt");
+$ctx1.sendIdx["with:"]=2;
 $4=_st($3)._onClick_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._printIt();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
+$ctx1.sendIdx["onClick:"]=2;
 $5=_st(html)._button();
 _st($5)._class_("button");
 _st($5)._with_("InspectIt");
@@ -744,23 +834,28 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2,$3,$4,$5,$6;
 $1=_st(html)._div();
+$ctx1.sendIdx["div"]=1;
 _st($1)._class_("editor");
+$ctx1.sendIdx["class:"]=1;
 $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@code"]=_st(html)._textarea();
 return self["@code"];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-self["@state"]=_st(_st(html)._div())._class_("state");
+$ctx1.sendIdx["with:"]=1;
 $3=_st(html)._div();
-_st($3)._class_("buttons_bar");
-$4=_st($3)._with_((function(){
+$ctx1.sendIdx["div"]=2;
+self["@state"]=_st($3)._class_("state");
+$ctx1.sendIdx["class:"]=2;
+$4=_st(html)._div();
+_st($4)._class_("buttons_bar");
+$5=_st($4)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._renderButtonsOn_(html);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$5=self;
-_st($5)._setEditorOn_(_st(self["@code"])._element());
-_st($5)._configureEditor();
-$6=_st($5)._updateState();
+self._setEditorOn_(_st(self["@code"])._element());
+self._configureEditor();
+$6=self._updateState();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLCodeWidget)})},
 args: ["html"],
 source: "renderContentOn: html\x0a\x09html div class: 'editor'; with: [\x0a\x09\x09code := html textarea ].\x0a\x09state := html div class: 'state'.\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons_bar';\x0a\x09\x09with: [ self renderButtonsOn: html ].\x0a\x09\x0a\x09self \x0a\x09\x09setEditorOn: code element;\x0a\x09\x09configureEditor;\x0a\x09\x09updateState",
@@ -893,12 +988,15 @@ category: 'updating',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2,$3;
 $1=self._hasModification();
 if(smalltalk.assert($1)){
-_st(_st(self["@state"])._asJQuery())._addClass_("modified");
+$2=_st(self["@state"])._asJQuery();
+$ctx1.sendIdx["asJQuery"]=1;
+_st($2)._addClass_("modified");
 } else {
-_st(_st(self["@state"])._asJQuery())._removeClass_("modified");
+$3=_st(self["@state"])._asJQuery();
+_st($3)._removeClass_("modified");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"updateState",{},smalltalk.HLCodeWidget)})},
 args: [],
@@ -917,24 +1015,45 @@ var self=this;
 var variables,classNames,pseudoVariables;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-variables=_st(_st(_st(_st(_st(_st(anEditor)._display())._wrapper())._asJQuery())._find_("span.cm-variable"))._get())._collect_((function(each){
+var $3,$2,$1,$4,$6,$5,$7,$13,$12,$11,$10,$14,$15,$9,$16,$17,$8;
+$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) {
-return _st(_st(each)._asJQuery())._html();
+$4=_st(each)._asJQuery();
+return _st($4)._html();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-classNames=_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
+$ctx1.sendIdx["collect:"]=1;
+$6=_st($Smalltalk())._current();
+$ctx1.sendIdx["current"]=1;
+$5=_st($6)._classes();
+classNames=_st($5)._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._name();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-pseudoVariables=_st(_st($Smalltalk())._current())._pseudoVariableNames();
-$1=_st(_st(_st(_st(_st(_st(variables).__comma(classNames)).__comma(pseudoVariables))._asSet())._asArray())._select_((function(each){
+$7=_st($Smalltalk())._current();
+pseudoVariables=_st($7)._pseudoVariableNames();
+$13=_st(variables).__comma(classNames);
+$12=_st($13).__comma(pseudoVariables);
+$ctx1.sendIdx[","]=1;
+$11=_st($12)._asSet();
+$10=_st($11)._asArray();
+$9=_st($10)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(each)._includesSubString_(_st(aToken)._string());
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})})))._reject_((function(each){
+$14=each;
+$15=_st(aToken)._string();
+$ctx2.sendIdx["string"]=1;
+return _st($14)._includesSubString_($15);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
+$8=_st($9)._reject_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(each).__eq(_st(aToken)._string());
+$16=each;
+$17=_st(aToken)._string();
+return _st($16).__eq($17);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
-return $1;
+return $8;
 }, 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 ]",
@@ -954,18 +1073,38 @@ 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,$2;
+var $1,$4,$3,$2,$5,$7,$10,$11,$9,$8,$14,$15,$13,$12,$6;
 cursor=_st(anEditor)._getCursor();
 token=_st(anEditor)._getTokenAt_(cursor);
-_st(token)._at_put_("state",_st(_st(_st($CodeMirror())._basicAt_("innerMode"))._value_value_(_st(anEditor)._getMode(),_st(token)._at_("state")))._state());
-$1=_st(_st(token)._type()).__eq("variable");
-if(smalltalk.assert($1)){
+$1=token;
+$4=_st($CodeMirror())._basicAt_("innerMode");
+$ctx1.sendIdx["basicAt:"]=1;
+$3=_st($4)._value_value_(_st(anEditor)._getMode(),_st(token)._at_("state"));
+$ctx1.sendIdx["value:value:"]=1;
+$2=_st($3)._state();
+_st($1)._at_put_("state",$2);
+$5=_st(_st(token)._type()).__eq("variable");
+if(smalltalk.assert($5)){
 completions=_st($HLCodeWidget())._variableHintFor_token_(anEditor,token);
 } else {
 completions=_st($HLCodeWidget())._messageHintFor_token_(anEditor,token);
 };
-$2=smalltalk.HashedCollection._from_(["list".__minus_gt(completions),"from".__minus_gt(_st(_st($CodeMirror())._basicAt_("Pos"))._value_value_(_st(cursor)._line(),_st(token)._end())),"to".__minus_gt(_st(_st($CodeMirror())._basicAt_("Pos"))._value_value_(_st(cursor)._line(),_st(token)._start()))]);
-return $2;
+$7="list".__minus_gt(completions);
+$ctx1.sendIdx["->"]=1;
+$10=_st($CodeMirror())._basicAt_("Pos");
+$ctx1.sendIdx["basicAt:"]=2;
+$11=_st(cursor)._line();
+$ctx1.sendIdx["line"]=1;
+$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]);
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"hintFor:options:",{anEditor:anEditor,options:options,cursor:cursor,token:token,completions:completions},smalltalk.HLCodeWidget.klass)})},
 args: ["anEditor", "options"],
 source: "hintFor: anEditor options: options\x0a\x09| cursor token completions |\x0a\x09\x0a\x09cursor := anEditor getCursor.\x0a\x09token := anEditor getTokenAt: cursor.\x0a\x09token at: 'state' put: ((CodeMirror basicAt: 'innerMode')\x0a\x09\x09value: anEditor getMode value: (token at: 'state')) state.\x0a\x09\x0a\x09completions := token type = 'variable' \x0a\x09\x09ifTrue: [ HLCodeWidget variableHintFor: anEditor token: token ]\x0a\x09\x09ifFalse: [ HLCodeWidget messageHintFor: anEditor token: token ].\x0a\x09\x0a\x09^ #{\x0a\x09\x09'list' -> completions.\x0a\x09\x09'from' -> ((CodeMirror basicAt: 'Pos') value: cursor line value: token end).\x0a\x09\x09'to' -> ((CodeMirror basicAt: 'Pos') value: cursor line value: token start)\x0a\x09}",
@@ -981,12 +1120,11 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 smalltalk.HLCodeWidget.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
-$1=self;
-_st($1)._setupCodeMirror();
-_st($1)._setupCommands();
-$2=_st($1)._setupKeyMaps();
+self._setupCodeMirror();
+self._setupCommands();
+$1=self._setupKeyMaps();
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
 source: "initialize\x0a\x09super initialize.\x0a\x09self \x0a\x09\x09setupCodeMirror;\x0a\x09\x09setupCommands;\x0a\x09\x09setupKeyMaps.",
@@ -1026,8 +1164,59 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=smalltalk.HashedCollection._from_(["Alt-Backspace".__minus_gt("delWordBefore"),"Alt-Delete".__minus_gt("delWordAfter"),"Alt-Left".__minus_gt("goWordBoundaryLeft"),"Alt-Right".__minus_gt("goWordBoundaryRight"),"Cmd-A".__minus_gt("selectAll"),"Cmd-Alt-F".__minus_gt("replace"),"Cmd-D".__minus_gt("doIt"),"Cmd-Down".__minus_gt("goDocEnd"),"Cmd-End".__minus_gt("goDocEnd"),"Cmd-F".__minus_gt("find"),"Cmd-G".__minus_gt("findNext"),"Cmd-I".__minus_gt("inspectIt"),"Cmd-Left".__minus_gt("goLineStart"),"Cmd-P".__minus_gt("printIt"),"Cmd-Right".__minus_gt("goLineEnd"),"Cmd-S".__minus_gt("saveIt"),"Cmd-Up".__minus_gt("goDocStart"),"Cmd-Y".__minus_gt("redo"),"Cmd-Z".__minus_gt("undo"),"Cmd-[".__minus_gt("indentLess"),"Cmd-]".__minus_gt("indentMore"),"Ctrl-Alt-Backspace".__minus_gt("delWordAfter"),"Shift-Cmd-Alt-F".__minus_gt("replaceAll"),"Shift-Cmd-G".__minus_gt("findPrev"),"Shift-Cmd-Z".__minus_gt("redo"),"fallthrough".__minus_gt(["basic","emacsy"])]);
+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;
+$2="Alt-Backspace".__minus_gt("delWordBefore");
+$ctx1.sendIdx["->"]=1;
+$3="Alt-Delete".__minus_gt("delWordAfter");
+$ctx1.sendIdx["->"]=2;
+$4="Alt-Left".__minus_gt("goWordBoundaryLeft");
+$ctx1.sendIdx["->"]=3;
+$5="Alt-Right".__minus_gt("goWordBoundaryRight");
+$ctx1.sendIdx["->"]=4;
+$6="Cmd-A".__minus_gt("selectAll");
+$ctx1.sendIdx["->"]=5;
+$7="Cmd-Alt-F".__minus_gt("replace");
+$ctx1.sendIdx["->"]=6;
+$8="Cmd-D".__minus_gt("doIt");
+$ctx1.sendIdx["->"]=7;
+$9="Cmd-Down".__minus_gt("goDocEnd");
+$ctx1.sendIdx["->"]=8;
+$10="Cmd-End".__minus_gt("goDocEnd");
+$ctx1.sendIdx["->"]=9;
+$11="Cmd-F".__minus_gt("find");
+$ctx1.sendIdx["->"]=10;
+$12="Cmd-G".__minus_gt("findNext");
+$ctx1.sendIdx["->"]=11;
+$13="Cmd-I".__minus_gt("inspectIt");
+$ctx1.sendIdx["->"]=12;
+$14="Cmd-Left".__minus_gt("goLineStart");
+$ctx1.sendIdx["->"]=13;
+$15="Cmd-P".__minus_gt("printIt");
+$ctx1.sendIdx["->"]=14;
+$16="Cmd-Right".__minus_gt("goLineEnd");
+$ctx1.sendIdx["->"]=15;
+$17="Cmd-S".__minus_gt("saveIt");
+$ctx1.sendIdx["->"]=16;
+$18="Cmd-Up".__minus_gt("goDocStart");
+$ctx1.sendIdx["->"]=17;
+$19="Cmd-Y".__minus_gt("redo");
+$ctx1.sendIdx["->"]=18;
+$20="Cmd-Z".__minus_gt("undo");
+$ctx1.sendIdx["->"]=19;
+$21="Cmd-[".__minus_gt("indentLess");
+$ctx1.sendIdx["->"]=20;
+$22="Cmd-]".__minus_gt("indentMore");
+$ctx1.sendIdx["->"]=21;
+$23="Ctrl-Alt-Backspace".__minus_gt("delWordAfter");
+$ctx1.sendIdx["->"]=22;
+$24="Shift-Cmd-Alt-F".__minus_gt("replaceAll");
+$ctx1.sendIdx["->"]=23;
+$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]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"macKeyMap",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1062,8 +1251,59 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=smalltalk.HashedCollection._from_(["Alt-Left".__minus_gt("goLineStart"),"Alt-Right".__minus_gt("goLineEnd"),"Alt-Up".__minus_gt("goDocStart"),"Ctrl-A".__minus_gt("selectAll"),"Ctrl-Backspace".__minus_gt("delWordBefore"),"Ctrl-D".__minus_gt("doIt"),"Ctrl-Delete".__minus_gt("delWordAfter"),"Ctrl-Down".__minus_gt("goDocEnd"),"Ctrl-End".__minus_gt("goDocEnd"),"Ctrl-F".__minus_gt("find"),"Ctrl-G".__minus_gt("findNext"),"Ctrl-I".__minus_gt("inspectIt"),"Ctrl-Home".__minus_gt("goDocStart"),"Ctrl-Left".__minus_gt("goWordBoundaryLeft"),"Ctrl-P".__minus_gt("printIt"),"Ctrl-Right".__minus_gt("goWordBoundaryRight"),"Ctrl-S".__minus_gt("saveIt"),"Ctrl-Y".__minus_gt("redo"),"Ctrl-Z".__minus_gt("undo"),"Ctrl-[".__minus_gt("indentLess"),"Ctrl-]".__minus_gt("indentMore"),"Shift-Ctrl-F".__minus_gt("replace"),"Shift-Ctrl-G".__minus_gt("findPrev"),"Shift-Ctrl-R".__minus_gt("replaceAll"),"Shift-Ctrl-Z".__minus_gt("redo"),"fallthrough".__minus_gt(["basic"])]);
+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;
+$2="Alt-Left".__minus_gt("goLineStart");
+$ctx1.sendIdx["->"]=1;
+$3="Alt-Right".__minus_gt("goLineEnd");
+$ctx1.sendIdx["->"]=2;
+$4="Alt-Up".__minus_gt("goDocStart");
+$ctx1.sendIdx["->"]=3;
+$5="Ctrl-A".__minus_gt("selectAll");
+$ctx1.sendIdx["->"]=4;
+$6="Ctrl-Backspace".__minus_gt("delWordBefore");
+$ctx1.sendIdx["->"]=5;
+$7="Ctrl-D".__minus_gt("doIt");
+$ctx1.sendIdx["->"]=6;
+$8="Ctrl-Delete".__minus_gt("delWordAfter");
+$ctx1.sendIdx["->"]=7;
+$9="Ctrl-Down".__minus_gt("goDocEnd");
+$ctx1.sendIdx["->"]=8;
+$10="Ctrl-End".__minus_gt("goDocEnd");
+$ctx1.sendIdx["->"]=9;
+$11="Ctrl-F".__minus_gt("find");
+$ctx1.sendIdx["->"]=10;
+$12="Ctrl-G".__minus_gt("findNext");
+$ctx1.sendIdx["->"]=11;
+$13="Ctrl-I".__minus_gt("inspectIt");
+$ctx1.sendIdx["->"]=12;
+$14="Ctrl-Home".__minus_gt("goDocStart");
+$ctx1.sendIdx["->"]=13;
+$15="Ctrl-Left".__minus_gt("goWordBoundaryLeft");
+$ctx1.sendIdx["->"]=14;
+$16="Ctrl-P".__minus_gt("printIt");
+$ctx1.sendIdx["->"]=15;
+$17="Ctrl-Right".__minus_gt("goWordBoundaryRight");
+$ctx1.sendIdx["->"]=16;
+$18="Ctrl-S".__minus_gt("saveIt");
+$ctx1.sendIdx["->"]=17;
+$19="Ctrl-Y".__minus_gt("redo");
+$ctx1.sendIdx["->"]=18;
+$20="Ctrl-Z".__minus_gt("undo");
+$ctx1.sendIdx["->"]=19;
+$21="Ctrl-[".__minus_gt("indentLess");
+$ctx1.sendIdx["->"]=20;
+$22="Ctrl-]".__minus_gt("indentMore");
+$ctx1.sendIdx["->"]=21;
+$23="Shift-Ctrl-F".__minus_gt("replace");
+$ctx1.sendIdx["->"]=22;
+$24="Shift-Ctrl-G".__minus_gt("findPrev");
+$ctx1.sendIdx["->"]=23;
+$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]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"pcKeyMap",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1102,23 +1342,33 @@ fn: function (){
 var self=this;
 function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3,$4,$6,$5;
 $1=_st($CodeMirror())._basicAt_("commands");
 _st($1)._at_put_("doIt",(function(cm){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(cm)._amberCodeWidget())._doIt();
+$2=_st(cm)._amberCodeWidget();
+$ctx2.sendIdx["amberCodeWidget"]=1;
+return _st($2)._doIt();
 }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,1)})}));
+$ctx1.sendIdx["at:put:"]=1;
 _st($1)._at_put_("inspectIt",(function(cm){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(cm)._amberCodeWidget())._inspectIt();
+$3=_st(cm)._amberCodeWidget();
+$ctx2.sendIdx["amberCodeWidget"]=2;
+return _st($3)._inspectIt();
 }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,2)})}));
+$ctx1.sendIdx["at:put:"]=2;
 _st($1)._at_put_("printIt",(function(cm){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(cm)._amberCodeWidget())._printIt();
+$4=_st(cm)._amberCodeWidget();
+$ctx2.sendIdx["amberCodeWidget"]=3;
+return _st($4)._printIt();
 }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,3)})}));
-$2=_st($1)._at_put_("saveIt",(function(cm){
+$ctx1.sendIdx["at:put:"]=3;
+$5=_st($1)._at_put_("saveIt",(function(cm){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(cm)._amberCodeWidget())._saveIt();
+$6=_st(cm)._amberCodeWidget();
+return _st($6)._saveIt();
 }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,4)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"setupCommands",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1353,11 +1603,10 @@ category: 'accessing',
 fn: function (aBrowserModel){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 self["@browserModel"]=aBrowserModel;
-$1=self;
-_st($1)._observeSystem();
-$2=_st($1)._observeBrowserModel();
+self._observeSystem();
+$1=self._observeBrowserModel();
 return self}, function($ctx1) {$ctx1.fill(self,"browserModel:",{aBrowserModel:aBrowserModel},smalltalk.HLBrowserCodeWidget)})},
 args: ["aBrowserModel"],
 source: "browserModel: aBrowserModel\x0a\x09browserModel := aBrowserModel.\x0a\x09self \x0a\x09\x09observeSystem;\x0a\x09\x09observeBrowserModel",
@@ -1388,16 +1637,27 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2;
 $1=_st(self._browserModel())._announcer();
 _st($1)._on_send_to_($HLSaveSourceCode(),"onSaveIt",self);
+$ctx1.sendIdx["on:send:to:"]=1;
 _st($1)._on_send_to_($HLShowInstanceToggled(),"onShowInstanceToggled",self);
+$ctx1.sendIdx["on:send:to:"]=2;
 _st($1)._on_send_to_($HLSourceCodeSaved(),"onSourceCodeSaved",self);
+$ctx1.sendIdx["on:send:to:"]=3;
 _st($1)._on_send_to_($HLAboutToChange(),"onBrowserAboutToChange:",self);
+$ctx1.sendIdx["on:send:to:"]=4;
 _st($1)._on_send_to_($HLParseErrorRaised(),"onParseError:",self);
+$ctx1.sendIdx["on:send:to:"]=5;
 _st($1)._on_send_to_($HLCompileErrorRaised(),"onCompileError:",self);
+$ctx1.sendIdx["on:send:to:"]=6;
 _st($1)._on_send_to_($HLUnknownVariableErrorRaised(),"onUnknownVariableError:",self);
+$ctx1.sendIdx["on:send:to:"]=7;
 _st($1)._on_send_to_($HLInstVarAdded(),"onInstVarAdded",self);
+$ctx1.sendIdx["on:send:to:"]=8;
 _st($1)._on_send_to_($HLMethodSelected(),"onMethodSelected:",self);
+$ctx1.sendIdx["on:send:to:"]=9;
 _st($1)._on_send_to_($HLClassSelected(),"onClassSelected:",self);
+$ctx1.sendIdx["on:send:to:"]=10;
 _st($1)._on_send_to_($HLProtocolSelected(),"onProtocolSelected:",self);
+$ctx1.sendIdx["on:send:to:"]=11;
 $2=_st($1)._on_send_to_($HLSourceCodeFocusRequested(),"onSourceCodeFocusRequested",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},smalltalk.HLBrowserCodeWidget)})},
 args: [],
@@ -1460,16 +1720,17 @@ fn: function (anAnnouncement){
 var self=this;
 var class_;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3;
 class_=_st(anAnnouncement)._item();
 $1=class_;
 if(($receiver = $1) == nil || $receiver == null){
 $2=self._contents_("");
+$ctx1.sendIdx["contents:"]=1;
 return $2;
 } else {
 $1;
 };
-self._contents_(_st(class_)._definition());
+$3=self._contents_(_st(class_)._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLBrowserCodeWidget)})},
 args: ["anAnnouncement"],
 source: "onClassSelected: anAnnouncement\x0a\x09| class |\x0a\x09\x0a\x09class:= anAnnouncement item.\x0a\x09\x0a\x09class ifNil: [ ^ self contents: '' ].\x0a    self contents: class definition",
@@ -1518,24 +1779,33 @@ fn: function (anAnnouncement){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6;
+var $4,$3,$2,$1,$6,$5,$11,$10,$9,$12,$8,$7;
 method=_st(anAnnouncement)._method();
-$1=_st(_st(self._browserModel())._selectedClass()).__eq(_st(method)._methodClass());
-if(! smalltalk.assert($1)){
-$2=self;
-return $2;
+$4=self._browserModel();
+$ctx1.sendIdx["browserModel"]=1;
+$3=_st($4)._selectedClass();
+$2=_st($3).__eq(_st(method)._methodClass());
+$ctx1.sendIdx["="]=1;
+if(! smalltalk.assert($2)){
+return self;
 };
-$3=_st(self._browserModel())._selectedMethod();
-if(($receiver = $3) == nil || $receiver == null){
-$4=self;
-return $4;
+$6=self._browserModel();
+$ctx1.sendIdx["browserModel"]=2;
+$5=_st($6)._selectedMethod();
+$ctx1.sendIdx["selectedMethod"]=1;
+if(($receiver = $5) == nil || $receiver == null){
+return self;
 } else {
-$3;
+$5;
 };
-$5=_st(_st(_st(self._browserModel())._selectedMethod())._selector()).__eq(_st(method)._selector());
-if(! smalltalk.assert($5)){
-$6=self;
-return $6;
+$11=self._browserModel();
+$10=_st($11)._selectedMethod();
+$9=_st($10)._selector();
+$ctx1.sendIdx["selector"]=1;
+$12=_st(method)._selector();
+$8=_st($9).__eq($12);
+if(! smalltalk.assert($8)){
+return self;
 };
 self._refresh();
 return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
@@ -1554,16 +1824,17 @@ fn: function (anAnnouncement){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3;
 method=_st(anAnnouncement)._item();
 $1=method;
 if(($receiver = $1) == nil || $receiver == null){
 $2=self._contents_("");
+$ctx1.sendIdx["contents:"]=1;
 return $2;
 } else {
 $1;
 };
-self._contents_(_st(method)._source());
+$3=self._contents_(_st(method)._source());
 return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
 args: ["anAnnouncement"],
 source: "onMethodSelected: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement item.\x0a\x09\x0a\x09method ifNil: [ ^ self contents: '' ].\x0a    self contents: method source",
@@ -1581,7 +1852,7 @@ var self=this;
 var lineIndex,newContents;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$3,$5,$6,$4,$8,$10,$12,$11,$9,$7;
 lineIndex=(1);
 self._contents_(_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
@@ -1590,14 +1861,32 @@ return smalltalk.withContext(function($ctx3) {
 $1=_st(lineIndex).__eq(_st(anAnnouncement)._line());
 if(smalltalk.assert($1)){
 $2=stream;
-_st($2)._nextPutAll_(_st(each)._copyFrom_to_((1),_st(anAnnouncement)._column()));
+$3=$2;
+$5=each;
+$6=_st(anAnnouncement)._column();
+$ctx3.sendIdx["column"]=1;
+$4=_st($5)._copyFrom_to_((1),$6);
+$ctx3.sendIdx["copyFrom:to:"]=1;
+_st($3)._nextPutAll_($4);
+$ctx3.sendIdx["nextPutAll:"]=1;
 _st($2)._nextPutAll_("<- ");
+$ctx3.sendIdx["nextPutAll:"]=2;
 _st($2)._nextPutAll_(_st(anAnnouncement)._message());
+$ctx3.sendIdx["nextPutAll:"]=3;
 _st($2)._nextPutAll_(" ");
-$3=_st($2)._nextPutAll_(_st(each)._copyFrom_to_(_st(_st(anAnnouncement)._column()).__plus((1)),_st(each)._size()));
-$3;
+$ctx3.sendIdx["nextPutAll:"]=4;
+$8=$2;
+$10=each;
+$12=_st(anAnnouncement)._column();
+$11=_st($12).__plus((1));
+$ctx3.sendIdx["+"]=1;
+$9=_st($10)._copyFrom_to_($11,_st(each)._size());
+$7=_st($8)._nextPutAll_($9);
+$ctx3.sendIdx["nextPutAll:"]=5;
+$7;
 } else {
 _st(stream)._nextPutAll_(each);
+$ctx3.sendIdx["nextPutAll:"]=6;
 };
 _st(stream)._nextPutAll_(_st($String())._cr());
 lineIndex=_st(lineIndex).__plus((1));
@@ -1619,15 +1908,22 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st(self._browserModel())._selectedClass();
+var $2,$1,$3,$7,$6,$5,$4;
+$2=self._browserModel();
+$ctx1.sendIdx["browserModel"]=1;
+$1=_st($2)._selectedClass();
+$ctx1.sendIdx["selectedClass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
-$2=self._contents_("");
-return $2;
+$3=self._contents_("");
+$ctx1.sendIdx["contents:"]=1;
+return $3;
 } else {
 $1;
 };
-self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
+$7=self._browserModel();
+$6=_st($7)._selectedClass();
+$5=_st($6)._definition();
+$4=self._contents_($5);
 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",
@@ -1659,15 +1955,22 @@ category: 'reactions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st(self._browserModel())._selectedClass();
+var $2,$1,$3,$7,$6,$5,$4;
+$2=self._browserModel();
+$ctx1.sendIdx["browserModel"]=1;
+$1=_st($2)._selectedClass();
+$ctx1.sendIdx["selectedClass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
-$2=self._contents_("");
-return $2;
+$3=self._contents_("");
+$ctx1.sendIdx["contents:"]=1;
+return $3;
 } else {
 $1;
 };
-self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
+$7=self._browserModel();
+$6=_st($7)._selectedClass();
+$5=_st($6)._definition();
+$4=self._contents_($5);
 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",
@@ -1724,7 +2027,9 @@ self._confirm_ifTrue_(_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 $1=stream;
 _st($1)._nextPutAll_(_st(error)._messageText());
+$ctx2.sendIdx["nextPutAll:"]=1;
 _st($1)._nextPutAll_(_st($String())._cr());
+$ctx2.sendIdx["nextPutAll:"]=2;
 $2=_st($1)._nextPutAll_("Would you like to define an instance variable?");
 return $2;
 }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})})),(function(){
@@ -1746,16 +2051,14 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
-$1=self._hasModification();
-if(smalltalk.assert($1)){
-$2=self;
-return $2;
+var $2,$1,$4,$3;
+$2=self._hasModification();
+if(smalltalk.assert($2)){
+return self;
 };
-$3=self._hasFocus();
-if(smalltalk.assert($3)){
-$4=self;
-return $4;
+$4=self._hasFocus();
+if(smalltalk.assert($4)){
+return self;
 };
 self._contents_(_st(_st(self._browserModel())._selectedMethod())._source());
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLBrowserCodeWidget)})},
@@ -1813,9 +2116,16 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $3,$2,$1,$6,$5,$4;
 smalltalk.HLBrowserCodeWidget.superclass.fn.prototype._unregsiter.apply(_st(self), []);
-_st(_st(self._browserModel())._announcer())._unsubscribe_(self);
-_st(_st(self._browserModel())._systemAnnouncer())._unsubscribe_(self);
+$3=self._browserModel();
+$ctx1.sendIdx["browserModel"]=1;
+$2=_st($3)._announcer();
+$1=_st($2)._unsubscribe_(self);
+$ctx1.sendIdx["unsubscribe:"]=1;
+$6=self._browserModel();
+$5=_st($6)._systemAnnouncer();
+$4=_st($5)._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",
@@ -1932,10 +2242,14 @@ 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) { 
-_st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._codeWidget(),(function(canvas){
+var $2,$3,$1;
+$2=html;
+$3=_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)})}))));
+}, function($ctx2) {$ctx2.fillBlock({canvas:canvas},$ctx1,1)})})));
+$1=_st($2)._with_($3);
+$ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWorkspace)})},
 args: ["html"],
 source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter\x0a\x09\x09with: self codeWidget\x0a\x09\x09with: [ :canvas | self renderTranscriptOn: canvas ]))",
@@ -1953,7 +2267,9 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$3,$4,$2;
 $1=_st(html)._div();
+$ctx1.sendIdx["div"]=1;
 _st($1)._class_("transcript-container");
+$ctx1.sendIdx["class:"]=1;
 $2=_st($1)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._div();
@@ -1962,6 +2278,7 @@ $4=_st($3)._with_("Transcript");
 $4;
 return _st(self._transcript())._renderOn_(html);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderTranscriptOn:",{html:html},smalltalk.HLWorkspace)})},
 args: ["html"],
 source: "renderTranscriptOn: html\x0a\x09html div \x0a\x09\x09class: 'transcript-container';\x0a\x09\x09with: [\x0a\x09\x09\x09html div\x0a\x09\x09\x09\x09class: 'list-label';\x0a\x09\x09\x09\x09with: 'Transcript'.\x0a\x09\x09\x09self transcript renderOn: html ]",
@@ -2002,8 +2319,10 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-smalltalk.HLWorkspace.superclass.fn.prototype._unregister.apply(_st(self), []);
-_st(self._transcript())._unregister();
+var $1,$2;
+$1=smalltalk.HLWorkspace.superclass.fn.prototype._unregister.apply(_st(self), []);
+$ctx1.sendIdx["unregister"]=1;
+$2=_st(self._transcript())._unregister();
 return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLWorkspace)})},
 args: [],
 source: "unregister\x0a\x09super unregister.\x0a\x09self transcript unregister",

File diff suppressed because it is too large
+ 393 - 177
js/IDE.js


+ 436 - 139
js/Importer-Exporter.js

@@ -29,13 +29,15 @@ category: 'convenience',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$3,$4,$1;
 $2=_st(aClass)._isMetaclass();
 if(smalltalk.assert($2)){
-$1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(" class");
+$3=_st(_st(aClass)._instanceClass())._name();
+$ctx1.sendIdx["name"]=1;
+$1=_st($3).__comma(" class");
 } else {
-$3=_st(aClass)._isNil();
-if(smalltalk.assert($3)){
+$4=_st(aClass)._isNil();
+if(smalltalk.assert($4)){
 $1="nil";
 } else {
 $1=_st(aClass)._name();
@@ -102,21 +104,22 @@ function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof Ordere
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ExportMethodProtocol(){return smalltalk.ExportMethodProtocol||(typeof ExportMethodProtocol=="undefined"?nil:ExportMethodProtocol)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $2,$1,$3;
 extensionName="*".__comma(_st(aPackage)._name());
 result=_st($OrderedCollection())._new();
-_st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
+$1=_st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st([each,_st(each)._class()])._do_((function(behavior){
 return smalltalk.withContext(function($ctx3) {
-$1=_st(_st(behavior)._protocols())._includes_(extensionName);
-if(smalltalk.assert($1)){
+$2=_st(_st(behavior)._protocols())._includes_(extensionName);
+if(smalltalk.assert($2)){
 return _st(result)._add_(_st($ExportMethodProtocol())._name_theClass_(extensionName,behavior));
 };
 }, function($ctx3) {$ctx3.fillBlock({behavior:behavior},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$2=result;
-return $2;
+$ctx1.sendIdx["do:"]=1;
+$3=result;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"extensionProtocolsOfPackage:",{aPackage:aPackage,extensionName:extensionName,result:result},smalltalk.AbstractExporter)})},
 args: ["aPackage"],
 source: "extensionProtocolsOfPackage: aPackage\x0a\x09| extensionName result |\x0a\x09\x0a\x09extensionName := '*', aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09\x0a\x09\x22The classes must be loaded since it is extensions only.\x0a\x09Therefore sorting (dependency resolution) does not matter here.\x0a\x09Not sorting improves the speed by a number of magnitude.\x22\x0a\x09\x0a\x09Smalltalk current classes do: [ :each |\x0a\x09\x09{each. each class} do: [ :behavior |\x0a\x09\x09\x09(behavior protocols includes: extensionName) ifTrue: [\x0a\x09\x09\x09\x09result add: (ExportMethodProtocol name: extensionName theClass: behavior) ] ] ].\x0a\x0a\x09^result",
@@ -140,6 +143,7 @@ var $1,$2;
 $1=aStream;
 _st($1)._nextPutAll_(" !");
 _st($1)._lf();
+$ctx1.sendIdx["lf"]=1;
 $2=_st($1)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportCategoryEpilogueOf:on:",{aCategory:aCategory,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aCategory", "aStream"],
@@ -156,10 +160,18 @@ category: 'output',
 fn: function (aCategory,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3,$5,$7,$6,$4;
 $1=aStream;
-_st($1)._nextPutAll_("!".__comma(self._classNameFor_(_st(aCategory)._theClass())));
-$2=_st($1)._nextPutAll_(_st(" methodsFor: '".__comma(_st(aCategory)._name())).__comma("'!"));
+$2=$1;
+$3="!".__comma(self._classNameFor_(_st(aCategory)._theClass()));
+$ctx1.sendIdx[","]=1;
+_st($2)._nextPutAll_($3);
+$ctx1.sendIdx["nextPutAll:"]=1;
+$5=$1;
+$7=" methodsFor: '".__comma(_st(aCategory)._name());
+$6=_st($7).__comma("'!");
+$ctx1.sendIdx[","]=2;
+$4=_st($5)._nextPutAll_($6);
 return self}, function($ctx1) {$ctx1.fill(self,"exportCategoryPrologueOf:on:",{aCategory:aCategory,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aCategory", "aStream"],
 source: "exportCategoryPrologueOf: aCategory on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aCategory theClass);\x0a\x09\x09nextPutAll: ' methodsFor: ''', aCategory name, '''!'",
@@ -175,36 +187,75 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$7;
+var $1,$2,$3,$4,$6,$5,$7,$8,$9,$11,$10,$12,$14,$13,$15,$16,$19,$18,$17,$20,$23,$22,$21,$24,$25;
 $1=aStream;
-_st($1)._nextPutAll_(self._classNameFor_(_st(aClass)._superclass()));
-_st($1)._nextPutAll_(" subclass: #".__comma(self._classNameFor_(aClass)));
+$2=$1;
+$3=self._classNameFor_(_st(aClass)._superclass());
+$ctx1.sendIdx["classNameFor:"]=1;
+_st($2)._nextPutAll_($3);
+$ctx1.sendIdx["nextPutAll:"]=1;
+$4=$1;
+$6=self._classNameFor_(aClass);
+$ctx1.sendIdx["classNameFor:"]=2;
+$5=" subclass: #".__comma($6);
+$ctx1.sendIdx[","]=1;
+_st($4)._nextPutAll_($5);
+$ctx1.sendIdx["nextPutAll:"]=2;
 _st($1)._lf();
+$ctx1.sendIdx["lf"]=1;
 _st($1)._tab();
-$2=_st($1)._nextPutAll_("instanceVariableNames: '");
+$ctx1.sendIdx["tab"]=1;
+$7=_st($1)._nextPutAll_("instanceVariableNames: '");
+$ctx1.sendIdx["nextPutAll:"]=3;
 _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(each);
+$ctx2.sendIdx["nextPutAll:"]=4;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(" ");
+$ctx2.sendIdx["nextPutAll:"]=5;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$3=aStream;
-_st($3)._nextPutAll_("'");
-_st($3)._lf();
-_st($3)._tab();
-_st($3)._nextPutAll_(_st("package: '".__comma(_st(aClass)._category())).__comma("'!"));
-$4=_st($3)._lf();
-$5=_st(_st(aClass)._comment())._notEmpty();
-if(smalltalk.assert($5)){
-$6=aStream;
-_st($6)._nextPutAll_(_st("!".__comma(self._classNameFor_(aClass))).__comma(" commentStamp!"));
-_st($6)._lf();
-_st($6)._nextPutAll_(_st(self._chunkEscape_(_st(aClass)._comment())).__comma("!"));
-$7=_st($6)._lf();
-$7;
+$8=aStream;
+_st($8)._nextPutAll_("'");
+$ctx1.sendIdx["nextPutAll:"]=6;
+_st($8)._lf();
+$ctx1.sendIdx["lf"]=2;
+_st($8)._tab();
+$9=$8;
+$11="package: '".__comma(_st(aClass)._category());
+$ctx1.sendIdx[","]=3;
+$10=_st($11).__comma("'!");
+$ctx1.sendIdx[","]=2;
+_st($9)._nextPutAll_($10);
+$ctx1.sendIdx["nextPutAll:"]=7;
+$12=_st($8)._lf();
+$ctx1.sendIdx["lf"]=3;
+$14=_st(aClass)._comment();
+$ctx1.sendIdx["comment"]=1;
+$13=_st($14)._notEmpty();
+if(smalltalk.assert($13)){
+$15=aStream;
+$16=$15;
+$19=self._classNameFor_(aClass);
+$18="!".__comma($19);
+$ctx1.sendIdx[","]=5;
+$17=_st($18).__comma(" commentStamp!");
+$ctx1.sendIdx[","]=4;
+_st($16)._nextPutAll_($17);
+$ctx1.sendIdx["nextPutAll:"]=8;
+_st($15)._lf();
+$ctx1.sendIdx["lf"]=4;
+$20=$15;
+$23=_st(aClass)._comment();
+$22=self._chunkEscape_($23);
+$21=_st($22).__comma("!");
+_st($20)._nextPutAll_($21);
+$24=_st($15)._lf();
+$ctx1.sendIdx["lf"]=5;
+$24;
 };
-_st(aStream)._lf();
+$25=_st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aClass", "aStream"],
 source: "exportDefinitionOf: aClass on: aStream\x0a\x09\x22Chunk format.\x22\x0a\x0a\x09aStream\x0a\x09\x09nextPutAll: (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;\x0a\x09\x09tab; nextPutAll: 'instanceVariableNames: '''.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: each]\x0a\x09\x09separatedBy: [aStream nextPutAll: ' '].\x0a\x09aStream\x0a\x09\x09nextPutAll: ''''; lf;\x0a\x09\x09tab; nextPutAll: 'package: ''', aClass category, '''!'; lf.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aClass), ' commentStamp!';lf;\x0a\x09\x09nextPutAll: (self chunkEscape: aClass comment), '!';lf].\x0a\x09aStream lf",
@@ -220,25 +271,40 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5;
-$1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
+var $3,$2,$1,$4,$5,$7,$6,$8,$10,$9,$11,$12;
+$3=_st(aClass)._class();
+$ctx1.sendIdx["class"]=1;
+$2=_st($3)._instanceVariableNames();
+$ctx1.sendIdx["instanceVariableNames"]=1;
+$1=_st($2)._isEmpty();
 if(! smalltalk.assert($1)){
-$2=aStream;
-_st($2)._nextPutAll_(self._classNameFor_(_st(aClass)._class()));
-$3=_st($2)._nextPutAll_(" instanceVariableNames: '");
-$3;
-_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
+$4=aStream;
+$5=$4;
+$7=_st(aClass)._class();
+$ctx1.sendIdx["class"]=2;
+$6=self._classNameFor_($7);
+_st($5)._nextPutAll_($6);
+$ctx1.sendIdx["nextPutAll:"]=1;
+$8=_st($4)._nextPutAll_(" instanceVariableNames: '");
+$ctx1.sendIdx["nextPutAll:"]=2;
+$8;
+$10=_st(aClass)._class();
+$9=_st($10)._instanceVariableNames();
+_st($9)._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(each);
+$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)})}));
-$4=aStream;
-_st($4)._nextPutAll_("'!");
-_st($4)._lf();
-$5=_st($4)._lf();
-$5;
+$11=aStream;
+_st($11)._nextPutAll_("'!");
+_st($11)._lf();
+$ctx1.sendIdx["lf"]=1;
+$12=_st($11)._lf();
+$12;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aClass", "aStream"],
@@ -258,8 +324,11 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2;
 $1=aStream;
 _st($1)._lf();
+$ctx1.sendIdx["lf"]=1;
 _st($1)._lf();
+$ctx1.sendIdx["lf"]=2;
 _st($1)._nextPutAll_(self._chunkEscape_(_st(aMethod)._source()));
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._lf();
 $2=_st($1)._nextPutAll_("!");
 return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.ChunkExporter)})},
@@ -277,15 +346,21 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2,$3;
 self._exportPackageDefinitionOf_on_(aPackage,aStream);
 _st(_st(aPackage)._sortedClasses())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 self._exportDefinitionOf_on_(each,aStream);
-self._exportProtocols_on_(self._ownMethodProtocolsOfClass_(each),aStream);
+$1=self._ownMethodProtocolsOfClass_(each);
+$ctx2.sendIdx["ownMethodProtocolsOfClass:"]=1;
+self._exportProtocols_on_($1,aStream);
+$ctx2.sendIdx["exportProtocols:on:"]=1;
 self._exportMetaDefinitionOf_on_(each,aStream);
-return self._exportProtocols_on_(self._ownMethodProtocolsOfClass_(_st(each)._class()),aStream);
+$2=self._ownMethodProtocolsOfClass_(_st(each)._class());
+return self._exportProtocols_on_($2,aStream);
+$ctx2.sendIdx["exportProtocols:on:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-self._exportProtocols_on_(self._extensionProtocolsOfPackage_(aPackage),aStream);
+$3=self._exportProtocols_on_(self._extensionProtocolsOfPackage_(aPackage),aStream);
 return self}, function($ctx1) {$ctx1.fill(self,"exportPackage:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aPackage", "aStream"],
 source: "exportPackage: aPackage on: aStream\x0a\x0a\x09self exportPackageDefinitionOf: aPackage on: aStream.\x0a\x09\x0a\x09aPackage sortedClasses do: [ :each |\x0a\x09\x09self exportDefinitionOf: each on: aStream.\x0a\x09\x09\x0a\x09\x09self \x0a\x09\x09\x09exportProtocols: (self ownMethodProtocolsOfClass: each)\x0a\x09\x09\x09on: aStream.\x0a\x09\x09\x09\x0a\x09\x09self exportMetaDefinitionOf: each on: aStream.\x0a\x09\x09\x0a\x09\x09self \x0a\x09\x09\x09exportProtocols: (self ownMethodProtocolsOfClass: each class)\x0a\x09\x09\x09on: aStream ].\x0a\x09\x09\x09\x0a\x09self \x0a\x09\x09exportProtocols: (self extensionProtocolsOfPackage: aPackage)\x0a\x09\x09on: aStream",
@@ -301,10 +376,14 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$4,$3,$5;
 $1=aStream;
-_st($1)._nextPutAll_(_st("Smalltalk current createPackage: '".__comma(_st(aPackage)._name())).__comma("'!"));
-$2=_st($1)._lf();
+$2=$1;
+$4="Smalltalk current createPackage: '".__comma(_st(aPackage)._name());
+$3=_st($4).__comma("'!");
+$ctx1.sendIdx[","]=1;
+_st($2)._nextPutAll_($3);
+$5=_st($1)._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",
@@ -345,6 +424,7 @@ var $1,$2;
 $1=aStream;
 _st($1)._nextPutAll_(" !");
 _st($1)._lf();
+$ctx1.sendIdx["lf"]=1;
 $2=_st($1)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportProtocolEpilogueOf:on:",{aProtocol:aProtocol,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aProtocol", "aStream"],
@@ -361,10 +441,18 @@ category: 'output',
 fn: function (aProtocol,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3,$5,$7,$6,$4;
 $1=aStream;
-_st($1)._nextPutAll_("!".__comma(self._classNameFor_(_st(aProtocol)._theClass())));
-$2=_st($1)._nextPutAll_(_st(" methodsFor: '".__comma(_st(aProtocol)._name())).__comma("'!"));
+$2=$1;
+$3="!".__comma(self._classNameFor_(_st(aProtocol)._theClass()));
+$ctx1.sendIdx[","]=1;
+_st($2)._nextPutAll_($3);
+$ctx1.sendIdx["nextPutAll:"]=1;
+$5=$1;
+$7=" methodsFor: '".__comma(_st(aProtocol)._name());
+$6=_st($7).__comma("'!");
+$ctx1.sendIdx[","]=2;
+$4=_st($5)._nextPutAll_($6);
 return self}, function($ctx1) {$ctx1.fill(self,"exportProtocolPrologueOf:on:",{aProtocol:aProtocol,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aProtocol", "aStream"],
 source: "exportProtocolPrologueOf: aProtocol on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aProtocol theClass);\x0a\x09\x09nextPutAll: ' methodsFor: ''', aProtocol name, '''!'",
@@ -405,10 +493,11 @@ function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 function $MethodCategory(){return smalltalk.MethodCategory||(typeof MethodCategory=="undefined"?nil:MethodCategory)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $2,$1,$3;
 name=_st(aPackage)._name();
 result=_st($OrderedCollection())._new();
-_st(_st($Package())._sortedClasses_(_st(_st($Smalltalk())._current())._classes()))._do_((function(each){
+$ctx1.sendIdx["new"]=1;
+$1=_st(_st($Package())._sortedClasses_(_st(_st($Smalltalk())._current())._classes()))._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st([each,_st(each)._class()])._do_((function(aClass){
 return smalltalk.withContext(function($ctx3) {
@@ -416,8 +505,8 @@ map=_st($Dictionary())._new();
 map;
 _st(aClass)._protocolsDo_((function(category,methods){
 return smalltalk.withContext(function($ctx4) {
-$1=_st(category).__eq("*".__comma(name));
-if(smalltalk.assert($1)){
+$2=_st(category).__eq("*".__comma(name));
+if(smalltalk.assert($2)){
 return _st(map)._at_put_(category,methods);
 };
 }, function($ctx4) {$ctx4.fillBlock({category:category,methods:methods},$ctx3,3)})}));
@@ -430,8 +519,9 @@ return _st($MethodCategory())._name_theClass_methods_(category,aClass,_st(map)._
 }, function($ctx4) {$ctx4.fillBlock({category:category},$ctx3,6)})})));
 }, function($ctx3) {$ctx3.fillBlock({aClass:aClass},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$2=result;
-return $2;
+$ctx1.sendIdx["do:"]=1;
+$3=result;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"extensionCategoriesOfPackage:",{aPackage:aPackage,name:name,map:map,result:result},smalltalk.ChunkExporter)})},
 args: ["aPackage"],
 source: "extensionCategoriesOfPackage: aPackage\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| name map result |\x0a\x09name := aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [ :each |\x0a\x09\x09{each. each class} do: [ :aClass |\x0a\x09\x09\x09map := Dictionary new.\x0a\x09\x09\x09aClass protocolsDo: [ :category :methods |\x0a\x09\x09\x09\x09category = ('*', name) ifTrue: [ map at: category put: methods ] ].\x0a\x09\x09\x09result addAll: ((map keys sorted: [:a :b | a <= b ]) collect: [ :category |\x0a\x09\x09\x09\x09MethodCategory name: category theClass: aClass methods: (map at: category) ]) ] ].\x0a\x09^result",
@@ -526,13 +616,15 @@ category: 'convenience',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$3,$4,$1;
 $2=_st(aClass)._isMetaclass();
 if(smalltalk.assert($2)){
-$1=_st(_st(_st(aClass)._instanceClass())._name()).__comma(".klass");
+$3=_st(_st(aClass)._instanceClass())._name();
+$ctx1.sendIdx["name"]=1;
+$1=_st($3).__comma(".klass");
 } else {
-$3=_st(aClass)._isNil();
-if(smalltalk.assert($3)){
+$4=_st(aClass)._isNil();
+if(smalltalk.assert($4)){
 $1="nil";
 } else {
 $1=_st(aClass)._name();
@@ -554,36 +646,77 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$7;
+var $1,$2,$5,$4,$3,$6,$8,$7,$9,$10,$12,$11,$13,$14,$15,$16,$18,$17,$19,$20,$21,$22,$24,$23,$25,$26;
 $1=aStream;
 _st($1)._lf();
+$ctx1.sendIdx["lf"]=1;
 _st($1)._nextPutAll_("smalltalk.addClass(");
-_st($1)._nextPutAll_(_st("'".__comma(self._classNameFor_(aClass))).__comma("', "));
-_st($1)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aClass)._superclass())));
-$2=_st($1)._nextPutAll_(", [");
+$ctx1.sendIdx["nextPutAll:"]=1;
+$2=$1;
+$5=self._classNameFor_(aClass);
+$ctx1.sendIdx["classNameFor:"]=1;
+$4="'".__comma($5);
+$ctx1.sendIdx[","]=2;
+$3=_st($4).__comma("', ");
+$ctx1.sendIdx[","]=1;
+_st($2)._nextPutAll_($3);
+$ctx1.sendIdx["nextPutAll:"]=2;
+$6=$1;
+$8=self._classNameFor_(_st(aClass)._superclass());
+$ctx1.sendIdx["classNameFor:"]=2;
+$7="smalltalk.".__comma($8);
+$ctx1.sendIdx[","]=3;
+_st($6)._nextPutAll_($7);
+$ctx1.sendIdx["nextPutAll:"]=3;
+$9=_st($1)._nextPutAll_(", [");
+$ctx1.sendIdx["nextPutAll:"]=4;
 _st(_st(aClass)._instanceVariableNames())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(aStream)._nextPutAll_(_st("'".__comma(each)).__comma("'"));
+$10=aStream;
+$12="'".__comma(each);
+$ctx2.sendIdx[","]=5;
+$11=_st($12).__comma("'");
+$ctx2.sendIdx[","]=4;
+return _st($10)._nextPutAll_($11);
+$ctx2.sendIdx["nextPutAll:"]=5;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(", ");
+$ctx2.sendIdx["nextPutAll:"]=6;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$3=aStream;
-_st($3)._nextPutAll_("], '");
-_st($3)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
-$4=_st($3)._nextPutAll_(");");
-$5=_st(_st(aClass)._comment())._notEmpty();
-if(smalltalk.assert($5)){
-$6=aStream;
-_st($6)._lf();
-_st($6)._nextPutAll_("smalltalk.");
-_st($6)._nextPutAll_(self._classNameFor_(aClass));
-_st($6)._nextPutAll_(".comment=");
-_st($6)._nextPutAll_(_st(_st(aClass)._comment())._asJavascript());
-$7=_st($6)._nextPutAll_(";");
-$7;
+$13=aStream;
+_st($13)._nextPutAll_("], '");
+$ctx1.sendIdx["nextPutAll:"]=7;
+$14=$13;
+$15=_st(_st(aClass)._category()).__comma("'");
+_st($14)._nextPutAll_($15);
+$ctx1.sendIdx["nextPutAll:"]=8;
+$16=_st($13)._nextPutAll_(");");
+$ctx1.sendIdx["nextPutAll:"]=9;
+$18=_st(aClass)._comment();
+$ctx1.sendIdx["comment"]=1;
+$17=_st($18)._notEmpty();
+if(smalltalk.assert($17)){
+$19=aStream;
+_st($19)._lf();
+$ctx1.sendIdx["lf"]=2;
+_st($19)._nextPutAll_("smalltalk.");
+$ctx1.sendIdx["nextPutAll:"]=10;
+$20=$19;
+$21=self._classNameFor_(aClass);
+_st($20)._nextPutAll_($21);
+$ctx1.sendIdx["nextPutAll:"]=11;
+_st($19)._nextPutAll_(".comment=");
+$ctx1.sendIdx["nextPutAll:"]=12;
+$22=$19;
+$24=_st(aClass)._comment();
+$23=_st($24)._asJavascript();
+_st($22)._nextPutAll_($23);
+$ctx1.sendIdx["nextPutAll:"]=13;
+$25=_st($19)._nextPutAll_(";");
+$25;
 };
-_st(aStream)._lf();
+$26=_st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
 args: ["aClass", "aStream"],
 source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.addClass(';\x0a\x09\x09nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09\x09separatedBy: [aStream nextPutAll: ', '].\x0a\x09aStream\x0a\x09\x09nextPutAll: '], ''';\x0a\x09\x09nextPutAll: aClass category, '''';\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.';\x0a\x09\x09nextPutAll: (self classNameFor: aClass);\x0a\x09\x09nextPutAll: '.comment=';\x0a\x09\x09nextPutAll: aClass comment asJavascript;\x0a\x09\x09nextPutAll: ';'].\x0a\x09aStream lf",
@@ -600,22 +733,47 @@ fn: function (aClass,aStream){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
-_st(aStream)._lf();
-$1=_st(_st(_st(aClass)._class())._instanceVariableNames())._isEmpty();
-if(! smalltalk.assert($1)){
-$2=aStream;
-_st($2)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aClass)._class())));
-$3=_st($2)._nextPutAll_(".iVarNames = [");
-$3;
-_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
+var $1,$4,$3,$2,$5,$6,$9,$8,$7,$10,$12,$11,$13,$15,$14,$16,$18,$17;
+$1=_st(aStream)._lf();
+$ctx1.sendIdx["lf"]=1;
+$4=_st(aClass)._class();
+$ctx1.sendIdx["class"]=1;
+$3=_st($4)._instanceVariableNames();
+$ctx1.sendIdx["instanceVariableNames"]=1;
+$2=_st($3)._isEmpty();
+if(! smalltalk.assert($2)){
+$5=aStream;
+$6=$5;
+$9=_st(aClass)._class();
+$ctx1.sendIdx["class"]=2;
+$8=self._classNameFor_($9);
+$7="smalltalk.".__comma($8);
+$ctx1.sendIdx[","]=1;
+_st($6)._nextPutAll_($7);
+$ctx1.sendIdx["nextPutAll:"]=1;
+$10=_st($5)._nextPutAll_(".iVarNames = [");
+$ctx1.sendIdx["nextPutAll:"]=2;
+$10;
+$12=_st(aClass)._class();
+$11=_st($12)._instanceVariableNames();
+_st($11)._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(aStream)._nextPutAll_(_st("'".__comma(each)).__comma("'"));
+$13=aStream;
+$15="'".__comma(each);
+$ctx2.sendIdx[","]=3;
+$14=_st($15).__comma("'");
+$ctx2.sendIdx[","]=2;
+return _st($13)._nextPutAll_($14);
+$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)})}));
-_st(aStream)._nextPutAll_("];".__comma(_st($String())._lf()));
+$16=aStream;
+$18=_st($String())._lf();
+$17="];".__comma($18);
+_st($16)._nextPutAll_($17);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
 args: ["aClass", "aStream"],
@@ -632,33 +790,99 @@ category: 'output',
 fn: function (aMethod,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2,$5,$4,$3,$6,$8,$7,$9,$11,$10,$12,$15,$14,$13,$16,$19,$18,$17,$20,$23,$22,$21,$25,$27,$26,$24,$28,$29,$30,$31;
 $1=aStream;
 _st($1)._nextPutAll_("smalltalk.addMethod(");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._lf();
+$ctx1.sendIdx["lf"]=1;
 _st($1)._nextPutAll_("smalltalk.method({");
+$ctx1.sendIdx["nextPutAll:"]=2;
 _st($1)._lf();
-_st($1)._nextPutAll_(_st("selector: ".__comma(_st(_st(aMethod)._selector())._asJavascript())).__comma(","));
+$ctx1.sendIdx["lf"]=2;
+$2=$1;
+$5=_st(_st(aMethod)._selector())._asJavascript();
+$ctx1.sendIdx["asJavascript"]=1;
+$4="selector: ".__comma($5);
+$ctx1.sendIdx[","]=2;
+$3=_st($4).__comma(",");
+$ctx1.sendIdx[","]=1;
+_st($2)._nextPutAll_($3);
+$ctx1.sendIdx["nextPutAll:"]=3;
 _st($1)._lf();
-_st($1)._nextPutAll_(_st("category: '".__comma(_st(aMethod)._category())).__comma("',"));
+$ctx1.sendIdx["lf"]=3;
+$6=$1;
+$8="category: '".__comma(_st(aMethod)._category());
+$ctx1.sendIdx[","]=4;
+$7=_st($8).__comma("',");
+$ctx1.sendIdx[","]=3;
+_st($6)._nextPutAll_($7);
+$ctx1.sendIdx["nextPutAll:"]=4;
 _st($1)._lf();
-_st($1)._nextPutAll_(_st("fn: ".__comma(_st(_st(aMethod)._fn())._compiledSource())).__comma(","));
+$ctx1.sendIdx["lf"]=4;
+$9=$1;
+$11="fn: ".__comma(_st(_st(aMethod)._fn())._compiledSource());
+$ctx1.sendIdx[","]=6;
+$10=_st($11).__comma(",");
+$ctx1.sendIdx[","]=5;
+_st($9)._nextPutAll_($10);
+$ctx1.sendIdx["nextPutAll:"]=5;
 _st($1)._lf();
-_st($1)._nextPutAll_(_st("args: ".__comma(_st(_st(aMethod)._arguments())._asJavascript())).__comma(","));
+$ctx1.sendIdx["lf"]=5;
+$12=$1;
+$15=_st(_st(aMethod)._arguments())._asJavascript();
+$ctx1.sendIdx["asJavascript"]=2;
+$14="args: ".__comma($15);
+$ctx1.sendIdx[","]=8;
+$13=_st($14).__comma(",");
+$ctx1.sendIdx[","]=7;
+_st($12)._nextPutAll_($13);
+$ctx1.sendIdx["nextPutAll:"]=6;
 _st($1)._lf();
-_st($1)._nextPutAll_(_st("source: ".__comma(_st(_st(aMethod)._source())._asJavascript())).__comma(","));
+$ctx1.sendIdx["lf"]=6;
+$16=$1;
+$19=_st(_st(aMethod)._source())._asJavascript();
+$ctx1.sendIdx["asJavascript"]=3;
+$18="source: ".__comma($19);
+$ctx1.sendIdx[","]=10;
+$17=_st($18).__comma(",");
+$ctx1.sendIdx[","]=9;
+_st($16)._nextPutAll_($17);
+$ctx1.sendIdx["nextPutAll:"]=7;
 _st($1)._lf();
-_st($1)._nextPutAll_(_st("messageSends: ".__comma(_st(_st(aMethod)._messageSends())._asJavascript())).__comma(","));
+$ctx1.sendIdx["lf"]=7;
+$20=$1;
+$23=_st(_st(aMethod)._messageSends())._asJavascript();
+$ctx1.sendIdx["asJavascript"]=4;
+$22="messageSends: ".__comma($23);
+$ctx1.sendIdx[","]=12;
+$21=_st($22).__comma(",");
+$ctx1.sendIdx[","]=11;
+_st($20)._nextPutAll_($21);
+$ctx1.sendIdx["nextPutAll:"]=8;
 _st($1)._lf();
-$2=_st($1)._nextPutAll_("referencedClasses: ".__comma(_st(_st(aMethod)._referencedClasses())._asJavascript()));
-$3=aStream;
-_st($3)._lf();
-_st($3)._nextPutAll_("}),");
-_st($3)._lf();
-_st($3)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass())));
-_st($3)._nextPutAll_(");");
-_st($3)._lf();
-$4=_st($3)._lf();
+$ctx1.sendIdx["lf"]=8;
+$25=$1;
+$27=_st(_st(aMethod)._referencedClasses())._asJavascript();
+$26="referencedClasses: ".__comma($27);
+$ctx1.sendIdx[","]=13;
+$24=_st($25)._nextPutAll_($26);
+$ctx1.sendIdx["nextPutAll:"]=9;
+$28=aStream;
+_st($28)._lf();
+$ctx1.sendIdx["lf"]=9;
+_st($28)._nextPutAll_("}),");
+$ctx1.sendIdx["nextPutAll:"]=10;
+_st($28)._lf();
+$ctx1.sendIdx["lf"]=10;
+$29=$28;
+$30="smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass()));
+_st($29)._nextPutAll_($30);
+$ctx1.sendIdx["nextPutAll:"]=11;
+_st($28)._nextPutAll_(");");
+_st($28)._lf();
+$ctx1.sendIdx["lf"]=11;
+$31=_st($28)._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",
@@ -674,25 +898,32 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._exportPackagePrologueOf_on_(aPackage,aStream);
-_st($1)._exportPackageDefinitionOf_on_(aPackage,aStream);
-$2=_st($1)._exportPackageTransportOf_on_(aPackage,aStream);
-_st(_st(aPackage)._sortedClasses())._do_((function(each){
+var $1,$3,$4,$2,$5;
+self._exportPackagePrologueOf_on_(aPackage,aStream);
+self._exportPackageDefinitionOf_on_(aPackage,aStream);
+$1=self._exportPackageTransportOf_on_(aPackage,aStream);
+$2=_st(_st(aPackage)._sortedClasses())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 self._exportDefinitionOf_on_(each,aStream);
-_st(_st(each)._ownMethods())._do_((function(method){
+$3=_st(each)._ownMethods();
+$ctx2.sendIdx["ownMethods"]=1;
+_st($3)._do_((function(method){
 return smalltalk.withContext(function($ctx3) {
 return self._exportMethod_on_(method,aStream);
+$ctx3.sendIdx["exportMethod:on:"]=1;
 }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,2)})}));
+$ctx2.sendIdx["do:"]=2;
 self._exportMetaDefinitionOf_on_(each,aStream);
-return _st(_st(_st(each)._class())._ownMethods())._do_((function(method){
+$4=_st(_st(each)._class())._ownMethods();
+return _st($4)._do_((function(method){
 return smalltalk.withContext(function($ctx3) {
 return self._exportMethod_on_(method,aStream);
+$ctx3.sendIdx["exportMethod:on:"]=2;
 }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,3)})}));
+$ctx2.sendIdx["do:"]=3;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-_st(self._extensionMethodsOfPackage_(aPackage))._do_((function(each){
+$ctx1.sendIdx["do:"]=1;
+$5=_st(self._extensionMethodsOfPackage_(aPackage))._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._exportMethod_on_(each,aStream);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
@@ -712,11 +943,16 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$4,$3,$5;
 $1=aStream;
 _st($1)._nextPutAll_("smalltalk.addPackage(");
-_st($1)._nextPutAll_(_st("'".__comma(_st(aPackage)._name())).__comma("');"));
-$2=_st($1)._lf();
+$ctx1.sendIdx["nextPutAll:"]=1;
+$2=$1;
+$4="'".__comma(_st(aPackage)._name());
+$3=_st($4).__comma("');");
+$ctx1.sendIdx[","]=1;
+_st($2)._nextPutAll_($3);
+$5=_st($1)._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",
@@ -773,9 +1009,13 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2;
 $1=aStream;
 _st($1)._nextPutAll_("smalltalk.packages[");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._nextPutAll_(_st(_st(aPackage)._name())._asJavascript());
+$ctx1.sendIdx["nextPutAll:"]=2;
 _st($1)._nextPutAll_("].transport = ");
+$ctx1.sendIdx["nextPutAll:"]=3;
 _st($1)._nextPutAll_(_st(_st(aPackage)._transport())._asJSONString());
+$ctx1.sendIdx["nextPutAll:"]=4;
 _st($1)._nextPutAll_(";");
 $2=_st($1)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportPackageTransportOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
@@ -793,10 +1033,13 @@ category: 'accessing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$3,$1;
 $1=_st(_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
+$2=_st(a)._selector();
+$ctx2.sendIdx["selector"]=1;
+$3=_st(b)._selector();
+return _st($2).__lt_eq($3);
 }, 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*");
@@ -839,13 +1082,18 @@ category: 'private',
 fn: function (anArray){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$4,$3,$1;
 $1=_st(_st(anArray)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(self._amdNamespaceOfPackage_(each))._notNil();
+$2=self._amdNamespaceOfPackage_(each);
+$ctx2.sendIdx["amdNamespaceOfPackage:"]=1;
+return _st($2)._notNil();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(self._amdNamespaceOfPackage_(each)).__comma("/")).__comma(_st(each)._name());
+$4=self._amdNamespaceOfPackage_(each);
+$3=_st($4).__comma("/");
+return _st($3).__comma(_st(each)._name());
+$ctx2.sendIdx[","]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"amdNamesOfPackages:",{anArray:anArray},smalltalk.AmdExporter)})},
@@ -863,10 +1111,14 @@ category: 'private',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(_st(_st(aPackage)._transport())._type()).__eq("amd");
+var $4,$3,$2,$5,$1;
+$4=_st(aPackage)._transport();
+$ctx1.sendIdx["transport"]=1;
+$3=_st($4)._type();
+$2=_st($3).__eq("amd");
 if(smalltalk.assert($2)){
-$1=_st(_st(aPackage)._transport())._namespace();
+$5=_st(aPackage)._transport();
+$1=_st($5)._namespace();
 } else {
 $1=nil;
 };
@@ -908,11 +1160,17 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2;
 $1=aStream;
 _st($1)._nextPutAll_("define(\x22");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._nextPutAll_(self._amdNamespaceOfPackage_(aPackage));
+$ctx1.sendIdx["nextPutAll:"]=2;
 _st($1)._nextPutAll_("/");
+$ctx1.sendIdx["nextPutAll:"]=3;
 _st($1)._nextPutAll_(_st(aPackage)._name());
+$ctx1.sendIdx["nextPutAll:"]=4;
 _st($1)._nextPutAll_("\x22, ");
+$ctx1.sendIdx["nextPutAll:"]=5;
 _st($1)._nextPutAll_(_st(["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st"].__comma(self._amdNamesOfPackages_(_st(aPackage)._loadDependencies())))._asJavascript());
+$ctx1.sendIdx["nextPutAll:"]=6;
 _st($1)._nextPutAll_(", function(smalltalk,nil,_st){");
 $2=_st($1)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.AmdExporter)})},
@@ -942,11 +1200,13 @@ result=""._writeStream();
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 char=_st(self["@stream"])._next();
+$ctx2.sendIdx["next"]=1;
 char;
 return _st(char)._notNil();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(char).__eq("!");
+$ctx2.sendIdx["="]=1;
 if(smalltalk.assert($1)){
 $2=_st(_st(self["@stream"])._peek()).__eq("!");
 if(smalltalk.assert($2)){
@@ -1014,10 +1274,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$3,$1;
 $1=_st(_st(self._theClass())._methodsInProtocol_(self._name()))._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
+$2=_st(a)._selector();
+$ctx2.sendIdx["selector"]=1;
+$3=_st(b)._selector();
+return _st($2).__lt_eq($3);
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methods",{},smalltalk.ExportMethodProtocol)})},
@@ -1176,10 +1439,28 @@ category: 'private',
 fn: function (aURL,aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._ajax_(smalltalk.HashedCollection._from_(["url".__minus_gt(aURL),"type".__minus_gt("PUT"),"data".__minus_gt(aString),"contentType".__minus_gt("text/plain;charset=UTF-8"),"error".__minus_gt((function(xhr){
+var $2,$3,$4,$5,$10,$9,$8,$7,$6,$1;
+$2="url".__minus_gt(aURL);
+$ctx1.sendIdx["->"]=1;
+$3="type".__minus_gt("PUT");
+$ctx1.sendIdx["->"]=2;
+$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){
 return smalltalk.withContext(function($ctx2) {
-return self._error_(_st(_st(_st("Commiting ".__comma(aURL)).__comma(" failed with reason: \x22")).__comma(_st(xhr)._responseText())).__comma("\x22"));
-}, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1,1)})}))]));
+$10="Commiting ".__comma(aURL);
+$9=_st($10).__comma(" failed with reason: \x22");
+$ctx2.sendIdx[","]=3;
+$8=_st($9).__comma(_st(xhr)._responseText());
+$ctx2.sendIdx[","]=2;
+$7=_st($8).__comma("\x22");
+$ctx2.sendIdx[","]=1;
+return self._error_($7);
+}, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1,1)})}));
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6]);
+self._ajax_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.PackageHandler)})},
 args: ["aURL", "aString"],
 source: "ajaxPutAt: aURL data: aString\x0a\x09self\x0a\x09\x09ajax: #{\x0a\x09\x09\x09'url' -> aURL.\x0a\x09\x09\x09'type' -> 'PUT'.\x0a\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09'error' -> [ :xhr | self error: 'Commiting ' , aURL , ' failed with reason: \x22' , (xhr responseText) , '\x22'] }",
@@ -1279,7 +1560,13 @@ category: 'committing',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._ajaxPutAt_data_(_st(_st(_st(self._commitPathJsFor_(aPackage)).__comma("/")).__comma(_st(aPackage)._name())).__comma(".js"),self._contentsFor_(aPackage));
+var $3,$2,$1;
+$3=_st(self._commitPathJsFor_(aPackage)).__comma("/");
+$2=_st($3).__comma(_st(aPackage)._name());
+$ctx1.sendIdx[","]=2;
+$1=_st($2).__comma(".js");
+$ctx1.sendIdx[","]=1;
+self._ajaxPutAt_data_($1,self._contentsFor_(aPackage));
 return self}, function($ctx1) {$ctx1.fill(self,"commitJsFileFor:",{aPackage:aPackage},smalltalk.PackageHandler)})},
 args: ["aPackage"],
 source: "commitJsFileFor: aPackage\x0a\x09self \x0a\x09\x09ajaxPutAt: (self commitPathJsFor: aPackage), '/', aPackage name, '.js'\x0a\x09\x09data: (self contentsFor: aPackage)",
@@ -1327,7 +1614,13 @@ category: 'committing',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._ajaxPutAt_data_(_st(_st(_st(self._commitPathStFor_(aPackage)).__comma("/")).__comma(_st(aPackage)._name())).__comma(".st"),self._chunkContentsFor_(aPackage));
+var $3,$2,$1;
+$3=_st(self._commitPathStFor_(aPackage)).__comma("/");
+$2=_st($3).__comma(_st(aPackage)._name());
+$ctx1.sendIdx[","]=2;
+$1=_st($2).__comma(".st");
+$ctx1.sendIdx[","]=1;
+self._ajaxPutAt_data_($1,self._chunkContentsFor_(aPackage));
 return self}, function($ctx1) {$ctx1.fill(self,"commitStFileFor:",{aPackage:aPackage},smalltalk.PackageHandler)})},
 args: ["aPackage"],
 source: "commitStFileFor: aPackage\x0a\x09self \x0a\x09\x09ajaxPutAt: (self commitPathStFor: aPackage), '/', aPackage name, '.st'\x0a\x09\x09data: (self chunkContentsFor: aPackage)",
@@ -1741,6 +2034,7 @@ var $1,$2,$4,$5,$3;
 $1=anObject;
 if(($receiver = $1) == nil || $receiver == null){
 $2=self._for_(self._defaultType());
+$ctx1.sendIdx["for:"]=1;
 return $2;
 } else {
 $1;
@@ -1800,12 +2094,15 @@ category: 'registration',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2,$3;
 $1=_st(aClass)._type();
+$ctx1.sendIdx["type"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-_st(self["@registry"])._at_put_(_st(aClass)._type(),aClass);
+$2=self["@registry"];
+$3=_st(aClass)._type();
+_st($2)._at_put_($3,aClass);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"register:",{aClass:aClass},smalltalk.PackageTransport.klass)})},
 args: ["aClass"],

+ 27 - 13
js/Kernel-Announcements.js

@@ -102,14 +102,22 @@ fn: function (anAnnouncement){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(_st($Smalltalk())._current())._at_(_st(self._announcementClass())._name());
+var $3,$4,$2,$6,$7,$5,$1;
+$3=_st($Smalltalk())._current();
+$ctx1.sendIdx["current"]=1;
+$4=_st(self._announcementClass())._name();
+$ctx1.sendIdx["name"]=1;
+$2=_st($3)._at_($4);
+$ctx1.sendIdx["at:"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 return false;
 } else {
 var class_;
 class_=$receiver;
-$1=_st(_st(_st($Smalltalk())._current())._at_(_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name()))._includesBehavior_(class_);
+$6=_st($Smalltalk())._current();
+$7=_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name();
+$5=_st($6)._at_($7);
+$1=_st($5)._includesBehavior_(class_);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
@@ -244,16 +252,22 @@ var self=this;
 function $AnnouncementSubscription(){return smalltalk.AnnouncementSubscription||(typeof AnnouncementSubscription=="undefined"?nil:AnnouncementSubscription)}
 function $MessageSend(){return smalltalk.MessageSend||(typeof MessageSend=="undefined"?nil:MessageSend)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
-$1=_st($AnnouncementSubscription())._new();
-$2=_st($MessageSend())._new();
-_st($2)._receiver_(anObject);
-_st($2)._selector_(aSelector);
-$3=_st($2)._yourself();
-_st($1)._valuable_($3);
-_st($1)._announcementClass_(aClass);
-$4=_st($1)._yourself();
-_st(self["@subscriptions"])._add_($4);
+var $1,$3,$4,$6,$7,$5,$8,$2;
+$1=self["@subscriptions"];
+$3=_st($AnnouncementSubscription())._new();
+$ctx1.sendIdx["new"]=1;
+$4=$3;
+$6=_st($MessageSend())._new();
+_st($6)._receiver_(anObject);
+_st($6)._selector_(aSelector);
+$7=_st($6)._yourself();
+$ctx1.sendIdx["yourself"]=1;
+$5=$7;
+_st($4)._valuable_($5);
+_st($3)._announcementClass_(aClass);
+$8=_st($3)._yourself();
+$2=$8;
+_st($1)._add_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"on:send:to:",{aClass:aClass,aSelector:aSelector,anObject:anObject},smalltalk.Announcer)})},
 args: ["aClass", "aSelector", "anObject"],
 source: "on: aClass send: aSelector to: anObject\x0a\x09subscriptions add: (AnnouncementSubscription new\x0a\x09\x09valuable: (MessageSend new\x0a\x09\x09\x09receiver: anObject;\x0a\x09\x09\x09selector: aSelector;\x0a\x09\x09\x09yourself);\x0a\x09\x09announcementClass: aClass;\x0a\x09\x09yourself)",

+ 259 - 126
js/Kernel-Classes.js

@@ -33,28 +33,36 @@ 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 $1,$2,$3,$4,$5,$6;
+var $2,$3,$1,$4,$5,$6,$7,$8,$9,$10;
 oldMethod=_st(self._methodDictionary())._at_ifAbsent_(_st(aMethod)._selector(),(function(){
 return smalltalk.withContext(function($ctx2) {
 return nil;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$1=_st(self._protocols())._includes_(_st(aMethod)._protocol());
+$2=self._protocols();
+$3=_st(aMethod)._protocol();
+$ctx1.sendIdx["protocol"]=1;
+$1=_st($2)._includes_($3);
 if(! smalltalk.assert($1)){
-_st(self._organization())._addElement_(_st(aMethod)._protocol());
+$4=self._organization();
+$5=_st(aMethod)._protocol();
+_st($4)._addElement_($5);
 };
 self._basicAddCompiledMethod_(aMethod);
-$2=oldMethod;
-if(($receiver = $2) == nil || $receiver == null){
-$3=_st($MethodAdded())._new();
-_st($3)._method_(aMethod);
-$4=_st($3)._yourself();
-announcement=$4;
+$6=oldMethod;
+if(($receiver = $6) == nil || $receiver == null){
+$7=_st($MethodAdded())._new();
+$ctx1.sendIdx["new"]=1;
+_st($7)._method_(aMethod);
+$ctx1.sendIdx["method:"]=1;
+$8=_st($7)._yourself();
+$ctx1.sendIdx["yourself"]=1;
+announcement=$8;
 } else {
-$5=_st($MethodModified())._new();
-_st($5)._oldMethod_(oldMethod);
-_st($5)._method_(aMethod);
-$6=_st($5)._yourself();
-announcement=$6;
+$9=_st($MethodModified())._new();
+_st($9)._oldMethod_(oldMethod);
+_st($9)._method_(aMethod);
+$10=_st($9)._yourself();
+announcement=$10;
 };
 _st(_st($SystemAnnouncer())._current())._announce_(announcement);
 return self}, function($ctx1) {$ctx1.fill(self,"addCompiledMethod:",{aMethod:aMethod,oldMethod:oldMethod,announcement:announcement},smalltalk.Behavior)})},
@@ -73,16 +81,20 @@ fn: function (){
 var self=this;
 var result;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$4,$3,$5;
 result=_st(self._instanceVariableNames())._copy();
 $1=self._superclass();
+$ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-_st(result)._addAll_(_st(self._superclass())._allInstanceVariableNames());
-};
 $2=result;
-return $2;
+$4=self._superclass();
+$3=_st($4)._allInstanceVariableNames();
+_st($2)._addAll_($3);
+};
+$5=result;
+return $5;
 }, 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",
@@ -98,13 +110,18 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
-$1=_st(self._allSuperclasses())._inject_into_(self._selectors(),(function(acc,each){
+var $2,$3,$4,$5,$6,$7,$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) {
-$2=acc;
-_st($2)._addAll_(_st(each)._selectors());
-$3=_st($2)._yourself();
-return $3;
+$4=acc;
+$5=$4;
+$6=_st(each)._selectors();
+_st($5)._addAll_($6);
+$7=_st($4)._yourself();
+return $7;
 }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Behavior)})},
@@ -123,20 +140,23 @@ fn: function (){
 var self=this;
 var subclasses,index;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2,$3;
 subclasses=self._subclasses();
+$ctx1.sendIdx["subclasses"]=1;
 index=(1);
 _st((function(){
 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) {
-_st(subclasses)._addAll_(_st(_st(subclasses)._at_(index))._subclasses());
+$1=subclasses;
+$2=_st(_st(subclasses)._at_(index))._subclasses();
+_st($1)._addAll_($2);
 index=_st(index).__plus((1));
 return index;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$1=subclasses;
-return $1;
+$3=subclasses;
+return $3;
 }, 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",
@@ -172,18 +192,25 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$3;
+var $1,$2,$5,$6,$4,$7,$9,$8,$10,$3;
 $1=self._superclass();
+$ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $2=[];
 return $2;
 } else {
 $1;
 };
-$4=_st($OrderedCollection())._with_(self._superclass());
-_st($4)._addAll_(_st(self._superclass())._allSuperclasses());
-$5=_st($4)._yourself();
-$3=$5;
+$5=$OrderedCollection();
+$6=self._superclass();
+$ctx1.sendIdx["superclass"]=2;
+$4=_st($5)._with_($6);
+$7=$4;
+$9=self._superclass();
+$8=_st($9)._allSuperclasses();
+_st($7)._addAll_($8);
+$10=_st($4)._yourself();
+$3=$10;
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"allSuperclasses",{},smalltalk.Behavior)})},
 args: [],
@@ -248,12 +275,16 @@ category: 'testing',
 fn: function (aSelector){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $3,$2,$4,$1;
 $1=_st(_st(_st(self._methodDictionary())._keys())._includes_(_st(aSelector)._asString()))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(self._superclass())._notNil())._and_((function(){
+$3=self._superclass();
+$ctx2.sendIdx["superclass"]=1;
+$2=_st($3)._notNil();
+return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-return _st(self._superclass())._canUnderstand_(aSelector);
+$4=self._superclass();
+return _st($4)._canUnderstand_(aSelector);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
@@ -450,16 +481,22 @@ category: 'testing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$4,$5,$3,$6,$2;
 $1=self._superclass();
+$ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 return false;
 } else {
 $1;
 };
-$2=_st(_st(aClass).__eq_eq(self._superclass()))._or_((function(){
+$4=aClass;
+$5=self._superclass();
+$ctx1.sendIdx["superclass"]=2;
+$3=_st($4).__eq_eq($5);
+$2=_st($3)._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(self._superclass())._inheritsFrom_(aClass);
+$6=self._superclass();
+return _st($6)._inheritsFrom_(aClass);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"inheritsFrom:",{aClass:aClass},smalltalk.Behavior)})},
@@ -750,13 +787,16 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$3,$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));
 }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1,1)})})))._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(a)._selector()).__lt_eq(_st(b)._selector());
+$2=_st(a)._selector();
+$ctx2.sendIdx["selector"]=1;
+$3=_st(b)._selector();
+return _st($2).__lt_eq($3);
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ownMethods",{},smalltalk.Behavior)})},
@@ -816,15 +856,18 @@ var methodsByCategory;
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 methodsByCategory=_st($HashedCollection())._new();
-_st(_st(self._methodDictionary())._values())._do_((function(m){
+$ctx1.sendIdx["new"]=1;
+$1=_st(_st(self._methodDictionary())._values())._do_((function(m){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(methodsByCategory)._at_ifAbsentPut_(_st(m)._category(),(function(){
 return smalltalk.withContext(function($ctx3) {
 return _st($Array())._new();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._add_(m);
 }, function($ctx2) {$ctx2.fillBlock({m:m},$ctx1,1)})}));
-_st(self._protocols())._do_((function(category){
+$ctx1.sendIdx["do:"]=1;
+$2=_st(self._protocols())._do_((function(category){
 return smalltalk.withContext(function($ctx2) {
 return _st(aBlock)._value_value_(category,_st(methodsByCategory)._at_(category));
 }, function($ctx2) {$ctx2.fillBlock({category:category},$ctx1,3)})}));
@@ -880,19 +923,25 @@ 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;
+var $1,$2,$3,$4,$5,$6;
 self._basicRemoveCompiledMethod_(aMethod);
 _st(self._methods())._detect_ifNone_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(each)._protocol()).__eq(_st(aMethod)._protocol());
+$1=_st(each)._protocol();
+$ctx2.sendIdx["protocol"]=1;
+$2=_st(aMethod)._protocol();
+$ctx2.sendIdx["protocol"]=2;
+return _st($1).__eq($2);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(self._organization())._removeElement_(_st(aMethod)._protocol());
+$3=self._organization();
+$4=_st(aMethod)._protocol();
+return _st($3)._removeElement_($4);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$1=_st($MethodRemoved())._new();
-_st($1)._method_(aMethod);
-$2=_st($1)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($2);
+$5=_st($MethodRemoved())._new();
+_st($5)._method_(aMethod);
+$6=_st($5)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($6);
 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)",
@@ -976,9 +1025,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"theNonMetaClass",{},smalltalk.Behavior)})},
 args: [],
 source: "theNonMetaClass\x0a\x09^ self",
@@ -1038,12 +1085,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$3,$1;
 $2=self._package();
+$ctx1.sendIdx["package"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1="Unclassified";
 } else {
-$1=_st(self._package())._name();
+$3=self._package();
+$1=_st($3)._name();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.Class)})},
@@ -1062,29 +1111,52 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
+var $2,$3,$5,$6,$4,$7,$8,$9,$12,$11,$13,$10,$14,$1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 $2=stream;
 _st($2)._nextPutAll_(_st(self._superclass())._asString());
+$ctx2.sendIdx["nextPutAll:"]=1;
 _st($2)._nextPutAll_(" subclass: #");
+$ctx2.sendIdx["nextPutAll:"]=2;
 _st($2)._nextPutAll_(self._name());
-_st($2)._nextPutAll_(_st(_st($String())._lf()).__comma(_st($String())._tab()));
-$3=_st($2)._nextPutAll_("instanceVariableNames: '");
-$3;
+$ctx2.sendIdx["nextPutAll:"]=3;
+$3=$2;
+$5=_st($String())._lf();
+$ctx2.sendIdx["lf"]=1;
+$6=_st($String())._tab();
+$ctx2.sendIdx["tab"]=1;
+$4=_st($5).__comma($6);
+$ctx2.sendIdx[","]=1;
+_st($3)._nextPutAll_($4);
+$ctx2.sendIdx["nextPutAll:"]=4;
+$7=_st($2)._nextPutAll_("instanceVariableNames: '");
+$ctx2.sendIdx["nextPutAll:"]=5;
+$7;
 _st(self._instanceVariableNames())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx3) {
 return _st(stream)._nextPutAll_(each);
+$ctx3.sendIdx["nextPutAll:"]=6;
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}),(function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(stream)._nextPutAll_(" ");
+$ctx3.sendIdx["nextPutAll:"]=7;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
-$4=stream;
-_st($4)._nextPutAll_(_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab()));
-_st($4)._nextPutAll_("package: '");
-_st($4)._nextPutAll_(self._category());
-$5=_st($4)._nextPutAll_("'");
-return $5;
+$8=stream;
+$9=$8;
+$12=_st($String())._lf();
+$11="'".__comma($12);
+$13=_st($String())._tab();
+$10=_st($11).__comma($13);
+$ctx2.sendIdx[","]=2;
+_st($9)._nextPutAll_($10);
+$ctx2.sendIdx["nextPutAll:"]=8;
+_st($8)._nextPutAll_("package: '");
+$ctx2.sendIdx["nextPutAll:"]=9;
+_st($8)._nextPutAll_(self._category());
+$ctx2.sendIdx["nextPutAll:"]=10;
+$14=_st($8)._nextPutAll_("'");
+return $14;
 }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"definition",{},smalltalk.Class)})},
@@ -1139,21 +1211,25 @@ 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 $1,$2,$3,$4;
-$1=_st(self._package()).__eq(aPackage);
+var $2,$1,$3,$4,$5,$6;
+$2=self._package();
+$ctx1.sendIdx["package"]=1;
+$1=_st($2).__eq(aPackage);
 if(smalltalk.assert($1)){
-$2=self;
-return $2;
+return self;
 };
 oldPackage=self._package();
 self._basicAt_put_("pkg",aPackage);
-_st(_st(oldPackage)._organization())._removeElement_(self);
-_st(_st(aPackage)._organization())._addElement_(self);
-$3=_st($ClassMoved())._new();
-_st($3)._theClass_(self);
-_st($3)._oldPackage_(oldPackage);
-$4=_st($3)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($4);
+$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);
 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)",
@@ -1296,8 +1372,10 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st("smalltalk.".__comma(_st(self._instanceClass())._name())).__comma(".klass");
+var $2,$1;
+$2="smalltalk.".__comma(_st(self._instanceClass())._name());
+$1=_st($2).__comma(".klass");
+$ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Metaclass)})},
 args: [],
@@ -1320,14 +1398,18 @@ $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 $2=stream;
 _st($2)._nextPutAll_(self._asString());
+$ctx2.sendIdx["nextPutAll:"]=1;
 $3=_st($2)._nextPutAll_(" instanceVariableNames: '");
+$ctx2.sendIdx["nextPutAll:"]=2;
 $3;
 _st(self._instanceVariableNames())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx3) {
 return _st(stream)._nextPutAll_(each);
+$ctx3.sendIdx["nextPutAll:"]=3;
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}),(function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(stream)._nextPutAll_(" ");
+$ctx3.sendIdx["nextPutAll:"]=4;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
 return _st(stream)._nextPutAll_("'");
 }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})}));
@@ -1399,6 +1481,7 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2;
 $1=aStream;
 _st($1)._nextPutAll_(_st(self._instanceClass())._name());
+$ctx1.sendIdx["nextPutAll:"]=1;
 $2=_st($1)._nextPutAll_(" class");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Metaclass)})},
 args: ["aStream"],
@@ -1439,9 +1522,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"theMetaClass",{},smalltalk.Metaclass)})},
 args: [],
 source: "theMetaClass\x0a\x09^ self",
@@ -1676,15 +1757,42 @@ fn: function (aClass,anotherClass){
 var self=this;
 function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
 return smalltalk.withContext(function($ctx1) { 
+var $3,$2,$4,$5,$6,$7,$1,$8,$10,$9,$14,$13,$12,$15,$16,$17,$18,$11;
 _st(anotherClass)._comment_(_st(aClass)._comment());
-_st(_st(_st(aClass)._methodDictionary())._values())._do_((function(each){
+$3=_st(aClass)._methodDictionary();
+$ctx1.sendIdx["methodDictionary"]=1;
+$2=_st($3)._values();
+$ctx1.sendIdx["values"]=1;
+$1=_st($2)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st($Compiler())._new())._install_forClass_category_(_st(each)._source(),anotherClass,_st(each)._category());
+$4=_st($Compiler())._new();
+$ctx2.sendIdx["new"]=1;
+$5=_st(each)._source();
+$ctx2.sendIdx["source"]=1;
+$6=anotherClass;
+$7=_st(each)._category();
+$ctx2.sendIdx["category"]=1;
+return _st($4)._install_forClass_category_($5,$6,$7);
+$ctx2.sendIdx["install:forClass:category:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-self._basicClass_instanceVariables_(_st(anotherClass)._class(),_st(_st(aClass)._class())._instanceVariableNames());
-_st(_st(_st(_st(aClass)._class())._methodDictionary())._values())._do_((function(each){
+$ctx1.sendIdx["do:"]=1;
+$8=_st(anotherClass)._class();
+$ctx1.sendIdx["class"]=1;
+$10=_st(aClass)._class();
+$ctx1.sendIdx["class"]=2;
+$9=_st($10)._instanceVariableNames();
+self._basicClass_instanceVariables_($8,$9);
+$14=_st(aClass)._class();
+$ctx1.sendIdx["class"]=3;
+$13=_st($14)._methodDictionary();
+$12=_st($13)._values();
+$11=_st($12)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st($Compiler())._new())._install_forClass_category_(_st(each)._source(),_st(anotherClass)._class(),_st(each)._category());
+$15=_st($Compiler())._new();
+$16=_st(each)._source();
+$17=_st(anotherClass)._class();
+$18=_st(each)._category();
+return _st($15)._install_forClass_category_($16,$17,$18);
 }, 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)})},
@@ -1767,8 +1875,13 @@ category: 'class migration',
 fn: function (aClass,anotherClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self._migrateClassNamed_superclass_instanceVariableNames_package_(_st(aClass)._name(),anotherClass,_st(aClass)._instanceVariableNames(),_st(_st(aClass)._package())._name());
+var $2,$3,$4,$5,$1;
+$2=_st(aClass)._name();
+$ctx1.sendIdx["name"]=1;
+$3=anotherClass;
+$4=_st(aClass)._instanceVariableNames();
+$5=_st(_st(aClass)._package())._name();
+$1=self._migrateClassNamed_superclass_instanceVariableNames_package_($2,$3,$4,$5);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"migrateClass:superclass:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
 args: ["aClass", "anotherClass"],
@@ -1790,37 +1903,47 @@ 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,$6,$7;
+var $1,$2,$3,$4,$5,$6,$8,$7,$9,$10,$11,$12,$13;
 tmp="new*".__comma(className);
-oldClass=_st(_st($Smalltalk())._current())._at_(className);
+$ctx1.sendIdx[","]=1;
+$1=_st($Smalltalk())._current();
+$ctx1.sendIdx["current"]=1;
+oldClass=_st($1)._at_(className);
 newClass=self._addSubclassOf_named_instanceVariableNames_package_(aClass,tmp,aCollection,packageName);
-self._basicSwapClassNames_with_(oldClass,newClass);
+$2=self._basicSwapClassNames_with_(oldClass,newClass);
+$ctx1.sendIdx["basicSwapClassNames:with:"]=1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._copyClass_to_(oldClass,newClass);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(exception){
 return smalltalk.withContext(function($ctx2) {
-$1=self;
-_st($1)._basicSwapClassNames_with_(oldClass,newClass);
-$2=_st($1)._basicRemoveClass_(newClass);
-$2;
+self._basicSwapClassNames_with_(oldClass,newClass);
+$3=self._basicRemoveClass_(newClass);
+$ctx2.sendIdx["basicRemoveClass:"]=1;
+$3;
 return _st(exception)._signal();
 }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1,2)})}));
-$3=self;
-_st($3)._rawRenameClass_to_(oldClass,tmp);
-$4=_st($3)._rawRenameClass_to_(newClass,className);
-_st(_st(oldClass)._subclasses())._do_displayingProgress_((function(each){
+self._rawRenameClass_to_(oldClass,tmp);
+$ctx1.sendIdx["rawRenameClass:to:"]=1;
+$4=self._rawRenameClass_to_(newClass,className);
+$5=_st(oldClass)._subclasses();
+$6=(function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._migrateClass_superclass_(each,newClass);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}),_st("Recompiling ".__comma(_st(newClass)._name())).__comma("..."));
-self._basicRemoveClass_(oldClass);
-$5=_st($ClassMigrated())._new();
-_st($5)._theClass_(newClass);
-_st($5)._oldClass_(oldClass);
-$6=_st($5)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($6);
-$7=newClass;
-return $7;
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})});
+$8="Recompiling ".__comma(_st(newClass)._name());
+$7=_st($8).__comma("...");
+$ctx1.sendIdx[","]=2;
+_st($5)._do_displayingProgress_($6,$7);
+$9=self._basicRemoveClass_(oldClass);
+$10=_st($SystemAnnouncer())._current();
+$11=_st($ClassMigrated())._new();
+_st($11)._theClass_(newClass);
+_st($11)._oldClass_(oldClass);
+$12=_st($11)._yourself();
+_st($10)._announce_($12);
+$13=newClass;
+return $13;
 }, 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",
@@ -1915,25 +2038,24 @@ var newClass;
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$5,$7,$8,$9;
-$1=self;
-$2=aClass;
-$3=className;
-$4=self._instanceVariableNamesFor_(ivarNames);
-$6=packageName;
-if(($receiver = $6) == nil || $receiver == null){
-$5="unclassified";
+var $1,$2,$3,$5,$4,$6,$7,$8;
+$1=aClass;
+$2=className;
+$3=self._instanceVariableNamesFor_(ivarNames);
+$5=packageName;
+if(($receiver = $5) == nil || $receiver == null){
+$4="unclassified";
 } else {
-$5=$6;
+$4=$5;
 };
-newClass=_st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$5);
+newClass=self._addSubclassOf_named_instanceVariableNames_package_($1,$2,$3,$4);
 self._setupClass_(newClass);
-$7=_st($ClassAdded())._new();
-_st($7)._theClass_(newClass);
-$8=_st($7)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($8);
-$9=newClass;
-return $9;
+$6=_st($ClassAdded())._new();
+_st($6)._theClass_(newClass);
+$7=_st($6)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($7);
+$8=newClass;
+return $8;
 }, function($ctx1) {$ctx1.fill(self,"superclass:subclass:instanceVariableNames:package:",{aClass:aClass,className:className,ivarNames:ivarNames,packageName:packageName,newClass:newClass},smalltalk.ClassBuilder)})},
 args: ["aClass", "className", "ivarNames", "packageName"],
 source: "superclass: aClass subclass: className instanceVariableNames: ivarNames package: packageName\x0a\x09| newClass |\x0a\x09\x0a\x09newClass := self addSubclassOf: aClass\x0a\x09\x09named: className instanceVariableNames: (self instanceVariableNamesFor: ivarNames)\x0a\x09\x09package: (packageName ifNil: ['unclassified']).\x0a\x09self setupClass: newClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassAdded new\x0a\x09\x09\x09theClass: newClass;\x0a\x09\x09\x09yourself).\x0a\x09\x0a\x09^newClass",
@@ -2118,6 +2240,7 @@ return smalltalk.withContext(function($ctx2) {
 $1=_st(_st(each)._superclass()).__eq(self._theClass());
 if(smalltalk.assert($1)){
 return _st(children)._add_(each);
+$ctx2.sendIdx["add:"]=1;
 } else {
 return _st(others)._add_(each);
 };
@@ -2227,10 +2350,20 @@ category: 'visiting',
 fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(aCollection)._add_(self._theClass());
+var $1,$2,$4,$3,$6,$5;
+$1=aCollection;
+$2=self._theClass();
+$ctx1.sendIdx["theClass"]=1;
+_st($1)._add_($2);
 _st(_st(self._nodes())._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
+$4=_st(a)._theClass();
+$ctx2.sendIdx["theClass"]=2;
+$3=_st($4)._name();
+$ctx2.sendIdx["name"]=1;
+$6=_st(b)._theClass();
+$5=_st($6)._name();
+return _st($3).__lt_eq($5);
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._do_((function(aNode){
 return smalltalk.withContext(function($ctx2) {
 return _st(aNode)._traverseClassesWith_(aCollection);

+ 266 - 97
js/Kernel-Collections.js

@@ -11,14 +11,28 @@ category: 'comparing',
 fn: function (anAssociation){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self._class()).__eq(_st(anAssociation)._class()))._and_((function(){
+var $3,$4,$2,$6,$7,$5,$8,$9,$1;
+$3=self._class();
+$ctx1.sendIdx["class"]=1;
+$4=_st(anAssociation)._class();
+$2=_st($3).__eq($4);
+$ctx1.sendIdx["="]=1;
+$1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(self._key()).__eq(_st(anAssociation)._key()))._and_((function(){
+$6=self._key();
+$ctx2.sendIdx["key"]=1;
+$7=_st(anAssociation)._key();
+$5=_st($6).__eq($7);
+$ctx2.sendIdx["="]=2;
+return _st($5)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-return _st(self._value()).__eq(_st(anAssociation)._value());
+$8=self._value();
+$ctx3.sendIdx["value"]=1;
+$9=_st(anAssociation)._value();
+return _st($8).__eq($9);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["and:"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"=",{anAssociation:anAssociation},smalltalk.Association)})},
 args: ["anAssociation"],
@@ -69,9 +83,11 @@ category: 'printing',
 fn: function (aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(self._key())._printOn_(aStream);
+var $1,$2;
+$1=_st(self._key())._printOn_(aStream);
+$ctx1.sendIdx["printOn:"]=1;
 _st(aStream)._nextPutAll_(" -> ");
-_st(self._value())._printOn_(aStream);
+$2=_st(self._value())._printOn_(aStream);
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Association)})},
 args: ["aStream"],
 source: "printOn: aStream\x0a\x09self key printOn: aStream.\x0a\x09aStream nextPutAll: ' -> '.\x0a\x09self value printOn: aStream",
@@ -588,21 +604,24 @@ var self=this;
 var set,outputSet;
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $2,$3,$1,$4;
 set=self._asSet();
 outputSet=_st($Set())._new();
 _st(aCollection)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(_st(set)._includes_(each))._and_((function(){
+$2=_st(set)._includes_(each);
+$ctx2.sendIdx["includes:"]=1;
+$1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-return _st(_st(outputSet)._includes_(each))._not();
+$3=_st(outputSet)._includes_(each);
+return _st($3)._not();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 if(smalltalk.assert($1)){
 return _st(outputSet)._add_(each);
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$2=_st(self._class())._withAll_(_st(outputSet)._asArray());
-return $2;
+$4=_st(self._class())._withAll_(_st(outputSet)._asArray());
+return $4;
 }, 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",
@@ -787,17 +806,20 @@ fn: function (selectBlock,collectBlock){
 var self=this;
 var stream;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3,$4;
 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)){
-return _st(stream)._nextPut_(_st(collectBlock)._value_(each));
+$2=stream;
+$3=_st(collectBlock)._value_(each);
+return _st($2)._nextPut_($3);
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$2=_st(stream)._contents();
-return $2;
+$4=_st(stream)._contents();
+return $4;
 }, 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",
@@ -888,6 +910,7 @@ return smalltalk.withContext(function($ctx1) {
 var $2,$3,$1;
 $2=self._new();
 _st($2)._add_(anObject);
+$ctx1.sendIdx["add:"]=1;
 _st($2)._add_(anotherObject);
 $3=_st($2)._yourself();
 $1=$3;
@@ -910,7 +933,9 @@ return smalltalk.withContext(function($ctx1) {
 var $2,$3,$1;
 $2=self._new();
 _st($2)._add_(firstObject);
+$ctx1.sendIdx["add:"]=1;
 _st($2)._add_(secondObject);
+$ctx1.sendIdx["add:"]=2;
 _st($2)._add_(thirdObject);
 $3=_st($2)._yourself();
 $1=$3;
@@ -1136,17 +1161,28 @@ category: 'comparing',
 fn: function (aHashedCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
-$1=_st(self._class()).__eq(_st(aHashedCollection)._class());
-if(! smalltalk.assert($1)){
+var $3,$4,$2,$1,$7,$8,$6,$5,$10,$11,$9;
+$3=self._class();
+$ctx1.sendIdx["class"]=1;
+$4=_st(aHashedCollection)._class();
+$2=_st($3).__eq($4);
+$ctx1.sendIdx["="]=1;
+if(! smalltalk.assert($2)){
 return false;
 };
-$2=_st(self._size()).__eq(_st(aHashedCollection)._size());
-if(! smalltalk.assert($2)){
+$7=self._size();
+$ctx1.sendIdx["size"]=1;
+$8=_st(aHashedCollection)._size();
+$6=_st($7).__eq($8);
+$ctx1.sendIdx["="]=2;
+if(! smalltalk.assert($6)){
 return false;
 };
-$3=_st(self._associations()).__eq(_st(aHashedCollection)._associations());
-return $3;
+$10=self._associations();
+$ctx1.sendIdx["associations"]=1;
+$11=_st(aHashedCollection)._associations();
+$9=_st($10).__eq($11);
+return $9;
 }, 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",
@@ -1603,16 +1639,20 @@ category: 'printing',
 fn: function (aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-smalltalk.HashedCollection.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
-_st(aStream)._nextPutAll_(" (");
+var $1,$2,$3;
+$1=smalltalk.HashedCollection.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
+$ctx1.sendIdx["printOn:"]=1;
+$2=_st(aStream)._nextPutAll_(" (");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st(self._associations())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._printOn_(aStream);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(" , ");
+$ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-_st(aStream)._nextPutAll_(")");
+$3=_st(aStream)._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.HashedCollection)})},
 args: ["aStream"],
 source: "printOn: aStream\x0a\x09super printOn: aStream.\x0a\x09\x0a\x09aStream nextPutAll: ' ('.\x0a\x09self associations\x0a\x09\x09do: [:each | each printOn: aStream ]\x0a\x09\x09separatedBy: [ aStream nextPutAll: ' , ' ].\x0a\x09aStream nextPutAll: ')'",
@@ -1858,18 +1898,26 @@ fn: function (aCollection){
 var self=this;
 var newCollection;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st(_st(aCollection)._size())._even();
+var $2,$1,$4,$3,$5,$6,$7,$8;
+$2=_st(aCollection)._size();
+$ctx1.sendIdx["size"]=1;
+$1=_st($2)._even();
 if(! smalltalk.assert($1)){
 self._error_("#newFromPairs only accepts arrays of an even length");
 };
 newCollection=self._new();
-_st((1)._to_by_(_st(aCollection)._size(),(2)))._do_((function(each){
+$4=_st(aCollection)._size();
+$3=(1)._to_by_($4,(2));
+_st($3)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(newCollection)._at_put_(_st(aCollection)._at_(each),_st(aCollection)._at_(_st(each).__plus((1))));
+$5=newCollection;
+$6=_st(aCollection)._at_(each);
+$ctx2.sendIdx["at:"]=1;
+$7=_st(aCollection)._at_(_st(each).__plus((1)));
+return _st($5)._at_put_($6,$7);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$2=newCollection;
-return $2;
+$8=newCollection;
+return $8;
 }, 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",
@@ -2176,20 +2224,29 @@ category: 'comparing',
 fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $4,$5,$3,$6,$7,$2,$1,$8;
 var $early={};
 try {
-$1=_st(_st(self._class()).__eq(_st(aCollection)._class()))._and_((function(){
+$4=self._class();
+$ctx1.sendIdx["class"]=1;
+$5=_st(aCollection)._class();
+$3=_st($4).__eq($5);
+$ctx1.sendIdx["="]=1;
+$2=_st($3)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(self._size()).__eq(_st(aCollection)._size());
+$6=self._size();
+$ctx2.sendIdx["size"]=1;
+$7=_st(aCollection)._size();
+return _st($6).__eq($7);
+$ctx2.sendIdx["="]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-if(! smalltalk.assert($1)){
+if(! smalltalk.assert($2)){
 return false;
 };
 self._withIndexDo_((function(each,i){
 return smalltalk.withContext(function($ctx2) {
-$2=_st(_st(aCollection)._at_(i)).__eq(each);
-if(! smalltalk.assert($2)){
+$8=_st(_st(aCollection)._at_(i)).__eq(each);
+if(! smalltalk.assert($8)){
 throw $early=[false];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,3)})}));
@@ -2815,11 +2872,13 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st("[".__comma(_st(self._collect_((function(each){
+var $2,$1;
+$2="[".__comma(_st(self._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._asJavascript();
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._join_(", "))).__comma("]");
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._join_(", "));
+$1=_st($2).__comma("]");
+$ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Array)})},
 args: [],
@@ -2919,16 +2978,20 @@ category: 'printing',
 fn: function (aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-smalltalk.Array.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
-_st(aStream)._nextPutAll_(" (");
+var $1,$2,$3;
+$1=smalltalk.Array.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
+$ctx1.sendIdx["printOn:"]=1;
+$2=_st(aStream)._nextPutAll_(" (");
+$ctx1.sendIdx["nextPutAll:"]=1;
 self._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._printOn_(aStream);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(" ");
+$ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-_st(aStream)._nextPutAll_(")");
+$3=_st(aStream)._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Array)})},
 args: ["aStream"],
 source: "printOn: aStream\x0a\x09super printOn: aStream.\x0a\x09\x0a\x09aStream nextPutAll: ' ('.\x0a\x09self \x0a\x09\x09do: [ :each | each printOn: aStream ]\x0a\x09\x09separatedBy: [ aStream nextPutAll: ' ' ].\x0a\x09aStream nextPutAll: ')'",
@@ -3187,6 +3250,7 @@ return smalltalk.withContext(function($ctx1) {
 var $2,$3,$1;
 $2=self._new_((2));
 _st($2)._at_put_((1),anObject);
+$ctx1.sendIdx["at:put:"]=1;
 _st($2)._at_put_((2),anObject2);
 $3=_st($2)._yourself();
 $1=$3;
@@ -3209,7 +3273,9 @@ return smalltalk.withContext(function($ctx1) {
 var $2,$3,$1;
 $2=self._new_((3));
 _st($2)._at_put_((1),anObject);
+$ctx1.sendIdx["at:put:"]=1;
 _st($2)._at_put_((2),anObject2);
+$ctx1.sendIdx["at:put:"]=2;
 _st($2)._at_put_((3),anObject3);
 $3=_st($2)._yourself();
 $1=$3;
@@ -3259,8 +3325,11 @@ category: 'copying',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._asString()).__comma(_st(aString)._asString());
+var $2,$3,$1;
+$2=self._asString();
+$ctx1.sendIdx["asString"]=1;
+$3=_st(aString)._asString();
+$1=_st($2).__comma($3);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,",",{aString:aString},smalltalk.CharacterArray)})},
 args: ["aString"],
@@ -3603,9 +3672,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.String)})},
 args: [],
 source: "asJSON\x0a\x09^self",
@@ -3658,14 +3725,13 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=_st(self._last()).__eq(":");
 if(! smalltalk.assert($1)){
 $2=self.__comma(":");
 return $2;
 };
-$3=self;
-return $3;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"asMutator",{},smalltalk.String)})},
 args: [],
 source: "asMutator\x0a\x09\x22Answer a setter selector. For example,\x0a\x09#name asMutator returns #name:\x22\x0a\x0a\x09self last = ':' ifFalse: [  ^ self, ':' ].\x0a\x09^ self",
@@ -3732,9 +3798,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.String)})},
 args: [],
 source: "asString\x0a\x09^self",
@@ -3750,9 +3814,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"asSymbol",{},smalltalk.String)})},
 args: [],
 source: "asSymbol\x0a\x09^ self",
@@ -3993,8 +4055,12 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(self._first())._asUppercase()).__eq_eq(self._first());
+var $3,$2,$4,$1;
+$3=self._first();
+$ctx1.sendIdx["first"]=1;
+$2=_st($3)._asUppercase();
+$4=self._first();
+$1=_st($2).__eq_eq($4);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isCapitalized",{},smalltalk.String)})},
 args: [],
@@ -4071,6 +4137,7 @@ return smalltalk.withContext(function($ctx2) {
 return _st(aCollection)._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx3) {
 return _st(stream)._nextPutAll_(_st(each)._asString());
+$ctx3.sendIdx["nextPutAll:"]=1;
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}),(function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(stream)._nextPutAll_(self);
@@ -4094,54 +4161,84 @@ 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 $1,$2,$3,$4;
+var $2,$1,$4,$5,$3,$6,$7,$8,$10,$9,$11,$12,$13,$14,$15,$16;
 var $early={};
 try {
 start=(1);
 sz=self._size();
 cr=_st($String())._cr();
 nextCR=self._indexOf_startingAt_(cr,(1));
+$ctx1.sendIdx["indexOf:startingAt:"]=1;
 lf=_st($String())._lf();
 nextLF=self._indexOf_startingAt_(lf,(1));
+$ctx1.sendIdx["indexOf:startingAt:"]=2;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(start).__lt_eq(sz);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(_st(nextLF).__eq((0)))._and_((function(){
+$2=_st(nextLF).__eq((0));
+$ctx2.sendIdx["="]=1;
+$1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(nextCR).__eq((0));
+$ctx3.sendIdx["="]=2;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
+$ctx2.sendIdx["and:"]=1;
 if(smalltalk.assert($1)){
 _st(aBlock)._value_value_value_(start,sz,sz);
-$2=self;
-throw $early=[$2];
+$ctx2.sendIdx["value:value:value:"]=1;
+throw $early=[self];
 };
-$3=_st(_st(nextCR).__eq((0)))._or_((function(){
+$4=_st(nextCR).__eq((0));
+$ctx2.sendIdx["="]=3;
+$3=_st($4)._or_((function(){
 return smalltalk.withContext(function($ctx3) {
-return _st((0).__lt(nextLF))._and_((function(){
+$5=(0).__lt(nextLF);
+$ctx3.sendIdx["<"]=1;
+return _st($5)._and_((function(){
 return smalltalk.withContext(function($ctx4) {
 return _st(nextLF).__lt(nextCR);
 }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
 if(smalltalk.assert($3)){
-_st(aBlock)._value_value_value_(start,_st(nextLF).__minus((1)),nextLF);
+$6=aBlock;
+$7=start;
+$8=_st(nextLF).__minus((1));
+$ctx2.sendIdx["-"]=1;
+_st($6)._value_value_value_($7,$8,nextLF);
+$ctx2.sendIdx["value:value:value:"]=2;
 start=(1).__plus(nextLF);
+$ctx2.sendIdx["+"]=1;
 start;
 nextLF=self._indexOf_startingAt_(lf,start);
+$ctx2.sendIdx["indexOf:startingAt:"]=3;
 return nextLF;
 } else {
-$4=_st((1).__plus(nextCR)).__eq(nextLF);
-if(smalltalk.assert($4)){
-_st(aBlock)._value_value_value_(start,_st(nextCR).__minus((1)),nextLF);
+$10=(1).__plus(nextCR);
+$ctx2.sendIdx["+"]=2;
+$9=_st($10).__eq(nextLF);
+if(smalltalk.assert($9)){
+$11=aBlock;
+$12=start;
+$13=_st(nextCR).__minus((1));
+$ctx2.sendIdx["-"]=2;
+_st($11)._value_value_value_($12,$13,nextLF);
+$ctx2.sendIdx["value:value:value:"]=3;
 start=(1).__plus(nextLF);
+$ctx2.sendIdx["+"]=3;
 start;
 nextCR=self._indexOf_startingAt_(cr,start);
+$ctx2.sendIdx["indexOf:startingAt:"]=4;
 nextCR;
 nextLF=self._indexOf_startingAt_(lf,start);
+$ctx2.sendIdx["indexOf:startingAt:"]=5;
 return nextLF;
 } else {
-_st(aBlock)._value_value_value_(start,_st(nextCR).__minus((1)),nextCR);
+$14=aBlock;
+$15=start;
+$16=_st(nextCR).__minus((1));
+_st($14)._value_value_value_($15,$16,nextCR);
 start=(1).__plus(nextCR);
 start;
 nextCR=self._indexOf_startingAt_(cr,start);
@@ -4293,7 +4390,9 @@ return smalltalk.withContext(function($ctx1) {
 var $1,$2;
 $1=aStream;
 _st($1)._nextPutAll_("'");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._nextPutAll_(self);
+$ctx1.sendIdx["nextPutAll:"]=2;
 $2=_st($1)._nextPutAll_("'");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.String)})},
 args: ["aStream"],
@@ -4484,8 +4583,13 @@ fn: function (separators){
 var self=this;
 function $RegularExpression(){return smalltalk.RegularExpression||(typeof RegularExpression=="undefined"?nil:RegularExpression)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self._replaceRegexp_with_(_st($RegularExpression())._fromString_flag_(_st("^[".__comma(separators)).__comma("]+"),"g"),"");
+var $3,$5,$4,$2,$1;
+$3=$RegularExpression();
+$5="^[".__comma(separators);
+$4=_st($5).__comma("]+");
+$ctx1.sendIdx[","]=1;
+$2=_st($3)._fromString_flag_($4,"g");
+$1=self._replaceRegexp_with_($2,"");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"trimLeft:",{separators:separators},smalltalk.String)})},
 args: ["separators"],
@@ -4521,8 +4625,13 @@ fn: function (separators){
 var self=this;
 function $RegularExpression(){return smalltalk.RegularExpression||(typeof RegularExpression=="undefined"?nil:RegularExpression)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self._replaceRegexp_with_(_st($RegularExpression())._fromString_flag_(_st("[".__comma(separators)).__comma("]+$"),"g"),"");
+var $3,$5,$4,$2,$1;
+$3=$RegularExpression();
+$5="[".__comma(separators);
+$4=_st($5).__comma("]+$");
+$ctx1.sendIdx[","]=1;
+$2=_st($3)._fromString_flag_($4,"g");
+$1=self._replaceRegexp_with_($2,"");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"trimRight:",{separators:separators},smalltalk.String)})},
 args: ["separators"],
@@ -4781,21 +4890,28 @@ category: 'comparing',
 fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $3,$4,$2,$1,$7,$8,$6,$5,$9;
 var $early={};
 try {
-$1=_st(self._class()).__eq(_st(aCollection)._class());
-if(! smalltalk.assert($1)){
+$3=self._class();
+$ctx1.sendIdx["class"]=1;
+$4=_st(aCollection)._class();
+$2=_st($3).__eq($4);
+$ctx1.sendIdx["="]=1;
+if(! smalltalk.assert($2)){
 return false;
 };
-$2=_st(self._size()).__eq(_st(aCollection)._size());
-if(! smalltalk.assert($2)){
+$7=self._size();
+$ctx1.sendIdx["size"]=1;
+$8=_st(aCollection)._size();
+$6=_st($7).__eq($8);
+if(! smalltalk.assert($6)){
 return false;
 };
 self._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$3=_st(aCollection)._includes_(each);
-if(! smalltalk.assert($3)){
+$9=_st(aCollection)._includes_(each);
+if(! smalltalk.assert($9)){
 throw $early=[false];
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
@@ -4947,16 +5063,20 @@ category: 'printing',
 fn: function (aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-smalltalk.Set.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
-_st(aStream)._nextPutAll_(" (");
+var $1,$2,$3;
+$1=smalltalk.Set.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
+$ctx1.sendIdx["printOn:"]=1;
+$2=_st(aStream)._nextPutAll_(" (");
+$ctx1.sendIdx["nextPutAll:"]=1;
 self._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._printOn_(aStream);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(" ");
+$ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-_st(aStream)._nextPutAll_(")");
+$3=_st(aStream)._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Set)})},
 args: ["aStream"],
 source: "printOn: aStream\x0a\x09super printOn: aStream.\x0a\x09\x0a\x09aStream nextPutAll: ' ('.\x0a\x09self \x0a\x09\x09do: [ :each | each printOn: aStream ]\x0a\x09\x09separatedBy: [ aStream nextPutAll: ' ' ].\x0a\x09aStream nextPutAll: ')'",
@@ -5056,6 +5176,7 @@ function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof Ordere
 return smalltalk.withContext(function($ctx1) { 
 smalltalk.Queue.superclass.fn.prototype._initialize.apply(_st(self), []);
 self["@read"]=_st($OrderedCollection())._new();
+$ctx1.sendIdx["new"]=1;
 self["@write"]=_st($OrderedCollection())._new();
 self["@readIndex"]=(1);
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Queue)})},
@@ -5406,13 +5527,18 @@ category: 'reading',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$4,$3,$5,$6,$1;
 $2=self._atEnd();
 if(smalltalk.assert($2)){
 $1=nil;
 } else {
-self._position_(_st(self._position()).__plus((1)));
-$1=_st(self["@collection"])._at_(self._position());
+$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);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"next",{},smalltalk.Stream)})},
@@ -5457,9 +5583,19 @@ category: 'writing',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._position_(_st(self._position()).__plus((1)));
-_st(self._collection())._at_put_(self._position(),anObject);
-self._setStreamSize_(_st(self._streamSize())._max_(self._position()));
+var $2,$1,$3,$4,$6,$7,$5;
+$2=self._position();
+$ctx1.sendIdx["position"]=1;
+$1=_st($2).__plus((1));
+self._position_($1);
+$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);
 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)",
@@ -5848,19 +5984,52 @@ fn: function (aString){
 var self=this;
 var pre,post;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$3,$2,$4,$5,$6,$9,$8,$10,$7,$12,$11,$14,$13,$16,$17,$15,$19,$20,$18;
 $1=self._atEnd();
 if(smalltalk.assert($1)){
-self._setCollection_(_st(self._collection()).__comma(aString));
+$3=self._collection();
+$ctx1.sendIdx["collection"]=1;
+$2=_st($3).__comma(aString);
+$ctx1.sendIdx[","]=1;
+self._setCollection_($2);
+$ctx1.sendIdx["setCollection:"]=1;
 } else {
-pre=_st(self._collection())._copyFrom_to_((1),self._position());
+$4=self._collection();
+$ctx1.sendIdx["collection"]=2;
+$5=self._position();
+$ctx1.sendIdx["position"]=1;
+pre=_st($4)._copyFrom_to_((1),$5);
+$ctx1.sendIdx["copyFrom:to:"]=1;
 pre;
-post=_st(self._collection())._copyFrom_to_(_st(_st(self._position()).__plus((1))).__plus(_st(aString)._size()),_st(self._collection())._size());
+$6=self._collection();
+$ctx1.sendIdx["collection"]=3;
+$9=self._position();
+$ctx1.sendIdx["position"]=2;
+$8=_st($9).__plus((1));
+$ctx1.sendIdx["+"]=2;
+$10=_st(aString)._size();
+$ctx1.sendIdx["size"]=1;
+$7=_st($8).__plus($10);
+$ctx1.sendIdx["+"]=1;
+$12=self._collection();
+$11=_st($12)._size();
+$ctx1.sendIdx["size"]=2;
+post=_st($6)._copyFrom_to_($7,$11);
 post;
-self._setCollection_(_st(_st(pre).__comma(aString)).__comma(post));
+$14=_st(pre).__comma(aString);
+$13=_st($14).__comma(post);
+$ctx1.sendIdx[","]=2;
+self._setCollection_($13);
 };
-self._position_(_st(self._position()).__plus(_st(aString)._size()));
-self._setStreamSize_(_st(self._streamSize())._max_(self._position()));
+$16=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);
 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)",

+ 22 - 14
js/Kernel-Exceptions.js

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

+ 105 - 49
js/Kernel-Infrastructure.js

@@ -155,11 +155,17 @@ category: 'compiling',
 fn: function (aString,aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=_st(_st(aClass)._instanceVariableNames())._copy();
-_st($1)._add_(aString);
-$2=_st($1)._yourself();
-_st(self._classBuilder())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
+var $1,$2,$3,$5,$6,$4,$7;
+$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);
 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",
@@ -239,16 +245,20 @@ fn: function (aClass){
 var self=this;
 var protocols;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$4,$3,$5;
 protocols=_st(aClass)._protocols();
 $1=_st(aClass)._superclass();
+$ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-_st(protocols)._addAll_(self._availableProtocolsFor_(_st(aClass)._superclass()));
+$2=protocols;
+$4=_st(aClass)._superclass();
+$3=self._availableProtocolsFor_($4);
+_st($2)._addAll_($3);
 };
-$2=_st(_st(protocols)._asSet())._asArray();
-return $2;
+$5=_st(_st(protocols)._asSet())._asArray();
+return $5;
 }, 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",
@@ -395,12 +405,15 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$3,$2;
 $1=_st(_st($Smalltalk())._current())._at_(aClassName);
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
+$3="A class named ".__comma(aClassName);
+$2=_st($3).__comma(" already exists");
+$ctx1.sendIdx[","]=1;
+self._error_($2);
 };
 _st(_st($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
 return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
@@ -496,7 +509,7 @@ var self=this;
 var package_;
 function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 package_=_st($Package())._named_(aPackageName);
 $1=package_;
 if(($receiver = $1) == nil || $receiver == null){
@@ -506,8 +519,7 @@ $1;
 };
 $2=_st(package_).__eq_eq(_st(aClass)._package());
 if(smalltalk.assert($2)){
-$3=self;
-return $3;
+return self;
 };
 _st(aClass)._package_(package_);
 return self}, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},smalltalk.Environment)})},
@@ -527,7 +539,7 @@ var self=this;
 var destinationClass;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$3,$4,$2,$5;
 destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
 $1=destinationClass;
 if(($receiver = $1) == nil || $receiver == null){
@@ -535,13 +547,16 @@ self._error_("Invalid class name");
 } else {
 $1;
 };
-$2=_st(destinationClass).__eq_eq(_st(aMethod)._methodClass());
+$3=destinationClass;
+$4=_st(aMethod)._methodClass();
+$ctx1.sendIdx["methodClass"]=1;
+$2=_st($3).__eq_eq($4);
 if(smalltalk.assert($2)){
-$3=self;
-return $3;
+return self;
 };
 _st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
-_st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
+$5=_st(aMethod)._methodClass();
+_st($5)._removeCompiledMethod_(aMethod);
 return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
 args: ["aMethod", "aClassName"],
 source: "moveMethod: aMethod toClass: aClassName\x0a\x09| destinationClass |\x0a\x09\x0a\x09destinationClass := Smalltalk current at: aClassName asSymbol.\x0a\x09destinationClass ifNil: [ self error: 'Invalid class name' ].\x0a\x09destinationClass == aMethod methodClass ifTrue: [ ^ self ].\x0a\x09\x0a\x09destinationClass \x0a\x09\x09compile: aMethod source\x0a\x09\x09category: aMethod protocol.\x0a\x09aMethod methodClass \x0a\x09\x09removeCompiledMethod: aMethod",
@@ -700,12 +715,15 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$3,$2;
 $1=_st(_st($Smalltalk())._current())._at_(aClassName);
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-self._error_(_st("A class named ".__comma(aClassName)).__comma(" already exists"));
+$3="A class named ".__comma(aClassName);
+$2=_st($3).__comma(" already exists");
+$ctx1.sendIdx[","]=1;
+self._error_($2);
 };
 _st(_st($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
 return self}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},smalltalk.Environment)})},
@@ -762,8 +780,11 @@ fn: function (){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
+var $3,$2,$1;
+$3=_st($Smalltalk())._current();
+$2=_st($3)._at_("SystemAnnouncer");
+$1=_st($2)._current();
+$ctx1.sendIdx["current"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
 args: [],
@@ -1318,21 +1339,27 @@ var self=this;
 var starCategoryName;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $4,$3,$2,$5,$7,$6,$8,$1;
 starCategoryName="*".__comma(self._name());
-$2=_st(_st(self._classes())._collect_((function(each){
+$4=self._classes();
+$ctx1.sendIdx["classes"]=1;
+$3=_st($4)._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._superclass();
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._asSet();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
+$2=_st($3)._asSet();
 _st($2)._remove_ifAbsent_(nil,(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-_st($2)._addAll_(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
+$5=$2;
+$7=_st(_st($Smalltalk())._current())._classes();
+$6=_st($7)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(each)._protocols())._includes_(starCategoryName);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})})));
-$3=_st($2)._yourself();
-$1=$3;
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
+_st($5)._addAll_($6);
+$8=_st($2)._yourself();
+$1=$8;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"loadDependencyClasses",{starCategoryName:starCategoryName},smalltalk.Package)})},
 args: [],
@@ -1403,7 +1430,9 @@ var $1,$2;
 smalltalk.Package.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
 $1=aStream;
 _st($1)._nextPutAll_(" (");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._nextPutAll_(self._name());
+$ctx1.sendIdx["nextPutAll:"]=2;
 $2=_st($1)._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Package)})},
 args: ["aStream"],
@@ -1427,6 +1456,7 @@ _st($1)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st($ClassBuilder())._new())._setupClass_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
+$ctx1.sendIdx["do:"]=1;
 $2=_st($1)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._initialize();
@@ -1551,33 +1581,41 @@ 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,$2;
+var $2,$1,$4,$3,$6,$5,$7,$8;
 children=[];
 others=[];
-_st(classes)._do_((function(each){
+$1=_st(classes)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(classes)._includes_(_st(each)._superclass());
-if(smalltalk.assert($1)){
+$2=_st(classes)._includes_(_st(each)._superclass());
+if(smalltalk.assert($2)){
 return _st(others)._add_(each);
 } else {
 return _st(children)._add_(each);
+$ctx2.sendIdx["add:"]=1;
 };
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
+$ctx1.sendIdx["do:"]=1;
 nodes=_st(children)._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st($ClassSorterNode())._on_classes_level_(each,others,(0));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
 nodes=_st(nodes)._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(a)._theClass())._name()).__lt_eq(_st(_st(b)._theClass())._name());
+$4=_st(a)._theClass();
+$ctx2.sendIdx["theClass"]=1;
+$3=_st($4)._name();
+$ctx2.sendIdx["name"]=1;
+$6=_st(b)._theClass();
+$5=_st($6)._name();
+return _st($3).__lt_eq($5);
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,5)})}));
 expandedClasses=_st($Array())._new();
-_st(nodes)._do_((function(aNode){
+$7=_st(nodes)._do_((function(aNode){
 return smalltalk.withContext(function($ctx2) {
 return _st(aNode)._traverseClassesWith_(expandedClasses);
 }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1,6)})}));
-$2=expandedClasses;
-return $2;
+$8=expandedClasses;
+return $8;
 }, 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",
@@ -1710,7 +1748,7 @@ var self=this;
 var candidate;
 function $BrowserInterface(){return smalltalk.BrowserInterface||(typeof BrowserInterface=="undefined"?nil:BrowserInterface)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 smalltalk.PlatformInterface.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
 $1=$BrowserInterface();
 if(($receiver = $1) == nil || $receiver == null){
@@ -1721,8 +1759,7 @@ candidate;
 $2=_st(candidate)._isAvailable();
 if(smalltalk.assert($2)){
 self._setWorker_(candidate);
-$3=self;
-return $3;
+return self;
 };
 };
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{candidate:candidate},smalltalk.PlatformInterface.klass)})},
@@ -2287,8 +2324,23 @@ fn: function (anException,aString){
 var self=this;
 function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st($ParseError())._new())._messageText_(_st(_st(_st(_st("Parse error on line ".__comma(_st(anException)._basicAt_("line"))).__comma(" column ")).__comma(_st(anException)._basicAt_("column"))).__comma(" : Unexpected character ")).__comma(_st(anException)._basicAt_("found")));
+var $2,$8,$7,$6,$9,$5,$4,$10,$3,$1;
+$2=_st($ParseError())._new();
+$8=_st(anException)._basicAt_("line");
+$ctx1.sendIdx["basicAt:"]=1;
+$7="Parse error on line ".__comma($8);
+$6=_st($7).__comma(" column ");
+$ctx1.sendIdx[","]=4;
+$9=_st(anException)._basicAt_("column");
+$ctx1.sendIdx["basicAt:"]=2;
+$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);
+$ctx1.sendIdx[","]=1;
+$1=_st($2)._messageText_($3);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parseError:parsing:",{anException:anException,aString:aString},smalltalk.Smalltalk)})},
 args: ["anException", "aString"],
@@ -2392,16 +2444,20 @@ fn: function (packageName,newName){
 var self=this;
 var pkg;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $1,$2,$3;
 pkg=self._packageAt_ifAbsent_(packageName,(function(){
 return smalltalk.withContext(function($ctx2) {
-return self._error_("Missing package: ".__comma(packageName));
+$1="Missing package: ".__comma(packageName);
+$ctx2.sendIdx[","]=1;
+return self._error_($1);
+$ctx2.sendIdx["error:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$1=self._packageAt_(newName);
-if(($receiver = $1) == nil || $receiver == null){
-$1;
+$2=self._packageAt_(newName);
+if(($receiver = $2) == nil || $receiver == null){
+$2;
 } else {
-self._error_("Already exists a package called: ".__comma(newName));
+$3="Already exists a package called: ".__comma(newName);
+self._error_($3);
 };
 _st(self._at_("packages"))._at_put_(newName,pkg);
 _st(pkg)._name_(newName);

+ 64 - 26
js/Kernel-Methods.js

@@ -519,8 +519,9 @@ 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;
+var $1,$2,$3,$5,$4,$8,$7,$9,$6,$11,$10;
 oldProtocol=self._protocol();
+$ctx1.sendIdx["protocol"]=1;
 self._basicAt_put_("category",aString);
 $1=_st($MethodMoved())._new();
 _st($1)._method_(self);
@@ -528,16 +529,28 @@ _st($1)._oldProtocol_(oldProtocol);
 $2=_st($1)._yourself();
 _st(_st($SystemAnnouncer())._current())._announce_($2);
 $3=self._methodClass();
+$ctx1.sendIdx["methodClass"]=1;
 if(($receiver = $3) == nil || $receiver == null){
 $3;
 } else {
-_st(_st(self._methodClass())._organization())._addElement_(aString);
-_st(_st(_st(self._methodClass())._methods())._select_((function(each){
+$5=self._methodClass();
+$ctx1.sendIdx["methodClass"]=2;
+$4=_st($5)._organization();
+$ctx1.sendIdx["organization"]=1;
+_st($4)._addElement_(aString);
+$8=self._methodClass();
+$ctx1.sendIdx["methodClass"]=3;
+$7=_st($8)._methods();
+$6=_st($7)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(each)._protocol()).__eq(oldProtocol);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})})))._ifEmpty_((function(){
+$9=_st(each)._protocol();
+return _st($9).__eq(oldProtocol);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
+_st($6)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(self._methodClass())._organization())._removeElement_(oldProtocol);
+$11=self._methodClass();
+$10=_st($11)._organization();
+return _st($10)._removeElement_(oldProtocol);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"category:",{aString:aString,oldProtocol:oldProtocol},smalltalk.CompiledMethod)})},
@@ -652,16 +665,22 @@ fn: function (){
 var self=this;
 var superclass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-superclass=_st(self._methodClass())._superclass();
-$1=superclass;
-if(($receiver = $1) == nil || $receiver == null){
+var $1,$2,$6,$5,$4,$3;
+$1=self._methodClass();
+$ctx1.sendIdx["methodClass"]=1;
+superclass=_st($1)._superclass();
+$ctx1.sendIdx["superclass"]=1;
+$2=superclass;
+if(($receiver = $2) == nil || $receiver == null){
 return false;
 } else {
-$1;
+$2;
 };
-$2=_st(_st(_st(self._methodClass())._superclass())._lookupSelector_(self._selector()))._notNil();
-return $2;
+$6=self._methodClass();
+$5=_st($6)._superclass();
+$4=_st($5)._lookupSelector_(self._selector());
+$3=_st($4)._notNil();
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass},smalltalk.CompiledMethod)})},
 args: [],
 source: "isOverride\x0a\x09| superclass |\x0a    \x0a    superclass := self methodClass superclass.\x0a\x09superclass ifNil: [ ^ false ].\x0a\x09\x0a    ^ (self methodClass superclass lookupSelector: self selector) notNil",
@@ -1115,7 +1134,9 @@ var $1,$2;
 smalltalk.Message.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
 $1=aStream;
 _st($1)._nextPutAll_("(");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._nextPutAll_(self._selector());
+$ctx1.sendIdx["nextPutAll:"]=2;
 $2=_st($1)._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Message)})},
 args: ["aStream"],
@@ -1266,9 +1287,13 @@ var $1,$2;
 smalltalk.MessageSend.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
 $1=aStream;
 _st($1)._nextPutAll_("(");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._nextPutAll_(self._receiver());
+$ctx1.sendIdx["nextPutAll:"]=2;
 _st($1)._nextPutAll_(" >> ");
+$ctx1.sendIdx["nextPutAll:"]=3;
 _st($1)._nextPutAll_(self._selector());
+$ctx1.sendIdx["nextPutAll:"]=4;
 $2=_st($1)._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.MessageSend)})},
 args: ["aStream"],
@@ -1457,12 +1482,17 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$3,$4,$1;
 $2=self._isBlockContext();
 if(smalltalk.assert($2)){
-$1=_st("a block (in ".__comma(_st(self._methodContext())._asString())).__comma(")");
+$3="a block (in ".__comma(_st(self._methodContext())._asString());
+$ctx1.sendIdx[","]=2;
+$1=_st($3).__comma(")");
+$ctx1.sendIdx[","]=1;
 } else {
-$1=_st(_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ")).__comma(self._selector());
+$4=_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ");
+$1=_st($4).__comma(self._selector());
+$ctx1.sendIdx[","]=3;
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.MethodContext)})},
@@ -1546,12 +1576,19 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $2,$5,$4,$3,$7,$6,$1;
 $2=self._methodContext();
+$ctx1.sendIdx["methodContext"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1=$2;
 } else {
-$1=_st(_st(_st(self._methodContext())._receiver())._class())._lookupSelector_(_st(self._methodContext())._selector());
+$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);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodContext)})},
@@ -1569,21 +1606,20 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3;
+var $1,$3,$2;
 $1=self._isBlockContext();
 if(! smalltalk.assert($1)){
-$2=self;
-return $2;
+return self;
 };
-$4=self._outerContext();
-if(($receiver = $4) == nil || $receiver == null){
-$3=$4;
+$3=self._outerContext();
+if(($receiver = $3) == nil || $receiver == null){
+$2=$3;
 } else {
 var outer;
 outer=$receiver;
-$3=_st(outer)._methodContext();
+$2=_st(outer)._methodContext();
 };
-return $3;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"methodContext",{},smalltalk.MethodContext)})},
 args: [],
 source: "methodContext\x0a\x09self isBlockContext ifFalse: [ ^ self ].\x0a\x09\x0a\x09^ self outerContext ifNotNil: [ :outer |\x0a\x09\x09outer methodContext ]",
@@ -1619,7 +1655,9 @@ var $1,$2;
 smalltalk.MethodContext.superclass.fn.prototype._printOn_.apply(_st(self), [aStream]);
 $1=aStream;
 _st($1)._nextPutAll_("(");
+$ctx1.sendIdx["nextPutAll:"]=1;
 _st($1)._nextPutAll_(self._asString());
+$ctx1.sendIdx["nextPutAll:"]=2;
 $2=_st($1)._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.MethodContext)})},
 args: ["aStream"],

+ 182 - 95
js/Kernel-Objects.js

@@ -48,8 +48,11 @@ category: 'comparing',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self._identityHash()).__eq(_st(anObject)._identityHash());
+var $2,$3,$1;
+$2=self._identityHash();
+$ctx1.sendIdx["identityHash"]=1;
+$3=_st(anObject)._identityHash();
+$1=_st($2).__eq($3);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject},smalltalk.Object)})},
 args: ["anObject"],
@@ -286,7 +289,22 @@ category: 'error handling',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st(console)._warn_(_st(_st(_st(_st(smalltalk.getThisContext()._home())._asString()).__comma(" is deprecated! (in ")).__comma(_st(_st(smalltalk.getThisContext()._home())._home())._asString())).__comma(")"));
+var $1,$6,$5,$4,$9,$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();
+$ctx1.sendIdx["home"]=2;
+$7=_st($8)._asString();
+$3=_st($4).__comma($7);
+$ctx1.sendIdx[","]=2;
+$2=_st($3).__comma(")");
+$ctx1.sendIdx[","]=1;
+_st($1)._warn_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"deprecatedAPI",{},smalltalk.Object)})},
 args: [],
 source: "deprecatedAPI\x0a\x09\x22Just a simple way to deprecate methods.\x0a\x09#deprecatedAPI is in the 'error handling' protocol even if it doesn't throw an error,\x0a\x09but it could in the future.\x22\x0a\x09console warn: thisContext home asString, ' is deprecated! (in ', thisContext home home asString, ')'",
@@ -378,9 +396,7 @@ category: 'testing',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.Object)})},
 args: ["aBlock"],
 source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self",
@@ -484,16 +500,17 @@ var self=this;
 var variables;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1,$2,$3;
 variables=_st($Dictionary())._new();
-_st(variables)._at_put_("#self",self);
+$1=_st(variables)._at_put_("#self",self);
+$ctx1.sendIdx["at:put:"]=1;
 _st(_st(self._class())._allInstanceVariableNames())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(variables)._at_put_(each,self._instVarAt_(each));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$1=anInspector;
-_st($1)._setLabel_(self._printString());
-$2=_st($1)._setVariables_(variables);
+$2=anInspector;
+_st($2)._setLabel_(self._printString());
+$3=_st($2)._setVariables_(variables);
 return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)})},
 args: ["anInspector"],
 source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [:each |\x0a\x09\x09variables at: each put: (self instVarAt: each)].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
@@ -841,16 +858,25 @@ category: 'printing',
 fn: function (aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
-$1=aStream;
-$3=_st(_st(_st(self._class())._name())._first())._isVowel();
-if(smalltalk.assert($3)){
-$2="an ";
+var $2,$7,$6,$5,$4,$3,$1,$9,$11,$10,$8;
+$2=aStream;
+$7=self._class();
+$ctx1.sendIdx["class"]=1;
+$6=_st($7)._name();
+$ctx1.sendIdx["name"]=1;
+$5=_st($6)._first();
+$4=_st($5)._isVowel();
+if(smalltalk.assert($4)){
+$3="an ";
 } else {
-$2="a ";
+$3="a ";
 };
-_st($1)._nextPutAll_($2);
-_st(aStream)._nextPutAll_(_st(self._class())._name());
+$1=_st($2)._nextPutAll_($3);
+$ctx1.sendIdx["nextPutAll:"]=1;
+$9=aStream;
+$11=self._class();
+$10=_st($11)._name();
+$8=_st($9)._nextPutAll_($10);
 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",
@@ -1060,9 +1086,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"yourself",{},smalltalk.Object)})},
 args: [],
 source: "yourself\x0a\x09^self",
@@ -1078,8 +1102,10 @@ category: 'comparing',
 fn: function (anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(self.__eq(anObject)).__eq(false);
+var $2,$1;
+$2=self.__eq(anObject);
+$1=_st($2).__eq(false);
+$ctx1.sendIdx["="]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"~=",{anObject:anObject},smalltalk.Object)})},
 args: ["anObject"],
@@ -1232,9 +1258,8 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self;
-if(smalltalk.assert($2)){
+var $1;
+if(smalltalk.assert(self)){
 $1=(1);
 } else {
 $1=(0);
@@ -1255,9 +1280,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Boolean)})},
 args: [],
 source: "asJSON\x0a\x09^self",
@@ -1289,9 +1312,7 @@ category: 'copying',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Boolean)})},
 args: [],
 source: "deepCopy\x0a\x09^self",
@@ -1307,9 +1328,8 @@ category: 'controlling',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self;
-$1=_st($2)._ifTrue_ifFalse_((function(){
+var $1;
+$1=self._ifTrue_ifFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),aBlock);
 return $1;
@@ -1328,9 +1348,8 @@ category: 'controlling',
 fn: function (aBlock,anotherBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self;
-$1=_st($2)._ifTrue_ifFalse_(anotherBlock,aBlock);
+var $1;
+$1=self._ifTrue_ifFalse_(anotherBlock,aBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
 args: ["aBlock", "anotherBlock"],
@@ -1347,9 +1366,8 @@ category: 'controlling',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self;
-$1=_st($2)._ifTrue_ifFalse_(aBlock,(function(){
+var $1;
+$1=self._ifTrue_ifFalse_(aBlock,(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
@@ -1478,9 +1496,7 @@ category: 'copying',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Boolean)})},
 args: [],
 source: "shallowCopy\x0a\x09^self",
@@ -2129,10 +2145,12 @@ var self=this;
 var t;
 function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
+var $2,$1;
 t=_st($Date())._now();
+$ctx1.sendIdx["now"]=1;
 _st(aBlock)._value();
-$1=_st(_st($Date())._now()).__minus(t);
+$2=_st($Date())._now();
+$1=_st($2).__minus(t);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"millisecondsToRun:",{aBlock:aBlock,t:t},smalltalk.Date.klass)})},
 args: ["aBlock"],
@@ -2504,9 +2522,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
 args: [],
 source: "asJSON\x0a\x09^self",
@@ -2522,8 +2538,10 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st("(".__comma(self._printString())).__comma(")");
+var $2,$1;
+$2="(".__comma(self._printString());
+$1=_st($2).__comma(")");
+$ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
 args: [],
@@ -2540,9 +2558,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.Number)})},
 args: [],
 source: "asNumber\x0a\x09^ self",
@@ -2628,9 +2644,7 @@ category: 'copying',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
 args: [],
 source: "copy\x0a\x09^self",
@@ -3118,21 +3132,25 @@ 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;
+var $1,$2;
 first=self._truncated();
-last=_st(_st(aNumber)._truncated()).__plus((1));
+$ctx1.sendIdx["truncated"]=1;
+$1=_st(aNumber)._truncated();
+last=_st($1).__plus((1));
+$ctx1.sendIdx["+"]=1;
 count=(1);
 array=_st($Array())._new();
 _st(_st(last).__minus(first))._timesRepeat_((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(array)._at_put_(count,first);
 count=_st(count).__plus((1));
+$ctx2.sendIdx["+"]=2;
 count;
 first=_st(first).__plus((1));
 return first;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$1=array;
-return $1;
+$2=array;
+return $2;
 }, 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",
@@ -3166,11 +3184,15 @@ return _st(value).__gt_eq(stop);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}))._whileTrue_((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(array)._at_put_(pos,value);
+$ctx2.sendIdx["at:put:"]=1;
 pos=_st(pos).__plus((1));
+$ctx2.sendIdx["+"]=1;
 pos;
 value=_st(value).__plus(step);
+$ctx2.sendIdx["+"]=2;
 return value;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
+$ctx1.sendIdx["whileTrue:"]=1;
 } else {
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -3179,6 +3201,7 @@ return _st(value).__lt_eq(stop);
 return smalltalk.withContext(function($ctx2) {
 _st(array)._at_put_(pos,value);
 pos=_st(pos).__plus((1));
+$ctx2.sendIdx["+"]=3;
 pos;
 value=_st(value).__plus(step);
 return value;
@@ -3216,9 +3239,12 @@ return _st(value).__gt_eq(stop);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}))._whileTrue_((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(aBlock)._value_(value);
+$ctx2.sendIdx["value:"]=1;
 value=_st(value).__plus(step);
+$ctx2.sendIdx["+"]=1;
 return value;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
+$ctx1.sendIdx["whileTrue:"]=1;
 } else {
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -3362,8 +3388,21 @@ fn: function (aPoint){
 var self=this;
 function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($Point())._x_y_(_st(self._x()).__star(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__star(_st(_st(aPoint)._asPoint())._y()));
+var $2,$4,$6,$5,$3,$8,$10,$9,$7,$1;
+$2=$Point();
+$4=self._x();
+$ctx1.sendIdx["x"]=1;
+$6=_st(aPoint)._asPoint();
+$ctx1.sendIdx["asPoint"]=1;
+$5=_st($6)._x();
+$3=_st($4).__star($5);
+$ctx1.sendIdx["*"]=1;
+$8=self._y();
+$ctx1.sendIdx["y"]=1;
+$10=_st(aPoint)._asPoint();
+$9=_st($10)._y();
+$7=_st($8).__star($9);
+$1=_st($2)._x_y_($3,$7);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
@@ -3381,8 +3420,21 @@ fn: function (aPoint){
 var self=this;
 function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($Point())._x_y_(_st(self._x()).__plus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__plus(_st(_st(aPoint)._asPoint())._y()));
+var $2,$4,$6,$5,$3,$8,$10,$9,$7,$1;
+$2=$Point();
+$4=self._x();
+$ctx1.sendIdx["x"]=1;
+$6=_st(aPoint)._asPoint();
+$ctx1.sendIdx["asPoint"]=1;
+$5=_st($6)._x();
+$3=_st($4).__plus($5);
+$ctx1.sendIdx["+"]=1;
+$8=self._y();
+$ctx1.sendIdx["y"]=1;
+$10=_st(aPoint)._asPoint();
+$9=_st($10)._y();
+$7=_st($8).__plus($9);
+$1=_st($2)._x_y_($3,$7);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
@@ -3400,8 +3452,21 @@ fn: function (aPoint){
 var self=this;
 function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($Point())._x_y_(_st(self._x()).__minus(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__minus(_st(_st(aPoint)._asPoint())._y()));
+var $2,$4,$6,$5,$3,$8,$10,$9,$7,$1;
+$2=$Point();
+$4=self._x();
+$ctx1.sendIdx["x"]=1;
+$6=_st(aPoint)._asPoint();
+$ctx1.sendIdx["asPoint"]=1;
+$5=_st($6)._x();
+$3=_st($4).__minus($5);
+$ctx1.sendIdx["-"]=1;
+$8=self._y();
+$ctx1.sendIdx["y"]=1;
+$10=_st(aPoint)._asPoint();
+$9=_st($10)._y();
+$7=_st($8).__minus($9);
+$1=_st($2)._x_y_($3,$7);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
@@ -3419,8 +3484,21 @@ fn: function (aPoint){
 var self=this;
 function $Point(){return smalltalk.Point||(typeof Point=="undefined"?nil:Point)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($Point())._x_y_(_st(self._x()).__slash(_st(_st(aPoint)._asPoint())._x()),_st(self._y()).__slash(_st(_st(aPoint)._asPoint())._y()));
+var $2,$4,$6,$5,$3,$8,$10,$9,$7,$1;
+$2=$Point();
+$4=self._x();
+$ctx1.sendIdx["x"]=1;
+$6=_st(aPoint)._asPoint();
+$ctx1.sendIdx["asPoint"]=1;
+$5=_st($6)._x();
+$3=_st($4).__slash($5);
+$ctx1.sendIdx["/"]=1;
+$8=self._y();
+$ctx1.sendIdx["y"]=1;
+$10=_st(aPoint)._asPoint();
+$9=_st($10)._y();
+$7=_st($8).__slash($9);
+$1=_st($2)._x_y_($3,$7);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
@@ -3437,10 +3515,24 @@ category: 'arithmetic',
 fn: function (aPoint){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(aPoint)._class()).__eq(self._class()))._and_((function(){
+var $3,$4,$2,$6,$7,$5,$9,$10,$8,$1;
+$3=_st(aPoint)._class();
+$ctx1.sendIdx["class"]=1;
+$4=self._class();
+$2=_st($3).__eq($4);
+$ctx1.sendIdx["="]=1;
+$1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(aPoint)._x()).__eq(self._x())).__and(_st(_st(aPoint)._y()).__eq(self._y()));
+$6=_st(aPoint)._x();
+$ctx2.sendIdx["x"]=1;
+$7=self._x();
+$5=_st($6).__eq($7);
+$ctx2.sendIdx["="]=2;
+$9=_st(aPoint)._y();
+$ctx2.sendIdx["y"]=1;
+$10=self._y();
+$8=_st($9).__eq($10);
+return _st($5).__and($8);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
@@ -3458,9 +3550,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
 args: [],
 source: "asPoint\x0a\x09^self",
@@ -3476,17 +3566,18 @@ category: 'printing',
 fn: function (aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-_st(self["@x"])._printOn_(aStream);
+var $1,$2,$3;
+$1=_st(self["@x"])._printOn_(aStream);
+$ctx1.sendIdx["printOn:"]=1;
 _st(aStream)._nextPutAll_("@");
-$1=_st(_st(self["@y"])._notNil())._and_((function(){
+$2=_st(_st(self["@y"])._notNil())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self["@y"])._negative();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-if(smalltalk.assert($1)){
+if(smalltalk.assert($2)){
 _st(aStream)._space();
 };
-_st(self["@y"])._printOn_(aStream);
+$3=_st(self["@y"])._printOn_(aStream);
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
 args: ["aStream"],
 source: "printOn: aStream\x0a\x09\x22Print receiver in classic x@y notation.\x22\x0a\x0a\x09x printOn: aStream.\x0a\x09\x0a\x09aStream nextPutAll: '@'.\x0a\x09(y notNil and: [y negative]) ifTrue: [\x0a\x09\x09\x09\x22Avoid ambiguous @- construct\x22\x0a\x09\x09\x09aStream space ].\x0a\x09\x0a\x09y printOn: aStream",
@@ -3502,8 +3593,11 @@ category: 'transforming',
 fn: function (delta){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st(_st(_st(delta)._x()).__plus(self["@x"])).__at(_st(_st(delta)._y()).__plus(self["@y"]));
+var $2,$3,$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);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
 args: ["delta"],
@@ -3689,9 +3783,7 @@ category: 'copying',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
 args: [],
 source: "deepCopy\x0a\x09^self",
@@ -3707,9 +3799,8 @@ category: 'testing',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=self;
-$1=_st($2)._ifNil_ifNotNil_(aBlock,(function(){
+var $1;
+$1=self._ifNil_ifNotNil_(aBlock,(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
@@ -3746,9 +3837,7 @@ category: 'testing',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
 args: ["aBlock"],
 source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self",
@@ -3846,9 +3935,7 @@ category: 'copying',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self;
-return $1;
+return self;
 }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
 args: [],
 source: "shallowCopy\x0a\x09^self",

File diff suppressed because it is too large
+ 507 - 170
js/Kernel-Tests.js


+ 103 - 40
js/SUnit-Tests.js

@@ -64,11 +64,13 @@ fn: function (){
 var self=this;
 function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
 return smalltalk.withContext(function($ctx1) { 
-self._should_raise_((function(){
+var $1,$2;
+$1=self._should_raise_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self["@empty"])._at_((5));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),$Error());
-self._should_raise_((function(){
+$ctx1.sendIdx["should:raise:"]=1;
+$2=self._should_raise_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self["@empty"])._at_put_((5),"abc");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),$Error());
@@ -87,8 +89,13 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._assert_(_st(self["@full"])._includes_((5)));
-self._assert_(_st(self["@full"])._includes_("abc"));
+var $2,$1,$4,$3;
+$2=_st(self["@full"])._includes_((5));
+$ctx1.sendIdx["includes:"]=1;
+$1=self._assert_($2);
+$ctx1.sendIdx["assert:"]=1;
+$4=_st(self["@full"])._includes_("abc");
+$3=self._assert_($4);
 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)",
@@ -104,10 +111,18 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._assert_equals_(_st(self["@empty"])._occurrencesOf_((0)),(0));
-self._assert_equals_(_st(self["@full"])._occurrencesOf_((5)),(1));
+var $2,$1,$4,$3,$6,$5;
+$2=_st(self["@empty"])._occurrencesOf_((0));
+$ctx1.sendIdx["occurrencesOf:"]=1;
+$1=self._assert_equals_($2,(0));
+$ctx1.sendIdx["assert:equals:"]=1;
+$4=_st(self["@full"])._occurrencesOf_((5));
+$ctx1.sendIdx["occurrencesOf:"]=2;
+$3=self._assert_equals_($4,(1));
+$ctx1.sendIdx["assert:equals:"]=2;
 _st(self["@full"])._add_((5));
-self._assert_equals_(_st(self["@full"])._occurrencesOf_((5)),(1));
+$6=_st(self["@full"])._occurrencesOf_((5));
+$5=self._assert_equals_($6,(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",
@@ -123,9 +138,13 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 _st(self["@full"])._remove_((5));
-self._assert_(_st(self["@full"])._includes_("abc"));
-self._deny_(_st(self["@full"])._includes_((5)));
+$1=_st(self["@full"])._includes_("abc");
+$ctx1.sendIdx["includes:"]=1;
+self._assert_($1);
+$2=_st(self["@full"])._includes_((5));
+self._deny_($2);
 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)",
@@ -211,15 +230,21 @@ category: 'helpers',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._timeout_((100));
-_st(self._async_((function(){
+var $1,$4,$3,$2;
+$1=self._timeout_((100));
+$ctx1.sendIdx["timeout:"]=1;
+$3=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._timeout_((20));
-return _st(self._async_((function(){
+$4=self._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._valueWithTimeout_((30));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._valueWithTimeout_((20));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+return _st($4)._valueWithTimeout_((30));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["async:"]=1;
+$2=_st($3)._valueWithTimeout_((20));
+$ctx1.sendIdx["valueWithTimeout:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutFailing",{},smalltalk.SUnitAsyncTest)})},
 args: [],
 source: "fakeMultipleTimeoutFailing\x0a\x09self timeout: 100.\x0a\x09(self async: [\x0a\x09\x09self timeout: 20.\x0a\x09\x09(self async: [ self finished ]) valueWithTimeout: 30\x0a\x09]) valueWithTimeout: 20",
@@ -235,15 +260,21 @@ category: 'helpers',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._timeout_((20));
-_st(self._async_((function(){
+var $1,$4,$3,$2;
+$1=self._timeout_((20));
+$ctx1.sendIdx["timeout:"]=1;
+$3=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._timeout_((40));
-return _st(self._async_((function(){
+$4=self._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._valueWithTimeout_((20));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._valueWithTimeout_((10));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+return _st($4)._valueWithTimeout_((20));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["async:"]=1;
+$2=_st($3)._valueWithTimeout_((10));
+$ctx1.sendIdx["valueWithTimeout:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutPassing",{},smalltalk.SUnitAsyncTest)})},
 args: [],
 source: "fakeMultipleTimeoutPassing\x0a\x09self timeout: 20.\x0a\x09(self async: [\x0a\x09\x09self timeout: 40.\x0a\x09\x09(self async: [ self finished ]) valueWithTimeout: 20\x0a\x09]) valueWithTimeout: 10",
@@ -335,7 +366,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;
+var $1,$2,$3,$4,$6,$5,$7;
 suite=["fakeError", "fakeErrorFailingInTearDown", "fakeFailure", "testPass"]._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._class())._selector_(each);
@@ -343,18 +374,27 @@ return _st(self._class())._selector_(each);
 runner=_st($TestSuiteRunner())._on_(suite);
 self._timeout_((200));
 result=_st(runner)._result();
+$ctx1.sendIdx["result"]=1;
 assertBlock=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
-self._assert_equals_(self._selectorSetOf_(_st(result)._errors()),["fakeError"]._asSet());
-self._assert_equals_(self._selectorSetOf_(_st(result)._failures()),["fakeErrorFailingInTearDown", "fakeFailure"]._asSet());
+$1=self._selectorSetOf_(_st(result)._errors());
+$ctx2.sendIdx["selectorSetOf:"]=1;
+$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);
 return self._finished();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(_st(ann)._result()).__eq_eq(result);
-if(smalltalk.assert($1)){
-$2=_st(_st(result)._runs()).__eq(_st(result)._total());
-return _st($2)._ifTrue_(assertBlock);
+$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);
 };
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,3)})}));
 _st(runner)._run();
@@ -379,6 +419,7 @@ return smalltalk.withContext(function($ctx2) {
 return self._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+$ctx2.sendIdx["async:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),$Error());
 self._timeout_((0));
 self._shouldnt_raise_((function(){
@@ -407,6 +448,7 @@ return smalltalk.withContext(function($ctx1) {
 self._should_raise_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._finished();
+$ctx2.sendIdx["finished"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),$Error());
 self._timeout_((0));
 self._shouldnt_raise_((function(){
@@ -428,11 +470,18 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._deny_(self._isAsync());
+var $2,$1,$3,$5,$4;
+$2=self._isAsync();
+$ctx1.sendIdx["isAsync"]=1;
+$1=self._deny_($2);
+$ctx1.sendIdx["deny:"]=1;
 self._timeout_((0));
-self._assert_(self._isAsync());
+$3=self._isAsync();
+$ctx1.sendIdx["isAsync"]=2;
+self._assert_($3);
 self._finished();
-self._deny_(self._isAsync());
+$5=self._isAsync();
+$4=self._deny_($5);
 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",
@@ -476,7 +525,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;
+var $1,$2,$4,$3,$5;
 suite=["fakeTimeout", "fakeMultipleTimeoutFailing", "fakeMultipleTimeoutPassing", "testPass"]._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._class())._selector_(each);
@@ -484,18 +533,24 @@ return _st(self._class())._selector_(each);
 runner=_st($TestSuiteRunner())._on_(suite);
 self._timeout_((200));
 result=_st(runner)._result();
+$ctx1.sendIdx["result"]=1;
 assertBlock=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
-self._assert_equals_(self._selectorSetOf_(_st(result)._errors()),_st($Set())._new());
-self._assert_equals_(self._selectorSetOf_(_st(result)._failures()),["fakeMultipleTimeoutFailing", "fakeTimeout"]._asSet());
+$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());
 return self._finished();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
 return smalltalk.withContext(function($ctx2) {
-$1=_st(_st(ann)._result()).__eq_eq(result);
-if(smalltalk.assert($1)){
-$2=_st(_st(result)._runs()).__eq(_st(result)._total());
-return _st($2)._ifTrue_(assertBlock);
+$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);
 };
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,3)})}));
 _st(runner)._run();
@@ -515,19 +570,26 @@ fn: function (){
 var self=this;
 var x;
 return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
 self["@flag"]="bad";
 self._timeout_((10));
 x=(0);
-self["@flag"]=_st(self._async_((function(){
+$1=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._finished();
+$ctx2.sendIdx["finished"]=1;
 self["@flag"]="ok";
 self["@flag"];
 x=_st(x).__plus((1));
+$ctx2.sendIdx["+"]=1;
 x;
 return self._assert_equals_(x,(1));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._valueWithTimeout_((0));
-self["@flag"]=_st(self._async_((function(){
+$ctx2.sendIdx["assert:equals:"]=1;
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+$ctx1.sendIdx["async:"]=1;
+self["@flag"]=_st($1)._valueWithTimeout_((0));
+$ctx1.sendIdx["valueWithTimeout:"]=1;
+$2=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._finished();
 self["@flag"]="ok";
@@ -535,7 +597,8 @@ self["@flag"];
 x=_st(x).__plus((1));
 x;
 return self._assert_equals_(x,(1));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})})))._valueWithTimeout_((0));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
+self["@flag"]=_st($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.",

+ 36 - 13
js/SUnit.js

@@ -85,8 +85,17 @@ category: 'testing',
 fn: function (actual,expected){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=self._assert_description_(_st(actual).__eq(expected),_st(_st("Expected: ".__comma(_st(expected)._printString())).__comma(" but was: ")).__comma(_st(actual)._printString()));
+var $2,$6,$5,$4,$7,$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);
+$ctx1.sendIdx[","]=1;
+$1=self._assert_description_($2,$3);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"assert:equals:",{actual:actual,expected:expected},smalltalk.TestCase)})},
 args: ["actual", "expected"],
@@ -587,8 +596,9 @@ fn: function (aBlock){
 var self=this;
 var failed;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-_st(self["@testCase"])._context_(self);
+var $1,$2,$3;
+$1=_st(self["@testCase"])._context_(self);
+$ctx1.sendIdx["context:"]=1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
 failed=true;
@@ -599,15 +609,16 @@ return failed;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._ensure_((function(){
 return smalltalk.withContext(function($ctx2) {
 _st(self["@testCase"])._context_(nil);
-$1=_st(failed)._and_((function(){
+$2=_st(failed)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(self["@testCase"])._isAsync();
+$ctx3.sendIdx["isAsync"]=1;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
-if(smalltalk.assert($1)){
+if(smalltalk.assert($2)){
 _st(self["@testCase"])._finished();
 };
-$2=_st(self["@testCase"])._isAsync();
-if(! smalltalk.assert($2)){
+$3=_st(self["@testCase"])._isAsync();
+if(! smalltalk.assert($3)){
 return _st(self["@testCase"])._tearDown();
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
@@ -751,7 +762,8 @@ var self=this;
 function $TestFailure(){return smalltalk.TestFailure||(typeof TestFailure=="undefined"?nil:TestFailure)}
 function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
 return smalltalk.withContext(function($ctx1) { 
-_st((function(){
+var $1;
+$1=_st((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aBlock)._on_do_($TestFailure(),(function(ex){
 return smalltalk.withContext(function($ctx3) {
@@ -761,6 +773,7 @@ return _st(self["@result"])._addFailure_(self["@testCase"]);
 return smalltalk.withContext(function($ctx2) {
 return _st(self["@result"])._addError_(self["@testCase"]);
 }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,3)})}));
+$ctx1.sendIdx["on:do:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"withErrorReporting:",{aBlock:aBlock},smalltalk.ReportingTestContext)})},
 args: ["aBlock"],
 source: "withErrorReporting: aBlock\x0a\x09[ aBlock\x0a\x09\x09on: TestFailure\x0a\x09\x09do: [ :ex | result addFailure: testCase ]\x0a\x09]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :ex | result addError: testCase ]",
@@ -896,6 +909,7 @@ smalltalk.TestResult.superclass.fn.prototype._initialize.apply(_st(self), []);
 self["@timestamp"]=_st($Date())._now();
 self["@runs"]=(0);
 self["@errors"]=_st($Array())._new();
+$ctx1.sendIdx["new"]=1;
 self["@failures"]=_st($Array())._new();
 self["@total"]=(0);
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TestResult)})},
@@ -913,10 +927,15 @@ category: 'running',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(self._runs()).__eq_eq(self._total());
+var $3,$2,$4,$6,$5,$1;
+$3=self._runs();
+$ctx1.sendIdx["runs"]=1;
+$2=_st($3).__eq_eq(self._total());
 if(! smalltalk.assert($2)){
-$1=_st(aBlock)._value_(_st(self._runs()).__plus((1)));
+$4=aBlock;
+$6=self._runs();
+$5=_st($6).__plus((1));
+$1=_st($4)._value_($5);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nextRunDo:",{aBlock:aBlock},smalltalk.TestResult)})},
@@ -936,7 +955,8 @@ var self=this;
 function $TestFailure(){return smalltalk.TestFailure||(typeof TestFailure=="undefined"?nil:TestFailure)}
 function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
 return smalltalk.withContext(function($ctx1) { 
-_st((function(){
+var $1;
+$1=_st((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st((function(){
 return smalltalk.withContext(function($ctx3) {
@@ -950,6 +970,7 @@ return self._addFailure_(aTestCase);
 return smalltalk.withContext(function($ctx2) {
 return self._addError_(aTestCase);
 }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,4)})}));
+$ctx1.sendIdx["on:do:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"runCase:",{aTestCase:aTestCase},smalltalk.TestResult)})},
 args: ["aTestCase"],
 source: "runCase: aTestCase\x0a\x09[[ self increaseRuns.\x0a\x09\x09aTestCase runCase]\x0a\x09on: TestFailure do: [:ex | self addFailure: aTestCase]]\x0a\x09on: Error do: [:ex | self addError: aTestCase]",
@@ -985,6 +1006,7 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $2,$3,$1;
 $2=_st(self._errors())._isEmpty();
+$ctx1.sendIdx["isEmpty"]=1;
 if(smalltalk.assert($2)){
 $3=_st(self._failures())._isEmpty();
 if(smalltalk.assert($3)){
@@ -1112,6 +1134,7 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 smalltalk.TestSuiteRunner.superclass.fn.prototype._initialize.apply(_st(self), []);
 self["@announcer"]=_st($Announcer())._new();
+$ctx1.sendIdx["new"]=1;
 self["@result"]=_st($TestResult())._new();
 self["@runNextTest"]=(function(){
 var runs;

+ 37 - 13
js/Spaces.js

@@ -28,8 +28,13 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-_st("body"._asJQuery())._append_("<iframe style=\x22display: none;\x22></iframe>");
-self["@frame"]=_st(_st("iframe"._asJQuery())._get())._last();
+var $1,$3,$2;
+$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();
 _st(_st(self["@frame"])._contentWindow())._location_(_st(window)._location());
 return self}, function($ctx1) {$ctx1.fill(self,"create",{},smalltalk.ObjectSpace)})},
 args: [],
@@ -46,11 +51,10 @@ category: 'releasing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self["@frame"];
 if(($receiver = $1) == nil || $receiver == null){
-$2=self;
-return $2;
+return self;
 } else {
 $1;
 };
@@ -72,13 +76,17 @@ fn: function (aBlock){
 var self=this;
 function $ObjectSpaceConnectionError(){return smalltalk.ObjectSpaceConnectionError||(typeof ObjectSpaceConnectionError=="undefined"?nil:ObjectSpaceConnectionError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2,$4,$6,$5,$3;
 $1=self._isConnected();
 if(! smalltalk.assert($1)){
 $2=_st($ObjectSpaceConnectionError())._signal();
 return $2;
 };
-$3=_st(_st(self["@frame"])._contentWindow())._eval_(_st("(".__comma(_st(aBlock)._compiledSource())).__comma(")()"));
+$4=_st(self["@frame"])._contentWindow();
+$6="(".__comma(_st(aBlock)._compiledSource());
+$5=_st($6).__comma(")()");
+$ctx1.sendIdx[","]=1;
+$3=_st($4)._eval_($5);
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},smalltalk.ObjectSpace)})},
 args: ["aBlock"],
@@ -280,8 +288,10 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._assert_(_st(_st(self["@space"])._frame())._notNil());
-self._assert_(_st(self["@space"])._isConnected());
+var $1,$2;
+$1=self._assert_(_st(_st(self["@space"])._frame())._notNil());
+$ctx1.sendIdx["assert:"]=1;
+$2=self._assert_(_st(self["@space"])._isConnected());
 return self}, function($ctx1) {$ctx1.fill(self,"testCreate",{},smalltalk.ObjectSpaceTest)})},
 args: [],
 source: "testCreate\x0a\x0a\x09self assert: space frame notNil.\x0a\x09self assert: space isConnected",
@@ -299,6 +309,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;
 _st(self["@space"])._whenReadyDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 result=_st(self["@space"])._do_((function(){
@@ -306,8 +317,14 @@ return smalltalk.withContext(function($ctx3) {
 return smalltalk;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 result;
-self._assert_equals_(_st(_st(result)._class())._name(),"Smalltalk");
-self._deny_(_st(_st(result)._class()).__eq($Smalltalk()));
+$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);
+$ctx2.sendIdx["deny:"]=1;
 return self._deny_(_st(result).__eq_eq(smalltalk));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"testEvaluation",{result:result},smalltalk.ObjectSpaceTest)})},
@@ -325,9 +342,16 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-self._deny_(_st(_st(self["@space"])._frame())._isNil());
+var $2,$1,$4,$3;
+$2=_st(self["@space"])._frame();
+$ctx1.sendIdx["frame"]=1;
+$1=_st($2)._isNil();
+$ctx1.sendIdx["isNil"]=1;
+self._deny_($1);
 _st(self["@space"])._release();
-self._assert_(_st(_st(self["@space"])._frame())._isNil());
+$4=_st(self["@space"])._frame();
+$3=_st($4)._isNil();
+self._assert_($3);
 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",

+ 14 - 14
st/IDE.st

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

+ 30 - 30
st/Kernel-Objects.st

@@ -755,6 +755,10 @@ identityHash
 	<return self / aNumber>
 !
 
+// aNumber
+	^(self / aNumber) floor
+!
+
 \\ aNumber
 	<return self % aNumber>
 !
@@ -773,10 +777,6 @@ min: aNumber
 
 negated
 	^0 - self
-!
-
-// aNumber
-	^(self / aNumber) floor
 ! !
 
 !Number methodsFor: 'comparing'!
@@ -946,24 +946,8 @@ to: stop do: aBlock
 
 !Number methodsFor: 'mathematical functions'!
 
-sqrt
-	<return Math.sqrt(self)>
-!
-
-squared
-	^self * self
-!
-
-cos
-	<return Math.cos(self);>
-!
-
-sin
-	<return Math.sin(self);>
-!
-
-tan
-	<return Math.tan(self);>
+** exponent
+	^self raisedTo: exponent
 !
 
 arcCos
@@ -978,6 +962,14 @@ arcTan
 	<return Math.atan(self);>
 !
 
+cos
+	<return Math.cos(self);>
+!
+
+ln
+	<return Math.log(self);>
+!
+
 log
 	<return Math.log(self) / Math.LN10;>
 !
@@ -998,12 +990,20 @@ sign
 		ifFalse: [ ^ -1 ].
 !
 
-** exponent
-	^self raisedTo: exponent
+sin
+	<return Math.sin(self);>
 !
 
-ln
-	<return Math.log(self);>
+sqrt
+	<return Math.sqrt(self)>
+!
+
+squared
+	^self * self
+!
+
+tan
+	<return Math.tan(self);>
 ! !
 
 !Number methodsFor: 'printing'!
@@ -1058,12 +1058,12 @@ heliosClass
 
 !Number class methodsFor: 'instance creation'!
 
-pi
-	<return Math.PI>
-!
-
 e
 	<return Math.E;>
+!
+
+pi
+	<return Math.PI>
 ! !
 
 Object subclass: #Point

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