1
0
Pārlūkot izejas kodu

- use the new code generator (with inlining) by default
- Recompiled everything using the new compiler

Nicolas Petton 12 gadi atpakaļ
vecāks
revīzija
a5d64a4838
44 mainītis faili ar 10089 papildinājumiem un 6756 dzēšanām
  1. 116 38
      js/Benchfib.deploy.js
  2. 120 42
      js/Benchfib.js
  3. 310 155
      js/Canvas.deploy.js
  4. 310 155
      js/Canvas.js
  5. 280 301
      js/Compiler-AST.deploy.js
  6. 280 301
      js/Compiler-AST.js
  7. 320 203
      js/Compiler-Core.deploy.js
  8. 339 216
      js/Compiler-Core.js
  9. 28 24
      js/Compiler-Exceptions.deploy.js
  10. 28 24
      js/Compiler-Exceptions.js
  11. 367 315
      js/Compiler-IR.deploy.js
  12. 368 316
      js/Compiler-IR.js
  13. 373 308
      js/Compiler-Inlining.deploy.js
  14. 357 299
      js/Compiler-Inlining.js
  15. 320 176
      js/Compiler-Semantic.deploy.js
  16. 320 183
      js/Compiler-Semantic.js
  17. 107 101
      js/Compiler-Tests.deploy.js
  18. 109 103
      js/Compiler-Tests.js
  19. 31 15
      js/Examples.deploy.js
  20. 33 17
      js/Examples.js
  21. 359 220
      js/IDE.deploy.js
  22. 352 225
      js/IDE.js
  23. 384 113
      js/Importer-Exporter.deploy.js
  24. 405 134
      js/Importer-Exporter.js
  25. 33 20
      js/Kernel-Announcements.deploy.js
  26. 35 22
      js/Kernel-Announcements.js
  27. 334 199
      js/Kernel-Classes.deploy.js
  28. 314 193
      js/Kernel-Classes.js
  29. 357 194
      js/Kernel-Collections.deploy.js
  30. 360 205
      js/Kernel-Collections.js
  31. 113 74
      js/Kernel-Exceptions.deploy.js
  32. 117 78
      js/Kernel-Exceptions.js
  33. 262 223
      js/Kernel-Methods.deploy.js
  34. 268 229
      js/Kernel-Methods.js
  35. 312 301
      js/Kernel-Objects.deploy.js
  36. 305 290
      js/Kernel-Objects.js
  37. 448 238
      js/Kernel-Tests.deploy.js
  38. 424 223
      js/Kernel-Tests.js
  39. 23 25
      js/Kernel-Transcript.deploy.js
  40. 24 26
      js/Kernel-Transcript.js
  41. 164 108
      js/SUnit.deploy.js
  42. 178 122
      js/SUnit.js
  43. 1 1
      st/Compiler-Core.st
  44. 1 1
      st/Compiler-Semantic.st

+ 116 - 38
js/Benchfib.deploy.js

@@ -7,10 +7,10 @@ smalltalk.method({
 selector: "main",
 fn: function (){
 var self=this;
-var result=nil;
-(result=smalltalk.send((0), "_tinyBenchmarks", []));
-smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send("0 tinyBenchmarks => ", "__comma", [result])]);
-return self;}
+var result;
+result=smalltalk.send((0),"_tinyBenchmarks",[]);
+smalltalk.send(console,"_log_",[smalltalk.send("0 tinyBenchmarks => ","__comma",[result])]);
+return self}
 }),
 smalltalk.Benchfib.klass);
 
@@ -21,8 +21,15 @@ smalltalk.method({
 selector: "benchFib",
 fn: function (){
 var self=this;
-return ((($receiver = self < (2)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (1);})() : (function(){return ((($receiver = ((($receiver = smalltalk.send(self - (1), "_benchFib", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(self - (2), "_benchFib", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(self - (2), "_benchFib", [])]))).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (1);}), (function(){return ((($receiver = ((($receiver = smalltalk.send(self - (1), "_benchFib", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(self - (2), "_benchFib", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(self - (2), "_benchFib", [])]))).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]));
-return self;}
+var $2,$1;
+$2=smalltalk.send(self,"__lt",[(2)]);
+if(smalltalk.assert($2)){
+$1=(1);
+} else {
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"__minus",[(1)]),"_benchFib",[]),"__plus",[smalltalk.send(smalltalk.send(self,"__minus",[(2)]),"_benchFib",[])]),"__plus",[(1)]);
+};
+return $1;
+}
 }),
 smalltalk.Number);
 
@@ -32,15 +39,42 @@ smalltalk.method({
 selector: "benchmark",
 fn: function (){
 var self=this;
-var size=nil;
-var flags=nil;
-var prime=nil;
-var k=nil;
-var count=nil;
-(size=(8190));
-smalltalk.send((1), "_to_do_", [self, (function(iter){(count=(0));(flags=smalltalk.send((smalltalk.Array || Array), "_new", []));smalltalk.send(size, "_timesRepeat_", [(function(){return smalltalk.send(flags, "_add_", [true]);})]);return smalltalk.send((1), "_to_do_", [size, (function(i){return ((($receiver = smalltalk.send(flags, "_at_", [i])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(prime=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));(k=((($receiver = i).klass === smalltalk.Number) ? $receiver +prime : smalltalk.send($receiver, "__plus", [prime])));(function(){while((function(){return ((($receiver = k).klass === smalltalk.Number) ? $receiver <=size : smalltalk.send($receiver, "__lt_eq", [size]));})()) {(function(){smalltalk.send(flags, "_at_put_", [k, false]);return (k=((($receiver = k).klass === smalltalk.Number) ? $receiver +prime : smalltalk.send($receiver, "__plus", [prime])));})()}})();return (count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(prime=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));(k=((($receiver = i).klass === smalltalk.Number) ? $receiver +prime : smalltalk.send($receiver, "__plus", [prime])));(function(){while((function(){return ((($receiver = k).klass === smalltalk.Number) ? $receiver <=size : smalltalk.send($receiver, "__lt_eq", [size]));})()) {(function(){smalltalk.send(flags, "_at_put_", [k, false]);return (k=((($receiver = k).klass === smalltalk.Number) ? $receiver +prime : smalltalk.send($receiver, "__plus", [prime])));})()}})();return (count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})]));})]);})]);
+var $1;
+var size;
+var flags;
+var prime;
+var k;
+var count;
+size=(8190);
+smalltalk.send((1),"_to_do_",[self,(function(iter){
+count=(0);
+count;
+flags=smalltalk.send((smalltalk.Array || Array),"_new",[]);
+flags;
+smalltalk.send(size,"_timesRepeat_",[(function(){
+return smalltalk.send(flags,"_add_",[true]);
+})]);
+return smalltalk.send((1),"_to_do_",[size,(function(i){
+$1=smalltalk.send(flags,"_at_",[i]);
+if(smalltalk.assert($1)){
+prime=smalltalk.send(i,"__plus",[(1)]);
+prime;
+k=smalltalk.send(i,"__plus",[prime]);
+k;
+smalltalk.send((function(){
+return smalltalk.send(k,"__lt_eq",[size]);
+}),"_whileTrue_",[(function(){
+smalltalk.send(flags,"_at_put_",[k,false]);
+k=smalltalk.send(k,"__plus",[prime]);
+return k;
+})]);
+count=smalltalk.send(count,"__plus",[(1)]);
+return count;
+};
+})]);
+})]);
 return count;
-return self;}
+}
 }),
 smalltalk.Number);
 
@@ -54,7 +88,8 @@ if (this < 2) {
 return 1;
 } else {
 return (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;};
-return self;}
+;
+return self}
 }),
 smalltalk.Number);
 
@@ -86,7 +121,8 @@ for (var z=0;z<this;z++) {
   }
 }
 return count;
-return self;}
+;
+return self}
 }),
 smalltalk.Number);
 
@@ -96,17 +132,38 @@ smalltalk.method({
 selector: "jstinyBenchmarks",
 fn: function (){
 var self=this;
-var t1=nil;
-var t2=nil;
-var r=nil;
-var n1=nil;
-var n2=nil;
-(n1=(1));
-(function(){while((function(){(t1=smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return smalltalk.send(n1, "_jsbenchmark", []);})]));return ((($receiver = t1).klass === smalltalk.Number) ? $receiver <(1000) : smalltalk.send($receiver, "__lt", [(1000)]));})()) {(function(){return (n1=((($receiver = n1).klass === smalltalk.Number) ? $receiver *(2) : smalltalk.send($receiver, "__star", [(2)])));})()}})();
-(n2=(28));
-(function(){while((function(){(t2=smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return (r=smalltalk.send(n2, "_jsbenchFib", []));})]));return ((($receiver = t2).klass === smalltalk.Number) ? $receiver <(1000) : smalltalk.send($receiver, "__lt", [(1000)]));})()) {(function(){return (n2=((($receiver = n2).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(((($receiver = ((($receiver = ((($receiver = n1).klass === smalltalk.Number) ? $receiver *(500000) : smalltalk.send($receiver, "__star", [(500000)]))).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))).klass === smalltalk.Number) ? $receiver /t1 : smalltalk.send($receiver, "__slash", [t1])), "_printString", []), "__comma", [" bytecodes/sec; "]), "__comma", [smalltalk.send(((($receiver = ((($receiver = r).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))).klass === smalltalk.Number) ? $receiver /t2 : smalltalk.send($receiver, "__slash", [t2])), "_printString", [])]), "__comma", [" sends/sec"]);
-return self;}
+var $1;
+var t1;
+var t2;
+var r;
+var n1;
+var n2;
+n1=(1);
+smalltalk.send((function(){
+t1=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[(function(){
+return smalltalk.send(n1,"_jsbenchmark",[]);
+})]);
+t1;
+return smalltalk.send(t1,"__lt",[(1000)]);
+}),"_whileTrue_",[(function(){
+n1=smalltalk.send(n1,"__star",[(2)]);
+return n1;
+})]);
+n2=(28);
+smalltalk.send((function(){
+t2=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[(function(){
+r=smalltalk.send(n2,"_jsbenchFib",[]);
+return r;
+})]);
+t2;
+return smalltalk.send(t2,"__lt",[(1000)]);
+}),"_whileTrue_",[(function(){
+n2=smalltalk.send(n2,"__plus",[(1)]);
+return n2;
+})]);
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(n1,"__star",[(500000)]),"__star",[(1000)]),"__slash",[t1]),"_printString",[]),"__comma",[" bytecodes/sec; "]),"__comma",[smalltalk.send(smalltalk.send(smalltalk.send(r,"__star",[(1000)]),"__slash",[t2]),"_printString",[])]),"__comma",[" sends/sec"]);
+return $1;
+}
 }),
 smalltalk.Number);
 
@@ -116,17 +173,38 @@ smalltalk.method({
 selector: "tinyBenchmarks",
 fn: function (){
 var self=this;
-var t1=nil;
-var t2=nil;
-var r=nil;
-var n1=nil;
-var n2=nil;
-(n1=(1));
-(function(){while((function(){(t1=smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return smalltalk.send(n1, "_benchmark", []);})]));return ((($receiver = t1).klass === smalltalk.Number) ? $receiver <(1000) : smalltalk.send($receiver, "__lt", [(1000)]));})()) {(function(){return (n1=((($receiver = n1).klass === smalltalk.Number) ? $receiver *(2) : smalltalk.send($receiver, "__star", [(2)])));})()}})();
-(n2=(16));
-(function(){while((function(){(t2=smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return (r=smalltalk.send(n2, "_benchFib", []));})]));return ((($receiver = t2).klass === smalltalk.Number) ? $receiver <(1000) : smalltalk.send($receiver, "__lt", [(1000)]));})()) {(function(){return (n2=((($receiver = n2).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(((($receiver = ((($receiver = ((($receiver = n1).klass === smalltalk.Number) ? $receiver *(500000) : smalltalk.send($receiver, "__star", [(500000)]))).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))).klass === smalltalk.Number) ? $receiver /t1 : smalltalk.send($receiver, "__slash", [t1])), "_printString", []), "__comma", [" bytecodes/sec; "]), "__comma", [smalltalk.send(((($receiver = ((($receiver = r).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))).klass === smalltalk.Number) ? $receiver /t2 : smalltalk.send($receiver, "__slash", [t2])), "_printString", [])]), "__comma", [" sends/sec"]);
-return self;}
+var $1;
+var t1;
+var t2;
+var r;
+var n1;
+var n2;
+n1=(1);
+smalltalk.send((function(){
+t1=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[(function(){
+return smalltalk.send(n1,"_benchmark",[]);
+})]);
+t1;
+return smalltalk.send(t1,"__lt",[(1000)]);
+}),"_whileTrue_",[(function(){
+n1=smalltalk.send(n1,"__star",[(2)]);
+return n1;
+})]);
+n2=(16);
+smalltalk.send((function(){
+t2=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[(function(){
+r=smalltalk.send(n2,"_benchFib",[]);
+return r;
+})]);
+t2;
+return smalltalk.send(t2,"__lt",[(1000)]);
+}),"_whileTrue_",[(function(){
+n2=smalltalk.send(n2,"__plus",[(1)]);
+return n2;
+})]);
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(n1,"__star",[(500000)]),"__star",[(1000)]),"__slash",[t1]),"_printString",[]),"__comma",[" bytecodes/sec; "]),"__comma",[smalltalk.send(smalltalk.send(smalltalk.send(r,"__star",[(1000)]),"__slash",[t2]),"_printString",[])]),"__comma",[" sends/sec"]);
+return $1;
+}
 }),
 smalltalk.Number);
 

+ 120 - 42
js/Benchfib.js

@@ -8,10 +8,10 @@ selector: "main",
 category: 'not yet classified',
 fn: function (){
 var self=this;
-var result=nil;
-(result=smalltalk.send((0), "_tinyBenchmarks", []));
-smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [smalltalk.send("0 tinyBenchmarks => ", "__comma", [result])]);
-return self;},
+var result;
+result=smalltalk.send((0),"_tinyBenchmarks",[]);
+smalltalk.send(console,"_log_",[smalltalk.send("0 tinyBenchmarks => ","__comma",[result])]);
+return self},
 args: [],
 source: "main\x0a\x0a\x09| result |\x0a\x09result := 0 tinyBenchmarks.\x0a\x09console log: '0 tinyBenchmarks => ' , result",
 messageSends: ["tinyBenchmarks", "log:", ","],
@@ -27,11 +27,18 @@ selector: "benchFib",
 category: '*Benchfib',
 fn: function (){
 var self=this;
-return ((($receiver = self < (2)).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (1);})() : (function(){return ((($receiver = ((($receiver = smalltalk.send(self - (1), "_benchFib", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(self - (2), "_benchFib", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(self - (2), "_benchFib", [])]))).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (1);}), (function(){return ((($receiver = ((($receiver = smalltalk.send(self - (1), "_benchFib", [])).klass === smalltalk.Number) ? $receiver +smalltalk.send(self - (2), "_benchFib", []) : smalltalk.send($receiver, "__plus", [smalltalk.send(self - (2), "_benchFib", [])]))).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)]));})]));
-return self;},
+var $2,$1;
+$2=smalltalk.send(self,"__lt",[(2)]);
+if(smalltalk.assert($2)){
+$1=(1);
+} else {
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"__minus",[(1)]),"_benchFib",[]),"__plus",[smalltalk.send(smalltalk.send(self,"__minus",[(2)]),"_benchFib",[])]),"__plus",[(1)]);
+};
+return $1;
+},
 args: [],
 source: "benchFib \x0a\x09\x22Handy send-heavy benchmark\x22\x0a\x09\x22(result // seconds to run) = approx calls per second\x22\x0a\x09\x22 | r t |\x0a\x09  t := Time millisecondsToRun: [r := 26 benchFib].\x0a\x09  (r * 1000) // t\x22\x0a\x09\x22138000 on a Mac 8100/100\x22\x0a\x09^ self < 2 \x0a\x09\x09ifTrue: [1] \x0a\x09\x09ifFalse: [(self-1) benchFib + (self-2) benchFib + 1]",
-messageSends: ["ifTrue:ifFalse:", "<", "+", "benchFib", "-"],
+messageSends: ["ifTrue:ifFalse:", "+", "benchFib", "-", "<"],
 referencedClasses: []
 }),
 smalltalk.Number);
@@ -43,18 +50,45 @@ selector: "benchmark",
 category: '*Benchfib',
 fn: function (){
 var self=this;
-var size=nil;
-var flags=nil;
-var prime=nil;
-var k=nil;
-var count=nil;
-(size=(8190));
-smalltalk.send((1), "_to_do_", [self, (function(iter){(count=(0));(flags=smalltalk.send((smalltalk.Array || Array), "_new", []));smalltalk.send(size, "_timesRepeat_", [(function(){return smalltalk.send(flags, "_add_", [true]);})]);return smalltalk.send((1), "_to_do_", [size, (function(i){return ((($receiver = smalltalk.send(flags, "_at_", [i])).klass === smalltalk.Boolean) ? ($receiver ? (function(){(prime=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));(k=((($receiver = i).klass === smalltalk.Number) ? $receiver +prime : smalltalk.send($receiver, "__plus", [prime])));(function(){while((function(){return ((($receiver = k).klass === smalltalk.Number) ? $receiver <=size : smalltalk.send($receiver, "__lt_eq", [size]));})()) {(function(){smalltalk.send(flags, "_at_put_", [k, false]);return (k=((($receiver = k).klass === smalltalk.Number) ? $receiver +prime : smalltalk.send($receiver, "__plus", [prime])));})()}})();return (count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(prime=((($receiver = i).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));(k=((($receiver = i).klass === smalltalk.Number) ? $receiver +prime : smalltalk.send($receiver, "__plus", [prime])));(function(){while((function(){return ((($receiver = k).klass === smalltalk.Number) ? $receiver <=size : smalltalk.send($receiver, "__lt_eq", [size]));})()) {(function(){smalltalk.send(flags, "_at_put_", [k, false]);return (k=((($receiver = k).klass === smalltalk.Number) ? $receiver +prime : smalltalk.send($receiver, "__plus", [prime])));})()}})();return (count=((($receiver = count).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})]));})]);})]);
+var $1;
+var size;
+var flags;
+var prime;
+var k;
+var count;
+size=(8190);
+smalltalk.send((1),"_to_do_",[self,(function(iter){
+count=(0);
+count;
+flags=smalltalk.send((smalltalk.Array || Array),"_new",[]);
+flags;
+smalltalk.send(size,"_timesRepeat_",[(function(){
+return smalltalk.send(flags,"_add_",[true]);
+})]);
+return smalltalk.send((1),"_to_do_",[size,(function(i){
+$1=smalltalk.send(flags,"_at_",[i]);
+if(smalltalk.assert($1)){
+prime=smalltalk.send(i,"__plus",[(1)]);
+prime;
+k=smalltalk.send(i,"__plus",[prime]);
+k;
+smalltalk.send((function(){
+return smalltalk.send(k,"__lt_eq",[size]);
+}),"_whileTrue_",[(function(){
+smalltalk.send(flags,"_at_put_",[k,false]);
+k=smalltalk.send(k,"__plus",[prime]);
+return k;
+})]);
+count=smalltalk.send(count,"__plus",[(1)]);
+return count;
+};
+})]);
+})]);
 return count;
-return self;},
+},
 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    | size flags prime k count |\x0a    size := 8190.\x0a    1 to: self do:\x0a        [:iter |\x0a        count := 0.\x0a        flags := Array new.\x0a        size timesRepeat: [ flags add: true].\x0a        1 to: size do:\x0a            [:i | (flags at: i) ifTrue:\x0a                [prime := i+1.\x0a                k := i + prime.\x0a                [k <= size] whileTrue:\x0a                    [flags at: k put: false.\x0a                    k := k + prime].\x0a                count := count + 1]]].\x0a    ^ count",
-messageSends: ["to:do:", "new", "timesRepeat:", "add:", "ifTrue:", "at:", "+", "whileTrue:", "<=", "at:put:"],
+messageSends: ["to:do:", "new", "timesRepeat:", "add:", "ifTrue:", "+", "whileTrue:", "at:put:", "<=", "at:"],
 referencedClasses: ["Array"]
 }),
 smalltalk.Number);
@@ -70,7 +104,8 @@ if (this < 2) {
 return 1;
 } else {
 return (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;};
-return self;},
+;
+return self},
 args: [],
 source: "jsbenchFib\x0a \x0a\x09<if (this < 2) {\x0areturn 1;\x0a} else {\x0areturn (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;}>",
 messageSends: [],
@@ -107,7 +142,8 @@ for (var z=0;z<this;z++) {
   }
 }
 return count;
-return self;},
+;
+return self},
 args: [],
 source: "jsbenchmark\x0a\x0a<\x0avar size = 8190;\x0avar count;\x0afor (var z=0;z<this;z++) {\x0a  count = 0;\x0a  var flags = new Array();\x0a  for (var p=0; p<size; p++) {\x0a    flags[p] = true;\x0a  }\x0a  for (var i=1;i<=size;i++) {\x0a    if (flags[i-1]) {\x0a      var prime = i+1;\x0a      var k = i + prime;\x0a      while (k <= size) {\x0a        flags[k-1] = false;\x0a        k = k + prime;\x0a      }\x0a      count = count + 1;\x0a    }\x0a  }\x0a}\x0areturn count>",
 messageSends: [],
@@ -122,20 +158,41 @@ selector: "jstinyBenchmarks",
 category: '*Benchfib',
 fn: function (){
 var self=this;
-var t1=nil;
-var t2=nil;
-var r=nil;
-var n1=nil;
-var n2=nil;
-(n1=(1));
-(function(){while((function(){(t1=smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return smalltalk.send(n1, "_jsbenchmark", []);})]));return ((($receiver = t1).klass === smalltalk.Number) ? $receiver <(1000) : smalltalk.send($receiver, "__lt", [(1000)]));})()) {(function(){return (n1=((($receiver = n1).klass === smalltalk.Number) ? $receiver *(2) : smalltalk.send($receiver, "__star", [(2)])));})()}})();
-(n2=(28));
-(function(){while((function(){(t2=smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return (r=smalltalk.send(n2, "_jsbenchFib", []));})]));return ((($receiver = t2).klass === smalltalk.Number) ? $receiver <(1000) : smalltalk.send($receiver, "__lt", [(1000)]));})()) {(function(){return (n2=((($receiver = n2).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(((($receiver = ((($receiver = ((($receiver = n1).klass === smalltalk.Number) ? $receiver *(500000) : smalltalk.send($receiver, "__star", [(500000)]))).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))).klass === smalltalk.Number) ? $receiver /t1 : smalltalk.send($receiver, "__slash", [t1])), "_printString", []), "__comma", [" bytecodes/sec; "]), "__comma", [smalltalk.send(((($receiver = ((($receiver = r).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))).klass === smalltalk.Number) ? $receiver /t2 : smalltalk.send($receiver, "__slash", [t2])), "_printString", [])]), "__comma", [" sends/sec"]);
-return self;},
+var $1;
+var t1;
+var t2;
+var r;
+var n1;
+var n2;
+n1=(1);
+smalltalk.send((function(){
+t1=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[(function(){
+return smalltalk.send(n1,"_jsbenchmark",[]);
+})]);
+t1;
+return smalltalk.send(t1,"__lt",[(1000)]);
+}),"_whileTrue_",[(function(){
+n1=smalltalk.send(n1,"__star",[(2)]);
+return n1;
+})]);
+n2=(28);
+smalltalk.send((function(){
+t2=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[(function(){
+r=smalltalk.send(n2,"_jsbenchFib",[]);
+return r;
+})]);
+t2;
+return smalltalk.send(t2,"__lt",[(1000)]);
+}),"_whileTrue_",[(function(){
+n2=smalltalk.send(n2,"__plus",[(1)]);
+return n2;
+})]);
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(n1,"__star",[(500000)]),"__star",[(1000)]),"__slash",[t1]),"_printString",[]),"__comma",[" bytecodes/sec; "]),"__comma",[smalltalk.send(smalltalk.send(smalltalk.send(r,"__star",[(1000)]),"__slash",[t2]),"_printString",[])]),"__comma",[" sends/sec"]);
+return $1;
+},
 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  ((r * 1000) / t2) printString, ' sends/sec'",
-messageSends: ["whileTrue:", "millisecondsToRun:", "jsbenchmark", "<", "*", "jsbenchFib", "+", ",", "printString", "/"],
+messageSends: ["whileTrue:", "*", "millisecondsToRun:", "jsbenchmark", "<", "+", "jsbenchFib", ",", "printString", "/"],
 referencedClasses: ["Date"]
 }),
 smalltalk.Number);
@@ -147,20 +204,41 @@ selector: "tinyBenchmarks",
 category: '*Benchfib',
 fn: function (){
 var self=this;
-var t1=nil;
-var t2=nil;
-var r=nil;
-var n1=nil;
-var n2=nil;
-(n1=(1));
-(function(){while((function(){(t1=smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return smalltalk.send(n1, "_benchmark", []);})]));return ((($receiver = t1).klass === smalltalk.Number) ? $receiver <(1000) : smalltalk.send($receiver, "__lt", [(1000)]));})()) {(function(){return (n1=((($receiver = n1).klass === smalltalk.Number) ? $receiver *(2) : smalltalk.send($receiver, "__star", [(2)])));})()}})();
-(n2=(16));
-(function(){while((function(){(t2=smalltalk.send((smalltalk.Date || Date), "_millisecondsToRun_", [(function(){return (r=smalltalk.send(n2, "_benchFib", []));})]));return ((($receiver = t2).klass === smalltalk.Number) ? $receiver <(1000) : smalltalk.send($receiver, "__lt", [(1000)]));})()) {(function(){return (n2=((($receiver = n2).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));})()}})();
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(((($receiver = ((($receiver = ((($receiver = n1).klass === smalltalk.Number) ? $receiver *(500000) : smalltalk.send($receiver, "__star", [(500000)]))).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))).klass === smalltalk.Number) ? $receiver /t1 : smalltalk.send($receiver, "__slash", [t1])), "_printString", []), "__comma", [" bytecodes/sec; "]), "__comma", [smalltalk.send(((($receiver = ((($receiver = r).klass === smalltalk.Number) ? $receiver *(1000) : smalltalk.send($receiver, "__star", [(1000)]))).klass === smalltalk.Number) ? $receiver /t2 : smalltalk.send($receiver, "__slash", [t2])), "_printString", [])]), "__comma", [" sends/sec"]);
-return self;},
+var $1;
+var t1;
+var t2;
+var r;
+var n1;
+var n2;
+n1=(1);
+smalltalk.send((function(){
+t1=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[(function(){
+return smalltalk.send(n1,"_benchmark",[]);
+})]);
+t1;
+return smalltalk.send(t1,"__lt",[(1000)]);
+}),"_whileTrue_",[(function(){
+n1=smalltalk.send(n1,"__star",[(2)]);
+return n1;
+})]);
+n2=(16);
+smalltalk.send((function(){
+t2=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[(function(){
+r=smalltalk.send(n2,"_benchFib",[]);
+return r;
+})]);
+t2;
+return smalltalk.send(t2,"__lt",[(1000)]);
+}),"_whileTrue_",[(function(){
+n2=smalltalk.send(n2,"__plus",[(1)]);
+return n2;
+})]);
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(n1,"__star",[(500000)]),"__star",[(1000)]),"__slash",[t1]),"_printString",[]),"__comma",[" bytecodes/sec; "]),"__comma",[smalltalk.send(smalltalk.send(smalltalk.send(r,"__star",[(1000)]),"__slash",[t2]),"_printString",[])]),"__comma",[" sends/sec"]);
+return $1;
+},
 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  ((r * 1000) / t2) printString, ' sends/sec'",
-messageSends: ["whileTrue:", "millisecondsToRun:", "benchmark", "<", "*", "benchFib", "+", ",", "printString", "/"],
+messageSends: ["whileTrue:", "*", "millisecondsToRun:", "benchmark", "<", "+", "benchFib", ",", "printString", "/"],
 referencedClasses: ["Date"]
 }),
 smalltalk.Number);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 310 - 155
js/Canvas.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 310 - 155
js/Canvas.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 280 - 301
js/Compiler-AST.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 280 - 301
js/Compiler-AST.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 320 - 203
js/Compiler-Core.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 339 - 216
js/Compiler-Core.js


+ 28 - 24
js/Compiler-Exceptions.deploy.js

@@ -16,10 +16,12 @@ smalltalk.addMethod(
 "_messageText",
 smalltalk.method({
 selector: "messageText",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(" Invalid assignment to variable: ", "__comma", [smalltalk.send(self, "_variableName", [])]);
-return self;}
+var $1;
+$1=smalltalk.send(" Invalid assignment to variable: ","__comma",[smalltalk.send(self,"_variableName",[])]);
+return $1;
+}
 }),
 smalltalk.InvalidAssignmentError);
 
@@ -27,10 +29,10 @@ smalltalk.addMethod(
 "_variableName",
 smalltalk.method({
 selector: "variableName",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@variableName'];
-return self;}
+return self["@variableName"];
+}
 }),
 smalltalk.InvalidAssignmentError);
 
@@ -38,10 +40,10 @@ smalltalk.addMethod(
 "_variableName_",
 smalltalk.method({
 selector: "variableName:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(self['@variableName']=aString);
-return self;}
+self["@variableName"]=aString;
+return self}
 }),
 smalltalk.InvalidAssignmentError);
 
@@ -52,10 +54,12 @@ smalltalk.addMethod(
 "_messageText",
 smalltalk.method({
 selector: "messageText",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send("Variable shadowing error: ", "__comma", [smalltalk.send(self, "_variableName", [])]), "__comma", [" is already defined"]);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send("Variable shadowing error: ","__comma",[smalltalk.send(self,"_variableName",[])]),"__comma",[" is already defined"]);
+return $1;
+}
 }),
 smalltalk.ShadowingVariableError);
 
@@ -63,10 +67,10 @@ smalltalk.addMethod(
 "_variableName",
 smalltalk.method({
 selector: "variableName",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@variableName'];
-return self;}
+return self["@variableName"];
+}
 }),
 smalltalk.ShadowingVariableError);
 
@@ -74,10 +78,10 @@ smalltalk.addMethod(
 "_variableName_",
 smalltalk.method({
 selector: "variableName:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(self['@variableName']=aString);
-return self;}
+self["@variableName"]=aString;
+return self}
 }),
 smalltalk.ShadowingVariableError);
 
@@ -88,10 +92,10 @@ smalltalk.addMethod(
 "_variableName",
 smalltalk.method({
 selector: "variableName",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@variableName'];
-return self;}
+return self["@variableName"];
+}
 }),
 smalltalk.UnknownVariableError);
 
@@ -99,10 +103,10 @@ smalltalk.addMethod(
 "_variableName_",
 smalltalk.method({
 selector: "variableName:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(self['@variableName']=aString);
-return self;}
+self["@variableName"]=aString;
+return self}
 }),
 smalltalk.UnknownVariableError);
 

+ 28 - 24
js/Compiler-Exceptions.js

@@ -22,10 +22,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "messageText",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(" Invalid assignment to variable: ", "__comma", [smalltalk.send(self, "_variableName", [])]);
-return self;},
+var $1;
+$1=smalltalk.send(" Invalid assignment to variable: ","__comma",[smalltalk.send(self,"_variableName",[])]);
+return $1;
+},
 args: [],
 source: "messageText\x0a\x09^ ' Invalid assignment to variable: ', self variableName",
 messageSends: [",", "variableName"],
@@ -38,10 +40,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "variableName",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@variableName'];
-return self;},
+return self["@variableName"];
+},
 args: [],
 source: "variableName\x0a\x09^ variableName",
 messageSends: [],
@@ -54,10 +56,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "variableName:",
 category: 'accessing',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(self['@variableName']=aString);
-return self;},
+self["@variableName"]=aString;
+return self},
 args: ["aString"],
 source: "variableName: aString\x0a\x09variableName := aString",
 messageSends: [],
@@ -74,10 +76,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "messageText",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send("Variable shadowing error: ", "__comma", [smalltalk.send(self, "_variableName", [])]), "__comma", [" is already defined"]);
-return self;},
+var $1;
+$1=smalltalk.send(smalltalk.send("Variable shadowing error: ","__comma",[smalltalk.send(self,"_variableName",[])]),"__comma",[" is already defined"]);
+return $1;
+},
 args: [],
 source: "messageText\x0a\x09^ 'Variable shadowing error: ', self variableName, ' is already defined'",
 messageSends: [",", "variableName"],
@@ -90,10 +94,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "variableName",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@variableName'];
-return self;},
+return self["@variableName"];
+},
 args: [],
 source: "variableName\x0a\x09^ variableName",
 messageSends: [],
@@ -106,10 +110,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "variableName:",
 category: 'accessing',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(self['@variableName']=aString);
-return self;},
+self["@variableName"]=aString;
+return self},
 args: ["aString"],
 source: "variableName: aString\x0a\x09variableName := aString",
 messageSends: [],
@@ -126,10 +130,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "variableName",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@variableName'];
-return self;},
+return self["@variableName"];
+},
 args: [],
 source: "variableName\x0a\x09^ variableName",
 messageSends: [],
@@ -142,10 +146,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "variableName:",
 category: 'accessing',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(self['@variableName']=aString);
-return self;},
+self["@variableName"]=aString;
+return self},
 args: ["aString"],
 source: "variableName: aString\x0a\x09variableName := aString",
 messageSends: [],

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 367 - 315
js/Compiler-IR.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 368 - 316
js/Compiler-IR.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 373 - 308
js/Compiler-Inlining.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 357 - 299
js/Compiler-Inlining.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 320 - 176
js/Compiler-Semantic.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 320 - 183
js/Compiler-Semantic.js


+ 107 - 101
js/Compiler-Tests.deploy.js

@@ -7,7 +7,7 @@ selector: "codeGeneratorClass",
 fn: function (){
 var self=this;
 return (smalltalk.CodeGenerator || CodeGenerator);
-return self;}
+}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -17,8 +17,13 @@ smalltalk.method({
 selector: "compiler",
 fn: function (){
 var self=this;
-return (function($rec){smalltalk.send($rec, "_codeGeneratorClass_", [smalltalk.send(self, "_codeGeneratorClass", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []));
-return self;}
+var $2,$3,$1;
+$2=smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]);
+smalltalk.send($2,"_codeGeneratorClass_",[smalltalk.send(self,"_codeGeneratorClass",[])]);
+$3=smalltalk.send($2,"_yourself",[]);
+$1=$3;
+return $1;
+}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -28,8 +33,8 @@ smalltalk.method({
 selector: "setUp",
 fn: function (){
 var self=this;
-(self['@receiver']=smalltalk.send(smalltalk.send(self, "_targetClass", []), "_new", []));
-return self;}
+self["@receiver"]=smalltalk.send(smalltalk.send(self,"_targetClass",[]),"_new",[]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -37,15 +42,15 @@ smalltalk.addMethod(
 "_should_return_",
 smalltalk.method({
 selector: "should:return:",
-fn: function (aString, anObject){
-var self=this;
-var method=nil;
-var result=nil;
-(method=smalltalk.send(smalltalk.send(self, "_compiler", []), "_install_forClass_category_", [aString, smalltalk.send(self, "_targetClass", []), "tests"]));
-(result=smalltalk.send(self['@receiver'], "_perform_", [smalltalk.send(method, "_selector", [])]));
-smalltalk.send(smalltalk.send(self, "_targetClass", []), "_removeCompiledMethod_", [method]);
-smalltalk.send(self, "_assert_equals_", [anObject, result]);
-return self;}
+fn: function (aString,anObject){
+var self=this;
+var method;
+var result;
+method=smalltalk.send(smalltalk.send(self,"_compiler",[]),"_install_forClass_category_",[aString,smalltalk.send(self,"_targetClass",[]),"tests"]);
+result=smalltalk.send(self["@receiver"],"_perform_",[smalltalk.send(method,"_selector",[])]);
+smalltalk.send(smalltalk.send(self,"_targetClass",[]),"_removeCompiledMethod_",[method]);
+smalltalk.send(self,"_assert_equals_",[anObject,result]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -56,7 +61,7 @@ selector: "targetClass",
 fn: function (){
 var self=this;
 return (smalltalk.DoIt || DoIt);
-return self;}
+}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -66,8 +71,7 @@ smalltalk.method({
 selector: "tearDown",
 fn: function (){
 var self=this;
-
-return self;}
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -77,10 +81,10 @@ smalltalk.method({
 selector: "testAssignment",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo | a | a := true ifTrue: [ 1 ]. ^ a", (1)]);
-smalltalk.send(self, "_should_return_", ["foo | a | a := false ifTrue: [ 1 ]. ^ a", nil]);
-smalltalk.send(self, "_should_return_", ["foo | a | ^ a := true ifTrue: [ 1 ]", (1)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo | a | a := true ifTrue: [ 1 ]. ^ a",(1)]);
+smalltalk.send(self,"_should_return_",["foo | a | a := false ifTrue: [ 1 ]. ^ a",nil]);
+smalltalk.send(self,"_should_return_",["foo | a | ^ a := true ifTrue: [ 1 ]",(1)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -90,10 +94,10 @@ smalltalk.method({
 selector: "testBlockReturn",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ #(1 2 3) collect: [ :each | true ifTrue: [ each + 1 ] ]", [(2), (3), (4)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ #(1 2 3) collect: [ :each | false ifFalse: [ each + 1 ] ]", [(2), (3), (4)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ #(1 2 3) collect: [ :each | each odd ifTrue: [ each + 1 ] ifFalse: [ each - 1 ] ]", [(2), (1), (4)]]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ #(1 2 3) collect: [ :each | true ifTrue: [ each + 1 ] ]",[(2), (3), (4)]]);
+smalltalk.send(self,"_should_return_",["foo ^ #(1 2 3) collect: [ :each | false ifFalse: [ each + 1 ] ]",[(2), (3), (4)]]);
+smalltalk.send(self,"_should_return_",["foo ^ #(1 2 3) collect: [ :each | each odd ifTrue: [ each + 1 ] ifFalse: [ each - 1 ] ]",[(2), (1), (4)]]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -103,8 +107,8 @@ smalltalk.method({
 selector: "testCascades",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ Array new add: 3; add: 4; yourself", [(3), (4)]]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ Array new add: 3; add: 4; yourself",[(3), (4)]]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -114,16 +118,16 @@ smalltalk.method({
 selector: "testLiterals",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ 'hello'", "hello"]);
-smalltalk.send(self, "_should_return_", ["foo ^ #(1 2 3 4)", [(1), (2), (3), (4)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ {1. [:x | x ] value: 2. 3. [4] value}", [(1), (2), (3), (4)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ true", true]);
-smalltalk.send(self, "_should_return_", ["foo ^ false", false]);
-smalltalk.send(self, "_should_return_", ["foo ^ #{1->2. 3->4}", smalltalk.HashedCollection._fromPairs_([smalltalk.send((1), "__minus_gt", [(2)]),smalltalk.send((3), "__minus_gt", [(4)])])]);
-smalltalk.send(self, "_should_return_", ["foo ^ #hello", smalltalk.symbolFor("hello")]);
-smalltalk.send(self, "_should_return_", ["foo ^ -123.456", (-123.456)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ 1",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ 'hello'","hello"]);
+smalltalk.send(self,"_should_return_",["foo ^ #(1 2 3 4)",[(1), (2), (3), (4)]]);
+smalltalk.send(self,"_should_return_",["foo ^ {1. [:x | x ] value: 2. 3. [4] value}",[(1), (2), (3), (4)]]);
+smalltalk.send(self,"_should_return_",["foo ^ true",true]);
+smalltalk.send(self,"_should_return_",["foo ^ false",false]);
+smalltalk.send(self,"_should_return_",["foo ^ #{1->2. 3->4}",smalltalk.HashedCollection._fromPairs_([smalltalk.send((1),"__minus_gt",[(2)]),smalltalk.send((3),"__minus_gt",[(4)])])]);
+smalltalk.send(self,"_should_return_",["foo ^ #hello",smalltalk.symbolFor("hello")]);
+smalltalk.send(self,"_should_return_",["foo ^ -123.456",(-123.456)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -133,12 +137,12 @@ smalltalk.method({
 selector: "testLocalReturn",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 + 1", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo self asString", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo | a b | a := 1. b := 2. ^ a + b", (3)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ 1",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 + 1",(2)]);
+smalltalk.send(self,"_should_return_",["foo ",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo self asString",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo | a b | a := 1. b := 2. ^ a + b",(3)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -148,12 +152,12 @@ smalltalk.method({
 selector: "testMessageSends",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1 asString", "1"]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 + 1", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 + 2 * 3", (9)]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 to: 3", [(1), (2), (3)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 to: 5 by: 2", [(1), (3), (5)]]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ 1 asString","1"]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 + 1",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 + 2 * 3",(9)]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 to: 3",[(1), (2), (3)]]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 to: 5 by: 2",[(1), (3), (5)]]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -163,11 +167,11 @@ smalltalk.method({
 selector: "testNestedIfTrue",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ true ifTrue: [ false ifFalse: [ 1 ] ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifTrue: [ false ifTrue: [ 1 ] ]", nil]);
-smalltalk.send(self, "_should_return_", ["foo true ifTrue: [ false ifFalse: [ ^ 1 ] ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo true ifTrue: [ false ifTrue: [ ^ 1 ] ]", self['@receiver']]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ true ifTrue: [ false ifFalse: [ 1 ] ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifTrue: [ false ifTrue: [ 1 ] ]",nil]);
+smalltalk.send(self,"_should_return_",["foo true ifTrue: [ false ifFalse: [ ^ 1 ] ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo true ifTrue: [ false ifTrue: [ ^ 1 ] ]",self["@receiver"]]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -177,11 +181,11 @@ smalltalk.method({
 selector: "testNonLocalReturn",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo [ ^ 1 ] value", (1)]);
-smalltalk.send(self, "_should_return_", ["foo [ ^ 1 + 1 ] value", (2)]);
-smalltalk.send(self, "_should_return_", ["foo | a b | a := 1. b := 2. [ ^ a + b ] value. self halt", (3)]);
-smalltalk.send(self, "_should_return_", ["foo [ :x | ^ x + x ] value: 4. ^ 2", (8)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo [ ^ 1 ] value",(1)]);
+smalltalk.send(self,"_should_return_",["foo [ ^ 1 + 1 ] value",(2)]);
+smalltalk.send(self,"_should_return_",["foo | a b | a := 1. b := 2. [ ^ a + b ] value. self halt",(3)]);
+smalltalk.send(self,"_should_return_",["foo [ :x | ^ x + x ] value: 4. ^ 2",(8)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -191,11 +195,11 @@ smalltalk.method({
 selector: "testifFalse",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo true ifFalse: [ ^ 1 ]", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo false ifFalse: [ ^ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifFalse: [ 1 ]", nil]);
-smalltalk.send(self, "_should_return_", ["foo ^ false ifFalse: [ 2 ]", (2)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo true ifFalse: [ ^ 1 ]",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo false ifFalse: [ ^ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifFalse: [ 1 ]",nil]);
+smalltalk.send(self,"_should_return_",["foo ^ false ifFalse: [ 2 ]",(2)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -205,11 +209,11 @@ smalltalk.method({
 selector: "testifFalseIfTrue",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo true ifFalse: [ ^ 1 ] ifTrue: [ ^ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo false ifFalse: [ ^ 2 ] ifTrue: [ ^1 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifFalse: [ 1 ] ifTrue: [ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ false ifFalse: [ 2 ] ifTrue: [ 1 ]", (2)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo true ifFalse: [ ^ 1 ] ifTrue: [ ^ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo false ifFalse: [ ^ 2 ] ifTrue: [ ^1 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifFalse: [ 1 ] ifTrue: [ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ false ifFalse: [ 2 ] ifTrue: [ 1 ]",(2)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -219,11 +223,11 @@ smalltalk.method({
 selector: "testifNil",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1 ifNil: [ 2 ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ nil ifNil: [ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo 1 ifNil: [ ^ 2 ]", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo nil ifNil: [ ^ 2 ]", (2)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ 1 ifNil: [ 2 ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ nil ifNil: [ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo 1 ifNil: [ ^ 2 ]",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo nil ifNil: [ ^ 2 ]",(2)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -233,11 +237,11 @@ smalltalk.method({
 selector: "testifNilIfNotNil",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1 ifNil: [ 2 ] ifNotNil: [ 3 ]", (3)]);
-smalltalk.send(self, "_should_return_", ["foo ^ nil ifNil: [ 2 ] ifNotNil: [ 3 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo 1 ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]", (3)]);
-smalltalk.send(self, "_should_return_", ["foo nil ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]", (2)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ 1 ifNil: [ 2 ] ifNotNil: [ 3 ]",(3)]);
+smalltalk.send(self,"_should_return_",["foo ^ nil ifNil: [ 2 ] ifNotNil: [ 3 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo 1 ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]",(3)]);
+smalltalk.send(self,"_should_return_",["foo nil ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]",(2)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -247,11 +251,11 @@ smalltalk.method({
 selector: "testifNotNil",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1 ifNotNil: [ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ nil ifNotNil: [ 2 ]", nil]);
-smalltalk.send(self, "_should_return_", ["foo 1 ifNotNil: [ ^ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo nil ifNotNil: [ ^ 2 ]", self['@receiver']]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo ^ 1 ifNotNil: [ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ nil ifNotNil: [ 2 ]",nil]);
+smalltalk.send(self,"_should_return_",["foo 1 ifNotNil: [ ^ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo nil ifNotNil: [ ^ 2 ]",self["@receiver"]]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -261,11 +265,11 @@ smalltalk.method({
 selector: "testifTrue",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo false ifTrue: [ ^ 1 ]", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo true ifTrue: [ ^ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ false ifTrue: [ 1 ]", nil]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifTrue: [ 2 ]", (2)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo false ifTrue: [ ^ 1 ]",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo true ifTrue: [ ^ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ false ifTrue: [ 1 ]",nil]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifTrue: [ 2 ]",(2)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -275,11 +279,11 @@ smalltalk.method({
 selector: "testifTrueIfFalse",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo false ifTrue: [ ^ 1 ] ifFalse: [ ^2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo true ifTrue: [ ^ 1 ] ifFalse: [ ^ 2 ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ false ifTrue: [ 2 ] ifFalse: [ 1 ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifTrue: [ 2 ] ifFalse: [ 1 ]", (2)]);
-return self;}
+smalltalk.send(self,"_should_return_",["foo false ifTrue: [ ^ 1 ] ifFalse: [ ^2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo true ifTrue: [ ^ 1 ] ifFalse: [ ^ 2 ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ false ifTrue: [ 2 ] ifFalse: [ 1 ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifTrue: [ 2 ] ifFalse: [ 1 ]",(2)]);
+return self}
 }),
 smalltalk.CodeGeneratorTest);
 
@@ -293,7 +297,7 @@ selector: "codeGeneratorClass",
 fn: function (){
 var self=this;
 return (smalltalk.InliningCodeGenerator || InliningCodeGenerator);
-return self;}
+}
 }),
 smalltalk.InliningCodeGeneratorTest);
 
@@ -417,12 +421,14 @@ smalltalk.method({
 selector: "testAssignment",
 fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo self := 1");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(self['@analyzer'], "_visit_", [ast]);}), (smalltalk.InvalidAssignmentError || InvalidAssignmentError)]);
-return self;}
+var src;
+var ast;
+src="foo self := 1";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self,"_should_raise_",[(function(){
+return smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+}),(smalltalk.InvalidAssignmentError || InvalidAssignmentError)]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 

+ 109 - 103
js/Compiler-Tests.js

@@ -8,7 +8,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return (smalltalk.CodeGenerator || CodeGenerator);
-return self;},
+},
 args: [],
 source: "codeGeneratorClass\x0a\x09^ CodeGenerator",
 messageSends: [],
@@ -23,11 +23,16 @@ selector: "compiler",
 category: 'factory',
 fn: function (){
 var self=this;
-return (function($rec){smalltalk.send($rec, "_codeGeneratorClass_", [smalltalk.send(self, "_codeGeneratorClass", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []));
-return self;},
+var $2,$3,$1;
+$2=smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]);
+smalltalk.send($2,"_codeGeneratorClass_",[smalltalk.send(self,"_codeGeneratorClass",[])]);
+$3=smalltalk.send($2,"_yourself",[]);
+$1=$3;
+return $1;
+},
 args: [],
 source: "compiler\x0a\x09^ Compiler new\x0a\x09\x09codeGeneratorClass: self codeGeneratorClass;\x0a\x09\x09yourself",
-messageSends: ["codeGeneratorClass:", "codeGeneratorClass", "yourself", "new"],
+messageSends: ["codeGeneratorClass:", "codeGeneratorClass", "new", "yourself"],
 referencedClasses: ["Compiler"]
 }),
 smalltalk.CodeGeneratorTest);
@@ -39,8 +44,8 @@ selector: "setUp",
 category: 'initialization',
 fn: function (){
 var self=this;
-(self['@receiver']=smalltalk.send(smalltalk.send(self, "_targetClass", []), "_new", []));
-return self;},
+self["@receiver"]=smalltalk.send(smalltalk.send(self,"_targetClass",[]),"_new",[]);
+return self},
 args: [],
 source: "setUp\x0a\x09receiver := self targetClass new",
 messageSends: ["new", "targetClass"],
@@ -53,18 +58,18 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "should:return:",
 category: 'testing',
-fn: function (aString, anObject){
-var self=this;
-var method=nil;
-var result=nil;
-(method=smalltalk.send(smalltalk.send(self, "_compiler", []), "_install_forClass_category_", [aString, smalltalk.send(self, "_targetClass", []), "tests"]));
-(result=smalltalk.send(self['@receiver'], "_perform_", [smalltalk.send(method, "_selector", [])]));
-smalltalk.send(smalltalk.send(self, "_targetClass", []), "_removeCompiledMethod_", [method]);
-smalltalk.send(self, "_assert_equals_", [anObject, result]);
-return self;},
+fn: function (aString,anObject){
+var self=this;
+var method;
+var result;
+method=smalltalk.send(smalltalk.send(self,"_compiler",[]),"_install_forClass_category_",[aString,smalltalk.send(self,"_targetClass",[]),"tests"]);
+result=smalltalk.send(self["@receiver"],"_perform_",[smalltalk.send(method,"_selector",[])]);
+smalltalk.send(smalltalk.send(self,"_targetClass",[]),"_removeCompiledMethod_",[method]);
+smalltalk.send(self,"_assert_equals_",[anObject,result]);
+return self},
 args: ["aString", "anObject"],
 source: "should: aString return: anObject\x0a\x09| method result |\x0a\x0a\x09method := self compiler install: aString forClass: self targetClass category: 'tests'.\x0a\x09result := receiver perform: method selector.\x0a\x09self targetClass removeCompiledMethod: method.\x0a\x09self assert: anObject equals: result",
-messageSends: ["install:forClass:category:", "compiler", "targetClass", "perform:", "selector", "removeCompiledMethod:", "assert:equals:"],
+messageSends: ["install:forClass:category:", "targetClass", "compiler", "perform:", "selector", "removeCompiledMethod:", "assert:equals:"],
 referencedClasses: []
 }),
 smalltalk.CodeGeneratorTest);
@@ -77,7 +82,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return (smalltalk.DoIt || DoIt);
-return self;},
+},
 args: [],
 source: "targetClass\x0a\x09^ DoIt",
 messageSends: [],
@@ -92,8 +97,7 @@ selector: "tearDown",
 category: 'initialization',
 fn: function (){
 var self=this;
-
-return self;},
+return self},
 args: [],
 source: "tearDown\x0a\x09\x22receiver := nil\x22",
 messageSends: [],
@@ -108,10 +112,10 @@ selector: "testAssignment",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo | a | a := true ifTrue: [ 1 ]. ^ a", (1)]);
-smalltalk.send(self, "_should_return_", ["foo | a | a := false ifTrue: [ 1 ]. ^ a", nil]);
-smalltalk.send(self, "_should_return_", ["foo | a | ^ a := true ifTrue: [ 1 ]", (1)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo | a | a := true ifTrue: [ 1 ]. ^ a",(1)]);
+smalltalk.send(self,"_should_return_",["foo | a | a := false ifTrue: [ 1 ]. ^ a",nil]);
+smalltalk.send(self,"_should_return_",["foo | a | ^ a := true ifTrue: [ 1 ]",(1)]);
+return self},
 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 ",
 messageSends: ["should:return:"],
@@ -126,10 +130,10 @@ selector: "testBlockReturn",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ #(1 2 3) collect: [ :each | true ifTrue: [ each + 1 ] ]", [(2), (3), (4)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ #(1 2 3) collect: [ :each | false ifFalse: [ each + 1 ] ]", [(2), (3), (4)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ #(1 2 3) collect: [ :each | each odd ifTrue: [ each + 1 ] ifFalse: [ each - 1 ] ]", [(2), (1), (4)]]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ #(1 2 3) collect: [ :each | true ifTrue: [ each + 1 ] ]",[(2), (3), (4)]]);
+smalltalk.send(self,"_should_return_",["foo ^ #(1 2 3) collect: [ :each | false ifFalse: [ each + 1 ] ]",[(2), (3), (4)]]);
+smalltalk.send(self,"_should_return_",["foo ^ #(1 2 3) collect: [ :each | each odd ifTrue: [ each + 1 ] ifFalse: [ each - 1 ] ]",[(2), (1), (4)]]);
+return self},
 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).",
 messageSends: ["should:return:"],
@@ -144,8 +148,8 @@ selector: "testCascades",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ Array new add: 3; add: 4; yourself", [(3), (4)]]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ Array new add: 3; add: 4; yourself",[(3), (4)]]);
+return self},
 args: [],
 source: "testCascades\x0a\x09\x0a\x09self should: 'foo ^ Array new add: 3; add: 4; yourself' return: #(3 4)",
 messageSends: ["should:return:"],
@@ -160,16 +164,16 @@ selector: "testLiterals",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ 'hello'", "hello"]);
-smalltalk.send(self, "_should_return_", ["foo ^ #(1 2 3 4)", [(1), (2), (3), (4)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ {1. [:x | x ] value: 2. 3. [4] value}", [(1), (2), (3), (4)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ true", true]);
-smalltalk.send(self, "_should_return_", ["foo ^ false", false]);
-smalltalk.send(self, "_should_return_", ["foo ^ #{1->2. 3->4}", smalltalk.HashedCollection._fromPairs_([smalltalk.send((1), "__minus_gt", [(2)]),smalltalk.send((3), "__minus_gt", [(4)])])]);
-smalltalk.send(self, "_should_return_", ["foo ^ #hello", smalltalk.symbolFor("hello")]);
-smalltalk.send(self, "_should_return_", ["foo ^ -123.456", (-123.456)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ 1",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ 'hello'","hello"]);
+smalltalk.send(self,"_should_return_",["foo ^ #(1 2 3 4)",[(1), (2), (3), (4)]]);
+smalltalk.send(self,"_should_return_",["foo ^ {1. [:x | x ] value: 2. 3. [4] value}",[(1), (2), (3), (4)]]);
+smalltalk.send(self,"_should_return_",["foo ^ true",true]);
+smalltalk.send(self,"_should_return_",["foo ^ false",false]);
+smalltalk.send(self,"_should_return_",["foo ^ #{1->2. 3->4}",smalltalk.HashedCollection._fromPairs_([smalltalk.send((1),"__minus_gt",[(2)]),smalltalk.send((3),"__minus_gt",[(4)])])]);
+smalltalk.send(self,"_should_return_",["foo ^ #hello",smalltalk.symbolFor("hello")]);
+smalltalk.send(self,"_should_return_",["foo ^ -123.456",(-123.456)]);
+return self},
 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",
 messageSends: ["should:return:", "->"],
@@ -184,12 +188,12 @@ selector: "testLocalReturn",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 + 1", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo self asString", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo | a b | a := 1. b := 2. ^ a + b", (3)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ 1",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 + 1",(2)]);
+smalltalk.send(self,"_should_return_",["foo ",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo self asString",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo | a b | a := 1. b := 2. ^ a + b",(3)]);
+return self},
 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",
 messageSends: ["should:return:"],
@@ -204,12 +208,12 @@ selector: "testMessageSends",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1 asString", "1"]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 + 1", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 + 2 * 3", (9)]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 to: 3", [(1), (2), (3)]]);
-smalltalk.send(self, "_should_return_", ["foo ^ 1 to: 5 by: 2", [(1), (3), (5)]]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ 1 asString","1"]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 + 1",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 + 2 * 3",(9)]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 to: 3",[(1), (2), (3)]]);
+smalltalk.send(self,"_should_return_",["foo ^ 1 to: 5 by: 2",[(1), (3), (5)]]);
+return self},
 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)",
 messageSends: ["should:return:"],
@@ -224,11 +228,11 @@ selector: "testNestedIfTrue",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ true ifTrue: [ false ifFalse: [ 1 ] ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifTrue: [ false ifTrue: [ 1 ] ]", nil]);
-smalltalk.send(self, "_should_return_", ["foo true ifTrue: [ false ifFalse: [ ^ 1 ] ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo true ifTrue: [ false ifTrue: [ ^ 1 ] ]", self['@receiver']]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ true ifTrue: [ false ifFalse: [ 1 ] ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifTrue: [ false ifTrue: [ 1 ] ]",nil]);
+smalltalk.send(self,"_should_return_",["foo true ifTrue: [ false ifFalse: [ ^ 1 ] ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo true ifTrue: [ false ifTrue: [ ^ 1 ] ]",self["@receiver"]]);
+return self},
 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.",
 messageSends: ["should:return:"],
@@ -243,11 +247,11 @@ selector: "testNonLocalReturn",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo [ ^ 1 ] value", (1)]);
-smalltalk.send(self, "_should_return_", ["foo [ ^ 1 + 1 ] value", (2)]);
-smalltalk.send(self, "_should_return_", ["foo | a b | a := 1. b := 2. [ ^ a + b ] value. self halt", (3)]);
-smalltalk.send(self, "_should_return_", ["foo [ :x | ^ x + x ] value: 4. ^ 2", (8)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo [ ^ 1 ] value",(1)]);
+smalltalk.send(self,"_should_return_",["foo [ ^ 1 + 1 ] value",(2)]);
+smalltalk.send(self,"_should_return_",["foo | a b | a := 1. b := 2. [ ^ a + b ] value. self halt",(3)]);
+smalltalk.send(self,"_should_return_",["foo [ :x | ^ x + x ] value: 4. ^ 2",(8)]);
+return self},
 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",
 messageSends: ["should:return:"],
@@ -262,11 +266,11 @@ selector: "testifFalse",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo true ifFalse: [ ^ 1 ]", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo false ifFalse: [ ^ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifFalse: [ 1 ]", nil]);
-smalltalk.send(self, "_should_return_", ["foo ^ false ifFalse: [ 2 ]", (2)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo true ifFalse: [ ^ 1 ]",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo false ifFalse: [ ^ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifFalse: [ 1 ]",nil]);
+smalltalk.send(self,"_should_return_",["foo ^ false ifFalse: [ 2 ]",(2)]);
+return self},
 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.",
 messageSends: ["should:return:"],
@@ -281,11 +285,11 @@ selector: "testifFalseIfTrue",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo true ifFalse: [ ^ 1 ] ifTrue: [ ^ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo false ifFalse: [ ^ 2 ] ifTrue: [ ^1 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifFalse: [ 1 ] ifTrue: [ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ false ifFalse: [ 2 ] ifTrue: [ 1 ]", (2)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo true ifFalse: [ ^ 1 ] ifTrue: [ ^ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo false ifFalse: [ ^ 2 ] ifTrue: [ ^1 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifFalse: [ 1 ] ifTrue: [ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ false ifFalse: [ 2 ] ifTrue: [ 1 ]",(2)]);
+return self},
 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.",
 messageSends: ["should:return:"],
@@ -300,11 +304,11 @@ selector: "testifNil",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1 ifNil: [ 2 ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ nil ifNil: [ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo 1 ifNil: [ ^ 2 ]", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo nil ifNil: [ ^ 2 ]", (2)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ 1 ifNil: [ 2 ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ nil ifNil: [ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo 1 ifNil: [ ^ 2 ]",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo nil ifNil: [ ^ 2 ]",(2)]);
+return self},
 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.",
 messageSends: ["should:return:"],
@@ -319,11 +323,11 @@ selector: "testifNilIfNotNil",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1 ifNil: [ 2 ] ifNotNil: [ 3 ]", (3)]);
-smalltalk.send(self, "_should_return_", ["foo ^ nil ifNil: [ 2 ] ifNotNil: [ 3 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo 1 ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]", (3)]);
-smalltalk.send(self, "_should_return_", ["foo nil ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]", (2)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ 1 ifNil: [ 2 ] ifNotNil: [ 3 ]",(3)]);
+smalltalk.send(self,"_should_return_",["foo ^ nil ifNil: [ 2 ] ifNotNil: [ 3 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo 1 ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]",(3)]);
+smalltalk.send(self,"_should_return_",["foo nil ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]",(2)]);
+return self},
 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.",
 messageSends: ["should:return:"],
@@ -338,11 +342,11 @@ selector: "testifNotNil",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo ^ 1 ifNotNil: [ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ nil ifNotNil: [ 2 ]", nil]);
-smalltalk.send(self, "_should_return_", ["foo 1 ifNotNil: [ ^ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo nil ifNotNil: [ ^ 2 ]", self['@receiver']]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo ^ 1 ifNotNil: [ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ nil ifNotNil: [ 2 ]",nil]);
+smalltalk.send(self,"_should_return_",["foo 1 ifNotNil: [ ^ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo nil ifNotNil: [ ^ 2 ]",self["@receiver"]]);
+return self},
 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.",
 messageSends: ["should:return:"],
@@ -357,11 +361,11 @@ selector: "testifTrue",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo false ifTrue: [ ^ 1 ]", self['@receiver']]);
-smalltalk.send(self, "_should_return_", ["foo true ifTrue: [ ^ 2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo ^ false ifTrue: [ 1 ]", nil]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifTrue: [ 2 ]", (2)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo false ifTrue: [ ^ 1 ]",self["@receiver"]]);
+smalltalk.send(self,"_should_return_",["foo true ifTrue: [ ^ 2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo ^ false ifTrue: [ 1 ]",nil]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifTrue: [ 2 ]",(2)]);
+return self},
 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.",
 messageSends: ["should:return:"],
@@ -376,11 +380,11 @@ selector: "testifTrueIfFalse",
 category: 'tests',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_should_return_", ["foo false ifTrue: [ ^ 1 ] ifFalse: [ ^2 ]", (2)]);
-smalltalk.send(self, "_should_return_", ["foo true ifTrue: [ ^ 1 ] ifFalse: [ ^ 2 ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ false ifTrue: [ 2 ] ifFalse: [ 1 ]", (1)]);
-smalltalk.send(self, "_should_return_", ["foo ^ true ifTrue: [ 2 ] ifFalse: [ 1 ]", (2)]);
-return self;},
+smalltalk.send(self,"_should_return_",["foo false ifTrue: [ ^ 1 ] ifFalse: [ ^2 ]",(2)]);
+smalltalk.send(self,"_should_return_",["foo true ifTrue: [ ^ 1 ] ifFalse: [ ^ 2 ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ false ifTrue: [ 2 ] ifFalse: [ 1 ]",(1)]);
+smalltalk.send(self,"_should_return_",["foo ^ true ifTrue: [ 2 ] ifFalse: [ 1 ]",(2)]);
+return self},
 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.",
 messageSends: ["should:return:"],
@@ -399,7 +403,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return (smalltalk.InliningCodeGenerator || InliningCodeGenerator);
-return self;},
+},
 args: [],
 source: "codeGeneratorClass\x0a\x09^ InliningCodeGenerator",
 messageSends: [],
@@ -558,12 +562,14 @@ selector: "testAssignment",
 category: 'tests',
 fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo self := 1");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(self['@analyzer'], "_visit_", [ast]);}), (smalltalk.InvalidAssignmentError || InvalidAssignmentError)]);
-return self;},
+var src;
+var ast;
+src="foo self := 1";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self,"_should_raise_",[(function(){
+return smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+}),(smalltalk.InvalidAssignmentError || InvalidAssignmentError)]);
+return self},
 args: [],
 source: "testAssignment\x0a\x09| src ast |\x0a\x0a\x09src := 'foo self := 1'.\x0a\x09ast := smalltalk parse: src.\x0a\x09self should: [analyzer visit: ast] raise: InvalidAssignmentError",
 messageSends: ["parse:", "should:raise:", "visit:"],

+ 31 - 15
js/Examples.deploy.js

@@ -6,9 +6,11 @@ smalltalk.method({
 selector: "decrease",
 fn: function (){
 var self=this;
-(self['@count']=((($receiver = self['@count']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])));
-smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);})]);
-return self;}
+self["@count"]=smalltalk.send(self["@count"],"__minus",[(1)]);
+smalltalk.send(self["@header"],"_contents_",[(function(html){
+return smalltalk.send(html,"_with_",[smalltalk.send(self["@count"],"_asString",[])]);
+})]);
+return self}
 }),
 smalltalk.Counter);
 
@@ -18,9 +20,11 @@ smalltalk.method({
 selector: "increase",
 fn: function (){
 var self=this;
-(self['@count']=((($receiver = self['@count']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
-smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);})]);
-return self;}
+self["@count"]=smalltalk.send(self["@count"],"__plus",[(1)]);
+smalltalk.send(self["@header"],"_contents_",[(function(html){
+return smalltalk.send(html,"_with_",[smalltalk.send(self["@count"],"_asString",[])]);
+})]);
+return self}
 }),
 smalltalk.Counter);
 
@@ -30,9 +34,9 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_initialize", [], smalltalk.Counter.superclass || nil);
-(self['@count']=(0));
-return self;}
+smalltalk.send(self,"_initialize",[],smalltalk.Widget);
+self["@count"]=(0);
+return self}
 }),
 smalltalk.Counter);
 
@@ -42,10 +46,22 @@ smalltalk.method({
 selector: "renderOn:",
 fn: function (html){
 var self=this;
-(self['@header']=(function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_h1", [])));
-(function($rec){smalltalk.send($rec, "_with_", ["++"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_increase", []);})]);})(smalltalk.send(html, "_button", []));
-(function($rec){smalltalk.send($rec, "_with_", ["--"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_decrease", []);})]);})(smalltalk.send(html, "_button", []));
-return self;}
+var $1,$2,$3,$4,$5,$6;
+$1=smalltalk.send(html,"_h1",[]);
+smalltalk.send($1,"_with_",[smalltalk.send(self["@count"],"_asString",[])]);
+$2=smalltalk.send($1,"_yourself",[]);
+self["@header"]=$2;
+$3=smalltalk.send(html,"_button",[]);
+smalltalk.send($3,"_with_",["++"]);
+$4=smalltalk.send($3,"_onClick_",[(function(){
+return smalltalk.send(self,"_increase",[]);
+})]);
+$5=smalltalk.send(html,"_button",[]);
+smalltalk.send($5,"_with_",["--"]);
+$6=smalltalk.send($5,"_onClick_",[(function(){
+return smalltalk.send(self,"_decrease",[]);
+})]);
+return self}
 }),
 smalltalk.Counter);
 
@@ -56,8 +72,8 @@ smalltalk.method({
 selector: "tryExample",
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_new", []), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
-return self;}
+smalltalk.send(smalltalk.send(self,"_new",[]),"_appendToJQuery_",[smalltalk.send("body","_asJQuery",[])]);
+return self}
 }),
 smalltalk.Counter.klass);
 

+ 33 - 17
js/Examples.js

@@ -8,9 +8,11 @@ selector: "decrease",
 category: 'actions',
 fn: function (){
 var self=this;
-(self['@count']=((($receiver = self['@count']).klass === smalltalk.Number) ? $receiver -(1) : smalltalk.send($receiver, "__minus", [(1)])));
-smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);})]);
-return self;},
+self["@count"]=smalltalk.send(self["@count"],"__minus",[(1)]);
+smalltalk.send(self["@header"],"_contents_",[(function(html){
+return smalltalk.send(html,"_with_",[smalltalk.send(self["@count"],"_asString",[])]);
+})]);
+return self},
 args: [],
 source: "decrease\x0a    count := count - 1.\x0a    header contents: [:html | html with: count asString]",
 messageSends: ["-", "contents:", "with:", "asString"],
@@ -25,9 +27,11 @@ selector: "increase",
 category: 'actions',
 fn: function (){
 var self=this;
-(self['@count']=((($receiver = self['@count']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
-smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);})]);
-return self;},
+self["@count"]=smalltalk.send(self["@count"],"__plus",[(1)]);
+smalltalk.send(self["@header"],"_contents_",[(function(html){
+return smalltalk.send(html,"_with_",[smalltalk.send(self["@count"],"_asString",[])]);
+})]);
+return self},
 args: [],
 source: "increase\x0a    count := count + 1.\x0a    header contents: [:html | html with: count asString]",
 messageSends: ["+", "contents:", "with:", "asString"],
@@ -42,9 +46,9 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_initialize", [], smalltalk.Counter.superclass || nil);
-(self['@count']=(0));
-return self;},
+smalltalk.send(self,"_initialize",[],smalltalk.Widget);
+self["@count"]=(0);
+return self},
 args: [],
 source: "initialize\x0a    super initialize.\x0a    count := 0",
 messageSends: ["initialize"],
@@ -59,13 +63,25 @@ selector: "renderOn:",
 category: 'rendering',
 fn: function (html){
 var self=this;
-(self['@header']=(function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_h1", [])));
-(function($rec){smalltalk.send($rec, "_with_", ["++"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_increase", []);})]);})(smalltalk.send(html, "_button", []));
-(function($rec){smalltalk.send($rec, "_with_", ["--"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_decrease", []);})]);})(smalltalk.send(html, "_button", []));
-return self;},
+var $1,$2,$3,$4,$5,$6;
+$1=smalltalk.send(html,"_h1",[]);
+smalltalk.send($1,"_with_",[smalltalk.send(self["@count"],"_asString",[])]);
+$2=smalltalk.send($1,"_yourself",[]);
+self["@header"]=$2;
+$3=smalltalk.send(html,"_button",[]);
+smalltalk.send($3,"_with_",["++"]);
+$4=smalltalk.send($3,"_onClick_",[(function(){
+return smalltalk.send(self,"_increase",[]);
+})]);
+$5=smalltalk.send(html,"_button",[]);
+smalltalk.send($5,"_with_",["--"]);
+$6=smalltalk.send($5,"_onClick_",[(function(){
+return smalltalk.send(self,"_decrease",[]);
+})]);
+return self},
 args: ["html"],
 source: "renderOn: html\x0a    header := html h1 \x0a\x09with: count asString;\x0a\x09yourself.\x0a    html button\x0a\x09with: '++';\x0a\x09onClick: [self increase].\x0a    html button\x0a\x09with: '--';\x0a\x09onClick: [self decrease]",
-messageSends: ["with:", "asString", "yourself", "h1", "onClick:", "increase", "button", "decrease"],
+messageSends: ["with:", "asString", "h1", "yourself", "button", "onClick:", "increase", "decrease"],
 referencedClasses: []
 }),
 smalltalk.Counter);
@@ -78,11 +94,11 @@ selector: "tryExample",
 category: 'example',
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_new", []), "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
-return self;},
+smalltalk.send(smalltalk.send(self,"_new",[]),"_appendToJQuery_",[smalltalk.send("body","_asJQuery",[])]);
+return self},
 args: [],
 source: "tryExample\x0a\x09\x22In order to play with the Counter, just select the\x0a\x09doit below and press the Do it button. Then take a\x0a\x09look in the HTML document above the IDE.\x22\x0a\x0a\x09\x22Counter tryExample\x22\x0a        self new appendToJQuery: 'body' asJQuery",
-messageSends: ["appendToJQuery:", "new", "asJQuery"],
+messageSends: ["appendToJQuery:", "asJQuery", "new"],
 referencedClasses: []
 }),
 smalltalk.Counter.klass);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 359 - 220
js/IDE.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 352 - 225
js/IDE.js


+ 384 - 113
js/Importer-Exporter.deploy.js

@@ -4,17 +4,36 @@ smalltalk.addMethod(
 "_nextChunk",
 smalltalk.method({
 selector: "nextChunk",
-fn: function () {
+fn: function (){
 var self=this;
+var $1,$2,$3;
 var $early={};
-try{var char_=nil;
-var result=nil;
-var chunk=nil;
-(result=smalltalk.send("", "_writeStream", []));
-(function(){while((function(){(char_=smalltalk.send(self['@stream'], "_next", []));return smalltalk.send(char_, "_notNil", []);})()) {(function(){((($receiver = smalltalk.send(char_, "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@stream'], "_peek", []), "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_next", []);})() : (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_next", []);}), (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@stream'], "_peek", []), "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_next", []);})() : (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_next", []);}), (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})]));})]));return smalltalk.send(result, "_nextPut_", [char_]);})()}})();
+try {
+var char_;
+var result;
+var chunk;
+result=smalltalk.send("","_writeStream",[]);
+smalltalk.send((function(){
+char_=smalltalk.send(self["@stream"],"_next",[]);
+char_;
+return smalltalk.send(char_,"_notNil",[]);
+}),"_whileTrue_",[(function(){
+$1=smalltalk.send(char_,"__eq",["!"]);
+if(smalltalk.assert($1)){
+$2=smalltalk.send(smalltalk.send(self["@stream"],"_peek",[]),"__eq",["!"]);
+if(smalltalk.assert($2)){
+smalltalk.send(self["@stream"],"_next",[]);
+} else {
+$3=smalltalk.send(smalltalk.send(result,"_contents",[]),"_trimBoth",[]);
+throw $early=[$3];
+};
+};
+return smalltalk.send(result,"_nextPut_",[char_]);
+})]);
 return nil;
-return self;
-} catch(e) {if(e===$early)return e[0]; throw e}}
+}
+catch(e) {if(e===$early)return e[0]; throw e}
+}
 }),
 smalltalk.ChunkParser);
 
@@ -22,10 +41,10 @@ smalltalk.addMethod(
 "_stream_",
 smalltalk.method({
 selector: "stream:",
-fn: function (aStream) {
+fn: function (aStream){
 var self=this;
-(self['@stream']=aStream);
-return self;}
+self["@stream"]=aStream;
+return self}
 }),
 smalltalk.ChunkParser);
 
@@ -34,10 +53,12 @@ smalltalk.addMethod(
 "_on_",
 smalltalk.method({
 selector: "on:",
-fn: function (aStream) {
+fn: function (aStream){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_new", []), "_stream_", [aStream]);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_stream_",[aStream]);
+return $1;
+}
 }),
 smalltalk.ChunkParser.klass);
 
@@ -47,10 +68,22 @@ smalltalk.addMethod(
 "_classNameFor_",
 smalltalk.method({
 selector: "classNameFor:",
-fn: function (aClass) {
+fn: function (aClass){
 var self=this;
-return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
-return self;}
+var $2,$3,$1;
+$2=smalltalk.send(aClass,"_isMetaclass",[]);
+if(smalltalk.assert($2)){
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_instanceClass",[]),"_name",[]),"__comma",[".klass"]);
+} else {
+$3=smalltalk.send(aClass,"_isNil",[]);
+if(smalltalk.assert($3)){
+$1="nil";
+} else {
+$1=smalltalk.send(aClass,"_name",[]);
+};
+};
+return $1;
+}
 }),
 smalltalk.Exporter);
 
@@ -58,10 +91,16 @@ smalltalk.addMethod(
 "_exportAll",
 smalltalk.method({
 selector: "exportAll",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packages", []), "_do_", [(function(pkg){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self, "_exportPackage_", [smalltalk.send(pkg, "_name", [])])]);})]);})]);
-return self;}
+var $1;
+$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
+return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packages",[]),"_do_",[(function(pkg){
+return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_exportPackage_",[smalltalk.send(pkg,"_name",[])])]);
+})]);
+})]);
+return $1;
+}
 }),
 smalltalk.Exporter);
 
@@ -69,10 +108,17 @@ smalltalk.addMethod(
 "_exportClass_",
 smalltalk.method({
 selector: "exportClass:",
-fn: function (aClass) {
+fn: function (aClass){
 var self=this;
-return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){smalltalk.send(self, "_exportDefinitionOf_on_", [aClass, stream]);smalltalk.send(self, "_exportMethodsOf_on_", [aClass, stream]);smalltalk.send(self, "_exportMetaDefinitionOf_on_", [aClass, stream]);return smalltalk.send(self, "_exportMethodsOf_on_", [smalltalk.send(aClass, "_class", []), stream]);})]);
-return self;}
+var $1;
+$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
+smalltalk.send(self,"_exportDefinitionOf_on_",[aClass,stream]);
+smalltalk.send(self,"_exportMethodsOf_on_",[aClass,stream]);
+smalltalk.send(self,"_exportMetaDefinitionOf_on_",[aClass,stream]);
+return smalltalk.send(self,"_exportMethodsOf_on_",[smalltalk.send(aClass,"_class",[]),stream]);
+})]);
+return $1;
+}
 }),
 smalltalk.Exporter);
 
@@ -80,14 +126,32 @@ smalltalk.addMethod(
 "_exportDefinitionOf_on_",
 smalltalk.method({
 selector: "exportDefinitionOf:on:",
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addClass("]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", ["', "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [", ["]);})(aStream);
-smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [", "]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["], '"]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_category", []), "__comma", ["'"])]);return smalltalk.send($rec, "_nextPutAll_", [");"]);})(aStream);
-((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [aClass])]);smalltalk.send($rec, "_nextPutAll_", [".comment="]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_comment", []), "_asJavascript", [])]);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [aClass])]);smalltalk.send($rec, "_nextPutAll_", [".comment="]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_comment", []), "_asJavascript", [])]);})(aStream);})]));
-smalltalk.send(aStream, "_lf", []);
-return self;}
+var $1,$2,$3,$4;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addClass("]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",["', "])]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])])]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[", ["]);
+smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[", "]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",["], '"]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_category",[]),"__comma",["'"])]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[");"]);
+$3=smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_notEmpty",[]);
+if(smalltalk.assert($3)){
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk."]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[aClass])]);
+smalltalk.send(aStream,"_nextPutAll_",[".comment="]);
+$4=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_asJavascript",[])]);
+$4;
+};
+smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.Exporter);
 
@@ -95,10 +159,22 @@ smalltalk.addMethod(
 "_exportMetaDefinitionOf_on_",
 smalltalk.method({
 selector: "exportMetaDefinitionOf:on:",
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [".iVarNames = ["]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [","]);})]);return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send("];", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [".iVarNames = ["]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [","]);})]);return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send("];", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]));
-return self;}
+var $1,$2;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_isEmpty",[]);
+if(! smalltalk.assert($1)){
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_class",[])])])]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[".iVarNames = ["]);
+$2;
+smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[","]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("];","__comma",[smalltalk.send((smalltalk.String || String),"_lf",[])])]);
+};
+return self}
 }),
 smalltalk.Exporter);
 
@@ -106,11 +182,36 @@ smalltalk.addMethod(
 "_exportMethod_of_on_",
 smalltalk.method({
 selector: "exportMethod:of:on:",
-fn: function (aMethod, aClass, aStream) {
+fn: function (aMethod,aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addMethod("]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", []), "_asJavascript", []), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk.method({"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("selector: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("category: '", "__comma", [smalltalk.send(aMethod, "_category", [])]), "__comma", ["',"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("args: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_arguments", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("source: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_source", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("messageSends: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_messageSends", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("referencedClasses: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_referencedClasses", []), "_asJavascript", [])])]);})(aStream);
-(function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["}),"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [");"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
-return self;}
+var $1,$2;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addMethod("]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asSelector",[]),"_asJavascript",[]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.method({"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("category: '","__comma",[smalltalk.send(aMethod,"_category",[])]),"__comma",["',"])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("fn: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_fn",[]),"_compiledSource",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("args: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_arguments",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("source: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_source",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("messageSends: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_messageSends",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("referencedClasses: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_referencedClasses",[]),"_asJavascript",[])])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["}),"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
+smalltalk.send(aStream,"_nextPutAll_",[");"]);
+smalltalk.send(aStream,"_lf",[]);
+$2=smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.Exporter);
 
@@ -118,11 +219,19 @@ smalltalk.addMethod(
 "_exportMethodsOf_on_",
 smalltalk.method({
 selector: "exportMethodsOf:on:",
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_category", []), "_match_", ["^\x5c*"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})]));})]);
-smalltalk.send(aStream, "_lf", []);
-return self;}
+var $1;
+smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_sorted_",[(function(a,b){
+return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
+})]),"_do_",[(function(each){
+$1=smalltalk.send(smalltalk.send(each,"_category",[]),"_match_",["^\x5c*"]);
+if(! smalltalk.assert($1)){
+return smalltalk.send(self,"_exportMethod_of_on_",[each,aClass,aStream]);
+};
+})]);
+smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.Exporter);
 
@@ -130,11 +239,21 @@ smalltalk.addMethod(
 "_exportPackage_",
 smalltalk.method({
 selector: "exportPackage:",
-fn: function (packageName) {
+fn: function (packageName){
 var self=this;
-var package=nil;
-return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){(package=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [packageName]));smalltalk.send(self, "_exportPackageDefinitionOf_on_", [package, stream]);smalltalk.send(smalltalk.send(smalltalk.send(package, "_sortedClasses", []), "_asSet", []), "_do_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self, "_exportClass_", [each])]);})]);return smalltalk.send(self, "_exportPackageExtensionsOf_on_", [package, stream]);})]);
-return self;}
+var $1;
+var package;
+$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
+package=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packageAt_",[packageName]);
+package;
+smalltalk.send(self,"_exportPackageDefinitionOf_on_",[package,stream]);
+smalltalk.send(smalltalk.send(smalltalk.send(package,"_sortedClasses",[]),"_asSet",[]),"_do_",[(function(each){
+return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_exportClass_",[each])]);
+})]);
+return smalltalk.send(self,"_exportPackageExtensionsOf_on_",[package,stream]);
+})]);
+return $1;
+}
 }),
 smalltalk.Exporter);
 
@@ -142,11 +261,13 @@ smalltalk.addMethod(
 "_exportPackageDefinitionOf_on_",
 smalltalk.method({
 selector: "exportPackageDefinitionOf:on:",
-fn: function (package, aStream) {
+fn: function (package,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addPackage("]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(package, "_name", [])]), "__comma", ["', "]), "__comma", [smalltalk.send(package, "_propertiesAsJSON", [])]), "__comma", [");"])]);})(aStream);
-smalltalk.send(aStream, "_lf", []);
-return self;}
+var $1;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addPackage("]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(package,"_name",[])]),"__comma",["', "]),"__comma",[smalltalk.send(package,"_propertiesAsJSON",[])]),"__comma",[");"])]);
+smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.Exporter);
 
@@ -154,12 +275,24 @@ smalltalk.addMethod(
 "_exportPackageExtensionsOf_on_",
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
-fn: function (package, aStream) {
+fn: function (package,aStream){
 var self=this;
-var name=nil;
-(name=smalltalk.send(package, "_name", []));
-smalltalk.send(smalltalk.send((smalltalk.Package || Package), "_sortedClasses_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", [])]), "_do_", [(function(each){return smalltalk.send([each,smalltalk.send(each, "_class", [])], "_do_", [(function(aClass){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(method){return ((($receiver = smalltalk.send(smalltalk.send(method, "_category", []), "_match_", [smalltalk.send("^\x5c*", "__comma", [name])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_exportMethod_of_on_", [method, aClass, aStream]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_exportMethod_of_on_", [method, aClass, aStream]);})]));})]);})]);})]);
-return self;}
+var $1;
+var name;
+name=smalltalk.send(package,"_name",[]);
+smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_sortedClasses_",[smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_classes",[])]),"_do_",[(function(each){
+return smalltalk.send([each,smalltalk.send(each,"_class",[])],"_do_",[(function(aClass){
+return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_sorted_",[(function(a,b){
+return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
+})]),"_do_",[(function(method){
+$1=smalltalk.send(smalltalk.send(method,"_category",[]),"_match_",[smalltalk.send("^\x5c*","__comma",[name])]);
+if(smalltalk.assert($1)){
+return smalltalk.send(self,"_exportMethod_of_on_",[method,aClass,aStream]);
+};
+})]);
+})]);
+})]);
+return self}
 }),
 smalltalk.Exporter);
 
@@ -170,10 +303,12 @@ smalltalk.addMethod(
 "_chunkEscape_",
 smalltalk.method({
 selector: "chunkEscape:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-return smalltalk.send(smalltalk.send(aString, "_replace_with_", ["!", "!!"]), "_trimBoth", []);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send(aString,"_replace_with_",["!","!!"]),"_trimBoth",[]);
+return $1;
+}
 }),
 smalltalk.ChunkExporter);
 
@@ -181,10 +316,22 @@ smalltalk.addMethod(
 "_classNameFor_",
 smalltalk.method({
 selector: "classNameFor:",
-fn: function (aClass) {
+fn: function (aClass){
 var self=this;
-return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [" class"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [" class"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
-return self;}
+var $2,$3,$1;
+$2=smalltalk.send(aClass,"_isMetaclass",[]);
+if(smalltalk.assert($2)){
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_instanceClass",[]),"_name",[]),"__comma",[" class"]);
+} else {
+$3=smalltalk.send(aClass,"_isNil",[]);
+if(smalltalk.assert($3)){
+$1="nil";
+} else {
+$1=smalltalk.send(aClass,"_name",[]);
+};
+};
+return $1;
+}
 }),
 smalltalk.ChunkExporter);
 
@@ -192,14 +339,32 @@ smalltalk.addMethod(
 "_exportDefinitionOf_on_",
 smalltalk.method({
 selector: "exportDefinitionOf:on:",
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(" subclass: #", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["\x09instanceVariableNames: '"]);})(aStream);
-smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["'"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("\x09package: '", "__comma", [smalltalk.send(aClass, "_category", [])]), "__comma", ["'!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);
-((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [" commentStamp!"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [" commentStamp!"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
-smalltalk.send(aStream, "_lf", []);
-return self;}
+var $1,$2,$3,$4;
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(" subclass: #","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
+smalltalk.send(aStream,"_lf",[]);
+$1=smalltalk.send(aStream,"_nextPutAll_",["\x09instanceVariableNames: '"]);
+smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[each]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[" "]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",["'"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("\x09package: '","__comma",[smalltalk.send(aClass,"_category",[])]),"__comma",["'!"])]);
+$2=smalltalk.send(aStream,"_lf",[]);
+$3=smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_notEmpty",[]);
+if(smalltalk.assert($3)){
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("!","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",[" commentStamp!"])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(self,"_chunkEscape_",[smalltalk.send(aClass,"_comment",[])]),"__comma",["!"])]);
+$4=smalltalk.send(aStream,"_lf",[]);
+$4;
+};
+smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.ChunkExporter);
 
@@ -207,10 +372,25 @@ smalltalk.addMethod(
 "_exportMetaDefinitionOf_on_",
 smalltalk.method({
 selector: "exportMetaDefinitionOf:on:",
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])]);return smalltalk.send($rec, "_nextPutAll_", [" instanceVariableNames: '"]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["'!"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])]);return smalltalk.send($rec, "_nextPutAll_", [" instanceVariableNames: '"]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["'!"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
-return self;}
+var $1,$2,$3;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_isEmpty",[]);
+if(! smalltalk.assert($1)){
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_class",[])])]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[" instanceVariableNames: '"]);
+$2;
+smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[each]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[" "]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",["'!"]);
+smalltalk.send(aStream,"_lf",[]);
+$3=smalltalk.send(aStream,"_lf",[]);
+$3;
+};
+return self}
 }),
 smalltalk.ChunkExporter);
 
@@ -218,10 +398,15 @@ smalltalk.addMethod(
 "_exportMethod_of_on_",
 smalltalk.method({
 selector: "exportMethod:of:on:",
-fn: function (aMethod, aClass, aStream) {
+fn: function (aMethod,aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aMethod, "_source", [])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["!"]);})(aStream);
-return self;}
+var $1;
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_chunkEscape_",[smalltalk.send(aMethod,"_source",[])])]);
+smalltalk.send(aStream,"_lf",[]);
+$1=smalltalk.send(aStream,"_nextPutAll_",["!"]);
+return self}
 }),
 smalltalk.ChunkExporter);
 
@@ -229,12 +414,20 @@ smalltalk.addMethod(
 "_exportMethods_category_of_on_",
 smalltalk.method({
 selector: "exportMethods:category:of:on:",
-fn: function (methods, category, aClass, aStream) {
+fn: function (methods,category,aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(" methodsFor: '", "__comma", [category]), "__comma", ["'!"])]);})(aStream);
-smalltalk.send(smalltalk.send(methods, "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(each){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [" !"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
-return self;}
+var $1,$2;
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("!","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(" methodsFor: '","__comma",[category]),"__comma",["'!"])]);
+smalltalk.send(smalltalk.send(methods,"_sorted_",[(function(a,b){
+return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
+})]),"_do_",[(function(each){
+return smalltalk.send(self,"_exportMethod_of_on_",[each,aClass,aStream]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",[" !"]);
+smalltalk.send(aStream,"_lf",[]);
+$2=smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.ChunkExporter);
 
@@ -242,14 +435,26 @@ smalltalk.addMethod(
 "_exportMethodsOf_on_",
 smalltalk.method({
 selector: "exportMethodsOf:on:",
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-var map=nil;
-(map=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
-smalltalk.send(aClass, "_protocolsDo_", [(function(category, methods){return ((($receiver = smalltalk.send(category, "_match_", ["^\x5c*"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(map, "_at_put_", [category, methods]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(map, "_at_put_", [category, methods]);})]));})]);
-smalltalk.send(smalltalk.send(smalltalk.send(map, "_keys", []), "_sorted_", [(function(a, b){return ((($receiver = a).klass === smalltalk.Number) ? $receiver <=b : smalltalk.send($receiver, "__lt_eq", [b]));})]), "_do_", [(function(category){var methods=nil;
-(methods=smalltalk.send(map, "_at_", [category]));return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, aClass, aStream]);})]);
-return self;}
+var $1;
+var map;
+map=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
+smalltalk.send(aClass,"_protocolsDo_",[(function(category,methods){
+$1=smalltalk.send(category,"_match_",["^\x5c*"]);
+if(! smalltalk.assert($1)){
+return smalltalk.send(map,"_at_put_",[category,methods]);
+};
+})]);
+smalltalk.send(smalltalk.send(smalltalk.send(map,"_keys",[]),"_sorted_",[(function(a,b){
+return smalltalk.send(a,"__lt_eq",[b]);
+})]),"_do_",[(function(category){
+var methods;
+methods=smalltalk.send(map,"_at_",[category]);
+methods;
+return smalltalk.send(self,"_exportMethods_category_of_on_",[methods,category,aClass,aStream]);
+})]);
+return self}
 }),
 smalltalk.ChunkExporter);
 
@@ -257,10 +462,12 @@ smalltalk.addMethod(
 "_exportPackageDefinitionOf_on_",
 smalltalk.method({
 selector: "exportPackageDefinitionOf:on:",
-fn: function (package, aStream) {
+fn: function (package,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Smalltalk current createPackage: '", "__comma", [smalltalk.send(package, "_name", [])]), "__comma", ["' properties: "]), "__comma", [smalltalk.send(smalltalk.send(package, "_properties", []), "_storeString", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);
-return self;}
+var $1;
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Smalltalk current createPackage: '","__comma",[smalltalk.send(package,"_name",[])]),"__comma",["' properties: "]),"__comma",[smalltalk.send(smalltalk.send(package,"_properties",[]),"_storeString",[])]),"__comma",["!"])]);
+$1=smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.ChunkExporter);
 
@@ -268,14 +475,33 @@ smalltalk.addMethod(
 "_exportPackageExtensionsOf_on_",
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
-fn: function (package, aStream) {
+fn: function (package,aStream){
 var self=this;
-var name=nil;
-var map=nil;
-(name=smalltalk.send(package, "_name", []));
-smalltalk.send(smalltalk.send((smalltalk.Package || Package), "_sortedClasses_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", [])]), "_do_", [(function(each){return smalltalk.send([each,smalltalk.send(each, "_class", [])], "_do_", [(function(aClass){(map=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));smalltalk.send(aClass, "_protocolsDo_", [(function(category, methods){return ((($receiver = smalltalk.send(category, "_match_", [smalltalk.send("^\x5c*", "__comma", [name])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(map, "_at_put_", [category, methods]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(map, "_at_put_", [category, methods]);})]));})]);return smalltalk.send(smalltalk.send(smalltalk.send(map, "_keys", []), "_sorted_", [(function(a, b){return ((($receiver = a).klass === smalltalk.Number) ? $receiver <=b : smalltalk.send($receiver, "__lt_eq", [b]));})]), "_do_", [(function(category){var methods=nil;
-(methods=smalltalk.send(map, "_at_", [category]));return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, aClass, aStream]);})]);})]);})]);
-return self;}
+var $1;
+var name;
+var map;
+name=smalltalk.send(package,"_name",[]);
+smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_sortedClasses_",[smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_classes",[])]),"_do_",[(function(each){
+return smalltalk.send([each,smalltalk.send(each,"_class",[])],"_do_",[(function(aClass){
+map=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
+map;
+smalltalk.send(aClass,"_protocolsDo_",[(function(category,methods){
+$1=smalltalk.send(category,"_match_",[smalltalk.send("^\x5c*","__comma",[name])]);
+if(smalltalk.assert($1)){
+return smalltalk.send(map,"_at_put_",[category,methods]);
+};
+})]);
+return smalltalk.send(smalltalk.send(smalltalk.send(map,"_keys",[]),"_sorted_",[(function(a,b){
+return smalltalk.send(a,"__lt_eq",[b]);
+})]),"_do_",[(function(category){
+var methods;
+methods=smalltalk.send(map,"_at_",[category]);
+methods;
+return smalltalk.send(self,"_exportMethods_category_of_on_",[methods,category,aClass,aStream]);
+})]);
+})]);
+})]);
+return self}
 }),
 smalltalk.ChunkExporter);
 
@@ -286,13 +512,23 @@ smalltalk.addMethod(
 "_exportDefinitionOf_on_",
 smalltalk.method({
 selector: "exportDefinitionOf:on:",
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addClass("]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", ["', "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [", ["]);})(aStream);
-smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [", "]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["], '"]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_category", []), "__comma", ["'"])]);return smalltalk.send($rec, "_nextPutAll_", [");"]);})(aStream);
-smalltalk.send(aStream, "_lf", []);
-return self;}
+var $1,$2;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addClass("]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",["', "])]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])])]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[", ["]);
+smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[", "]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",["], '"]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_category",[]),"__comma",["'"])]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[");"]);
+smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.StrippedExporter);
 
@@ -300,10 +536,26 @@ smalltalk.addMethod(
 "_exportMethod_of_on_",
 smalltalk.method({
 selector: "exportMethod:of:on:",
-fn: function (aMethod, aClass, aStream) {
+fn: function (aMethod,aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addMethod("]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", []), "_asJavascript", []), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk.method({"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("selector: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["}),"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [");"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
-return self;}
+var $1;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addMethod("]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asSelector",[]),"_asJavascript",[]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.method({"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("fn: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_fn",[]),"_compiledSource",[])])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["}),"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
+smalltalk.send(aStream,"_nextPutAll_",[");"]);
+smalltalk.send(aStream,"_lf",[]);
+$1=smalltalk.send(aStream,"_lf",[]);
+return self}
 }),
 smalltalk.StrippedExporter);
 
@@ -314,16 +566,35 @@ smalltalk.addMethod(
 "_import_",
 smalltalk.method({
 selector: "import:",
-fn: function (aStream) {
+fn: function (aStream){
 var self=this;
-var chunk=nil;
-var result=nil;
-var parser=nil;
-var lastEmpty=nil;
-(parser=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_on_", [aStream]));
-(lastEmpty=false);
-(function(){while(!(function(){(chunk=smalltalk.send(parser, "_nextChunk", []));return smalltalk.send(chunk, "_isNil", []);})()) {(function(){return ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (lastEmpty=true);})() : (function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [chunk]));return ((($receiver = lastEmpty).klass === smalltalk.Boolean) ? ($receiver ? (function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (lastEmpty=true);}), (function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [chunk]));return ((($receiver = lastEmpty).klass === smalltalk.Boolean) ? ($receiver ? (function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})]));})]));})()}})();
-return self;}
+var $1;
+var chunk;
+var result;
+var parser;
+var lastEmpty;
+parser=smalltalk.send((smalltalk.ChunkParser || ChunkParser),"_on_",[aStream]);
+lastEmpty=false;
+smalltalk.send((function(){
+chunk=smalltalk.send(parser,"_nextChunk",[]);
+chunk;
+return smalltalk.send(chunk,"_isNil",[]);
+}),"_whileFalse_",[(function(){
+$1=smalltalk.send(chunk,"_isEmpty",[]);
+if(smalltalk.assert($1)){
+lastEmpty=true;
+return lastEmpty;
+} else {
+result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_evaluateExpression_",[chunk]);
+result;
+if(smalltalk.assert(lastEmpty)){
+lastEmpty=false;
+lastEmpty;
+return smalltalk.send(result,"_scanFrom_",[parser]);
+};
+};
+})]);
+return self}
 }),
 smalltalk.Importer);
 

+ 405 - 134
js/Importer-Exporter.js

@@ -5,20 +5,39 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "nextChunk",
 category: 'reading',
-fn: function () {
+fn: function (){
 var self=this;
+var $1,$2,$3;
 var $early={};
-try{var char_=nil;
-var result=nil;
-var chunk=nil;
-(result=smalltalk.send("", "_writeStream", []));
-(function(){while((function(){(char_=smalltalk.send(self['@stream'], "_next", []));return smalltalk.send(char_, "_notNil", []);})()) {(function(){((($receiver = smalltalk.send(char_, "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@stream'], "_peek", []), "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_next", []);})() : (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_next", []);}), (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})]));})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self['@stream'], "_peek", []), "__eq", ["!"])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self['@stream'], "_next", []);})() : (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@stream'], "_next", []);}), (function(){return (function(){throw $early=[smalltalk.send(smalltalk.send(result, "_contents", []), "_trimBoth", [])]})();})]));})]));return smalltalk.send(result, "_nextPut_", [char_]);})()}})();
+try {
+var char_;
+var result;
+var chunk;
+result=smalltalk.send("","_writeStream",[]);
+smalltalk.send((function(){
+char_=smalltalk.send(self["@stream"],"_next",[]);
+char_;
+return smalltalk.send(char_,"_notNil",[]);
+}),"_whileTrue_",[(function(){
+$1=smalltalk.send(char_,"__eq",["!"]);
+if(smalltalk.assert($1)){
+$2=smalltalk.send(smalltalk.send(self["@stream"],"_peek",[]),"__eq",["!"]);
+if(smalltalk.assert($2)){
+smalltalk.send(self["@stream"],"_next",[]);
+} else {
+$3=smalltalk.send(smalltalk.send(result,"_contents",[]),"_trimBoth",[]);
+throw $early=[$3];
+};
+};
+return smalltalk.send(result,"_nextPut_",[char_]);
+})]);
 return nil;
-return self;
-} catch(e) {if(e===$early)return e[0]; throw e}},
+}
+catch(e) {if(e===$early)return e[0]; throw e}
+},
 args: [],
 source: "nextChunk\x0a\x09\x22The chunk format (Smalltalk Interchange Format or Fileout format)\x0a\x09is a trivial format but can be a bit tricky to understand:\x0a\x09\x09- Uses the exclamation mark as delimiter of chunks.\x0a\x09\x09- Inside a chunk a normal exclamation mark must be doubled.\x0a\x09\x09- A non empty chunk must be a valid Smalltalk expression.\x0a\x09\x09- A chunk on top level with a preceding empty chunk is an instruction chunk:\x0a\x09\x09\x09- The object created by the expression then takes over reading chunks.\x0a\x0a\x09This metod returns next chunk as a String (trimmed), empty String (all whitespace) or nil.\x22\x0a\x0a\x09| char result chunk |\x0a\x09result := '' writeStream.\x0a        [char := stream next.\x0a        char notNil] whileTrue: [\x0a                 char = '!' ifTrue: [\x0a                         stream peek = '!'\x0a                                ifTrue: [stream next \x22skipping the escape double\x22]\x0a                                ifFalse: [^result contents trimBoth  \x22chunk end marker found\x22]].\x0a                 result nextPut: char].\x0a\x09^nil \x22a chunk needs to end with !\x22",
-messageSends: ["writeStream", "whileTrue:", "next", "notNil", "ifTrue:", "=", "ifTrue:ifFalse:", "peek", "trimBoth", "contents", "nextPut:"],
+messageSends: ["writeStream", "whileTrue:", "ifTrue:", "ifTrue:ifFalse:", "next", "trimBoth", "contents", "=", "peek", "nextPut:", "notNil"],
 referencedClasses: []
 }),
 smalltalk.ChunkParser);
@@ -28,10 +47,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "stream:",
 category: 'accessing',
-fn: function (aStream) {
+fn: function (aStream){
 var self=this;
-(self['@stream']=aStream);
-return self;},
+self["@stream"]=aStream;
+return self},
 args: ["aStream"],
 source: "stream: aStream\x0a\x09stream := aStream",
 messageSends: [],
@@ -45,10 +64,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "on:",
 category: 'not yet classified',
-fn: function (aStream) {
+fn: function (aStream){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_new", []), "_stream_", [aStream]);
-return self;},
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_stream_",[aStream]);
+return $1;
+},
 args: ["aStream"],
 source: "on: aStream\x0a\x09^self new stream: aStream",
 messageSends: ["stream:", "new"],
@@ -63,13 +84,25 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "classNameFor:",
 category: 'private',
-fn: function (aClass) {
+fn: function (aClass){
 var self=this;
-return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [".klass"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
-return self;},
+var $2,$3,$1;
+$2=smalltalk.send(aClass,"_isMetaclass",[]);
+if(smalltalk.assert($2)){
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_instanceClass",[]),"_name",[]),"__comma",[".klass"]);
+} else {
+$3=smalltalk.send(aClass,"_isNil",[]);
+if(smalltalk.assert($3)){
+$1="nil";
+} else {
+$1=smalltalk.send(aClass,"_name",[]);
+};
+};
+return $1;
+},
 args: ["aClass"],
 source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09    ifTrue: [aClass instanceClass name, '.klass']\x0a\x09    ifFalse: [\x0a\x09\x09aClass isNil\x0a\x09\x09    ifTrue: ['nil']\x0a\x09\x09    ifFalse: [aClass name]]",
-messageSends: ["ifTrue:ifFalse:", "isMetaclass", ",", "name", "instanceClass", "isNil"],
+messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"],
 referencedClasses: []
 }),
 smalltalk.Exporter);
@@ -79,14 +112,20 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportAll",
 category: 'fileOut',
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packages", []), "_do_", [(function(pkg){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self, "_exportPackage_", [smalltalk.send(pkg, "_name", [])])]);})]);})]);
-return self;},
+var $1;
+$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
+return smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packages",[]),"_do_",[(function(pkg){
+return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_exportPackage_",[smalltalk.send(pkg,"_name",[])])]);
+})]);
+})]);
+return $1;
+},
 args: [],
 source: "exportAll\x0a    \x22Export all packages in the system.\x22\x0a\x0a    ^String streamContents: [:stream |\x0a    \x09Smalltalk current packages do: [:pkg |\x0a\x09\x09stream nextPutAll: (self exportPackage: pkg name)]]",
-messageSends: ["streamContents:", "do:", "packages", "current", "nextPutAll:", "exportPackage:", "name"],
-referencedClasses: ["String", "Smalltalk"]
+messageSends: ["streamContents:", "do:", "nextPutAll:", "exportPackage:", "name", "packages", "current"],
+referencedClasses: ["Smalltalk", "String"]
 }),
 smalltalk.Exporter);
 
@@ -95,10 +134,17 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportClass:",
 category: 'fileOut',
-fn: function (aClass) {
+fn: function (aClass){
 var self=this;
-return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){smalltalk.send(self, "_exportDefinitionOf_on_", [aClass, stream]);smalltalk.send(self, "_exportMethodsOf_on_", [aClass, stream]);smalltalk.send(self, "_exportMetaDefinitionOf_on_", [aClass, stream]);return smalltalk.send(self, "_exportMethodsOf_on_", [smalltalk.send(aClass, "_class", []), stream]);})]);
-return self;},
+var $1;
+$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
+smalltalk.send(self,"_exportDefinitionOf_on_",[aClass,stream]);
+smalltalk.send(self,"_exportMethodsOf_on_",[aClass,stream]);
+smalltalk.send(self,"_exportMetaDefinitionOf_on_",[aClass,stream]);
+return smalltalk.send(self,"_exportMethodsOf_on_",[smalltalk.send(aClass,"_class",[]),stream]);
+})]);
+return $1;
+},
 args: ["aClass"],
 source: "exportClass: aClass\x0a\x09\x22Export a single class. Subclasses override these methods.\x22\x0a\x0a\x09^String streamContents: [:stream |\x0a\x09\x09self exportDefinitionOf: aClass on: stream.\x0a\x09\x09self exportMethodsOf: aClass on: stream.\x0a\x09\x09self exportMetaDefinitionOf: aClass on: stream.\x0a\x09\x09self exportMethodsOf: aClass class on: stream]",
 messageSends: ["streamContents:", "exportDefinitionOf:on:", "exportMethodsOf:on:", "exportMetaDefinitionOf:on:", "class"],
@@ -111,17 +157,35 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportDefinitionOf:on:",
 category: 'private',
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addClass("]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", ["', "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [", ["]);})(aStream);
-smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [", "]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["], '"]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_category", []), "__comma", ["'"])]);return smalltalk.send($rec, "_nextPutAll_", [");"]);})(aStream);
-((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [aClass])]);smalltalk.send($rec, "_nextPutAll_", [".comment="]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_comment", []), "_asJavascript", [])]);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk."]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [aClass])]);smalltalk.send($rec, "_nextPutAll_", [".comment="]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_comment", []), "_asJavascript", [])]);})(aStream);})]));
-smalltalk.send(aStream, "_lf", []);
-return self;},
+var $1,$2,$3,$4;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addClass("]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",["', "])]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])])]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[", ["]);
+smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[", "]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",["], '"]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_category",[]),"__comma",["'"])]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[");"]);
+$3=smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_notEmpty",[]);
+if(smalltalk.assert($3)){
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk."]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[aClass])]);
+smalltalk.send(aStream,"_nextPutAll_",[".comment="]);
+$4=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_asJavascript",[])]);
+$4;
+};
+smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["aClass", "aStream"],
 source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream \x0a\x09    nextPutAll: 'smalltalk.addClass(';\x0a\x09    nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09    nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09    nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames \x0a\x09    do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09    separatedBy: [aStream nextPutAll: ', '].\x0a\x09aStream\x09\x0a\x09    nextPutAll: '], ''';\x0a\x09    nextPutAll: aClass category, '''';\x0a\x09    nextPutAll: ');'.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09    aStream \x0a\x09    \x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.';\x0a\x09\x09nextPutAll: (self classNameFor: aClass);\x0a\x09\x09nextPutAll: '.comment=';\x0a\x09\x09nextPutAll: aClass comment asJavascript].\x0a\x09aStream lf",
-messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "lf", "asJavascript"],
+messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "lf", "asJavascript", "comment", "notEmpty"],
 referencedClasses: []
 }),
 smalltalk.Exporter);
@@ -131,13 +195,25 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMetaDefinitionOf:on:",
 category: 'private',
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [".iVarNames = ["]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [","]);})]);return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send("];", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [".iVarNames = ["]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [","]);})]);return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send("];", "__comma", [smalltalk.send((smalltalk.String || String), "_lf", [])])]);})]));
-return self;},
+var $1,$2;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_isEmpty",[]);
+if(! smalltalk.assert($1)){
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_class",[])])])]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[".iVarNames = ["]);
+$2;
+smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[","]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("];","__comma",[smalltalk.send((smalltalk.String || String),"_lf",[])])]);
+};
+return self},
 args: ["aClass", "aStream"],
 source: "exportMetaDefinitionOf: aClass on: aStream\x0a\x09aClass class instanceVariableNames isEmpty ifFalse: [\x0a\x09    aStream \x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass class);\x0a\x09\x09nextPutAll: '.iVarNames = ['.\x0a\x09    aClass class instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09\x09separatedBy: [aStream nextPutAll: ','].\x0a\x09    aStream nextPutAll: '];', String lf]",
-messageSends: ["ifFalse:", "isEmpty", "instanceVariableNames", "class", "nextPutAll:", ",", "classNameFor:", "do:separatedBy:", "lf"],
+messageSends: ["ifFalse:", "nextPutAll:", ",", "classNameFor:", "class", "do:separatedBy:", "instanceVariableNames", "lf", "isEmpty"],
 referencedClasses: ["String"]
 }),
 smalltalk.Exporter);
@@ -147,11 +223,36 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethod:of:on:",
 category: 'private',
-fn: function (aMethod, aClass, aStream) {
+fn: function (aMethod,aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addMethod("]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", []), "_asJavascript", []), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk.method({"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("selector: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("category: '", "__comma", [smalltalk.send(aMethod, "_category", [])]), "__comma", ["',"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("args: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_arguments", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("source: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_source", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("messageSends: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_messageSends", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("referencedClasses: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_referencedClasses", []), "_asJavascript", [])])]);})(aStream);
-(function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["}),"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [");"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
-return self;},
+var $1,$2;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addMethod("]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asSelector",[]),"_asJavascript",[]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.method({"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("category: '","__comma",[smalltalk.send(aMethod,"_category",[])]),"__comma",["',"])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("fn: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_fn",[]),"_compiledSource",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("args: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_arguments",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("source: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_source",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("messageSends: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_messageSends",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("referencedClasses: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_referencedClasses",[]),"_asJavascript",[])])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["}),"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
+smalltalk.send(aStream,"_nextPutAll_",[");"]);
+smalltalk.send(aStream,"_lf",[]);
+$2=smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["aMethod", "aClass", "aStream"],
 source: "exportMethod: aMethod of: aClass on: aStream\x0a\x09aStream \x0a\x09\x09nextPutAll: 'smalltalk.addMethod(';lf;\x0a\x09\x09nextPutAll: aMethod selector asSelector asJavascript, ',';lf;\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: aClass);\x0a\x09\x09nextPutAll: ');';lf;lf",
 messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "asSelector", "selector", "category", "compiledSource", "fn", "arguments", "source", "messageSends", "referencedClasses", "classNameFor:"],
@@ -164,14 +265,22 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethodsOf:on:",
 category: 'private',
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(each){return ((($receiver = smalltalk.send(smalltalk.send(each, "_category", []), "_match_", ["^\x5c*"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})]));})]);
-smalltalk.send(aStream, "_lf", []);
-return self;},
+var $1;
+smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_sorted_",[(function(a,b){
+return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
+})]),"_do_",[(function(each){
+$1=smalltalk.send(smalltalk.send(each,"_category",[]),"_match_",["^\x5c*"]);
+if(! smalltalk.assert($1)){
+return smalltalk.send(self,"_exportMethod_of_on_",[each,aClass,aStream]);
+};
+})]);
+smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["aClass", "aStream"],
 source: "exportMethodsOf: aClass on: aStream\x0a\x09\x22Issue #143: sort methods alphabetically\x22\x0a\x0a\x09((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector]) do: [:each |\x0a\x09\x09(each category match: '^\x5c*') ifFalse: [\x0a\x09\x09\x09self exportMethod: each of: aClass on: aStream]].\x0a\x09aStream lf",
-messageSends: ["do:", "sorted:", "values", "methodDictionary", "<=", "selector", "ifFalse:", "match:", "category", "exportMethod:of:on:", "lf"],
+messageSends: ["do:", "ifFalse:", "exportMethod:of:on:", "match:", "category", "sorted:", "<=", "selector", "values", "methodDictionary", "lf"],
 referencedClasses: []
 }),
 smalltalk.Exporter);
@@ -181,15 +290,25 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackage:",
 category: 'fileOut',
-fn: function (packageName) {
+fn: function (packageName){
 var self=this;
-var package=nil;
-return smalltalk.send((smalltalk.String || String), "_streamContents_", [(function(stream){(package=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_packageAt_", [packageName]));smalltalk.send(self, "_exportPackageDefinitionOf_on_", [package, stream]);smalltalk.send(smalltalk.send(smalltalk.send(package, "_sortedClasses", []), "_asSet", []), "_do_", [(function(each){return smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self, "_exportClass_", [each])]);})]);return smalltalk.send(self, "_exportPackageExtensionsOf_on_", [package, stream]);})]);
-return self;},
+var $1;
+var package;
+$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(stream){
+package=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_packageAt_",[packageName]);
+package;
+smalltalk.send(self,"_exportPackageDefinitionOf_on_",[package,stream]);
+smalltalk.send(smalltalk.send(smalltalk.send(package,"_sortedClasses",[]),"_asSet",[]),"_do_",[(function(each){
+return smalltalk.send(stream,"_nextPutAll_",[smalltalk.send(self,"_exportClass_",[each])]);
+})]);
+return smalltalk.send(self,"_exportPackageExtensionsOf_on_",[package,stream]);
+})]);
+return $1;
+},
 args: ["packageName"],
 source: "exportPackage: packageName\x0a\x09\x22Export a given package by name.\x22\x0a\x0a\x09| package |\x0a\x09^String streamContents: [:stream |\x0a                package := Smalltalk current packageAt: packageName.\x0a                self exportPackageDefinitionOf: package on: stream.\x0a\x0a\x09\x09\x22Export classes in dependency order.\x0a\x09\x09Update (issue #171): Remove duplicates for export\x22\x0a\x09    \x09package sortedClasses asSet do: [:each |\x0a                        stream nextPutAll: (self exportClass: each)].\x0a\x09\x09self exportPackageExtensionsOf: package on: stream]",
-messageSends: ["streamContents:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "asSet", "sortedClasses", "nextPutAll:", "exportClass:", "exportPackageExtensionsOf:on:"],
-referencedClasses: ["String", "Smalltalk"]
+messageSends: ["streamContents:", "packageAt:", "current", "exportPackageDefinitionOf:on:", "do:", "nextPutAll:", "exportClass:", "asSet", "sortedClasses", "exportPackageExtensionsOf:on:"],
+referencedClasses: ["Smalltalk", "String"]
 }),
 smalltalk.Exporter);
 
@@ -198,14 +317,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageDefinitionOf:on:",
 category: 'private',
-fn: function (package, aStream) {
+fn: function (package,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addPackage("]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(package, "_name", [])]), "__comma", ["', "]), "__comma", [smalltalk.send(package, "_propertiesAsJSON", [])]), "__comma", [");"])]);})(aStream);
-smalltalk.send(aStream, "_lf", []);
-return self;},
+var $1;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addPackage("]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(package,"_name",[])]),"__comma",["', "]),"__comma",[smalltalk.send(package,"_propertiesAsJSON",[])]),"__comma",[");"])]);
+smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["package", "aStream"],
 source: "exportPackageDefinitionOf: package on: aStream\x0a\x09aStream \x0a\x09    nextPutAll: 'smalltalk.addPackage(';\x0a\x09    nextPutAll: '''', package name, ''', ', package propertiesAsJSON , ');'.\x0a\x09aStream lf",
-messageSends: ["nextPutAll:", ",", "name", "propertiesAsJSON", "lf"],
+messageSends: ["nextPutAll:", ",", "propertiesAsJSON", "name", "lf"],
 referencedClasses: []
 }),
 smalltalk.Exporter);
@@ -215,16 +336,28 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
 category: 'private',
-fn: function (package, aStream) {
+fn: function (package,aStream){
 var self=this;
-var name=nil;
-(name=smalltalk.send(package, "_name", []));
-smalltalk.send(smalltalk.send((smalltalk.Package || Package), "_sortedClasses_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", [])]), "_do_", [(function(each){return smalltalk.send([each,smalltalk.send(each, "_class", [])], "_do_", [(function(aClass){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_methodDictionary", []), "_values", []), "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(method){return ((($receiver = smalltalk.send(smalltalk.send(method, "_category", []), "_match_", [smalltalk.send("^\x5c*", "__comma", [name])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(self, "_exportMethod_of_on_", [method, aClass, aStream]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(self, "_exportMethod_of_on_", [method, aClass, aStream]);})]));})]);})]);})]);
-return self;},
+var $1;
+var name;
+name=smalltalk.send(package,"_name",[]);
+smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_sortedClasses_",[smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_classes",[])]),"_do_",[(function(each){
+return smalltalk.send([each,smalltalk.send(each,"_class",[])],"_do_",[(function(aClass){
+return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_methodDictionary",[]),"_values",[]),"_sorted_",[(function(a,b){
+return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
+})]),"_do_",[(function(method){
+$1=smalltalk.send(smalltalk.send(method,"_category",[]),"_match_",[smalltalk.send("^\x5c*","__comma",[name])]);
+if(smalltalk.assert($1)){
+return smalltalk.send(self,"_exportMethod_of_on_",[method,aClass,aStream]);
+};
+})]);
+})]);
+})]);
+return self},
 args: ["package", "aStream"],
 source: "exportPackageExtensionsOf: package on: aStream\x0a\x09\x22Issue #143: sort classes and methods alphabetically\x22\x0a\x0a\x09| name |\x0a\x09name := package name.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [:each |\x0a\x09\x09{each. each class} do: [:aClass | \x0a\x09\x09\x09((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector]) do: [:method |\x0a\x09\x09\x09\x09(method category match: '^\x5c*', name) ifTrue: [\x0a\x09\x09\x09\x09\x09self exportMethod: method of: aClass on: aStream ]]]]",
-messageSends: ["name", "do:", "sortedClasses:", "classes", "current", "class", "sorted:", "values", "methodDictionary", "<=", "selector", "ifTrue:", "match:", "category", ",", "exportMethod:of:on:"],
-referencedClasses: ["Package", "Smalltalk"]
+messageSends: ["name", "do:", "ifTrue:", "exportMethod:of:on:", "match:", ",", "category", "sorted:", "<=", "selector", "values", "methodDictionary", "class", "sortedClasses:", "classes", "current"],
+referencedClasses: ["Smalltalk", "Package"]
 }),
 smalltalk.Exporter);
 
@@ -236,10 +369,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "chunkEscape:",
 category: 'not yet classified',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-return smalltalk.send(smalltalk.send(aString, "_replace_with_", ["!", "!!"]), "_trimBoth", []);
-return self;},
+var $1;
+$1=smalltalk.send(smalltalk.send(aString,"_replace_with_",["!","!!"]),"_trimBoth",[]);
+return $1;
+},
 args: ["aString"],
 source: "chunkEscape: aString\x0a\x09\x22Replace all occurrences of ! with !! and trim at both ends.\x22\x0a\x0a\x09^(aString replace: '!' with: '!!') trimBoth",
 messageSends: ["trimBoth", "replace:with:"],
@@ -252,13 +387,25 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "classNameFor:",
 category: 'not yet classified',
-fn: function (aClass) {
+fn: function (aClass){
 var self=this;
-return ((($receiver = smalltalk.send(aClass, "_isMetaclass", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [" class"]);})() : (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_instanceClass", []), "_name", []), "__comma", [" class"]);}), (function(){return ((($receiver = smalltalk.send(aClass, "_isNil", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "nil";})() : (function(){return smalltalk.send(aClass, "_name", []);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "nil";}), (function(){return smalltalk.send(aClass, "_name", []);})]));})]));
-return self;},
+var $2,$3,$1;
+$2=smalltalk.send(aClass,"_isMetaclass",[]);
+if(smalltalk.assert($2)){
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_instanceClass",[]),"_name",[]),"__comma",[" class"]);
+} else {
+$3=smalltalk.send(aClass,"_isNil",[]);
+if(smalltalk.assert($3)){
+$1="nil";
+} else {
+$1=smalltalk.send(aClass,"_name",[]);
+};
+};
+return $1;
+},
 args: ["aClass"],
 source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09    ifTrue: [aClass instanceClass name, ' class']\x0a\x09    ifFalse: [\x0a\x09\x09aClass isNil\x0a\x09\x09    ifTrue: ['nil']\x0a\x09\x09    ifFalse: [aClass name]]",
-messageSends: ["ifTrue:ifFalse:", "isMetaclass", ",", "name", "instanceClass", "isNil"],
+messageSends: ["ifTrue:ifFalse:", ",", "name", "instanceClass", "isNil", "isMetaclass"],
 referencedClasses: []
 }),
 smalltalk.ChunkExporter);
@@ -268,17 +415,35 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportDefinitionOf:on:",
 category: 'not yet classified',
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(" subclass: #", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["\x09instanceVariableNames: '"]);})(aStream);
-smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["'"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("\x09package: '", "__comma", [smalltalk.send(aClass, "_category", [])]), "__comma", ["'!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);
-((($receiver = smalltalk.send(smalltalk.send(aClass, "_comment", []), "_notEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [" commentStamp!"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return (function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", [" commentStamp!"])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aClass, "_comment", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
-smalltalk.send(aStream, "_lf", []);
-return self;},
+var $1,$2,$3,$4;
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(" subclass: #","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
+smalltalk.send(aStream,"_lf",[]);
+$1=smalltalk.send(aStream,"_nextPutAll_",["\x09instanceVariableNames: '"]);
+smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[each]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[" "]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",["'"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("\x09package: '","__comma",[smalltalk.send(aClass,"_category",[])]),"__comma",["'!"])]);
+$2=smalltalk.send(aStream,"_lf",[]);
+$3=smalltalk.send(smalltalk.send(aClass,"_comment",[]),"_notEmpty",[]);
+if(smalltalk.assert($3)){
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("!","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",[" commentStamp!"])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(self,"_chunkEscape_",[smalltalk.send(aClass,"_comment",[])]),"__comma",["!"])]);
+$4=smalltalk.send(aStream,"_lf",[]);
+$4;
+};
+smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["aClass", "aStream"],
 source: "exportDefinitionOf: aClass on: aStream\x0a    \x22Chunk format.\x22\x0a\x0a    aStream \x0a        nextPutAll: (self classNameFor: aClass superclass);\x0a        nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;\x0a        nextPutAll: '\x09instanceVariableNames: '''.\x0a    aClass instanceVariableNames \x0a        do: [:each | aStream nextPutAll: each]\x0a        separatedBy: [aStream nextPutAll: ' '].\x0a    aStream \x0a        nextPutAll: ''''; lf;\x0a        nextPutAll: '\x09package: ''', aClass category, '''!'; lf.\x0a    aClass comment notEmpty ifTrue: [\x0a        aStream \x0a        nextPutAll: '!', (self classNameFor: aClass), ' commentStamp!';lf;\x0a        nextPutAll: (self chunkEscape: aClass comment), '!';lf].\x0a    aStream lf",
-messageSends: ["nextPutAll:", "classNameFor:", "superclass", ",", "lf", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "chunkEscape:"],
+messageSends: ["nextPutAll:", "classNameFor:", "superclass", ",", "lf", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "chunkEscape:", "comment", "notEmpty"],
 referencedClasses: []
 }),
 smalltalk.ChunkExporter);
@@ -288,13 +453,28 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMetaDefinitionOf:on:",
 category: 'not yet classified',
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])]);return smalltalk.send($rec, "_nextPutAll_", [" instanceVariableNames: '"]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["'!"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_class", [])])]);return smalltalk.send($rec, "_nextPutAll_", [" instanceVariableNames: '"]);})(aStream);smalltalk.send(smalltalk.send(smalltalk.send(aClass, "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [each]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [" "]);})]);return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["'!"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);})]));
-return self;},
+var $1,$2,$3;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_isEmpty",[]);
+if(! smalltalk.assert($1)){
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_class",[])])]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[" instanceVariableNames: '"]);
+$2;
+smalltalk.send(smalltalk.send(smalltalk.send(aClass,"_class",[]),"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[each]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[" "]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",["'!"]);
+smalltalk.send(aStream,"_lf",[]);
+$3=smalltalk.send(aStream,"_lf",[]);
+$3;
+};
+return self},
 args: ["aClass", "aStream"],
 source: "exportMetaDefinitionOf: aClass on: aStream\x0a\x0a\x09aClass class instanceVariableNames isEmpty ifFalse: [\x0a\x09\x09aStream \x0a\x09\x09    nextPutAll: (self classNameFor: aClass class);\x0a\x09\x09    nextPutAll: ' instanceVariableNames: '''.\x0a\x09\x09aClass class instanceVariableNames \x0a\x09\x09    do: [:each | aStream nextPutAll: each]\x0a\x09\x09    separatedBy: [aStream nextPutAll: ' '].\x0a\x09\x09aStream\x09\x0a\x09\x09    nextPutAll: '''!'; lf; lf]",
-messageSends: ["ifFalse:", "isEmpty", "instanceVariableNames", "class", "nextPutAll:", "classNameFor:", "do:separatedBy:", "lf"],
+messageSends: ["ifFalse:", "nextPutAll:", "classNameFor:", "class", "do:separatedBy:", "instanceVariableNames", "lf", "isEmpty"],
 referencedClasses: []
 }),
 smalltalk.ChunkExporter);
@@ -304,10 +484,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethod:of:on:",
 category: 'not yet classified',
-fn: function (aMethod, aClass, aStream) {
+fn: function (aMethod,aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_chunkEscape_", [smalltalk.send(aMethod, "_source", [])])]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_nextPutAll_", ["!"]);})(aStream);
-return self;},
+var $1;
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_chunkEscape_",[smalltalk.send(aMethod,"_source",[])])]);
+smalltalk.send(aStream,"_lf",[]);
+$1=smalltalk.send(aStream,"_nextPutAll_",["!"]);
+return self},
 args: ["aMethod", "aClass", "aStream"],
 source: "exportMethod: aMethod of: aClass on: aStream\x0a\x09aStream \x0a\x09\x09lf; lf; nextPutAll: (self chunkEscape: aMethod source); lf;\x0a\x09\x09nextPutAll: '!'",
 messageSends: ["lf", "nextPutAll:", "chunkEscape:", "source"],
@@ -320,15 +505,23 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethods:category:of:on:",
 category: 'not yet classified',
-fn: function (methods, category, aClass, aStream) {
+fn: function (methods,category,aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("!", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);return smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(" methodsFor: '", "__comma", [category]), "__comma", ["'!"])]);})(aStream);
-smalltalk.send(smalltalk.send(methods, "_sorted_", [(function(a, b){return ((($receiver = smalltalk.send(a, "_selector", [])).klass === smalltalk.Number) ? $receiver <=smalltalk.send(b, "_selector", []) : smalltalk.send($receiver, "__lt_eq", [smalltalk.send(b, "_selector", [])]));})]), "_do_", [(function(each){return smalltalk.send(self, "_exportMethod_of_on_", [each, aClass, aStream]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [" !"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
-return self;},
+var $1,$2;
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("!","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(" methodsFor: '","__comma",[category]),"__comma",["'!"])]);
+smalltalk.send(smalltalk.send(methods,"_sorted_",[(function(a,b){
+return smalltalk.send(smalltalk.send(a,"_selector",[]),"__lt_eq",[smalltalk.send(b,"_selector",[])]);
+})]),"_do_",[(function(each){
+return smalltalk.send(self,"_exportMethod_of_on_",[each,aClass,aStream]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",[" !"]);
+smalltalk.send(aStream,"_lf",[]);
+$2=smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["methods", "category", "aClass", "aStream"],
 source: "exportMethods: methods category: category of: aClass on: aStream\x0a\x09\x22Issue #143: sort methods alphabetically\x22\x0a\x0a\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aClass);\x0a\x09\x09nextPutAll: ' methodsFor: ''', category, '''!'.\x0a\x09\x09(methods sorted: [:a :b | a selector <= b selector]) do: [:each |\x0a\x09\x09\x09\x09self exportMethod: each of: aClass on: aStream].\x0a\x09aStream nextPutAll: ' !'; lf; lf",
-messageSends: ["nextPutAll:", ",", "classNameFor:", "do:", "sorted:", "<=", "selector", "exportMethod:of:on:", "lf"],
+messageSends: ["nextPutAll:", ",", "classNameFor:", "do:", "exportMethod:of:on:", "sorted:", "<=", "selector", "lf"],
 referencedClasses: []
 }),
 smalltalk.ChunkExporter);
@@ -338,17 +531,29 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethodsOf:on:",
 category: 'not yet classified',
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-var map=nil;
-(map=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));
-smalltalk.send(aClass, "_protocolsDo_", [(function(category, methods){return ((($receiver = smalltalk.send(category, "_match_", ["^\x5c*"])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(map, "_at_put_", [category, methods]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(map, "_at_put_", [category, methods]);})]));})]);
-smalltalk.send(smalltalk.send(smalltalk.send(map, "_keys", []), "_sorted_", [(function(a, b){return ((($receiver = a).klass === smalltalk.Number) ? $receiver <=b : smalltalk.send($receiver, "__lt_eq", [b]));})]), "_do_", [(function(category){var methods=nil;
-(methods=smalltalk.send(map, "_at_", [category]));return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, aClass, aStream]);})]);
-return self;},
+var $1;
+var map;
+map=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
+smalltalk.send(aClass,"_protocolsDo_",[(function(category,methods){
+$1=smalltalk.send(category,"_match_",["^\x5c*"]);
+if(! smalltalk.assert($1)){
+return smalltalk.send(map,"_at_put_",[category,methods]);
+};
+})]);
+smalltalk.send(smalltalk.send(smalltalk.send(map,"_keys",[]),"_sorted_",[(function(a,b){
+return smalltalk.send(a,"__lt_eq",[b]);
+})]),"_do_",[(function(category){
+var methods;
+methods=smalltalk.send(map,"_at_",[category]);
+methods;
+return smalltalk.send(self,"_exportMethods_category_of_on_",[methods,category,aClass,aStream]);
+})]);
+return self},
 args: ["aClass", "aStream"],
 source: "exportMethodsOf: aClass on: aStream\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| map |\x0a\x09map := Dictionary new.\x0a\x09aClass protocolsDo: [:category :methods | \x0a\x09\x09(category match: '^\x5c*') ifFalse: [ map at: category put: methods ]].\x0a\x09(map keys sorted: [:a :b | a <= b ]) do: [:category | | methods |\x0a\x09\x09methods := map at: category.\x0a\x09\x09self\x0a\x09\x09\x09exportMethods: methods\x0a\x09\x09\x09category: category\x0a\x09\x09\x09of: aClass\x0a\x09\x09\x09on: aStream ]",
-messageSends: ["new", "protocolsDo:", "ifFalse:", "match:", "at:put:", "do:", "sorted:", "keys", "<=", "at:", "exportMethods:category:of:on:"],
+messageSends: ["new", "protocolsDo:", "ifFalse:", "at:put:", "match:", "do:", "at:", "exportMethods:category:of:on:", "sorted:", "<=", "keys"],
 referencedClasses: ["Dictionary"]
 }),
 smalltalk.ChunkExporter);
@@ -358,13 +563,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageDefinitionOf:on:",
 category: 'not yet classified',
-fn: function (package, aStream) {
+fn: function (package,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Smalltalk current createPackage: '", "__comma", [smalltalk.send(package, "_name", [])]), "__comma", ["' properties: "]), "__comma", [smalltalk.send(smalltalk.send(package, "_properties", []), "_storeString", [])]), "__comma", ["!"])]);return smalltalk.send($rec, "_lf", []);})(aStream);
-return self;},
+var $1;
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Smalltalk current createPackage: '","__comma",[smalltalk.send(package,"_name",[])]),"__comma",["' properties: "]),"__comma",[smalltalk.send(smalltalk.send(package,"_properties",[]),"_storeString",[])]),"__comma",["!"])]);
+$1=smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["package", "aStream"],
 source: "exportPackageDefinitionOf: package on: aStream\x0a\x09\x22Chunk format.\x22\x0a\x0a\x09aStream \x0a\x09    nextPutAll: 'Smalltalk current createPackage: ''', package name,\x0a\x09\x09''' properties: ', package properties storeString, '!'; lf.",
-messageSends: ["nextPutAll:", ",", "name", "storeString", "properties", "lf"],
+messageSends: ["nextPutAll:", ",", "storeString", "properties", "name", "lf"],
 referencedClasses: []
 }),
 smalltalk.ChunkExporter);
@@ -374,18 +581,37 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportPackageExtensionsOf:on:",
 category: 'not yet classified',
-fn: function (package, aStream) {
+fn: function (package,aStream){
 var self=this;
-var name=nil;
-var map=nil;
-(name=smalltalk.send(package, "_name", []));
-smalltalk.send(smalltalk.send((smalltalk.Package || Package), "_sortedClasses_", [smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk), "_current", []), "_classes", [])]), "_do_", [(function(each){return smalltalk.send([each,smalltalk.send(each, "_class", [])], "_do_", [(function(aClass){(map=smalltalk.send((smalltalk.Dictionary || Dictionary), "_new", []));smalltalk.send(aClass, "_protocolsDo_", [(function(category, methods){return ((($receiver = smalltalk.send(category, "_match_", [smalltalk.send("^\x5c*", "__comma", [name])])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(map, "_at_put_", [category, methods]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(map, "_at_put_", [category, methods]);})]));})]);return smalltalk.send(smalltalk.send(smalltalk.send(map, "_keys", []), "_sorted_", [(function(a, b){return ((($receiver = a).klass === smalltalk.Number) ? $receiver <=b : smalltalk.send($receiver, "__lt_eq", [b]));})]), "_do_", [(function(category){var methods=nil;
-(methods=smalltalk.send(map, "_at_", [category]));return smalltalk.send(self, "_exportMethods_category_of_on_", [methods, category, aClass, aStream]);})]);})]);})]);
-return self;},
+var $1;
+var name;
+var map;
+name=smalltalk.send(package,"_name",[]);
+smalltalk.send(smalltalk.send((smalltalk.Package || Package),"_sortedClasses_",[smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_classes",[])]),"_do_",[(function(each){
+return smalltalk.send([each,smalltalk.send(each,"_class",[])],"_do_",[(function(aClass){
+map=smalltalk.send((smalltalk.Dictionary || Dictionary),"_new",[]);
+map;
+smalltalk.send(aClass,"_protocolsDo_",[(function(category,methods){
+$1=smalltalk.send(category,"_match_",[smalltalk.send("^\x5c*","__comma",[name])]);
+if(smalltalk.assert($1)){
+return smalltalk.send(map,"_at_put_",[category,methods]);
+};
+})]);
+return smalltalk.send(smalltalk.send(smalltalk.send(map,"_keys",[]),"_sorted_",[(function(a,b){
+return smalltalk.send(a,"__lt_eq",[b]);
+})]),"_do_",[(function(category){
+var methods;
+methods=smalltalk.send(map,"_at_",[category]);
+methods;
+return smalltalk.send(self,"_exportMethods_category_of_on_",[methods,category,aClass,aStream]);
+})]);
+})]);
+})]);
+return self},
 args: ["package", "aStream"],
 source: "exportPackageExtensionsOf: package on: aStream\x0a\x09\x22We need to override this one too since we need to group\x0a\x09all methods in a given protocol under a leading methodsFor: chunk\x0a\x09for that class.\x22\x0a\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| name map |\x0a\x09name := package name.\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\x09(category match: '^\x5c*', name) ifTrue: [ map at: category put: methods ]].\x0a\x09\x09\x09(map keys sorted: [:a :b | a <= b ]) do: [:category | | methods |\x0a\x09\x09\x09\x09methods := map at: category.\x09\x0a\x09\x09\x09\x09self exportMethods: methods category: category of: aClass on: aStream ]]]",
-messageSends: ["name", "do:", "sortedClasses:", "classes", "current", "class", "new", "protocolsDo:", "ifTrue:", "match:", ",", "at:put:", "sorted:", "keys", "<=", "at:", "exportMethods:category:of:on:"],
-referencedClasses: ["Package", "Smalltalk", "Dictionary"]
+messageSends: ["name", "do:", "new", "protocolsDo:", "ifTrue:", "at:put:", "match:", ",", "at:", "exportMethods:category:of:on:", "sorted:", "<=", "keys", "class", "sortedClasses:", "classes", "current"],
+referencedClasses: ["Dictionary", "Smalltalk", "Package"]
 }),
 smalltalk.ChunkExporter);
 
@@ -397,13 +623,23 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportDefinitionOf:on:",
 category: 'private',
-fn: function (aClass, aStream) {
+fn: function (aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addClass("]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])]), "__comma", ["', "])]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [smalltalk.send(aClass, "_superclass", [])])])]);return smalltalk.send($rec, "_nextPutAll_", [", ["]);})(aStream);
-smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_do_separatedBy_", [(function(each){return smalltalk.send(aStream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [each]), "__comma", ["'"])]);}), (function(){return smalltalk.send(aStream, "_nextPutAll_", [", "]);})]);
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["], '"]);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(aClass, "_category", []), "__comma", ["'"])]);return smalltalk.send($rec, "_nextPutAll_", [");"]);})(aStream);
-smalltalk.send(aStream, "_lf", []);
-return self;},
+var $1,$2;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addClass("]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])]),"__comma",["', "])]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[smalltalk.send(aClass,"_superclass",[])])])]);
+$1=smalltalk.send(aStream,"_nextPutAll_",[", ["]);
+smalltalk.send(smalltalk.send(aClass,"_instanceVariableNames",[]),"_do_separatedBy_",[(function(each){
+return smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("'","__comma",[each]),"__comma",["'"])]);
+}),(function(){
+return smalltalk.send(aStream,"_nextPutAll_",[", "]);
+})]);
+smalltalk.send(aStream,"_nextPutAll_",["], '"]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(aClass,"_category",[]),"__comma",["'"])]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[");"]);
+smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["aClass", "aStream"],
 source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream \x0a\x09    nextPutAll: 'smalltalk.addClass(';\x0a\x09    nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09    nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09    nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames \x0a\x09    do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09    separatedBy: [aStream nextPutAll: ', '].\x0a\x09aStream\x09\x0a\x09    nextPutAll: '], ''';\x0a\x09    nextPutAll: aClass category, '''';\x0a\x09    nextPutAll: ');'.\x0a\x09aStream lf",
 messageSends: ["nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "lf"],
@@ -416,10 +652,26 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "exportMethod:of:on:",
 category: 'private',
-fn: function (aMethod, aClass, aStream) {
+fn: function (aMethod,aClass,aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", ["smalltalk.addMethod("]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", []), "_asJavascript", []), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["smalltalk.method({"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("selector: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asJavascript", [])]), "__comma", [","])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", ["}),"]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [");"]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
-return self;},
+var $1;
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.addMethod("]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asSelector",[]),"_asJavascript",[]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["smalltalk.method({"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(smalltalk.send("selector: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_selector",[]),"_asJavascript",[])]),"__comma",[","])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("fn: ","__comma",[smalltalk.send(smalltalk.send(aMethod,"_fn",[]),"_compiledSource",[])])]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",["}),"]);
+smalltalk.send(aStream,"_lf",[]);
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send("smalltalk.","__comma",[smalltalk.send(self,"_classNameFor_",[aClass])])]);
+smalltalk.send(aStream,"_nextPutAll_",[");"]);
+smalltalk.send(aStream,"_lf",[]);
+$1=smalltalk.send(aStream,"_lf",[]);
+return self},
 args: ["aMethod", "aClass", "aStream"],
 source: "exportMethod: aMethod of: aClass on: aStream\x0a\x09aStream \x0a\x09\x09nextPutAll: 'smalltalk.addMethod(';lf;\x0a\x09\x09nextPutAll: aMethod selector asSelector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'smalltalk.method({';lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'fn: ', aMethod fn compiledSource;lf;\x0a\x09\x09nextPutAll: '}),';lf;\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass);\x0a\x09\x09nextPutAll: ');';lf;lf",
 messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "asSelector", "selector", "compiledSource", "fn", "classNameFor:"],
@@ -435,19 +687,38 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "import:",
 category: 'fileIn',
-fn: function (aStream) {
+fn: function (aStream){
 var self=this;
-var chunk=nil;
-var result=nil;
-var parser=nil;
-var lastEmpty=nil;
-(parser=smalltalk.send((smalltalk.ChunkParser || ChunkParser), "_on_", [aStream]));
-(lastEmpty=false);
-(function(){while(!(function(){(chunk=smalltalk.send(parser, "_nextChunk", []));return smalltalk.send(chunk, "_isNil", []);})()) {(function(){return ((($receiver = smalltalk.send(chunk, "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return (lastEmpty=true);})() : (function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [chunk]));return ((($receiver = lastEmpty).klass === smalltalk.Boolean) ? ($receiver ? (function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})]));})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return (lastEmpty=true);}), (function(){(result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler), "_new", []), "_evaluateExpression_", [chunk]));return ((($receiver = lastEmpty).klass === smalltalk.Boolean) ? ($receiver ? (function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){(lastEmpty=false);return smalltalk.send(result, "_scanFrom_", [parser]);})]));})]));})()}})();
-return self;},
+var $1;
+var chunk;
+var result;
+var parser;
+var lastEmpty;
+parser=smalltalk.send((smalltalk.ChunkParser || ChunkParser),"_on_",[aStream]);
+lastEmpty=false;
+smalltalk.send((function(){
+chunk=smalltalk.send(parser,"_nextChunk",[]);
+chunk;
+return smalltalk.send(chunk,"_isNil",[]);
+}),"_whileFalse_",[(function(){
+$1=smalltalk.send(chunk,"_isEmpty",[]);
+if(smalltalk.assert($1)){
+lastEmpty=true;
+return lastEmpty;
+} else {
+result=smalltalk.send(smalltalk.send((smalltalk.Compiler || Compiler),"_new",[]),"_evaluateExpression_",[chunk]);
+result;
+if(smalltalk.assert(lastEmpty)){
+lastEmpty=false;
+lastEmpty;
+return smalltalk.send(result,"_scanFrom_",[parser]);
+};
+};
+})]);
+return self},
 args: ["aStream"],
 source: "import: aStream\x0a    | chunk result parser lastEmpty |\x0a    parser := ChunkParser on: aStream.\x0a    lastEmpty := false.\x0a    [chunk := parser nextChunk.\x0a     chunk isNil] whileFalse: [\x0a        chunk isEmpty\x0a       \x09\x09ifTrue: [lastEmpty := true]\x0a       \x09\x09ifFalse: [\x0a        \x09\x09result := Compiler new evaluateExpression: chunk.\x0a        \x09\x09lastEmpty \x0a            \x09\x09\x09ifTrue: [\x0a                                  \x09lastEmpty := false.\x0a                                  \x09result scanFrom: parser]]]",
-messageSends: ["on:", "whileFalse:", "nextChunk", "isNil", "ifTrue:ifFalse:", "isEmpty", "evaluateExpression:", "new", "ifTrue:", "scanFrom:"],
+messageSends: ["on:", "whileFalse:", "ifTrue:ifFalse:", "evaluateExpression:", "new", "ifTrue:", "scanFrom:", "isEmpty", "nextChunk", "isNil"],
 referencedClasses: ["ChunkParser", "Compiler"]
 }),
 smalltalk.Importer);

+ 33 - 20
js/Kernel-Announcements.deploy.js

@@ -6,8 +6,8 @@ smalltalk.method({
 selector: "announcementClass",
 fn: function (){
 var self=this;
-return self['@announcementClass'];
-return self;}
+return self["@announcementClass"];
+}
 }),
 smalltalk.AnnouncementSubscription);
 
@@ -17,8 +17,8 @@ smalltalk.method({
 selector: "announcementClass:",
 fn: function (aClass){
 var self=this;
-(self['@announcementClass']=aClass);
-return self;}
+self["@announcementClass"]=aClass;
+return self}
 }),
 smalltalk.AnnouncementSubscription);
 
@@ -28,8 +28,8 @@ smalltalk.method({
 selector: "block",
 fn: function (){
 var self=this;
-return self['@block'];
-return self;}
+return self["@block"];
+}
 }),
 smalltalk.AnnouncementSubscription);
 
@@ -39,8 +39,8 @@ smalltalk.method({
 selector: "block:",
 fn: function (aBlock){
 var self=this;
-(self['@block']=aBlock);
-return self;}
+self["@block"]=aBlock;
+return self}
 }),
 smalltalk.AnnouncementSubscription);
 
@@ -50,8 +50,12 @@ smalltalk.method({
 selector: "deliver:",
 fn: function (anAnnouncement){
 var self=this;
-((($receiver = smalltalk.send(self, "_handlesAnnouncement_", [anAnnouncement])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_block", []), "_value_", [anAnnouncement]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_block", []), "_value_", [anAnnouncement]);})]));
-return self;}
+var $1;
+$1=smalltalk.send(self,"_handlesAnnouncement_",[anAnnouncement]);
+if(smalltalk.assert($1)){
+smalltalk.send(smalltalk.send(self,"_block",[]),"_value_",[anAnnouncement]);
+};
+return self}
 }),
 smalltalk.AnnouncementSubscription);
 
@@ -61,8 +65,10 @@ smalltalk.method({
 selector: "handlesAnnouncement:",
 fn: function (anAnnouncement){
 var self=this;
-return smalltalk.send(anAnnouncement, "_isKindOf_", [smalltalk.send(self, "_announcementClass", [])]);
-return self;}
+var $1;
+$1=smalltalk.send(anAnnouncement,"_isKindOf_",[smalltalk.send(self,"_announcementClass",[])]);
+return $1;
+}
 }),
 smalltalk.AnnouncementSubscription);
 
@@ -75,8 +81,10 @@ smalltalk.method({
 selector: "announce:",
 fn: function (anAnnouncement){
 var self=this;
-smalltalk.send(self['@subscriptions'], "_do_", [(function(each){return smalltalk.send(each, "_deliver_", [anAnnouncement]);})]);
-return self;}
+smalltalk.send(self["@subscriptions"],"_do_",[(function(each){
+return smalltalk.send(each,"_deliver_",[anAnnouncement]);
+})]);
+return self}
 }),
 smalltalk.Announcer);
 
@@ -86,9 +94,9 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_initialize", [], smalltalk.Announcer.superclass || nil);
-(self['@subscriptions']=smalltalk.send((smalltalk.Array || Array), "_new", []));
-return self;}
+smalltalk.send(self,"_initialize",[],smalltalk.Object);
+self["@subscriptions"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
+return self}
 }),
 smalltalk.Announcer);
 
@@ -96,10 +104,15 @@ smalltalk.addMethod(
 "_on_do_",
 smalltalk.method({
 selector: "on:do:",
-fn: function (aClass, aBlock){
+fn: function (aClass,aBlock){
 var self=this;
-smalltalk.send(self['@subscriptions'], "_add_", [(function($rec){smalltalk.send($rec, "_block_", [aBlock]);smalltalk.send($rec, "_announcementClass_", [aClass]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.AnnouncementSubscription || AnnouncementSubscription), "_new", []))]);
-return self;}
+var $1,$2;
+$1=smalltalk.send((smalltalk.AnnouncementSubscription || AnnouncementSubscription),"_new",[]);
+smalltalk.send($1,"_block_",[aBlock]);
+smalltalk.send($1,"_announcementClass_",[aClass]);
+$2=smalltalk.send($1,"_yourself",[]);
+smalltalk.send(self["@subscriptions"],"_add_",[$2]);
+return self}
 }),
 smalltalk.Announcer);
 

+ 35 - 22
js/Kernel-Announcements.js

@@ -7,8 +7,8 @@ selector: "announcementClass",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self['@announcementClass'];
-return self;},
+return self["@announcementClass"];
+},
 args: [],
 source: "announcementClass\x0a\x09^announcementClass",
 messageSends: [],
@@ -23,8 +23,8 @@ selector: "announcementClass:",
 category: 'accessing',
 fn: function (aClass){
 var self=this;
-(self['@announcementClass']=aClass);
-return self;},
+self["@announcementClass"]=aClass;
+return self},
 args: ["aClass"],
 source: "announcementClass: aClass\x0a\x09announcementClass := aClass",
 messageSends: [],
@@ -39,8 +39,8 @@ selector: "block",
 category: 'accessing',
 fn: function (){
 var self=this;
-return self['@block'];
-return self;},
+return self["@block"];
+},
 args: [],
 source: "block\x0a\x09^block",
 messageSends: [],
@@ -55,8 +55,8 @@ selector: "block:",
 category: 'accessing',
 fn: function (aBlock){
 var self=this;
-(self['@block']=aBlock);
-return self;},
+self["@block"]=aBlock;
+return self},
 args: ["aBlock"],
 source: "block: aBlock\x0a\x09block := aBlock",
 messageSends: [],
@@ -71,11 +71,15 @@ selector: "deliver:",
 category: 'announcing',
 fn: function (anAnnouncement){
 var self=this;
-((($receiver = smalltalk.send(self, "_handlesAnnouncement_", [anAnnouncement])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(smalltalk.send(self, "_block", []), "_value_", [anAnnouncement]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(smalltalk.send(self, "_block", []), "_value_", [anAnnouncement]);})]));
-return self;},
+var $1;
+$1=smalltalk.send(self,"_handlesAnnouncement_",[anAnnouncement]);
+if(smalltalk.assert($1)){
+smalltalk.send(smalltalk.send(self,"_block",[]),"_value_",[anAnnouncement]);
+};
+return self},
 args: ["anAnnouncement"],
 source: "deliver: anAnnouncement\x0a\x09(self handlesAnnouncement: anAnnouncement)\x0a\x09\x09ifTrue: [self block value: anAnnouncement]",
-messageSends: ["ifTrue:", "handlesAnnouncement:", "value:", "block"],
+messageSends: ["ifTrue:", "value:", "block", "handlesAnnouncement:"],
 referencedClasses: []
 }),
 smalltalk.AnnouncementSubscription);
@@ -87,8 +91,10 @@ selector: "handlesAnnouncement:",
 category: 'announcing',
 fn: function (anAnnouncement){
 var self=this;
-return smalltalk.send(anAnnouncement, "_isKindOf_", [smalltalk.send(self, "_announcementClass", [])]);
-return self;},
+var $1;
+$1=smalltalk.send(anAnnouncement,"_isKindOf_",[smalltalk.send(self,"_announcementClass",[])]);
+return $1;
+},
 args: ["anAnnouncement"],
 source: "handlesAnnouncement: anAnnouncement\x0a\x09^anAnnouncement isKindOf: self announcementClass",
 messageSends: ["isKindOf:", "announcementClass"],
@@ -106,8 +112,10 @@ selector: "announce:",
 category: 'announcing',
 fn: function (anAnnouncement){
 var self=this;
-smalltalk.send(self['@subscriptions'], "_do_", [(function(each){return smalltalk.send(each, "_deliver_", [anAnnouncement]);})]);
-return self;},
+smalltalk.send(self["@subscriptions"],"_do_",[(function(each){
+return smalltalk.send(each,"_deliver_",[anAnnouncement]);
+})]);
+return self},
 args: ["anAnnouncement"],
 source: "announce: anAnnouncement\x0a\x09subscriptions do: [:each |\x0a\x09\x09each deliver: anAnnouncement]",
 messageSends: ["do:", "deliver:"],
@@ -122,9 +130,9 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_initialize", [], smalltalk.Announcer.superclass || nil);
-(self['@subscriptions']=smalltalk.send((smalltalk.Array || Array), "_new", []));
-return self;},
+smalltalk.send(self,"_initialize",[],smalltalk.Object);
+self["@subscriptions"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
+return self},
 args: [],
 source: "initialize\x0a\x09super initialize.\x0a\x09subscriptions := Array new",
 messageSends: ["initialize", "new"],
@@ -137,13 +145,18 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "on:do:",
 category: 'subscribing',
-fn: function (aClass, aBlock){
+fn: function (aClass,aBlock){
 var self=this;
-smalltalk.send(self['@subscriptions'], "_add_", [(function($rec){smalltalk.send($rec, "_block_", [aBlock]);smalltalk.send($rec, "_announcementClass_", [aClass]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.AnnouncementSubscription || AnnouncementSubscription), "_new", []))]);
-return self;},
+var $1,$2;
+$1=smalltalk.send((smalltalk.AnnouncementSubscription || AnnouncementSubscription),"_new",[]);
+smalltalk.send($1,"_block_",[aBlock]);
+smalltalk.send($1,"_announcementClass_",[aClass]);
+$2=smalltalk.send($1,"_yourself",[]);
+smalltalk.send(self["@subscriptions"],"_add_",[$2]);
+return self},
 args: ["aClass", "aBlock"],
 source: "on: aClass do: aBlock\x0a\x09subscriptions add: (AnnouncementSubscription new\x0a\x09\x09block: aBlock;\x0a\x09\x09announcementClass: aClass;\x0a\x09\x09yourself)",
-messageSends: ["add:", "block:", "announcementClass:", "yourself", "new"],
+messageSends: ["add:", "block:", "new", "announcementClass:", "yourself"],
 referencedClasses: ["AnnouncementSubscription"]
 }),
 smalltalk.Announcer);

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 334 - 199
js/Kernel-Classes.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 314 - 193
js/Kernel-Classes.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 357 - 194
js/Kernel-Collections.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 360 - 205
js/Kernel-Collections.js


+ 113 - 74
js/Kernel-Exceptions.deploy.js

@@ -4,10 +4,11 @@ smalltalk.addMethod(
 "_context",
 smalltalk.method({
 selector: "context",
-fn: function () {
+fn: function (){
 var self=this;
 return self.context;
-return self;}
+;
+return self}
 }),
 smalltalk.Error);
 
@@ -15,10 +16,11 @@ smalltalk.addMethod(
 "_isSmalltalkError",
 smalltalk.method({
 selector: "isSmalltalkError",
-fn: function () {
+fn: function (){
 var self=this;
 return self.smalltalkError === true;
-return self;}
+;
+return self}
 }),
 smalltalk.Error);
 
@@ -26,10 +28,11 @@ smalltalk.addMethod(
 "_jsStack",
 smalltalk.method({
 selector: "jsStack",
-fn: function () {
+fn: function (){
 var self=this;
 return self.stack;
-return self;}
+;
+return self}
 }),
 smalltalk.Error);
 
@@ -37,10 +40,10 @@ smalltalk.addMethod(
 "_messageText",
 smalltalk.method({
 selector: "messageText",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@messageText'];
-return self;}
+return self["@messageText"];
+}
 }),
 smalltalk.Error);
 
@@ -48,10 +51,10 @@ smalltalk.addMethod(
 "_messageText_",
 smalltalk.method({
 selector: "messageText:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(self['@messageText']=aString);
-return self;}
+self["@messageText"]=aString;
+return self}
 }),
 smalltalk.Error);
 
@@ -59,10 +62,11 @@ smalltalk.addMethod(
 "_signal",
 smalltalk.method({
 selector: "signal",
-fn: function () {
+fn: function (){
 var self=this;
 self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
-return self;}
+;
+return self}
 }),
 smalltalk.Error);
 
@@ -70,11 +74,11 @@ smalltalk.addMethod(
 "_signal_",
 smalltalk.method({
 selector: "signal:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-smalltalk.send(self, "_messageText_", [aString]);
-smalltalk.send(self, "_signal", []);
-return self;}
+smalltalk.send(self,"_messageText_",[aString]);
+smalltalk.send(self,"_signal",[]);
+return self}
 }),
 smalltalk.Error);
 
@@ -83,10 +87,12 @@ smalltalk.addMethod(
 "_signal",
 smalltalk.method({
 selector: "signal",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_new", []), "_signal", []);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_signal",[]);
+return $1;
+}
 }),
 smalltalk.Error.klass);
 
@@ -94,10 +100,12 @@ smalltalk.addMethod(
 "_signal_",
 smalltalk.method({
 selector: "signal:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_new", []), "_signal_", [aString]);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_signal_",[aString]);
+return $1;
+}
 }),
 smalltalk.Error.klass);
 
@@ -107,10 +115,10 @@ smalltalk.addMethod(
 "_message",
 smalltalk.method({
 selector: "message",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@message'];
-return self;}
+return self["@message"];
+}
 }),
 smalltalk.MessageNotUnderstood);
 
@@ -118,10 +126,10 @@ smalltalk.addMethod(
 "_message_",
 smalltalk.method({
 selector: "message:",
-fn: function (aMessage) {
+fn: function (aMessage){
 var self=this;
-(self['@message']=aMessage);
-return self;}
+self["@message"]=aMessage;
+return self}
 }),
 smalltalk.MessageNotUnderstood);
 
@@ -129,10 +137,12 @@ smalltalk.addMethod(
 "_messageText",
 smalltalk.method({
 selector: "messageText",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_asString", []), "__comma", [" does not understand #"]), "__comma", [smalltalk.send(smalltalk.send(self, "_message", []), "_selector", [])]);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_receiver",[]),"_asString",[]),"__comma",[" does not understand #"]),"__comma",[smalltalk.send(smalltalk.send(self,"_message",[]),"_selector",[])]);
+return $1;
+}
 }),
 smalltalk.MessageNotUnderstood);
 
@@ -140,10 +150,10 @@ smalltalk.addMethod(
 "_receiver",
 smalltalk.method({
 selector: "receiver",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@receiver'];
-return self;}
+return self["@receiver"];
+}
 }),
 smalltalk.MessageNotUnderstood);
 
@@ -151,10 +161,10 @@ smalltalk.addMethod(
 "_receiver_",
 smalltalk.method({
 selector: "receiver:",
-fn: function (anObject) {
+fn: function (anObject){
 var self=this;
-(self['@receiver']=anObject);
-return self;}
+self["@receiver"]=anObject;
+return self}
 }),
 smalltalk.MessageNotUnderstood);
 
@@ -165,10 +175,10 @@ smalltalk.addMethod(
 "_object",
 smalltalk.method({
 selector: "object",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@object'];
-return self;}
+return self["@object"];
+}
 }),
 smalltalk.NonBooleanReceiver);
 
@@ -176,10 +186,10 @@ smalltalk.addMethod(
 "_object_",
 smalltalk.method({
 selector: "object:",
-fn: function (anObject) {
+fn: function (anObject){
 var self=this;
-(self['@object']=anObject);
-return self;}
+self["@object"]=anObject;
+return self}
 }),
 smalltalk.NonBooleanReceiver);
 
@@ -190,11 +200,17 @@ smalltalk.addMethod(
 "_handleError_",
 smalltalk.method({
 selector: "handleError:",
-fn: function (anError) {
+fn: function (anError){
 var self=this;
-(($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
-smalltalk.send(self, "_logError_", [anError]);
-return self;}
+var $1;
+$1=smalltalk.send(anError,"_context",[]);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+smalltalk.send(self,"_logErrorContext_",[smalltalk.send(anError,"_context",[])]);
+};
+smalltalk.send(self,"_logError_",[anError]);
+return self}
 }),
 smalltalk.ErrorHandler);
 
@@ -202,10 +218,10 @@ smalltalk.addMethod(
 "_log_",
 smalltalk.method({
 selector: "log:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
-return self;}
+smalltalk.send(console,"_log_",[aString]);
+return self}
 }),
 smalltalk.ErrorHandler);
 
@@ -213,11 +229,17 @@ smalltalk.addMethod(
 "_logContext_",
 smalltalk.method({
 selector: "logContext:",
-fn: function (aContext) {
+fn: function (aContext){
 var self=this;
-(($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
-smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [">>"]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
-return self;}
+var $1;
+$1=smalltalk.send(aContext,"_home",[]);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+smalltalk.send(self,"_logContext_",[smalltalk.send(aContext,"_home",[])]);
+};
+smalltalk.send(self,"_log_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext,"_receiver",[]),"_asString",[]),"__comma",[">>"]),"__comma",[smalltalk.send(aContext,"_selector",[])])]);
+return self}
 }),
 smalltalk.ErrorHandler);
 
@@ -225,10 +247,10 @@ smalltalk.addMethod(
 "_logError_",
 smalltalk.method({
 selector: "logError:",
-fn: function (anError) {
+fn: function (anError){
 var self=this;
-smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
-return self;}
+smalltalk.send(self,"_log_",[smalltalk.send(anError,"_messageText",[])]);
+return self}
 }),
 smalltalk.ErrorHandler);
 
@@ -236,10 +258,20 @@ smalltalk.addMethod(
 "_logErrorContext_",
 smalltalk.method({
 selector: "logErrorContext:",
-fn: function (aContext) {
+fn: function (aContext){
 var self=this;
-(($receiver = aContext) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;})() : nil;
-return self;}
+var $1;
+if(($receiver = aContext) == nil || $receiver == undefined){
+aContext;
+} else {
+$1=smalltalk.send(aContext,"_home",[]);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+smalltalk.send(self,"_logContext_",[smalltalk.send(aContext,"_home",[])]);
+};
+};
+return self}
 }),
 smalltalk.ErrorHandler);
 
@@ -249,10 +281,17 @@ smalltalk.addMethod(
 "_current",
 smalltalk.method({
 selector: "current",
-fn: function () {
+fn: function (){
 var self=this;
-return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", []));})() : $receiver;
-return self;}
+var $1;
+if(($receiver = self["@current"]) == nil || $receiver == undefined){
+self["@current"]=smalltalk.send(self,"_new",[]);
+$1=self["@current"];
+} else {
+$1=self["@current"];
+};
+return $1;
+}
 }),
 smalltalk.ErrorHandler.klass);
 
@@ -260,10 +299,10 @@ smalltalk.addMethod(
 "_initialize",
 smalltalk.method({
 selector: "initialize",
-fn: function () {
+fn: function (){
 var self=this;
-smalltalk.send(self, "_register", []);
-return self;}
+smalltalk.send(self,"_register",[]);
+return self}
 }),
 smalltalk.ErrorHandler.klass);
 
@@ -271,10 +310,10 @@ smalltalk.addMethod(
 "_register",
 smalltalk.method({
 selector: "register",
-fn: function () {
+fn: function (){
 var self=this;
-smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
-return self;}
+smalltalk.send((smalltalk.ErrorHandler || ErrorHandler),"_setCurrent_",[smalltalk.send(self,"_new",[])]);
+return self}
 }),
 smalltalk.ErrorHandler.klass);
 
@@ -282,10 +321,10 @@ smalltalk.addMethod(
 "_setCurrent_",
 smalltalk.method({
 selector: "setCurrent:",
-fn: function (anHandler) {
+fn: function (anHandler){
 var self=this;
-(self['@current']=anHandler);
-return self;}
+self["@current"]=anHandler;
+return self}
 }),
 smalltalk.ErrorHandler.klass);
 

+ 117 - 78
js/Kernel-Exceptions.js

@@ -5,10 +5,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "context",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
 return self.context;
-return self;},
+;
+return self},
 args: [],
 source: "context\x0a\x09<return self.context>",
 messageSends: [],
@@ -21,10 +22,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "isSmalltalkError",
 category: 'testing',
-fn: function () {
+fn: function (){
 var self=this;
 return self.smalltalkError === true;
-return self;},
+;
+return self},
 args: [],
 source: "isSmalltalkError\x0a\x09<return self.smalltalkError === true>",
 messageSends: [],
@@ -37,10 +39,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "jsStack",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
 return self.stack;
-return self;},
+;
+return self},
 args: [],
 source: "jsStack\x0a\x09<return self.stack>",
 messageSends: [],
@@ -53,10 +56,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "messageText",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@messageText'];
-return self;},
+return self["@messageText"];
+},
 args: [],
 source: "messageText\x0a\x09^messageText",
 messageSends: [],
@@ -69,10 +72,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "messageText:",
 category: 'accessing',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(self['@messageText']=aString);
-return self;},
+self["@messageText"]=aString;
+return self},
 args: ["aString"],
 source: "messageText: aString\x0a\x09messageText := aString",
 messageSends: [],
@@ -85,10 +88,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "signal",
 category: 'signaling',
-fn: function () {
+fn: function (){
 var self=this;
 self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self);
-return self;},
+;
+return self},
 args: [],
 source: "signal\x0a\x09<self.context = smalltalk.getThisContext(); self.smalltalkError = true; throw(self)>",
 messageSends: [],
@@ -101,11 +105,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "signal:",
 category: 'signaling',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-smalltalk.send(self, "_messageText_", [aString]);
-smalltalk.send(self, "_signal", []);
-return self;},
+smalltalk.send(self,"_messageText_",[aString]);
+smalltalk.send(self,"_signal",[]);
+return self},
 args: ["aString"],
 source: "signal: aString\x0a\x09self messageText: aString.\x0a\x09self signal",
 messageSends: ["messageText:", "signal"],
@@ -119,10 +123,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "signal",
 category: 'instance creation',
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_new", []), "_signal", []);
-return self;},
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_signal",[]);
+return $1;
+},
 args: [],
 source: "signal\x0a\x09^self new signal",
 messageSends: ["signal", "new"],
@@ -135,10 +141,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "signal:",
 category: 'instance creation',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_new", []), "_signal_", [aString]);
-return self;},
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_new",[]),"_signal_",[aString]);
+return $1;
+},
 args: ["aString"],
 source: "signal: aString\x0a\x09    ^self new\x0a\x09\x09signal: aString",
 messageSends: ["signal:", "new"],
@@ -153,10 +161,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "message",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@message'];
-return self;},
+return self["@message"];
+},
 args: [],
 source: "message\x0a\x09^message",
 messageSends: [],
@@ -169,10 +177,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "message:",
 category: 'accessing',
-fn: function (aMessage) {
+fn: function (aMessage){
 var self=this;
-(self['@message']=aMessage);
-return self;},
+self["@message"]=aMessage;
+return self},
 args: ["aMessage"],
 source: "message: aMessage\x0a\x09message := aMessage",
 messageSends: [],
@@ -185,13 +193,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "messageText",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_asString", []), "__comma", [" does not understand #"]), "__comma", [smalltalk.send(smalltalk.send(self, "_message", []), "_selector", [])]);
-return self;},
+var $1;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_receiver",[]),"_asString",[]),"__comma",[" does not understand #"]),"__comma",[smalltalk.send(smalltalk.send(self,"_message",[]),"_selector",[])]);
+return $1;
+},
 args: [],
 source: "messageText\x0a\x09^self receiver asString, ' does not understand #', self message selector",
-messageSends: [",", "asString", "receiver", "selector", "message"],
+messageSends: [",", "selector", "message", "asString", "receiver"],
 referencedClasses: []
 }),
 smalltalk.MessageNotUnderstood);
@@ -201,10 +211,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "receiver",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@receiver'];
-return self;},
+return self["@receiver"];
+},
 args: [],
 source: "receiver\x0a\x09^receiver",
 messageSends: [],
@@ -217,10 +227,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "receiver:",
 category: 'accessing',
-fn: function (anObject) {
+fn: function (anObject){
 var self=this;
-(self['@receiver']=anObject);
-return self;},
+self["@receiver"]=anObject;
+return self},
 args: ["anObject"],
 source: "receiver: anObject\x0a\x09receiver := anObject",
 messageSends: [],
@@ -236,10 +246,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "object",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@object'];
-return self;},
+return self["@object"];
+},
 args: [],
 source: "object\x0a\x09^ object",
 messageSends: [],
@@ -252,10 +262,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "object:",
 category: 'accessing',
-fn: function (anObject) {
+fn: function (anObject){
 var self=this;
-(self['@object']=anObject);
-return self;},
+self["@object"]=anObject;
+return self},
 args: ["anObject"],
 source: "object: anObject\x0a\x09object := anObject",
 messageSends: [],
@@ -271,14 +281,20 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "handleError:",
 category: 'error handling',
-fn: function (anError) {
+fn: function (anError){
 var self=this;
-(($receiver = smalltalk.send(anError, "_context", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logErrorContext_", [smalltalk.send(anError, "_context", [])]);})() : nil;
-smalltalk.send(self, "_logError_", [anError]);
-return self;},
+var $1;
+$1=smalltalk.send(anError,"_context",[]);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+smalltalk.send(self,"_logErrorContext_",[smalltalk.send(anError,"_context",[])]);
+};
+smalltalk.send(self,"_logError_",[anError]);
+return self},
 args: ["anError"],
 source: "handleError: anError\x0a\x09anError context ifNotNil: [self logErrorContext: anError context].\x0a\x09self logError: anError",
-messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
+messageSends: ["ifNotNil:", "logErrorContext:", "context", "logError:"],
 referencedClasses: []
 }),
 smalltalk.ErrorHandler);
@@ -288,10 +304,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "log:",
 category: 'private',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-smalltalk.send((typeof console == 'undefined' ? nil : console), "_log_", [aString]);
-return self;},
+smalltalk.send(console,"_log_",[aString]);
+return self},
 args: ["aString"],
 source: "log: aString\x0a\x09console log: aString",
 messageSends: ["log:"],
@@ -304,14 +320,20 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "logContext:",
 category: 'private',
-fn: function (aContext) {
+fn: function (aContext){
 var self=this;
-(($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;
-smalltalk.send(self, "_log_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext, "_receiver", []), "_asString", []), "__comma", [">>"]), "__comma", [smalltalk.send(aContext, "_selector", [])])]);
-return self;},
+var $1;
+$1=smalltalk.send(aContext,"_home",[]);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+smalltalk.send(self,"_logContext_",[smalltalk.send(aContext,"_home",[])]);
+};
+smalltalk.send(self,"_log_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aContext,"_receiver",[]),"_asString",[]),"__comma",[">>"]),"__comma",[smalltalk.send(aContext,"_selector",[])])]);
+return self},
 args: ["aContext"],
 source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home].\x0a\x09self log: aContext receiver asString, '>>', aContext selector",
-messageSends: ["ifNotNil:", "home", "logContext:", "log:", ",", "asString", "receiver", "selector"],
+messageSends: ["ifNotNil:", "logContext:", "home", "log:", ",", "selector", "asString", "receiver"],
 referencedClasses: []
 }),
 smalltalk.ErrorHandler);
@@ -321,10 +343,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "logError:",
 category: 'private',
-fn: function (anError) {
+fn: function (anError){
 var self=this;
-smalltalk.send(self, "_log_", [smalltalk.send(anError, "_messageText", [])]);
-return self;},
+smalltalk.send(self,"_log_",[smalltalk.send(anError,"_messageText",[])]);
+return self},
 args: ["anError"],
 source: "logError: anError\x0a\x09self log: anError messageText",
 messageSends: ["log:", "messageText"],
@@ -337,13 +359,23 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "logErrorContext:",
 category: 'private',
-fn: function (aContext) {
+fn: function (aContext){
 var self=this;
-(($receiver = aContext) != nil && $receiver != undefined) ? (function(){return (($receiver = smalltalk.send(aContext, "_home", [])) != nil && $receiver != undefined) ? (function(){return smalltalk.send(self, "_logContext_", [smalltalk.send(aContext, "_home", [])]);})() : nil;})() : nil;
-return self;},
+var $1;
+if(($receiver = aContext) == nil || $receiver == undefined){
+aContext;
+} else {
+$1=smalltalk.send(aContext,"_home",[]);
+if(($receiver = $1) == nil || $receiver == undefined){
+$1;
+} else {
+smalltalk.send(self,"_logContext_",[smalltalk.send(aContext,"_home",[])]);
+};
+};
+return self},
 args: ["aContext"],
 source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home]]",
-messageSends: ["ifNotNil:", "home", "logContext:"],
+messageSends: ["ifNotNil:", "logContext:", "home"],
 referencedClasses: []
 }),
 smalltalk.ErrorHandler);
@@ -355,10 +387,17 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "current",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return (($receiver = self['@current']) == nil || $receiver == undefined) ? (function(){return (self['@current']=smalltalk.send(self, "_new", []));})() : $receiver;
-return self;},
+var $1;
+if(($receiver = self["@current"]) == nil || $receiver == undefined){
+self["@current"]=smalltalk.send(self,"_new",[]);
+$1=self["@current"];
+} else {
+$1=self["@current"];
+};
+return $1;
+},
 args: [],
 source: "current\x0a\x09^current ifNil: [current := self new]",
 messageSends: ["ifNil:", "new"],
@@ -371,10 +410,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "initialize",
 category: 'initialization',
-fn: function () {
+fn: function (){
 var self=this;
-smalltalk.send(self, "_register", []);
-return self;},
+smalltalk.send(self,"_register",[]);
+return self},
 args: [],
 source: "initialize\x0a\x09self register",
 messageSends: ["register"],
@@ -387,10 +426,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "register",
 category: 'initialization',
-fn: function () {
+fn: function (){
 var self=this;
-smalltalk.send((smalltalk.ErrorHandler || ErrorHandler), "_setCurrent_", [smalltalk.send(self, "_new", [])]);
-return self;},
+smalltalk.send((smalltalk.ErrorHandler || ErrorHandler),"_setCurrent_",[smalltalk.send(self,"_new",[])]);
+return self},
 args: [],
 source: "register\x0a\x09ErrorHandler setCurrent: self new",
 messageSends: ["setCurrent:", "new"],
@@ -403,10 +442,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "setCurrent:",
 category: 'accessing',
-fn: function (anHandler) {
+fn: function (anHandler){
 var self=this;
-(self['@current']=anHandler);
-return self;},
+self["@current"]=anHandler;
+return self},
 args: ["anHandler"],
 source: "setCurrent: anHandler\x0a\x09current := anHandler",
 messageSends: [],

+ 262 - 223
js/Kernel-Methods.deploy.js

@@ -4,11 +4,11 @@ smalltalk.addMethod(
 "_applyTo_arguments_",
 smalltalk.method({
 selector: "applyTo:arguments:",
-fn: function (anObject, aCollection) {
-    var self = this;
-    return self.apply(anObject, aCollection);
-    return self;
-}
+fn: function (anObject,aCollection){
+var self=this;
+return self.apply(anObject, aCollection);
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -16,11 +16,11 @@ smalltalk.addMethod(
 "_compiledSource",
 smalltalk.method({
 selector: "compiledSource",
-fn: function () {
-    var self = this;
-    return self.toString();
-    return self;
-}
+fn: function (){
+var self=this;
+return self.toString();
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -28,12 +28,23 @@ smalltalk.addMethod(
 "_ensure_",
 smalltalk.method({
 selector: "ensure:",
-fn: function (aBlock) {
-    var self = this;
-    var success = nil;
-    success = false;
-    return smalltalk.send(function () {smalltalk.send(self, "_value", []);success = true;return smalltalk.send(aBlock, "_value", []);}, "_on_do_", [smalltalk.Error || Error, function (ex) {($receiver = success).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(aBlock, "_value", []);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(aBlock, "_value", []);}]);return smalltalk.send(ex, "_signal", []);}]);
-    return self;
+fn: function (aBlock){
+var self=this;
+var $1;
+var success;
+success=false;
+$1=smalltalk.send((function(){
+smalltalk.send(self,"_value",[]);
+success=true;
+success;
+return smalltalk.send(aBlock,"_value",[]);
+}),"_on_do_",[(smalltalk.Error || Error),(function(ex){
+if(! smalltalk.assert(success)){
+smalltalk.send(aBlock,"_value",[]);
+};
+return smalltalk.send(ex,"_signal",[]);
+})]);
+return $1;
 }
 }),
 smalltalk.BlockClosure);
@@ -42,11 +53,11 @@ smalltalk.addMethod(
 "_new",
 smalltalk.method({
 selector: "new",
-fn: function () {
-    var self = this;
-    return new self;
-    return self;
-}
+fn: function (){
+var self=this;
+return new self();
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -54,11 +65,11 @@ smalltalk.addMethod(
 "_newValue_",
 smalltalk.method({
 selector: "newValue:",
-fn: function (anObject) {
-    var self = this;
-    return new self(anObject);
-    return self;
-}
+fn: function (anObject){
+var self=this;
+return new self(anObject);
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -66,11 +77,11 @@ smalltalk.addMethod(
 "_newValue_value_",
 smalltalk.method({
 selector: "newValue:value:",
-fn: function (anObject, anObject2) {
-    var self = this;
-    return new self(anObject, anObject2);
-    return self;
-}
+fn: function (anObject,anObject2){
+var self=this;
+return new self(anObject, anObject2);
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -78,11 +89,11 @@ smalltalk.addMethod(
 "_newValue_value_value_",
 smalltalk.method({
 selector: "newValue:value:value:",
-fn: function (anObject, anObject2, anObject3) {
-    var self = this;
-    return new self(anObject, anObject2);
-    return self;
-}
+fn: function (anObject,anObject2,anObject3){
+var self=this;
+return new self(anObject, anObject2);
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -90,11 +101,11 @@ smalltalk.addMethod(
 "_numArgs",
 smalltalk.method({
 selector: "numArgs",
-fn: function () {
-    var self = this;
-    return self.length;
-    return self;
-}
+fn: function (){
+var self=this;
+return self.length;
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -102,10 +113,18 @@ smalltalk.addMethod(
 "_on_do_",
 smalltalk.method({
 selector: "on:do:",
-fn: function (anErrorClass, aBlock) {
-    var self = this;
-    return smalltalk.send(self, "_try_catch_", [self, function (error) {return ($receiver = smalltalk.send(error, "_isKindOf_", [anErrorClass])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(aBlock, "_value_", [error]);}() : function () {return smalltalk.send(error, "_signal", []);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(aBlock, "_value_", [error]);}, function () {return smalltalk.send(error, "_signal", []);}]);}]);
-    return self;
+fn: function (anErrorClass,aBlock){
+var self=this;
+var $2,$1;
+$1=smalltalk.send(self,"_try_catch_",[self,(function(error){
+$2=smalltalk.send(error,"_isKindOf_",[anErrorClass]);
+if(smalltalk.assert($2)){
+return smalltalk.send(aBlock,"_value_",[error]);
+} else {
+return smalltalk.send(error,"_signal",[]);
+};
+})]);
+return $1;
 }
 }),
 smalltalk.BlockClosure);
@@ -114,10 +133,11 @@ smalltalk.addMethod(
 "_timeToRun",
 smalltalk.method({
 selector: "timeToRun",
-fn: function () {
-    var self = this;
-    return smalltalk.send(smalltalk.Date || Date, "_millisecondsToRun_", [self]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[self]);
+return $1;
 }
 }),
 smalltalk.BlockClosure);
@@ -126,11 +146,11 @@ smalltalk.addMethod(
 "_value",
 smalltalk.method({
 selector: "value",
-fn: function () {
-    var self = this;
-    return self();
-    return self;
-}
+fn: function (){
+var self=this;
+return self();;
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -138,11 +158,11 @@ smalltalk.addMethod(
 "_value_",
 smalltalk.method({
 selector: "value:",
-fn: function (anArg) {
-    var self = this;
-    return self(anArg);
-    return self;
-}
+fn: function (anArg){
+var self=this;
+return self(anArg);;
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -150,11 +170,11 @@ smalltalk.addMethod(
 "_value_value_",
 smalltalk.method({
 selector: "value:value:",
-fn: function (firstArg, secondArg) {
-    var self = this;
-    return self(firstArg, secondArg);
-    return self;
-}
+fn: function (firstArg,secondArg){
+var self=this;
+return self(firstArg, secondArg);;
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -162,11 +182,11 @@ smalltalk.addMethod(
 "_value_value_value_",
 smalltalk.method({
 selector: "value:value:value:",
-fn: function (firstArg, secondArg, thirdArg) {
-    var self = this;
-    return self(firstArg, secondArg, thirdArg);
-    return self;
-}
+fn: function (firstArg,secondArg,thirdArg){
+var self=this;
+return self(firstArg, secondArg, thirdArg);;
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -174,11 +194,11 @@ smalltalk.addMethod(
 "_valueWithInterval_",
 smalltalk.method({
 selector: "valueWithInterval:",
-fn: function (aNumber) {
-    var self = this;
-    return setInterval(self, aNumber);
-    return self;
-}
+fn: function (aNumber){
+var self=this;
+return setInterval(self, aNumber);
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -186,11 +206,11 @@ smalltalk.addMethod(
 "_valueWithPossibleArguments_",
 smalltalk.method({
 selector: "valueWithPossibleArguments:",
-fn: function (aCollection) {
-    var self = this;
-    return self.apply(null, aCollection);
-    return self;
-}
+fn: function (aCollection){
+var self=this;
+return self.apply(null, aCollection);;
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -198,11 +218,11 @@ smalltalk.addMethod(
 "_valueWithTimeout_",
 smalltalk.method({
 selector: "valueWithTimeout:",
-fn: function (aNumber) {
-    var self = this;
-    return setTimeout(self, aNumber);
-    return self;
-}
+fn: function (aNumber){
+var self=this;
+return setTimeout(self, aNumber);
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -210,11 +230,11 @@ smalltalk.addMethod(
 "_whileFalse",
 smalltalk.method({
 selector: "whileFalse",
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_whileFalse_", [function () {return nil;}]);
-    return self;
-}
+fn: function (){
+var self=this;
+smalltalk.send(self,"_whileFalse_",[(function(){
+})]);
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -222,13 +242,11 @@ smalltalk.addMethod(
 "_whileFalse_",
 smalltalk.method({
 selector: "whileFalse:",
-fn: function (aBlock) {
-    var self = this;
-    while (!self()) {
-        aBlock();
-    }
-    return self;
-}
+fn: function (aBlock){
+var self=this;
+while(!self()) {aBlock()};
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -236,11 +254,11 @@ smalltalk.addMethod(
 "_whileTrue",
 smalltalk.method({
 selector: "whileTrue",
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_whileTrue_", [function () {return nil;}]);
-    return self;
-}
+fn: function (){
+var self=this;
+smalltalk.send(self,"_whileTrue_",[(function(){
+})]);
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -248,13 +266,11 @@ smalltalk.addMethod(
 "_whileTrue_",
 smalltalk.method({
 selector: "whileTrue:",
-fn: function (aBlock) {
-    var self = this;
-    while (self()) {
-        aBlock();
-    }
-    return self;
-}
+fn: function (aBlock){
+var self=this;
+while(self()) {aBlock()};
+;
+return self}
 }),
 smalltalk.BlockClosure);
 
@@ -265,11 +281,11 @@ smalltalk.addMethod(
 "_arguments",
 smalltalk.method({
 selector: "arguments",
-fn: function () {
-    var self = this;
-    return self.args || [];
-    return self;
-}
+fn: function (){
+var self=this;
+return self.args || [];
+;
+return self}
 }),
 smalltalk.CompiledMethod);
 
@@ -277,11 +293,16 @@ smalltalk.addMethod(
 "_category",
 smalltalk.method({
 selector: "category",
-fn: function () {
-    var self = this;
-    return ($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil ||
-        $receiver == undefined ? function () {return "";}() : $receiver;
-    return self;
+fn: function (){
+var self=this;
+var $2,$1;
+$2=smalltalk.send(self,"_basicAt_",["category"]);
+if(($receiver = $2) == nil || $receiver == undefined){
+$1="";
+} else {
+$1=$2;
+};
+return $1;
 }
 }),
 smalltalk.CompiledMethod);
@@ -290,11 +311,10 @@ smalltalk.addMethod(
 "_category_",
 smalltalk.method({
 selector: "category:",
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self, "_basicAt_put_", ["category", aString]);
-    return self;
-}
+fn: function (aString){
+var self=this;
+smalltalk.send(self,"_basicAt_put_",["category",aString]);
+return self}
 }),
 smalltalk.CompiledMethod);
 
@@ -302,10 +322,11 @@ smalltalk.addMethod(
 "_fn",
 smalltalk.method({
 selector: "fn",
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["fn"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["fn"]);
+return $1;
 }
 }),
 smalltalk.CompiledMethod);
@@ -314,11 +335,10 @@ smalltalk.addMethod(
 "_fn_",
 smalltalk.method({
 selector: "fn:",
-fn: function (aBlock) {
-    var self = this;
-    smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
-    return self;
-}
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self,"_basicAt_put_",["fn",aBlock]);
+return self}
 }),
 smalltalk.CompiledMethod);
 
@@ -326,10 +346,11 @@ smalltalk.addMethod(
 "_messageSends",
 smalltalk.method({
 selector: "messageSends",
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["messageSends"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["messageSends"]);
+return $1;
 }
 }),
 smalltalk.CompiledMethod);
@@ -338,10 +359,11 @@ smalltalk.addMethod(
 "_methodClass",
 smalltalk.method({
 selector: "methodClass",
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["methodClass"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["methodClass"]);
+return $1;
 }
 }),
 smalltalk.CompiledMethod);
@@ -350,10 +372,11 @@ smalltalk.addMethod(
 "_referencedClasses",
 smalltalk.method({
 selector: "referencedClasses",
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["referencedClasses"]);
+return $1;
 }
 }),
 smalltalk.CompiledMethod);
@@ -362,10 +385,11 @@ smalltalk.addMethod(
 "_selector",
 smalltalk.method({
 selector: "selector",
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["selector"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["selector"]);
+return $1;
 }
 }),
 smalltalk.CompiledMethod);
@@ -374,11 +398,10 @@ smalltalk.addMethod(
 "_selector_",
 smalltalk.method({
 selector: "selector:",
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
-    return self;
-}
+fn: function (aString){
+var self=this;
+smalltalk.send(self,"_basicAt_put_",["selector",aString]);
+return self}
 }),
 smalltalk.CompiledMethod);
 
@@ -386,11 +409,16 @@ smalltalk.addMethod(
 "_source",
 smalltalk.method({
 selector: "source",
-fn: function () {
-    var self = this;
-    return ($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil ||
-        $receiver == undefined ? function () {return "";}() : $receiver;
-    return self;
+fn: function (){
+var self=this;
+var $2,$1;
+$2=smalltalk.send(self,"_basicAt_",["source"]);
+if(($receiver = $2) == nil || $receiver == undefined){
+$1="";
+} else {
+$1=$2;
+};
+return $1;
 }
 }),
 smalltalk.CompiledMethod);
@@ -399,11 +427,10 @@ smalltalk.addMethod(
 "_source_",
 smalltalk.method({
 selector: "source:",
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self, "_basicAt_put_", ["source", aString]);
-    return self;
-}
+fn: function (aString){
+var self=this;
+smalltalk.send(self,"_basicAt_put_",["source",aString]);
+return self}
 }),
 smalltalk.CompiledMethod);
 
@@ -414,10 +441,9 @@ smalltalk.addMethod(
 "_arguments",
 smalltalk.method({
 selector: "arguments",
-fn: function () {
-    var self = this;
-    return self['@arguments'];
-    return self;
+fn: function (){
+var self=this;
+return self["@arguments"];
 }
 }),
 smalltalk.Message);
@@ -426,11 +452,10 @@ smalltalk.addMethod(
 "_arguments_",
 smalltalk.method({
 selector: "arguments:",
-fn: function (anArray) {
-    var self = this;
-    self['@arguments'] = anArray;
-    return self;
-}
+fn: function (anArray){
+var self=this;
+self["@arguments"]=anArray;
+return self}
 }),
 smalltalk.Message);
 
@@ -438,10 +463,17 @@ smalltalk.addMethod(
 "_printString",
 smalltalk.method({
 selector: "printString",
-fn: function () {
-    var self = this;
-    return smalltalk.send(smalltalk.String || String, "_streamContents_", [function (aStream) {return function ($rec) {smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Message.superclass || nil)]);smalltalk.send($rec, "_nextPutAll_", ["("]);smalltalk.send($rec, "_nextPutAll_", [self['@selector']]);return smalltalk.send($rec, "_nextPutAll_", [")"]);}(aStream);}]);
-    return self;
+fn: function (){
+var self=this;
+var $2,$1;
+$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(aStream){
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_printString",[],smalltalk.Object)]);
+smalltalk.send(aStream,"_nextPutAll_",["("]);
+smalltalk.send(aStream,"_nextPutAll_",[self["@selector"]]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[")"]);
+return $2;
+})]);
+return $1;
 }
 }),
 smalltalk.Message);
@@ -450,10 +482,9 @@ smalltalk.addMethod(
 "_selector",
 smalltalk.method({
 selector: "selector",
-fn: function () {
-    var self = this;
-    return self['@selector'];
-    return self;
+fn: function (){
+var self=this;
+return self["@selector"];
 }
 }),
 smalltalk.Message);
@@ -462,11 +493,10 @@ smalltalk.addMethod(
 "_selector_",
 smalltalk.method({
 selector: "selector:",
-fn: function (aString) {
-    var self = this;
-    self['@selector'] = aString;
-    return self;
-}
+fn: function (aString){
+var self=this;
+self["@selector"]=aString;
+return self}
 }),
 smalltalk.Message);
 
@@ -474,10 +504,11 @@ smalltalk.addMethod(
 "_sendTo_",
 smalltalk.method({
 selector: "sendTo:",
-fn: function (anObject) {
-    var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_send_to_arguments_", [smalltalk.send(self, "_selector", []), anObject, smalltalk.send(self, "_arguments", [])]);
-    return self;
+fn: function (anObject){
+var self=this;
+var $1;
+$1=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_send_to_arguments_",[smalltalk.send(self,"_selector",[]),anObject,smalltalk.send(self,"_arguments",[])]);
+return $1;
 }
 }),
 smalltalk.Message);
@@ -487,10 +518,15 @@ smalltalk.addMethod(
 "_selector_arguments_",
 smalltalk.method({
 selector: "selector:arguments:",
-fn: function (aString, anArray) {
-    var self = this;
-    return function ($rec) {smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(self, "_new", []));
-    return self;
+fn: function (aString,anArray){
+var self=this;
+var $2,$3,$1;
+$2=smalltalk.send(self,"_new",[]);
+smalltalk.send($2,"_selector_",[aString]);
+smalltalk.send($2,"_arguments_",[anArray]);
+$3=smalltalk.send($2,"_yourself",[]);
+$1=$3;
+return $1;
 }
 }),
 smalltalk.Message.klass);
@@ -501,10 +537,11 @@ smalltalk.addMethod(
 "_asString",
 smalltalk.method({
 selector: "asString",
-fn: function () {
-    var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_printString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(self, "_selector", [])]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_receiver",[]),"_class",[]),"_printString",[]),"__comma",[" >> "]),"__comma",[smalltalk.send(self,"_selector",[])]);
+return $1;
 }
 }),
 smalltalk.MethodContext);
@@ -513,11 +550,11 @@ smalltalk.addMethod(
 "_home",
 smalltalk.method({
 selector: "home",
-fn: function () {
-    var self = this;
-    return self.homeContext;
-    return self;
-}
+fn: function (){
+var self=this;
+return self.homeContext;
+;
+return self}
 }),
 smalltalk.MethodContext);
 
@@ -525,10 +562,11 @@ smalltalk.addMethod(
 "_pc",
 smalltalk.method({
 selector: "pc",
-fn: function () {
+fn: function (){
 var self=this;
 return self.pc;
-return self;}
+;
+return self}
 }),
 smalltalk.MethodContext);
 
@@ -536,10 +574,11 @@ smalltalk.addMethod(
 "_printString",
 smalltalk.method({
 selector: "printString",
-fn: function () {
-    var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.MethodContext.superclass || nil), "__comma", ["("]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [")"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_printString",[],smalltalk.Object),"__comma",["("]),"__comma",[smalltalk.send(self,"_asString",[])]),"__comma",[")"]);
+return $1;
 }
 }),
 smalltalk.MethodContext);
@@ -548,11 +587,11 @@ smalltalk.addMethod(
 "_receiver",
 smalltalk.method({
 selector: "receiver",
-fn: function () {
-    var self = this;
-    return self.receiver;
-    return self;
-}
+fn: function (){
+var self=this;
+return self.receiver;
+;
+return self}
 }),
 smalltalk.MethodContext);
 
@@ -560,11 +599,11 @@ smalltalk.addMethod(
 "_selector",
 smalltalk.method({
 selector: "selector",
-fn: function () {
-    var self = this;
-    return smalltalk.convertSelector(self.selector);
-    return self;
-}
+fn: function (){
+var self=this;
+return smalltalk.convertSelector(self.selector);
+;
+return self}
 }),
 smalltalk.MethodContext);
 
@@ -572,11 +611,11 @@ smalltalk.addMethod(
 "_temps",
 smalltalk.method({
 selector: "temps",
-fn: function () {
-    var self = this;
-    return self.temps;
-    return self;
-}
+fn: function (){
+var self=this;
+return self.temps;
+;
+return self}
 }),
 smalltalk.MethodContext);
 

+ 268 - 229
js/Kernel-Methods.js

@@ -6,11 +6,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "applyTo:arguments:",
 category: 'evaluating',
-fn: function (anObject, aCollection) {
-    var self = this;
-    return self.apply(anObject, aCollection);
-    return self;
-},
+fn: function (anObject,aCollection){
+var self=this;
+return self.apply(anObject, aCollection);
+;
+return self},
 args: ["anObject", "aCollection"],
 source: "applyTo: anObject arguments: aCollection\x0a\x09<return self.apply(anObject, aCollection)>",
 messageSends: [],
@@ -23,11 +23,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "compiledSource",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self.toString();
-    return self;
-},
+fn: function (){
+var self=this;
+return self.toString();
+;
+return self},
 args: [],
 source: "compiledSource\x0a\x09<return self.toString()>",
 messageSends: [],
@@ -40,16 +40,27 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "ensure:",
 category: 'evaluating',
-fn: function (aBlock) {
-    var self = this;
-    var success = nil;
-    success = false;
-    return smalltalk.send(function () {smalltalk.send(self, "_value", []);success = true;return smalltalk.send(aBlock, "_value", []);}, "_on_do_", [smalltalk.Error || Error, function (ex) {($receiver = success).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(aBlock, "_value", []);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(aBlock, "_value", []);}]);return smalltalk.send(ex, "_signal", []);}]);
-    return self;
+fn: function (aBlock){
+var self=this;
+var $1;
+var success;
+success=false;
+$1=smalltalk.send((function(){
+smalltalk.send(self,"_value",[]);
+success=true;
+success;
+return smalltalk.send(aBlock,"_value",[]);
+}),"_on_do_",[(smalltalk.Error || Error),(function(ex){
+if(! smalltalk.assert(success)){
+smalltalk.send(aBlock,"_value",[]);
+};
+return smalltalk.send(ex,"_signal",[]);
+})]);
+return $1;
 },
 args: ["aBlock"],
 source: "ensure: aBlock\x0a\x09| success |\x0a\x09success := false.\x0a\x09^[self value. success := true. aBlock value]\x0a\x09\x09on: Error\x0a\x09\x09do: [:ex |\x0a\x09\x09\x09success ifFalse: [aBlock value].\x0a\x09\x09\x09ex signal]",
-messageSends: ["on:do:", "value", "ifFalse:", "signal"],
+messageSends: ["on:do:", "ifFalse:", "value", "signal"],
 referencedClasses: ["Error"]
 }),
 smalltalk.BlockClosure);
@@ -59,11 +70,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "new",
 category: 'evaluating',
-fn: function () {
-    var self = this;
-    return new self;
-    return self;
-},
+fn: function (){
+var self=this;
+return new self();
+;
+return self},
 args: [],
 source: "new\x0a\x09\x22Use the receiver as a JS constructor. \x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self()>",
 messageSends: [],
@@ -76,11 +87,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "newValue:",
 category: 'evaluating',
-fn: function (anObject) {
-    var self = this;
-    return new self(anObject);
-    return self;
-},
+fn: function (anObject){
+var self=this;
+return new self(anObject);
+;
+return self},
 args: ["anObject"],
 source: "newValue: anObject\x0a\x09\x22Use the receiver as a JS constructor. \x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self(anObject)>",
 messageSends: [],
@@ -93,11 +104,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "newValue:value:",
 category: 'evaluating',
-fn: function (anObject, anObject2) {
-    var self = this;
-    return new self(anObject, anObject2);
-    return self;
-},
+fn: function (anObject,anObject2){
+var self=this;
+return new self(anObject, anObject2);
+;
+return self},
 args: ["anObject", "anObject2"],
 source: "newValue:  anObject value: anObject2\x0a\x09\x22Use the receiver as a JS constructor. \x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self(anObject, anObject2)>",
 messageSends: [],
@@ -110,11 +121,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "newValue:value:value:",
 category: 'evaluating',
-fn: function (anObject, anObject2, anObject3) {
-    var self = this;
-    return new self(anObject, anObject2);
-    return self;
-},
+fn: function (anObject,anObject2,anObject3){
+var self=this;
+return new self(anObject, anObject2);
+;
+return self},
 args: ["anObject", "anObject2", "anObject3"],
 source: "newValue:  anObject value: anObject2 value: anObject3\x0a\x09\x22Use the receiver as a JS constructor. \x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self(anObject, anObject2)>",
 messageSends: [],
@@ -127,11 +138,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "numArgs",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self.length;
-    return self;
-},
+fn: function (){
+var self=this;
+return self.length;
+;
+return self},
 args: [],
 source: "numArgs\x0a\x09<return self.length>",
 messageSends: [],
@@ -144,14 +155,22 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "on:do:",
 category: 'error handling',
-fn: function (anErrorClass, aBlock) {
-    var self = this;
-    return smalltalk.send(self, "_try_catch_", [self, function (error) {return ($receiver = smalltalk.send(error, "_isKindOf_", [anErrorClass])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(aBlock, "_value_", [error]);}() : function () {return smalltalk.send(error, "_signal", []);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(aBlock, "_value_", [error]);}, function () {return smalltalk.send(error, "_signal", []);}]);}]);
-    return self;
+fn: function (anErrorClass,aBlock){
+var self=this;
+var $2,$1;
+$1=smalltalk.send(self,"_try_catch_",[self,(function(error){
+$2=smalltalk.send(error,"_isKindOf_",[anErrorClass]);
+if(smalltalk.assert($2)){
+return smalltalk.send(aBlock,"_value_",[error]);
+} else {
+return smalltalk.send(error,"_signal",[]);
+};
+})]);
+return $1;
 },
 args: ["anErrorClass", "aBlock"],
 source: "on: anErrorClass do: aBlock\x0a\x09^self try: self catch: [:error |\x0a\x09    (error isKindOf: anErrorClass) \x0a\x09     ifTrue: [aBlock value: error]\x0a\x09     ifFalse: [error signal]]",
-messageSends: ["try:catch:", "ifTrue:ifFalse:", "isKindOf:", "value:", "signal"],
+messageSends: ["try:catch:", "ifTrue:ifFalse:", "value:", "signal", "isKindOf:"],
 referencedClasses: []
 }),
 smalltalk.BlockClosure);
@@ -161,10 +180,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "timeToRun",
 category: 'evaluating',
-fn: function () {
-    var self = this;
-    return smalltalk.send(smalltalk.Date || Date, "_millisecondsToRun_", [self]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send((smalltalk.Date || Date),"_millisecondsToRun_",[self]);
+return $1;
 },
 args: [],
 source: "timeToRun\x0a\x09\x22Answer the number of milliseconds taken to execute this block.\x22\x0a\x0a\x09^ Date millisecondsToRun: self",
@@ -178,11 +198,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "value",
 category: 'evaluating',
-fn: function () {
-    var self = this;
-    return self();
-    return self;
-},
+fn: function (){
+var self=this;
+return self();;
+;
+return self},
 args: [],
 source: "value\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<return self();>",
 messageSends: [],
@@ -195,11 +215,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "value:",
 category: 'evaluating',
-fn: function (anArg) {
-    var self = this;
-    return self(anArg);
-    return self;
-},
+fn: function (anArg){
+var self=this;
+return self(anArg);;
+;
+return self},
 args: ["anArg"],
 source: "value: anArg\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<return self(anArg);>",
 messageSends: [],
@@ -212,11 +232,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "value:value:",
 category: 'evaluating',
-fn: function (firstArg, secondArg) {
-    var self = this;
-    return self(firstArg, secondArg);
-    return self;
-},
+fn: function (firstArg,secondArg){
+var self=this;
+return self(firstArg, secondArg);;
+;
+return self},
 args: ["firstArg", "secondArg"],
 source: "value: firstArg value: secondArg\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<return self(firstArg, secondArg);>",
 messageSends: [],
@@ -229,11 +249,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "value:value:value:",
 category: 'evaluating',
-fn: function (firstArg, secondArg, thirdArg) {
-    var self = this;
-    return self(firstArg, secondArg, thirdArg);
-    return self;
-},
+fn: function (firstArg,secondArg,thirdArg){
+var self=this;
+return self(firstArg, secondArg, thirdArg);;
+;
+return self},
 args: ["firstArg", "secondArg", "thirdArg"],
 source: "value: firstArg value: secondArg value: thirdArg\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<return self(firstArg, secondArg, thirdArg);>",
 messageSends: [],
@@ -246,11 +266,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "valueWithInterval:",
 category: 'timeout/interval',
-fn: function (aNumber) {
-    var self = this;
-    return setInterval(self, aNumber);
-    return self;
-},
+fn: function (aNumber){
+var self=this;
+return setInterval(self, aNumber);
+;
+return self},
 args: ["aNumber"],
 source: "valueWithInterval: aNumber\x0a\x09<return setInterval(self, aNumber)>",
 messageSends: [],
@@ -263,11 +283,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "valueWithPossibleArguments:",
 category: 'evaluating',
-fn: function (aCollection) {
-    var self = this;
-    return self.apply(null, aCollection);
-    return self;
-},
+fn: function (aCollection){
+var self=this;
+return self.apply(null, aCollection);;
+;
+return self},
 args: ["aCollection"],
 source: "valueWithPossibleArguments: aCollection\x0a\x09<return self.apply(null, aCollection);>",
 messageSends: [],
@@ -280,11 +300,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "valueWithTimeout:",
 category: 'timeout/interval',
-fn: function (aNumber) {
-    var self = this;
-    return setTimeout(self, aNumber);
-    return self;
-},
+fn: function (aNumber){
+var self=this;
+return setTimeout(self, aNumber);
+;
+return self},
 args: ["aNumber"],
 source: "valueWithTimeout: aNumber\x0a\x09<return setTimeout(self, aNumber)>",
 messageSends: [],
@@ -297,11 +317,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "whileFalse",
 category: 'controlling',
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_whileFalse_", [function () {return nil;}]);
-    return self;
-},
+fn: function (){
+var self=this;
+smalltalk.send(self,"_whileFalse_",[(function(){
+})]);
+return self},
 args: [],
 source: "whileFalse\x0a\x09\x22inlined in the Compiler\x22\x0a\x09self whileFalse: []",
 messageSends: ["whileFalse:"],
@@ -314,13 +334,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "whileFalse:",
 category: 'controlling',
-fn: function (aBlock) {
-    var self = this;
-    while (!self()) {
-        aBlock();
-    }
-    return self;
-},
+fn: function (aBlock){
+var self=this;
+while(!self()) {aBlock()};
+;
+return self},
 args: ["aBlock"],
 source: "whileFalse: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<while(!self()) {aBlock()}>",
 messageSends: [],
@@ -333,11 +351,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "whileTrue",
 category: 'controlling',
-fn: function () {
-    var self = this;
-    smalltalk.send(self, "_whileTrue_", [function () {return nil;}]);
-    return self;
-},
+fn: function (){
+var self=this;
+smalltalk.send(self,"_whileTrue_",[(function(){
+})]);
+return self},
 args: [],
 source: "whileTrue\x0a\x09\x22inlined in the Compiler\x22\x0a\x09self whileTrue: []",
 messageSends: ["whileTrue:"],
@@ -350,13 +368,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "whileTrue:",
 category: 'controlling',
-fn: function (aBlock) {
-    var self = this;
-    while (self()) {
-        aBlock();
-    }
-    return self;
-},
+fn: function (aBlock){
+var self=this;
+while(self()) {aBlock()};
+;
+return self},
 args: ["aBlock"],
 source: "whileTrue: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<while(self()) {aBlock()}>",
 messageSends: [],
@@ -373,11 +389,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "arguments",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self.args || [];
-    return self;
-},
+fn: function (){
+var self=this;
+return self.args || [];
+;
+return self},
 args: [],
 source: "arguments\x0a\x09<return self.args || []>",
 messageSends: [],
@@ -390,11 +406,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "category",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return ($receiver = smalltalk.send(self, "_basicAt_", ["category"])) == nil ||
-        $receiver == undefined ? function () {return "";}() : $receiver;
-    return self;
+fn: function (){
+var self=this;
+var $2,$1;
+$2=smalltalk.send(self,"_basicAt_",["category"]);
+if(($receiver = $2) == nil || $receiver == undefined){
+$1="";
+} else {
+$1=$2;
+};
+return $1;
 },
 args: [],
 source: "category\x0a\x09^(self basicAt: 'category') ifNil: ['']",
@@ -408,11 +429,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "category:",
 category: 'accessing',
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self, "_basicAt_put_", ["category", aString]);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self,"_basicAt_put_",["category",aString]);
+return self},
 args: ["aString"],
 source: "category: aString\x0a\x09self basicAt: 'category' put: aString",
 messageSends: ["basicAt:put:"],
@@ -425,10 +445,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "fn",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["fn"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["fn"]);
+return $1;
 },
 args: [],
 source: "fn\x0a\x09^self basicAt: 'fn'",
@@ -442,11 +463,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "fn:",
 category: 'accessing',
-fn: function (aBlock) {
-    var self = this;
-    smalltalk.send(self, "_basicAt_put_", ["fn", aBlock]);
-    return self;
-},
+fn: function (aBlock){
+var self=this;
+smalltalk.send(self,"_basicAt_put_",["fn",aBlock]);
+return self},
 args: ["aBlock"],
 source: "fn: aBlock\x0a\x09self basicAt: 'fn' put: aBlock",
 messageSends: ["basicAt:put:"],
@@ -459,10 +479,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "messageSends",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["messageSends"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["messageSends"]);
+return $1;
 },
 args: [],
 source: "messageSends\x0a\x09^self basicAt: 'messageSends'",
@@ -476,10 +497,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "methodClass",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["methodClass"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["methodClass"]);
+return $1;
 },
 args: [],
 source: "methodClass\x0a\x09^self basicAt: 'methodClass'",
@@ -493,10 +515,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "referencedClasses",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["referencedClasses"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["referencedClasses"]);
+return $1;
 },
 args: [],
 source: "referencedClasses\x0a\x09^self basicAt: 'referencedClasses'",
@@ -510,10 +533,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selector",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return smalltalk.send(self, "_basicAt_", ["selector"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(self,"_basicAt_",["selector"]);
+return $1;
 },
 args: [],
 source: "selector\x0a\x09^self basicAt: 'selector'",
@@ -527,11 +551,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selector:",
 category: 'accessing',
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self, "_basicAt_put_", ["selector", aString]);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self,"_basicAt_put_",["selector",aString]);
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09self basicAt: 'selector' put: aString",
 messageSends: ["basicAt:put:"],
@@ -544,11 +567,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "source",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return ($receiver = smalltalk.send(self, "_basicAt_", ["source"])) == nil ||
-        $receiver == undefined ? function () {return "";}() : $receiver;
-    return self;
+fn: function (){
+var self=this;
+var $2,$1;
+$2=smalltalk.send(self,"_basicAt_",["source"]);
+if(($receiver = $2) == nil || $receiver == undefined){
+$1="";
+} else {
+$1=$2;
+};
+return $1;
 },
 args: [],
 source: "source\x0a\x09^(self basicAt: 'source') ifNil: ['']",
@@ -562,11 +590,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "source:",
 category: 'accessing',
-fn: function (aString) {
-    var self = this;
-    smalltalk.send(self, "_basicAt_put_", ["source", aString]);
-    return self;
-},
+fn: function (aString){
+var self=this;
+smalltalk.send(self,"_basicAt_put_",["source",aString]);
+return self},
 args: ["aString"],
 source: "source: aString\x0a\x09self basicAt: 'source' put: aString",
 messageSends: ["basicAt:put:"],
@@ -583,10 +610,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "arguments",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@arguments'];
-    return self;
+fn: function (){
+var self=this;
+return self["@arguments"];
 },
 args: [],
 source: "arguments\x0a\x09^arguments",
@@ -600,11 +626,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "arguments:",
 category: 'accessing',
-fn: function (anArray) {
-    var self = this;
-    self['@arguments'] = anArray;
-    return self;
-},
+fn: function (anArray){
+var self=this;
+self["@arguments"]=anArray;
+return self},
 args: ["anArray"],
 source: "arguments: anArray\x0a\x09arguments := anArray",
 messageSends: [],
@@ -617,10 +642,17 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "printString",
 category: 'printing',
-fn: function () {
-    var self = this;
-    return smalltalk.send(smalltalk.String || String, "_streamContents_", [function (aStream) {return function ($rec) {smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(self, "_printString", [], smalltalk.Message.superclass || nil)]);smalltalk.send($rec, "_nextPutAll_", ["("]);smalltalk.send($rec, "_nextPutAll_", [self['@selector']]);return smalltalk.send($rec, "_nextPutAll_", [")"]);}(aStream);}]);
-    return self;
+fn: function (){
+var self=this;
+var $2,$1;
+$1=smalltalk.send((smalltalk.String || String),"_streamContents_",[(function(aStream){
+smalltalk.send(aStream,"_nextPutAll_",[smalltalk.send(self,"_printString",[],smalltalk.Object)]);
+smalltalk.send(aStream,"_nextPutAll_",["("]);
+smalltalk.send(aStream,"_nextPutAll_",[self["@selector"]]);
+$2=smalltalk.send(aStream,"_nextPutAll_",[")"]);
+return $2;
+})]);
+return $1;
 },
 args: [],
 source: "printString\x0a\x09^ String streamContents: [:aStream|  \x0a                                  \x09\x09\x09\x09aStream \x0a                                  \x09\x09\x09\x09\x09nextPutAll: super printString;\x0a                                  \x09\x09\x09\x09\x09nextPutAll: '(';\x0a                                  \x09\x09\x09\x09\x09nextPutAll: selector;\x0a                                  \x09\x09\x09\x09\x09nextPutAll: ')' \x09\x09\x09\x09]",
@@ -634,10 +666,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selector",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@selector'];
-    return self;
+fn: function (){
+var self=this;
+return self["@selector"];
 },
 args: [],
 source: "selector\x0a\x09^selector",
@@ -651,11 +682,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selector:",
 category: 'accessing',
-fn: function (aString) {
-    var self = this;
-    self['@selector'] = aString;
-    return self;
-},
+fn: function (aString){
+var self=this;
+self["@selector"]=aString;
+return self},
 args: ["aString"],
 source: "selector: aString\x0a\x09selector := aString",
 messageSends: [],
@@ -668,14 +698,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "sendTo:",
 category: 'printing',
-fn: function (anObject) {
-    var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_send_to_arguments_", [smalltalk.send(self, "_selector", []), anObject, smalltalk.send(self, "_arguments", [])]);
-    return self;
+fn: function (anObject){
+var self=this;
+var $1;
+$1=smalltalk.send(smalltalk.send((smalltalk.Smalltalk || Smalltalk),"_current",[]),"_send_to_arguments_",[smalltalk.send(self,"_selector",[]),anObject,smalltalk.send(self,"_arguments",[])]);
+return $1;
 },
 args: ["anObject"],
 source: "sendTo: anObject\x0a\x09^ Smalltalk current send: self selector to: anObject arguments: self arguments",
-messageSends: ["send:to:arguments:", "current", "selector", "arguments"],
+messageSends: ["send:to:arguments:", "selector", "arguments", "current"],
 referencedClasses: ["Smalltalk"]
 }),
 smalltalk.Message);
@@ -686,14 +717,19 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selector:arguments:",
 category: 'instance creation',
-fn: function (aString, anArray) {
-    var self = this;
-    return function ($rec) {smalltalk.send($rec, "_selector_", [aString]);smalltalk.send($rec, "_arguments_", [anArray]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(self, "_new", []));
-    return self;
+fn: function (aString,anArray){
+var self=this;
+var $2,$3,$1;
+$2=smalltalk.send(self,"_new",[]);
+smalltalk.send($2,"_selector_",[aString]);
+smalltalk.send($2,"_arguments_",[anArray]);
+$3=smalltalk.send($2,"_yourself",[]);
+$1=$3;
+return $1;
 },
 args: ["aString", "anArray"],
 source: "selector: aString arguments: anArray\x0a\x09^self new\x0a\x09\x09selector: aString;\x0a\x09\x09arguments: anArray;\x0a\x09\x09yourself",
-messageSends: ["selector:", "arguments:", "yourself", "new"],
+messageSends: ["selector:", "new", "arguments:", "yourself"],
 referencedClasses: []
 }),
 smalltalk.Message.klass);
@@ -706,14 +742,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "asString",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_printString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(self, "_selector", [])]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_receiver",[]),"_class",[]),"_printString",[]),"__comma",[" >> "]),"__comma",[smalltalk.send(self,"_selector",[])]);
+return $1;
 },
 args: [],
 source: "asString\x0a\x09^self receiver class printString, ' >> ', self selector",
-messageSends: [",", "printString", "class", "receiver", "selector"],
+messageSends: [",", "selector", "printString", "class", "receiver"],
 referencedClasses: []
 }),
 smalltalk.MethodContext);
@@ -723,11 +760,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "home",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self.homeContext;
-    return self;
-},
+fn: function (){
+var self=this;
+return self.homeContext;
+;
+return self},
 args: [],
 source: "home\x0a\x09<return self.homeContext>",
 messageSends: [],
@@ -740,10 +777,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "pc",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
 return self.pc;
-return self;},
+;
+return self},
 args: [],
 source: "pc\x0a\x09<return self.pc>",
 messageSends: [],
@@ -756,14 +794,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "printString",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", [], smalltalk.MethodContext.superclass || nil), "__comma", ["("]), "__comma", [smalltalk.send(self, "_asString", [])]), "__comma", [")"]);
-    return self;
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_printString",[],smalltalk.Object),"__comma",["("]),"__comma",[smalltalk.send(self,"_asString",[])]),"__comma",[")"]);
+return $1;
 },
 args: [],
 source: "printString\x0a\x09^super printString, '(', self asString, ')'",
-messageSends: [",", "printString", "asString"],
+messageSends: [",", "asString", "printString"],
 referencedClasses: []
 }),
 smalltalk.MethodContext);
@@ -773,11 +812,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "receiver",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self.receiver;
-    return self;
-},
+fn: function (){
+var self=this;
+return self.receiver;
+;
+return self},
 args: [],
 source: "receiver\x0a\x09<return self.receiver>",
 messageSends: [],
@@ -790,11 +829,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selector",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return smalltalk.convertSelector(self.selector);
-    return self;
-},
+fn: function (){
+var self=this;
+return smalltalk.convertSelector(self.selector);
+;
+return self},
 args: [],
 source: "selector\x0a\x09<return smalltalk.convertSelector(self.selector)>",
 messageSends: [],
@@ -807,11 +846,11 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "temps",
 category: 'accessing',
-fn: function () {
-    var self = this;
-    return self.temps;
-    return self;
-},
+fn: function (){
+var self=this;
+return self.temps;
+;
+return self},
 args: [],
 source: "temps\x0a\x09<return self.temps>",
 messageSends: [],

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 312 - 301
js/Kernel-Objects.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 305 - 290
js/Kernel-Objects.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 448 - 238
js/Kernel-Tests.deploy.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 424 - 223
js/Kernel-Tests.js


+ 23 - 25
js/Kernel-Transcript.deploy.js

@@ -6,8 +6,7 @@ smalltalk.method({
 selector: "clear",
 fn: function (){
 var self=this;
-
-return self;}
+return self}
 }),
 smalltalk.ConsoleTranscript);
 
@@ -17,8 +16,7 @@ smalltalk.method({
 selector: "cr",
 fn: function (){
 var self=this;
-
-return self;}
+return self}
 }),
 smalltalk.ConsoleTranscript);
 
@@ -28,8 +26,7 @@ smalltalk.method({
 selector: "open",
 fn: function (){
 var self=this;
-
-return self;}
+return self}
 }),
 smalltalk.ConsoleTranscript);
 
@@ -39,10 +36,11 @@ smalltalk.method({
 selector: "show:",
 fn: function (anObject){
 var self=this;
-var string=nil;
-(string=smalltalk.send(anObject, "_asString", []));
+var string;
+string=smalltalk.send(anObject,"_asString",[]);
 console.log(String(string));
-return self;}
+;
+return self}
 }),
 smalltalk.ConsoleTranscript);
 
@@ -53,8 +51,8 @@ smalltalk.method({
 selector: "initialize",
 fn: function (){
 var self=this;
-smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
-return self;}
+smalltalk.send((smalltalk.Transcript || Transcript),"_register_",[smalltalk.send(self,"_new",[])]);
+return self}
 }),
 smalltalk.ConsoleTranscript.klass);
 
@@ -68,8 +66,8 @@ smalltalk.method({
 selector: "clear",
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
-return self;}
+smalltalk.send(smalltalk.send(self,"_current",[]),"_clear",[]);
+return self}
 }),
 smalltalk.Transcript.klass);
 
@@ -79,8 +77,8 @@ smalltalk.method({
 selector: "cr",
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
-return self;}
+smalltalk.send(smalltalk.send(self,"_current",[]),"_show_",[smalltalk.send((smalltalk.String || String),"_cr",[])]);
+return self}
 }),
 smalltalk.Transcript.klass);
 
@@ -90,8 +88,8 @@ smalltalk.method({
 selector: "current",
 fn: function (){
 var self=this;
-return self['@current'];
-return self;}
+return self["@current"];
+}
 }),
 smalltalk.Transcript.klass);
 
@@ -101,8 +99,8 @@ smalltalk.method({
 selector: "new",
 fn: function (){
 var self=this;
-smalltalk.send(self, "_shouldNotImplement", []);
-return self;}
+smalltalk.send(self,"_shouldNotImplement",[]);
+return self}
 }),
 smalltalk.Transcript.klass);
 
@@ -112,8 +110,8 @@ smalltalk.method({
 selector: "open",
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
-return self;}
+smalltalk.send(smalltalk.send(self,"_current",[]),"_open",[]);
+return self}
 }),
 smalltalk.Transcript.klass);
 
@@ -123,8 +121,8 @@ smalltalk.method({
 selector: "register:",
 fn: function (aTranscript){
 var self=this;
-(self['@current']=aTranscript);
-return self;}
+self["@current"]=aTranscript;
+return self}
 }),
 smalltalk.Transcript.klass);
 
@@ -134,8 +132,8 @@ smalltalk.method({
 selector: "show:",
 fn: function (anObject){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
-return self;}
+smalltalk.send(smalltalk.send(self,"_current",[]),"_show_",[anObject]);
+return self}
 }),
 smalltalk.Transcript.klass);
 

+ 24 - 26
js/Kernel-Transcript.js

@@ -7,8 +7,7 @@ selector: "clear",
 category: 'printing',
 fn: function (){
 var self=this;
-
-return self;},
+return self},
 args: [],
 source: "clear\x0a\x09\x22no op\x22",
 messageSends: [],
@@ -23,8 +22,7 @@ selector: "cr",
 category: 'printing',
 fn: function (){
 var self=this;
-
-return self;},
+return self},
 args: [],
 source: "cr\x0a\x09\x22no op\x22",
 messageSends: [],
@@ -39,8 +37,7 @@ selector: "open",
 category: 'actions',
 fn: function (){
 var self=this;
-
-return self;},
+return self},
 args: [],
 source: "open",
 messageSends: [],
@@ -55,10 +52,11 @@ selector: "show:",
 category: 'printing',
 fn: function (anObject){
 var self=this;
-var string=nil;
-(string=smalltalk.send(anObject, "_asString", []));
+var string;
+string=smalltalk.send(anObject,"_asString",[]);
 console.log(String(string));
-return self;},
+;
+return self},
 args: ["anObject"],
 source: "show: anObject\x0a\x09| string |\x0a\x09string := anObject asString.\x0a\x09<console.log(String(string))>",
 messageSends: ["asString"],
@@ -74,8 +72,8 @@ selector: "initialize",
 category: 'initialization',
 fn: function (){
 var self=this;
-smalltalk.send((smalltalk.Transcript || Transcript), "_register_", [smalltalk.send(self, "_new", [])]);
-return self;},
+smalltalk.send((smalltalk.Transcript || Transcript),"_register_",[smalltalk.send(self,"_new",[])]);
+return self},
 args: [],
 source: "initialize\x0a\x09Transcript register: self new",
 messageSends: ["register:", "new"],
@@ -94,8 +92,8 @@ selector: "clear",
 category: 'printing',
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_current", []), "_clear", []);
-return self;},
+smalltalk.send(smalltalk.send(self,"_current",[]),"_clear",[]);
+return self},
 args: [],
 source: "clear\x0a    self current clear",
 messageSends: ["clear", "current"],
@@ -110,11 +108,11 @@ selector: "cr",
 category: 'printing',
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [smalltalk.send((smalltalk.String || String), "_cr", [])]);
-return self;},
+smalltalk.send(smalltalk.send(self,"_current",[]),"_show_",[smalltalk.send((smalltalk.String || String),"_cr",[])]);
+return self},
 args: [],
 source: "cr\x0a    self current show: String cr",
-messageSends: ["show:", "current", "cr"],
+messageSends: ["show:", "cr", "current"],
 referencedClasses: ["String"]
 }),
 smalltalk.Transcript.klass);
@@ -126,8 +124,8 @@ selector: "current",
 category: 'instance creation',
 fn: function (){
 var self=this;
-return self['@current'];
-return self;},
+return self["@current"];
+},
 args: [],
 source: "current\x0a    ^current",
 messageSends: [],
@@ -142,8 +140,8 @@ selector: "new",
 category: 'instance creation',
 fn: function (){
 var self=this;
-smalltalk.send(self, "_shouldNotImplement", []);
-return self;},
+smalltalk.send(self,"_shouldNotImplement",[]);
+return self},
 args: [],
 source: "new\x0a    self shouldNotImplement",
 messageSends: ["shouldNotImplement"],
@@ -158,8 +156,8 @@ selector: "open",
 category: 'instance creation',
 fn: function (){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_current", []), "_open", []);
-return self;},
+smalltalk.send(smalltalk.send(self,"_current",[]),"_open",[]);
+return self},
 args: [],
 source: "open\x0a    self current open",
 messageSends: ["open", "current"],
@@ -174,8 +172,8 @@ selector: "register:",
 category: 'instance creation',
 fn: function (aTranscript){
 var self=this;
-(self['@current']=aTranscript);
-return self;},
+self["@current"]=aTranscript;
+return self},
 args: ["aTranscript"],
 source: "register: aTranscript\x0a\x09current := aTranscript",
 messageSends: [],
@@ -190,8 +188,8 @@ selector: "show:",
 category: 'printing',
 fn: function (anObject){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_current", []), "_show_", [anObject]);
-return self;},
+smalltalk.send(smalltalk.send(self,"_current",[]),"_show_",[anObject]);
+return self},
 args: ["anObject"],
 source: "show: anObject\x0a    self current show: anObject",
 messageSends: ["show:", "current"],

+ 164 - 108
js/SUnit.deploy.js

@@ -4,10 +4,10 @@ smalltalk.addMethod(
 "_assert_",
 smalltalk.method({
 selector: "assert:",
-fn: function (aBoolean) {
+fn: function (aBoolean){
 var self=this;
-smalltalk.send(self, "_assert_description_", [aBoolean, "Assertion failed"]);
-return self;}
+smalltalk.send(self,"_assert_description_",[aBoolean,"Assertion failed"]);
+return self}
 }),
 smalltalk.TestCase);
 
@@ -15,10 +15,12 @@ smalltalk.addMethod(
 "_assert_description_",
 smalltalk.method({
 selector: "assert:description:",
-fn: function (aBoolean, aString) {
+fn: function (aBoolean,aString){
 var self=this;
-((($receiver = aBoolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_signalFailure_", [aString]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_signalFailure_", [aString]);})]));
-return self;}
+if(! smalltalk.assert(aBoolean)){
+smalltalk.send(self,"_signalFailure_",[aString]);
+};
+return self}
 }),
 smalltalk.TestCase);
 
@@ -26,10 +28,12 @@ smalltalk.addMethod(
 "_assert_equals_",
 smalltalk.method({
 selector: "assert:equals:",
-fn: function (expected, actual) {
+fn: function (expected,actual){
 var self=this;
-return smalltalk.send(self, "_assert_description_", [smalltalk.send(expected, "__eq", [actual]), smalltalk.send(smalltalk.send(smalltalk.send("Expected: ", "__comma", [smalltalk.send(expected, "_asString", [])]), "__comma", [" but was: "]), "__comma", [smalltalk.send(actual, "_asString", [])])]);
-return self;}
+var $1;
+$1=smalltalk.send(self,"_assert_description_",[smalltalk.send(expected,"__eq",[actual]),smalltalk.send(smalltalk.send(smalltalk.send("Expected: ","__comma",[smalltalk.send(expected,"_asString",[])]),"__comma",[" but was: "]),"__comma",[smalltalk.send(actual,"_asString",[])])]);
+return $1;
+}
 }),
 smalltalk.TestCase);
 
@@ -37,10 +41,10 @@ smalltalk.addMethod(
 "_deny_",
 smalltalk.method({
 selector: "deny:",
-fn: function (aBoolean) {
+fn: function (aBoolean){
 var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
-return self;}
+smalltalk.send(self,"_assert_",[smalltalk.send(aBoolean,"_not",[])]);
+return self}
 }),
 smalltalk.TestCase);
 
@@ -48,10 +52,18 @@ smalltalk.addMethod(
 "_performTestFor_",
 smalltalk.method({
 selector: "performTestFor:",
-fn: function (aResult) {
-var self=this;
-smalltalk.send((function(){return smalltalk.send((function(){return smalltalk.send(self, "_perform_", [smalltalk.send(self, "_selector", [])]);}), "_on_do_", [(smalltalk.TestFailure || TestFailure), (function(ex){return smalltalk.send(aResult, "_addFailure_", [self]);})]);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return smalltalk.send(aResult, "_addError_", [self]);})]);
-return self;}
+fn: function (aResult){
+var self=this;
+smalltalk.send((function(){
+return smalltalk.send((function(){
+return smalltalk.send(self,"_perform_",[smalltalk.send(self,"_selector",[])]);
+}),"_on_do_",[(smalltalk.TestFailure || TestFailure),(function(ex){
+return smalltalk.send(aResult,"_addFailure_",[self]);
+})]);
+}),"_on_do_",[(smalltalk.Error || Error),(function(ex){
+return smalltalk.send(aResult,"_addError_",[self]);
+})]);
+return self}
 }),
 smalltalk.TestCase);
 
@@ -59,13 +71,13 @@ smalltalk.addMethod(
 "_runCaseFor_",
 smalltalk.method({
 selector: "runCaseFor:",
-fn: function (aTestResult) {
+fn: function (aTestResult){
 var self=this;
-smalltalk.send(self, "_setUp", []);
-smalltalk.send(aTestResult, "_increaseRuns", []);
-smalltalk.send(self, "_performTestFor_", [aTestResult]);
-smalltalk.send(self, "_tearDown", []);
-return self;}
+smalltalk.send(self,"_setUp",[]);
+smalltalk.send(aTestResult,"_increaseRuns",[]);
+smalltalk.send(self,"_performTestFor_",[aTestResult]);
+smalltalk.send(self,"_tearDown",[]);
+return self}
 }),
 smalltalk.TestCase);
 
@@ -73,10 +85,10 @@ smalltalk.addMethod(
 "_selector",
 smalltalk.method({
 selector: "selector",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@testSelector'];
-return self;}
+return self["@testSelector"];
+}
 }),
 smalltalk.TestCase);
 
@@ -84,10 +96,10 @@ smalltalk.addMethod(
 "_setTestSelector_",
 smalltalk.method({
 selector: "setTestSelector:",
-fn: function (aSelector) {
+fn: function (aSelector){
 var self=this;
-(self['@testSelector']=aSelector);
-return self;}
+self["@testSelector"]=aSelector;
+return self}
 }),
 smalltalk.TestCase);
 
@@ -95,10 +107,9 @@ smalltalk.addMethod(
 "_setUp",
 smalltalk.method({
 selector: "setUp",
-fn: function () {
+fn: function (){
 var self=this;
-
-return self;}
+return self}
 }),
 smalltalk.TestCase);
 
@@ -106,10 +117,10 @@ smalltalk.addMethod(
 "_should_",
 smalltalk.method({
 selector: "should:",
-fn: function (aBlock) {
+fn: function (aBlock){
 var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send(aBlock, "_value", [])]);
-return self;}
+smalltalk.send(self,"_assert_",[smalltalk.send(aBlock,"_value",[])]);
+return self}
 }),
 smalltalk.TestCase);
 
@@ -117,10 +128,15 @@ smalltalk.addMethod(
 "_should_raise_",
 smalltalk.method({
 selector: "should:raise:",
-fn: function (aBlock, anExceptionClass) {
+fn: function (aBlock,anExceptionClass){
 var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send((function(){smalltalk.send(aBlock, "_value", []);return false;}), "_on_do_", [anExceptionClass, (function(ex){return true;})])]);
-return self;}
+smalltalk.send(self,"_assert_",[smalltalk.send((function(){
+smalltalk.send(aBlock,"_value",[]);
+return false;
+}),"_on_do_",[anExceptionClass,(function(ex){
+return true;
+})])]);
+return self}
 }),
 smalltalk.TestCase);
 
@@ -128,10 +144,15 @@ smalltalk.addMethod(
 "_shouldnt_raise_",
 smalltalk.method({
 selector: "shouldnt:raise:",
-fn: function (aBlock, anExceptionClass) {
+fn: function (aBlock,anExceptionClass){
 var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send((function(){smalltalk.send(aBlock, "_value", []);return true;}), "_on_do_", [anExceptionClass, (function(ex){return false;})])]);
-return self;}
+smalltalk.send(self,"_assert_",[smalltalk.send((function(){
+smalltalk.send(aBlock,"_value",[]);
+return true;
+}),"_on_do_",[anExceptionClass,(function(ex){
+return false;
+})])]);
+return self}
 }),
 smalltalk.TestCase);
 
@@ -139,10 +160,13 @@ smalltalk.addMethod(
 "_signalFailure_",
 smalltalk.method({
 selector: "signalFailure:",
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.TestFailure || TestFailure), "_new", []));
-return self;}
+var $1,$2;
+$1=smalltalk.send((smalltalk.TestFailure || TestFailure),"_new",[]);
+smalltalk.send($1,"_messageText_",[aString]);
+$2=smalltalk.send($1,"_signal",[]);
+return self}
 }),
 smalltalk.TestCase);
 
@@ -150,10 +174,9 @@ smalltalk.addMethod(
 "_tearDown",
 smalltalk.method({
 selector: "tearDown",
-fn: function () {
+fn: function (){
 var self=this;
-
-return self;}
+return self}
 }),
 smalltalk.TestCase);
 
@@ -162,13 +185,17 @@ smalltalk.addMethod(
 "_allTestSelectors",
 smalltalk.method({
 selector: "allTestSelectors",
-fn: function () {
-var self=this;
-var selectors=nil;
-(selectors=smalltalk.send(self, "_testSelectors", []));
-((($receiver = smalltalk.send(self, "_shouldInheritSelectors", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})]));
+fn: function (){
+var self=this;
+var $1;
+var selectors;
+selectors=smalltalk.send(self,"_testSelectors",[]);
+$1=smalltalk.send(self,"_shouldInheritSelectors",[]);
+if(smalltalk.assert($1)){
+smalltalk.send(selectors,"_addAll_",[smalltalk.send(smalltalk.send(self,"_superclass",[]),"_allTestSelectors",[])]);
+};
 return selectors;
-return self;}
+}
 }),
 smalltalk.TestCase.klass);
 
@@ -176,10 +203,14 @@ smalltalk.addMethod(
 "_buildSuite",
 smalltalk.method({
 selector: "buildSuite",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_allTestSelectors", []), "_collect_", [(function(each){return smalltalk.send(self, "_selector_", [each]);})]);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_allTestSelectors",[]),"_collect_",[(function(each){
+return smalltalk.send(self,"_selector_",[each]);
+})]);
+return $1;
+}
 }),
 smalltalk.TestCase.klass);
 
@@ -187,10 +218,12 @@ smalltalk.addMethod(
 "_isAbstract",
 smalltalk.method({
 selector: "isAbstract",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_name", []), "__eq", ["TestCase"]);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_name",[]),"__eq",["TestCase"]);
+return $1;
+}
 }),
 smalltalk.TestCase.klass);
 
@@ -198,10 +231,10 @@ smalltalk.addMethod(
 "_lookupHierarchyRoot",
 smalltalk.method({
 selector: "lookupHierarchyRoot",
-fn: function () {
+fn: function (){
 var self=this;
 return (smalltalk.TestCase || TestCase);
-return self;}
+}
 }),
 smalltalk.TestCase.klass);
 
@@ -209,10 +242,15 @@ smalltalk.addMethod(
 "_selector_",
 smalltalk.method({
 selector: "selector:",
-fn: function (aSelector) {
+fn: function (aSelector){
 var self=this;
-return (function($rec){smalltalk.send($rec, "_setTestSelector_", [aSelector]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
-return self;}
+var $2,$3,$1;
+$2=smalltalk.send(self,"_new",[]);
+smalltalk.send($2,"_setTestSelector_",[aSelector]);
+$3=smalltalk.send($2,"_yourself",[]);
+$1=$3;
+return $1;
+}
 }),
 smalltalk.TestCase.klass);
 
@@ -220,10 +258,12 @@ smalltalk.addMethod(
 "_shouldInheritSelectors",
 smalltalk.method({
 selector: "shouldInheritSelectors",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(self, "_~_eq", [smalltalk.send(self, "_lookupHierarchyRoot", [])]);
-return self;}
+var $1;
+$1=smalltalk.send(self,"_~_eq",[smalltalk.send(self,"_lookupHierarchyRoot",[])]);
+return $1;
+}
 }),
 smalltalk.TestCase.klass);
 
@@ -231,10 +271,14 @@ smalltalk.addMethod(
 "_testSelectors",
 smalltalk.method({
 selector: "testSelectors",
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_select_", [(function(each){return smalltalk.send(each, "_match_", ["^test"]);})]);
-return self;}
+var $1;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodDictionary",[]),"_keys",[]),"_select_",[(function(each){
+return smalltalk.send(each,"_match_",["^test"]);
+})]);
+return $1;
+}
 }),
 smalltalk.TestCase.klass);
 
@@ -247,10 +291,10 @@ smalltalk.addMethod(
 "_addError_",
 smalltalk.method({
 selector: "addError:",
-fn: function (anError) {
+fn: function (anError){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
-return self;}
+smalltalk.send(smalltalk.send(self,"_errors",[]),"_add_",[anError]);
+return self}
 }),
 smalltalk.TestResult);
 
@@ -258,10 +302,10 @@ smalltalk.addMethod(
 "_addFailure_",
 smalltalk.method({
 selector: "addFailure:",
-fn: function (aFailure) {
+fn: function (aFailure){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
-return self;}
+smalltalk.send(smalltalk.send(self,"_failures",[]),"_add_",[aFailure]);
+return self}
 }),
 smalltalk.TestResult);
 
@@ -269,10 +313,10 @@ smalltalk.addMethod(
 "_errors",
 smalltalk.method({
 selector: "errors",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@errors'];
-return self;}
+return self["@errors"];
+}
 }),
 smalltalk.TestResult);
 
@@ -280,10 +324,10 @@ smalltalk.addMethod(
 "_failures",
 smalltalk.method({
 selector: "failures",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@failures'];
-return self;}
+return self["@failures"];
+}
 }),
 smalltalk.TestResult);
 
@@ -291,10 +335,10 @@ smalltalk.addMethod(
 "_increaseRuns",
 smalltalk.method({
 selector: "increaseRuns",
-fn: function () {
+fn: function (){
 var self=this;
-(self['@runs']=((($receiver = self['@runs']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
-return self;}
+self["@runs"]=smalltalk.send(self["@runs"],"__plus",[(1)]);
+return self}
 }),
 smalltalk.TestResult);
 
@@ -302,15 +346,15 @@ smalltalk.addMethod(
 "_initialize",
 smalltalk.method({
 selector: "initialize",
-fn: function () {
+fn: function (){
 var self=this;
-smalltalk.send(self, "_initialize", [], smalltalk.TestResult.superclass || nil);
-(self['@timestamp']=smalltalk.send((smalltalk.Date || Date), "_now", []));
-(self['@runs']=(0));
-(self['@errors']=smalltalk.send((smalltalk.Array || Array), "_new", []));
-(self['@failures']=smalltalk.send((smalltalk.Array || Array), "_new", []));
-(self['@total']=(0));
-return self;}
+smalltalk.send(self,"_initialize",[],smalltalk.Object);
+self["@timestamp"]=smalltalk.send((smalltalk.Date || Date),"_now",[]);
+self["@runs"]=(0);
+self["@errors"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
+self["@failures"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
+self["@total"]=(0);
+return self}
 }),
 smalltalk.TestResult);
 
@@ -318,10 +362,10 @@ smalltalk.addMethod(
 "_runs",
 smalltalk.method({
 selector: "runs",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@runs'];
-return self;}
+return self["@runs"];
+}
 }),
 smalltalk.TestResult);
 
@@ -329,10 +373,22 @@ smalltalk.addMethod(
 "_status",
 smalltalk.method({
 selector: "status",
-fn: function () {
-var self=this;
-return ((($receiver = smalltalk.send(smalltalk.send(self, "_errors", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));})() : (function(){return "error";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));}), (function(){return "error";})]));
-return self;}
+fn: function (){
+var self=this;
+var $2,$3,$1;
+$2=smalltalk.send(smalltalk.send(self,"_errors",[]),"_isEmpty",[]);
+if(smalltalk.assert($2)){
+$3=smalltalk.send(smalltalk.send(self,"_failures",[]),"_isEmpty",[]);
+if(smalltalk.assert($3)){
+$1="success";
+} else {
+$1="failure";
+};
+} else {
+$1="error";
+};
+return $1;
+}
 }),
 smalltalk.TestResult);
 
@@ -340,10 +396,10 @@ smalltalk.addMethod(
 "_timestamp",
 smalltalk.method({
 selector: "timestamp",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@timestamp'];
-return self;}
+return self["@timestamp"];
+}
 }),
 smalltalk.TestResult);
 
@@ -351,10 +407,10 @@ smalltalk.addMethod(
 "_total",
 smalltalk.method({
 selector: "total",
-fn: function () {
+fn: function (){
 var self=this;
-return self['@total'];
-return self;}
+return self["@total"];
+}
 }),
 smalltalk.TestResult);
 
@@ -362,10 +418,10 @@ smalltalk.addMethod(
 "_total_",
 smalltalk.method({
 selector: "total:",
-fn: function (aNumber) {
+fn: function (aNumber){
 var self=this;
-(self['@total']=aNumber);
-return self;}
+self["@total"]=aNumber;
+return self}
 }),
 smalltalk.TestResult);
 

+ 178 - 122
js/SUnit.js

@@ -5,10 +5,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "assert:",
 category: 'testing',
-fn: function (aBoolean) {
+fn: function (aBoolean){
 var self=this;
-smalltalk.send(self, "_assert_description_", [aBoolean, "Assertion failed"]);
-return self;},
+smalltalk.send(self,"_assert_description_",[aBoolean,"Assertion failed"]);
+return self},
 args: ["aBoolean"],
 source: "assert: aBoolean\x0a\x09self assert: aBoolean description: 'Assertion failed'",
 messageSends: ["assert:description:"],
@@ -21,10 +21,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "assert:description:",
 category: 'testing',
-fn: function (aBoolean, aString) {
+fn: function (aBoolean,aString){
 var self=this;
-((($receiver = aBoolean).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(self, "_signalFailure_", [aString]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(self, "_signalFailure_", [aString]);})]));
-return self;},
+if(! smalltalk.assert(aBoolean)){
+smalltalk.send(self,"_signalFailure_",[aString]);
+};
+return self},
 args: ["aBoolean", "aString"],
 source: "assert: aBoolean description: aString\x0a\x09aBoolean ifFalse: [self signalFailure: aString]",
 messageSends: ["ifFalse:", "signalFailure:"],
@@ -37,10 +39,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "assert:equals:",
 category: 'testing',
-fn: function (expected, actual) {
+fn: function (expected,actual){
 var self=this;
-return smalltalk.send(self, "_assert_description_", [smalltalk.send(expected, "__eq", [actual]), smalltalk.send(smalltalk.send(smalltalk.send("Expected: ", "__comma", [smalltalk.send(expected, "_asString", [])]), "__comma", [" but was: "]), "__comma", [smalltalk.send(actual, "_asString", [])])]);
-return self;},
+var $1;
+$1=smalltalk.send(self,"_assert_description_",[smalltalk.send(expected,"__eq",[actual]),smalltalk.send(smalltalk.send(smalltalk.send("Expected: ","__comma",[smalltalk.send(expected,"_asString",[])]),"__comma",[" but was: "]),"__comma",[smalltalk.send(actual,"_asString",[])])]);
+return $1;
+},
 args: ["expected", "actual"],
 source: "assert: expected equals: actual\x0a\x09^ self assert: (expected = actual) description: 'Expected: ', expected asString, ' but was: ', actual asString",
 messageSends: ["assert:description:", "=", ",", "asString"],
@@ -53,10 +57,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "deny:",
 category: 'testing',
-fn: function (aBoolean) {
+fn: function (aBoolean){
 var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
-return self;},
+smalltalk.send(self,"_assert_",[smalltalk.send(aBoolean,"_not",[])]);
+return self},
 args: ["aBoolean"],
 source: "deny: aBoolean\x0a\x09self assert: aBoolean not",
 messageSends: ["assert:", "not"],
@@ -69,14 +73,22 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "performTestFor:",
 category: 'running',
-fn: function (aResult) {
-var self=this;
-smalltalk.send((function(){return smalltalk.send((function(){return smalltalk.send(self, "_perform_", [smalltalk.send(self, "_selector", [])]);}), "_on_do_", [(smalltalk.TestFailure || TestFailure), (function(ex){return smalltalk.send(aResult, "_addFailure_", [self]);})]);}), "_on_do_", [(smalltalk.Error || Error), (function(ex){return smalltalk.send(aResult, "_addError_", [self]);})]);
-return self;},
+fn: function (aResult){
+var self=this;
+smalltalk.send((function(){
+return smalltalk.send((function(){
+return smalltalk.send(self,"_perform_",[smalltalk.send(self,"_selector",[])]);
+}),"_on_do_",[(smalltalk.TestFailure || TestFailure),(function(ex){
+return smalltalk.send(aResult,"_addFailure_",[self]);
+})]);
+}),"_on_do_",[(smalltalk.Error || Error),(function(ex){
+return smalltalk.send(aResult,"_addError_",[self]);
+})]);
+return self},
 args: ["aResult"],
 source: "performTestFor: aResult\x0a\x09[[self perform: self selector]\x0a\x09\x09on: TestFailure do: [:ex | aResult addFailure: self]]\x0a\x09\x09on: Error do: [:ex | aResult addError: self]",
-messageSends: ["on:do:", "perform:", "selector", "addFailure:", "addError:"],
-referencedClasses: ["TestFailure", "Error"]
+messageSends: ["on:do:", "addError:", "addFailure:", "perform:", "selector"],
+referencedClasses: ["Error", "TestFailure"]
 }),
 smalltalk.TestCase);
 
@@ -85,13 +97,13 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "runCaseFor:",
 category: 'running',
-fn: function (aTestResult) {
+fn: function (aTestResult){
 var self=this;
-smalltalk.send(self, "_setUp", []);
-smalltalk.send(aTestResult, "_increaseRuns", []);
-smalltalk.send(self, "_performTestFor_", [aTestResult]);
-smalltalk.send(self, "_tearDown", []);
-return self;},
+smalltalk.send(self,"_setUp",[]);
+smalltalk.send(aTestResult,"_increaseRuns",[]);
+smalltalk.send(self,"_performTestFor_",[aTestResult]);
+smalltalk.send(self,"_tearDown",[]);
+return self},
 args: ["aTestResult"],
 source: "runCaseFor: aTestResult\x0a\x09self setUp.\x0a\x09aTestResult increaseRuns.\x0a\x09self performTestFor: aTestResult.\x0a\x09self tearDown",
 messageSends: ["setUp", "increaseRuns", "performTestFor:", "tearDown"],
@@ -104,10 +116,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selector",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@testSelector'];
-return self;},
+return self["@testSelector"];
+},
 args: [],
 source: "selector\x0a\x09^testSelector",
 messageSends: [],
@@ -120,10 +132,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "setTestSelector:",
 category: 'accessing',
-fn: function (aSelector) {
+fn: function (aSelector){
 var self=this;
-(self['@testSelector']=aSelector);
-return self;},
+self["@testSelector"]=aSelector;
+return self},
 args: ["aSelector"],
 source: "setTestSelector: aSelector\x0a\x09testSelector := aSelector",
 messageSends: [],
@@ -136,10 +148,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "setUp",
 category: 'running',
-fn: function () {
+fn: function (){
 var self=this;
-
-return self;},
+return self},
 args: [],
 source: "setUp",
 messageSends: [],
@@ -152,10 +163,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "should:",
 category: 'testing',
-fn: function (aBlock) {
+fn: function (aBlock){
 var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send(aBlock, "_value", [])]);
-return self;},
+smalltalk.send(self,"_assert_",[smalltalk.send(aBlock,"_value",[])]);
+return self},
 args: ["aBlock"],
 source: "should: aBlock\x0a\x09self assert: aBlock value",
 messageSends: ["assert:", "value"],
@@ -168,10 +179,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "should:raise:",
 category: 'testing',
-fn: function (aBlock, anExceptionClass) {
-var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send((function(){smalltalk.send(aBlock, "_value", []);return false;}), "_on_do_", [anExceptionClass, (function(ex){return true;})])]);
-return self;},
+fn: function (aBlock,anExceptionClass){
+var self=this;
+smalltalk.send(self,"_assert_",[smalltalk.send((function(){
+smalltalk.send(aBlock,"_value",[]);
+return false;
+}),"_on_do_",[anExceptionClass,(function(ex){
+return true;
+})])]);
+return self},
 args: ["aBlock", "anExceptionClass"],
 source: "should: aBlock raise: anExceptionClass\x0a\x09self assert: ([aBlock value. false] \x0a\x09\x09on: anExceptionClass \x0a\x09\x09do: [:ex | true])",
 messageSends: ["assert:", "on:do:", "value"],
@@ -184,10 +200,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "shouldnt:raise:",
 category: 'testing',
-fn: function (aBlock, anExceptionClass) {
-var self=this;
-smalltalk.send(self, "_assert_", [smalltalk.send((function(){smalltalk.send(aBlock, "_value", []);return true;}), "_on_do_", [anExceptionClass, (function(ex){return false;})])]);
-return self;},
+fn: function (aBlock,anExceptionClass){
+var self=this;
+smalltalk.send(self,"_assert_",[smalltalk.send((function(){
+smalltalk.send(aBlock,"_value",[]);
+return true;
+}),"_on_do_",[anExceptionClass,(function(ex){
+return false;
+})])]);
+return self},
 args: ["aBlock", "anExceptionClass"],
 source: "shouldnt: aBlock raise: anExceptionClass\x0a\x09self assert: ([aBlock value. true] \x0a\x09\x09on: anExceptionClass \x0a\x09\x09do: [:ex | false])",
 messageSends: ["assert:", "on:do:", "value"],
@@ -200,13 +221,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "signalFailure:",
 category: 'private',
-fn: function (aString) {
+fn: function (aString){
 var self=this;
-(function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send((smalltalk.TestFailure || TestFailure), "_new", []));
-return self;},
+var $1,$2;
+$1=smalltalk.send((smalltalk.TestFailure || TestFailure),"_new",[]);
+smalltalk.send($1,"_messageText_",[aString]);
+$2=smalltalk.send($1,"_signal",[]);
+return self},
 args: ["aString"],
 source: "signalFailure: aString\x0a\x09TestFailure new\x0a\x09\x09messageText: aString;\x0a\x09\x09signal",
-messageSends: ["messageText:", "signal", "new"],
+messageSends: ["messageText:", "new", "signal"],
 referencedClasses: ["TestFailure"]
 }),
 smalltalk.TestCase);
@@ -216,10 +240,9 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "tearDown",
 category: 'running',
-fn: function () {
+fn: function (){
 var self=this;
-
-return self;},
+return self},
 args: [],
 source: "tearDown",
 messageSends: [],
@@ -233,16 +256,20 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "allTestSelectors",
 category: 'accessing',
-fn: function () {
-var self=this;
-var selectors=nil;
-(selectors=smalltalk.send(self, "_testSelectors", []));
-((($receiver = smalltalk.send(self, "_shouldInheritSelectors", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})() : nil) : smalltalk.send($receiver, "_ifTrue_", [(function(){return smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);})]));
+fn: function (){
+var self=this;
+var $1;
+var selectors;
+selectors=smalltalk.send(self,"_testSelectors",[]);
+$1=smalltalk.send(self,"_shouldInheritSelectors",[]);
+if(smalltalk.assert($1)){
+smalltalk.send(selectors,"_addAll_",[smalltalk.send(smalltalk.send(self,"_superclass",[]),"_allTestSelectors",[])]);
+};
 return selectors;
-return self;},
+},
 args: [],
 source: "allTestSelectors\x0a\x09| selectors |\x0a\x09selectors := self testSelectors.\x0a\x09self shouldInheritSelectors ifTrue: [\x0a\x09\x09selectors addAll: self superclass allTestSelectors].\x0a\x09^selectors",
-messageSends: ["testSelectors", "ifTrue:", "shouldInheritSelectors", "addAll:", "allTestSelectors", "superclass"],
+messageSends: ["testSelectors", "ifTrue:", "addAll:", "allTestSelectors", "superclass", "shouldInheritSelectors"],
 referencedClasses: []
 }),
 smalltalk.TestCase.klass);
@@ -252,13 +279,17 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "buildSuite",
 category: 'accessing',
-fn: function () {
-var self=this;
-return smalltalk.send(smalltalk.send(self, "_allTestSelectors", []), "_collect_", [(function(each){return smalltalk.send(self, "_selector_", [each]);})]);
-return self;},
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_allTestSelectors",[]),"_collect_",[(function(each){
+return smalltalk.send(self,"_selector_",[each]);
+})]);
+return $1;
+},
 args: [],
 source: "buildSuite\x0a\x09^self allTestSelectors collect: [:each | self selector: each]",
-messageSends: ["collect:", "allTestSelectors", "selector:"],
+messageSends: ["collect:", "selector:", "allTestSelectors"],
 referencedClasses: []
 }),
 smalltalk.TestCase.klass);
@@ -268,10 +299,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "isAbstract",
 category: 'testing',
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_name", []), "__eq", ["TestCase"]);
-return self;},
+var $1;
+$1=smalltalk.send(smalltalk.send(self,"_name",[]),"__eq",["TestCase"]);
+return $1;
+},
 args: [],
 source: "isAbstract\x0a\x09^ self name = 'TestCase'",
 messageSends: ["=", "name"],
@@ -284,10 +317,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "lookupHierarchyRoot",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
 return (smalltalk.TestCase || TestCase);
-return self;},
+},
 args: [],
 source: "lookupHierarchyRoot\x0a\x09^TestCase",
 messageSends: [],
@@ -300,13 +333,18 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "selector:",
 category: 'accessing',
-fn: function (aSelector) {
-var self=this;
-return (function($rec){smalltalk.send($rec, "_setTestSelector_", [aSelector]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(self, "_new", []));
-return self;},
+fn: function (aSelector){
+var self=this;
+var $2,$3,$1;
+$2=smalltalk.send(self,"_new",[]);
+smalltalk.send($2,"_setTestSelector_",[aSelector]);
+$3=smalltalk.send($2,"_yourself",[]);
+$1=$3;
+return $1;
+},
 args: ["aSelector"],
 source: "selector: aSelector\x0a\x09^self new\x0a\x09\x09setTestSelector: aSelector;\x0a\x09\x09yourself",
-messageSends: ["setTestSelector:", "yourself", "new"],
+messageSends: ["setTestSelector:", "new", "yourself"],
 referencedClasses: []
 }),
 smalltalk.TestCase.klass);
@@ -316,10 +354,12 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "shouldInheritSelectors",
 category: 'testing',
-fn: function () {
+fn: function (){
 var self=this;
-return smalltalk.send(self, "_~_eq", [smalltalk.send(self, "_lookupHierarchyRoot", [])]);
-return self;},
+var $1;
+$1=smalltalk.send(self,"_~_eq",[smalltalk.send(self,"_lookupHierarchyRoot",[])]);
+return $1;
+},
 args: [],
 source: "shouldInheritSelectors\x0a\x09^self ~= self lookupHierarchyRoot",
 messageSends: ["~=", "lookupHierarchyRoot"],
@@ -332,13 +372,17 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testSelectors",
 category: 'accessing',
-fn: function () {
-var self=this;
-return smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_select_", [(function(each){return smalltalk.send(each, "_match_", ["^test"]);})]);
-return self;},
+fn: function (){
+var self=this;
+var $1;
+$1=smalltalk.send(smalltalk.send(smalltalk.send(self,"_methodDictionary",[]),"_keys",[]),"_select_",[(function(each){
+return smalltalk.send(each,"_match_",["^test"]);
+})]);
+return $1;
+},
 args: [],
 source: "testSelectors\x0a\x09^self methodDictionary keys select: [:each | each match: '^test']",
-messageSends: ["select:", "keys", "methodDictionary", "match:"],
+messageSends: ["select:", "match:", "keys", "methodDictionary"],
 referencedClasses: []
 }),
 smalltalk.TestCase.klass);
@@ -353,10 +397,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "addError:",
 category: 'accessing',
-fn: function (anError) {
+fn: function (anError){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
-return self;},
+smalltalk.send(smalltalk.send(self,"_errors",[]),"_add_",[anError]);
+return self},
 args: ["anError"],
 source: "addError: anError\x0a\x09self errors add: anError",
 messageSends: ["add:", "errors"],
@@ -369,10 +413,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "addFailure:",
 category: 'accessing',
-fn: function (aFailure) {
+fn: function (aFailure){
 var self=this;
-smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
-return self;},
+smalltalk.send(smalltalk.send(self,"_failures",[]),"_add_",[aFailure]);
+return self},
 args: ["aFailure"],
 source: "addFailure: aFailure\x0a\x09self failures add: aFailure",
 messageSends: ["add:", "failures"],
@@ -385,10 +429,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "errors",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@errors'];
-return self;},
+return self["@errors"];
+},
 args: [],
 source: "errors\x0a\x09^errors",
 messageSends: [],
@@ -401,10 +445,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "failures",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@failures'];
-return self;},
+return self["@failures"];
+},
 args: [],
 source: "failures\x0a\x09^failures",
 messageSends: [],
@@ -417,10 +461,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "increaseRuns",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-(self['@runs']=((($receiver = self['@runs']).klass === smalltalk.Number) ? $receiver +(1) : smalltalk.send($receiver, "__plus", [(1)])));
-return self;},
+self["@runs"]=smalltalk.send(self["@runs"],"__plus",[(1)]);
+return self},
 args: [],
 source: "increaseRuns\x0a\x09runs := runs + 1",
 messageSends: ["+"],
@@ -433,15 +477,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "initialize",
 category: 'initialization',
-fn: function () {
-var self=this;
-smalltalk.send(self, "_initialize", [], smalltalk.TestResult.superclass || nil);
-(self['@timestamp']=smalltalk.send((smalltalk.Date || Date), "_now", []));
-(self['@runs']=(0));
-(self['@errors']=smalltalk.send((smalltalk.Array || Array), "_new", []));
-(self['@failures']=smalltalk.send((smalltalk.Array || Array), "_new", []));
-(self['@total']=(0));
-return self;},
+fn: function (){
+var self=this;
+smalltalk.send(self,"_initialize",[],smalltalk.Object);
+self["@timestamp"]=smalltalk.send((smalltalk.Date || Date),"_now",[]);
+self["@runs"]=(0);
+self["@errors"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
+self["@failures"]=smalltalk.send((smalltalk.Array || Array),"_new",[]);
+self["@total"]=(0);
+return self},
 args: [],
 source: "initialize\x0a\x09super initialize.\x0a\x09timestamp := Date now.\x0a\x09runs := 0.\x0a\x09errors := Array new.\x0a\x09failures := Array new.\x0a\x09total := 0",
 messageSends: ["initialize", "now", "new"],
@@ -454,10 +498,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "runs",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@runs'];
-return self;},
+return self["@runs"];
+},
 args: [],
 source: "runs\x0a\x09^runs",
 messageSends: [],
@@ -470,13 +514,25 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "status",
 category: 'accessing',
-fn: function () {
-var self=this;
-return ((($receiver = smalltalk.send(smalltalk.send(self, "_errors", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));})() : (function(){return "error";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return ((($receiver = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", [])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return "success";})() : (function(){return "failure";})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]));}), (function(){return "error";})]));
-return self;},
+fn: function (){
+var self=this;
+var $2,$3,$1;
+$2=smalltalk.send(smalltalk.send(self,"_errors",[]),"_isEmpty",[]);
+if(smalltalk.assert($2)){
+$3=smalltalk.send(smalltalk.send(self,"_failures",[]),"_isEmpty",[]);
+if(smalltalk.assert($3)){
+$1="success";
+} else {
+$1="failure";
+};
+} else {
+$1="error";
+};
+return $1;
+},
 args: [],
 source: "status\x0a\x09^self errors isEmpty \x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self failures isEmpty \x0a\x09\x09\x09\x09ifTrue: ['success']\x0a\x09\x09\x09\x09ifFalse: ['failure']]\x0a\x09\x09ifFalse: ['error']",
-messageSends: ["ifTrue:ifFalse:", "isEmpty", "errors", "failures"],
+messageSends: ["ifTrue:ifFalse:", "isEmpty", "failures", "errors"],
 referencedClasses: []
 }),
 smalltalk.TestResult);
@@ -486,10 +542,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "timestamp",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@timestamp'];
-return self;},
+return self["@timestamp"];
+},
 args: [],
 source: "timestamp\x0a\x09^timestamp",
 messageSends: [],
@@ -502,10 +558,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "total",
 category: 'accessing',
-fn: function () {
+fn: function (){
 var self=this;
-return self['@total'];
-return self;},
+return self["@total"];
+},
 args: [],
 source: "total\x0a\x09^total",
 messageSends: [],
@@ -518,10 +574,10 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "total:",
 category: 'accessing',
-fn: function (aNumber) {
+fn: function (aNumber){
 var self=this;
-(self['@total']=aNumber);
-return self;},
+self["@total"]=aNumber;
+return self},
 args: ["aNumber"],
 source: "total: aNumber\x0a\x09total := aNumber",
 messageSends: [],

+ 1 - 1
st/Compiler-Core.st

@@ -11,7 +11,7 @@ The default code generator is an instance of `InlinedCodeGenerator`!
 !Compiler methodsFor: 'accessing'!
 
 codeGeneratorClass
-	^codeGeneratorClass ifNil: [FunCodeGenerator]
+	^codeGeneratorClass ifNil: [InliningCodeGenerator]
 !
 
 codeGeneratorClass: aClass

+ 1 - 1
st/Compiler-Semantic.st

@@ -110,7 +110,7 @@ isMethodScope
 ! !
 
 LexicalScope subclass: #MethodLexicalScope
-	instanceVariableNames: 'iVars unknownVariables localReturn nonLocalReturns'
+	instanceVariableNames: 'iVars pseudoVars unknownVariables localReturn nonLocalReturns'
 	package: 'Compiler-Semantic'!
 !MethodLexicalScope commentStamp!
 I represent a method scope.!

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels