Kaynağa Gözat

- Fix the last bits of the inlining compiler
- Some more tests

Nicolas Petton 11 yıl önce
ebeveyn
işleme
3cbd9ed34b

Dosya farkı çok büyük olduğundan ihmal edildi
+ 335 - 208
js/Compiler-AST.deploy.js


Dosya farkı çok büyük olduğundan ihmal edildi
+ 322 - 208
js/Compiler-AST.js


+ 321 - 106
js/Compiler-IR.deploy.js

@@ -6,21 +6,24 @@ smalltalk.method({
 selector: "alias:",
 fn: function (aNode) {
     var self = this;
-    var $early = {};
-    try {
-        var variable = nil;
-        ($receiver = smalltalk.send(aNode, "_isValueNode", [])).klass === smalltalk.Boolean ? $receiver ? function () {return function () {throw $early = [smalltalk.send(self, "_visit_", [aNode])];}();}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return function () {throw $early = [smalltalk.send(self, "_visit_", [aNode])];}();}]);
-        variable = function ($rec) {smalltalk.send($rec, "_variable_", [smalltalk.send(smalltalk.send(smalltalk.AliasVar || AliasVar, "_new", []), "_name_", [smalltalk.send("$", "__comma", [smalltalk.send(self, "_nextAlias", [])])])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []));
-        smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [variable]);smalltalk.send($rec, "_add_", [smalltalk.send(self, "_visit_", [aNode])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []))]);
-        smalltalk.send(smalltalk.send(smalltalk.send(self, "_method", []), "_internalVariables", []), "_add_", [variable]);
-        return variable;
-        return self;
-    } catch (e) {
-        if (e === $early) {
-            return e[0];
-        }
-        throw e;
+    var $1, $2, $3, $4, $5, $6;
+    var variable;
+    $1 = smalltalk.send(aNode, "_isValueNode", []);
+    if (smalltalk.assert($1)) {
+        $2 = smalltalk.send(self, "_visit_", [aNode]);
+        return $2;
     }
+    $3 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
+    smalltalk.send($3, "_variable_", [smalltalk.send(smalltalk.send(smalltalk.AliasVar || AliasVar, "_new", []), "_name_", [smalltalk.send("$", "__comma", [smalltalk.send(self, "_nextAlias", [])])])]);
+    $4 = smalltalk.send($3, "_yourself", []);
+    variable = $4;
+    $5 = smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []);
+    smalltalk.send($5, "_add_", [variable]);
+    smalltalk.send($5, "_add_", [smalltalk.send(self, "_visit_", [aNode])]);
+    $6 = smalltalk.send($5, "_yourself", []);
+    smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [$6]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_method", []), "_internalVariables", []), "_add_", [variable]);
+    return variable;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -54,9 +57,16 @@ smalltalk.method({
 selector: "nextAlias",
 fn: function () {
     var self = this;
-    smalltalk.send(self['@nextAlias'], "_ifNil_", [function () {self['@nextAlias'] = 0;return self['@nextAlias'];}]);
+    var $1;
+    if (($receiver = self['@nextAlias']) == nil || $receiver == undefined) {
+        self['@nextAlias'] = 0;
+        self['@nextAlias'];
+    } else {
+        self['@nextAlias'];
+    }
     self['@nextAlias'] = smalltalk.send(self['@nextAlias'], "__plus", [1]);
-    return smalltalk.send(self['@nextAlias'], "_asString", []);
+    $1 = smalltalk.send(self['@nextAlias'], "_asString", []);
+    return $1;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -136,14 +146,18 @@ smalltalk.method({
 selector: "visitAssignmentNode:",
 fn: function (aNode) {
     var self = this;
-    var left = nil;
-    var right = nil;
-    var assignment = nil;
+    var $1, $2;
+    var left;
+    var right;
+    var assignment;
     right = smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_right", [])]);
     left = smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_left", [])]);
-    smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [left]);smalltalk.send($rec, "_add_", [right]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []))]);
+    $1 = smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []);
+    smalltalk.send($1, "_add_", [left]);
+    smalltalk.send($1, "_add_", [right]);
+    $2 = smalltalk.send($1, "_yourself", []);
+    smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [$2]);
     return left;
-    return self;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -174,8 +188,8 @@ smalltalk.method({
 selector: "visitBlockSequenceNode:",
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    return smalltalk.send(self, "_withSequence_do_", [smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []), function () {return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_ifNotEmpty_", [function () {smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [each])]);}]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", []), "_isReturnNode", []), "_ifFalse_ifTrue_", [function () {$1 = smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);smalltalk.send($1, "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);$2 = smalltalk.send($1, "_yourself", []);return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [$2]);}, function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);}]);}]);}]);
+    return smalltalk.send(self, "_withSequence_do_", [smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []), function () {return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_ifNotEmpty_", [function () {smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [each])]);}]);return ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", []), "_isReturnNode", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRBlockReturn || IRBlockReturn, "_new", []))]);}() : function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);}() : smalltalk.send($receiver, "_ifFalse_ifTrue_", [function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRBlockReturn || IRBlockReturn, "_new", []))]);}, function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);}]);}]);}]);
+    return self;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -186,13 +200,16 @@ smalltalk.method({
 selector: "visitCascadeNode:",
 fn: function (aNode) {
     var self = this;
+    var $1, $2;
     var alias;
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_isValueNode", []))) {
+    $1 = smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_isValueNode", []);
+    if (!smalltalk.assert($1)) {
         alias = smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_receiver", [])]);
         smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_receiver_", [smalltalk.send(smalltalk.send(smalltalk.VariableNode || VariableNode, "_new", []), "_binding_", [smalltalk.send(alias, "_variable", [])])]);}]);
     }
     smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [each])]);}]);
-    return smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])]);
+    $2 = smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])]);
+    return $2;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -231,11 +248,12 @@ smalltalk.method({
 selector: "visitJSStatementNode:",
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRVerbatim || IRVerbatim, "_new", []);
-    smalltalk.send($1, "_source_", [smalltalk.send(aNode, "_source", [])]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRVerbatim || IRVerbatim, "_new", []);
+    smalltalk.send($2, "_source_", [smalltalk.send(aNode, "_source", [])]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -246,7 +264,7 @@ smalltalk.method({
 selector: "visitMethodNode:",
 fn: function (aNode) {
     var self = this;
-    var $1, $2, $3, $4, $5, $6;
+    var $1, $2, $3, $4, $5, $6, $7, $8;
     $1 = smalltalk.send(smalltalk.IRMethod || IRMethod, "_new", []);
     smalltalk.send($1, "_source_", [smalltalk.send(self, "_source", [])]);
     smalltalk.send($1, "_arguments_", [smalltalk.send(aNode, "_arguments", [])]);
@@ -258,13 +276,15 @@ fn: function (aNode) {
     smalltalk.send(self, "_method_", [$2]);
     smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_scope", []), "_temps", []), "_do_", [function (each) {$3 = smalltalk.send(smalltalk.IRTempDeclaration || IRTempDeclaration, "_new", []);smalltalk.send($3, "_name_", [smalltalk.send(each, "_name", [])]);$4 = smalltalk.send($3, "_yourself", []);return smalltalk.send(smalltalk.send(self, "_method", []), "_add_", [$4]);}]);
     smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_method", []), "_add_", [smalltalk.send(self, "_visit_", [each])]);}]);
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(aNode, "_scope", []), "_hasLocalReturn", []))) {
-        $5 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
-        smalltalk.send($5, "_variable_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_scope", []), "_pseudoVars", []), "_at_", ["self"])]);
-        $6 = smalltalk.send($5, "_yourself", []);
-        smalltalk.send(smalltalk.send(smalltalk.send(self, "_method", []), "_add_", [smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", [])]), "_add_", [$6]);
+    $5 = smalltalk.send(smalltalk.send(aNode, "_scope", []), "_hasLocalReturn", []);
+    if (!smalltalk.assert($5)) {
+        $6 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
+        smalltalk.send($6, "_variable_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_scope", []), "_pseudoVars", []), "_at_", ["self"])]);
+        $7 = smalltalk.send($6, "_yourself", []);
+        smalltalk.send(smalltalk.send(smalltalk.send(self, "_method", []), "_add_", [smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", [])]), "_add_", [$7]);
     }
-    return smalltalk.send(self, "_method", []);
+    $8 = smalltalk.send(self, "_method", []);
+    return $8;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -275,12 +295,17 @@ smalltalk.method({
 selector: "visitReturnNode:",
 fn: function (aNode) {
     var self = this;
-    var return_ = nil;
-    return_ = ($receiver = smalltalk.send(aNode, "_nonLocalReturn", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(smalltalk.IRNonLocalReturn || IRNonLocalReturn, "_new", []);}() : function () {return smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.IRNonLocalReturn || IRNonLocalReturn, "_new", []);}, function () {return smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);}]);
+    var $1;
+    var return_;
+    $1 = smalltalk.send(aNode, "_nonLocalReturn", []);
+    if (smalltalk.assert($1)) {
+        return_ = smalltalk.send(smalltalk.IRNonLocalReturn || IRNonLocalReturn, "_new", []);
+    } else {
+        return_ = smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);
+    }
     smalltalk.send(return_, "_scope_", [smalltalk.send(aNode, "_scope", [])]);
     smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {return smalltalk.send(return_, "_add_", [smalltalk.send(self, "_alias_", [each])]);}]);
     return return_;
-    return self;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -291,18 +316,27 @@ smalltalk.method({
 selector: "visitSendNode:",
 fn: function (aNode) {
     var self = this;
-    var send = nil;
-    var receiver = nil;
-    var arguments = nil;
+    var $1, $2, $3, $4;
+    var send;
+    var receiver;
+    var arguments;
     send = smalltalk.send(smalltalk.IRSend || IRSend, "_new", []);
-    (function ($rec) {smalltalk.send($rec, "_selector_", [smalltalk.send(aNode, "_selector", [])]);return smalltalk.send($rec, "_index_", [smalltalk.send(aNode, "_index", [])]);}(send));
-    ($receiver = smalltalk.send(aNode, "_superSend", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(send, "_classSend_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_superclass", [])]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(send, "_classSend_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_superclass", [])]);}]);
-    receiver = ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeInlined", []), "_or_", [function () {return smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeAliased", []);}])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_receiver", [])]);}() : function () {return smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_receiver", [])]);}, function () {return smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);}]);
-    arguments = smalltalk.send(smalltalk.send(aNode, "_arguments", []), "_collect_", [function (each) {return ($receiver = smalltalk.send(each, "_shouldBeInlined", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_alias_", [each]);}() : function () {return smalltalk.send(self, "_visit_", [each]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(self, "_alias_", [each]);}, function () {return smalltalk.send(self, "_visit_", [each]);}]);}]);
+    smalltalk.send(send, "_selector_", [smalltalk.send(aNode, "_selector", [])]);
+    $1 = smalltalk.send(send, "_index_", [smalltalk.send(aNode, "_index", [])]);
+    $2 = smalltalk.send(aNode, "_superSend", []);
+    if (smalltalk.assert($2)) {
+        smalltalk.send(send, "_classSend_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_superclass", [])]);
+    }
+    $3 = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeInlined", []), "_or_", [function () {return smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeAliased", []);}]);
+    if (smalltalk.assert($3)) {
+        receiver = smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_receiver", [])]);
+    } else {
+        receiver = smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);
+    }
+    arguments = smalltalk.send(smalltalk.send(aNode, "_arguments", []), "_collect_", [function (each) {$4 = smalltalk.send(each, "_shouldBeInlined", []);if (smalltalk.assert($4)) {return smalltalk.send(self, "_alias_", [each]);} else {return smalltalk.send(self, "_visit_", [each]);}}]);
     smalltalk.send(send, "_add_", [receiver]);
     smalltalk.send(arguments, "_do_", [function (each) {return smalltalk.send(send, "_add_", [each]);}]);
     return send;
-    return self;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -313,7 +347,9 @@ smalltalk.method({
 selector: "visitSequenceNode:",
 fn: function (aNode) {
     var self = this;
-    return smalltalk.send(self, "_withSequence_do_", [smalltalk.send(smalltalk.IRSequence || IRSequence, "_new", []), function () {return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {var instruction;instruction = smalltalk.send(self, "_visit_", [each]);if (!smalltalk.assert(smalltalk.send(instruction, "_isVariable", []))) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [instruction]);}}]);}]);
+    var $2, $1;
+    $1 = smalltalk.send(self, "_withSequence_do_", [smalltalk.send(smalltalk.IRSequence || IRSequence, "_new", []), function () {return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {var instruction;instruction = smalltalk.send(self, "_visit_", [each]);$2 = smalltalk.send(instruction, "_isVariable", []);if (!smalltalk.assert($2)) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [instruction]);}}]);}]);
+    return $1;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -324,11 +360,12 @@ smalltalk.method({
 selector: "visitValueNode:",
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRValue || IRValue, "_new", []);
-    smalltalk.send($1, "_value_", [smalltalk.send(aNode, "_value", [])]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRValue || IRValue, "_new", []);
+    smalltalk.send($2, "_value_", [smalltalk.send(aNode, "_value", [])]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -339,11 +376,12 @@ smalltalk.method({
 selector: "visitVariableNode:",
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
-    smalltalk.send($1, "_variable_", [smalltalk.send(aNode, "_binding", [])]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
+    smalltalk.send($2, "_variable_", [smalltalk.send(aNode, "_binding", [])]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.IRASTTranslator);
@@ -373,7 +411,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRInstruction_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRInstruction_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRInstruction);
@@ -384,8 +424,10 @@ smalltalk.method({
 selector: "add:",
 fn: function (anObject) {
     var self = this;
+    var $1;
     smalltalk.send(anObject, "_parent_", [self]);
-    return smalltalk.send(smalltalk.send(self, "_instructions", []), "_add_", [anObject]);
+    $1 = smalltalk.send(smalltalk.send(self, "_instructions", []), "_add_", [anObject]);
+    return $1;
 }
 }),
 smalltalk.IRInstruction);
@@ -407,7 +449,15 @@ smalltalk.method({
 selector: "instructions",
 fn: function () {
     var self = this;
-    return smalltalk.send(self['@instructions'], "_ifNil_", [function () {self['@instructions'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);return self['@instructions'];}]);
+    var $1;
+    if (($receiver = self['@instructions']) == nil ||
+        $receiver == undefined) {
+        self['@instructions'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);
+        $1 = self['@instructions'];
+    } else {
+        $1 = self['@instructions'];
+    }
+    return $1;
 }
 }),
 smalltalk.IRInstruction);
@@ -579,11 +629,12 @@ smalltalk.method({
 selector: "on:",
 fn: function (aBuilder) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(self, "_new", []);
-    smalltalk.send($1, "_builder_", [aBuilder]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_builder_", [aBuilder]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.IRInstruction.klass);
@@ -596,7 +647,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRAssignment_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRAssignment_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRAssignment);
@@ -610,7 +663,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRDynamicArray_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRDynamicArray_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRDynamicArray);
@@ -624,7 +679,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRDynamicDictionary_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRDynamicDictionary_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRDynamicDictionary);
@@ -664,7 +721,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRClosure_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRClosure_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRClosure);
@@ -675,7 +734,13 @@ smalltalk.method({
 selector: "arguments",
 fn: function () {
     var self = this;
-    return smalltalk.send(self['@arguments'], "_ifNil_", [function () {return [];}]);
+    var $1;
+    if (($receiver = self['@arguments']) == nil || $receiver == undefined) {
+        $1 = [];
+    } else {
+        $1 = self['@arguments'];
+    }
+    return $1;
 }
 }),
 smalltalk.IRClosure);
@@ -722,7 +787,9 @@ smalltalk.method({
 selector: "sequence",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_instructions", []), "_last", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_instructions", []), "_last", []);
+    return $1;
 }
 }),
 smalltalk.IRClosure);
@@ -736,7 +803,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRMethod_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRMethod_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRMethod);
@@ -793,7 +862,15 @@ smalltalk.method({
 selector: "internalVariables",
 fn: function () {
     var self = this;
-    return smalltalk.send(self['@internalVariables'], "_ifNil_", [function () {self['@internalVariables'] = smalltalk.send(smalltalk.Set || Set, "_new", []);return self['@internalVariables'];}]);
+    var $1;
+    if (($receiver = self['@internalVariables']) == nil ||
+        $receiver == undefined) {
+        self['@internalVariables'] = smalltalk.send(smalltalk.Set || Set, "_new", []);
+        $1 = self['@internalVariables'];
+    } else {
+        $1 = self['@internalVariables'];
+    }
+    return $1;
 }
 }),
 smalltalk.IRMethod);
@@ -889,7 +966,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRReturn_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRReturn_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRReturn);
@@ -905,13 +984,26 @@ fn: function () {
 }),
 smalltalk.IRReturn);
 
+smalltalk.addMethod(
+"_isBlockReturn",
+smalltalk.method({
+selector: "isBlockReturn",
+fn: function () {
+    var self = this;
+    return false;
+    return self;
+}
+}),
+smalltalk.IRReturn);
+
 smalltalk.addMethod(
 "_isLocalReturn",
 smalltalk.method({
 selector: "isLocalReturn",
 fn: function () {
     var self = this;
-    return smalltalk.send(self, "_isReturn", []);
+    return true;
+    return self;
 }
 }),
 smalltalk.IRReturn);
@@ -922,7 +1014,9 @@ smalltalk.method({
 selector: "isNonLocalReturn",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_isLocalReturn", []), "_not", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_isLocalReturn", []), "_not", []);
+    return $1;
 }
 }),
 smalltalk.IRReturn);
@@ -940,6 +1034,33 @@ smalltalk.IRReturn);
 
 
 
+smalltalk.addClass('IRBlockReturn', smalltalk.IRReturn, [], 'Compiler-IR');
+smalltalk.addMethod(
+"_accept_",
+smalltalk.method({
+selector: "accept:",
+fn: function (aVisitor) {
+    var self = this;
+    return smalltalk.send(aVisitor, "_visitIRBlockReturn_", [self]);
+    return self;
+}
+}),
+smalltalk.IRBlockReturn);
+
+smalltalk.addMethod(
+"_isBlockReturn",
+smalltalk.method({
+selector: "isBlockReturn",
+fn: function () {
+    var self = this;
+    return true;
+    return self;
+}
+}),
+smalltalk.IRBlockReturn);
+
+
+
 smalltalk.addClass('IRNonLocalReturn', smalltalk.IRReturn, [], 'Compiler-IR');
 smalltalk.addMethod(
 "_accept_",
@@ -947,7 +1068,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRNonLocalReturn_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRNonLocalReturn_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRNonLocalReturn);
@@ -972,7 +1095,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRSend_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRSend_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRSend);
@@ -1066,7 +1191,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRSequence_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRSequence_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRSequence);
@@ -1091,7 +1218,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRBlockSequence_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRBlockSequence_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRBlockSequence);
@@ -1105,7 +1234,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRTempDeclaration_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRTempDeclaration_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRTempDeclaration);
@@ -1153,7 +1284,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRValue_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRValue_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRValue);
@@ -1190,7 +1323,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRVariable_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRVariable_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRVariable);
@@ -1238,7 +1373,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRVerbatim_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRVerbatim_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRVerbatim);
@@ -1275,7 +1412,9 @@ smalltalk.method({
 selector: "visit:",
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(anIRInstruction, "_accept_", [self]);
+    var $1;
+    $1 = smalltalk.send(anIRInstruction, "_accept_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1286,7 +1425,21 @@ smalltalk.method({
 selector: "visitIRAssignment:",
 fn: function (anIRAssignment) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRAssignment]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRAssignment]);
+    return $1;
+}
+}),
+smalltalk.IRVisitor);
+
+smalltalk.addMethod(
+"_visitIRBlockReturn_",
+smalltalk.method({
+selector: "visitIRBlockReturn:",
+fn: function (anIRBlockReturn) {
+    var self = this;
+    return smalltalk.send(self, "_visitIRReturn_", [anIRBlockReturn]);
+    return self;
 }
 }),
 smalltalk.IRVisitor);
@@ -1297,7 +1450,9 @@ smalltalk.method({
 selector: "visitIRBlockSequence:",
 fn: function (anIRBlockSequence) {
     var self = this;
-    return smalltalk.send(self, "_visitIRSequence_", [anIRBlockSequence]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRSequence_", [anIRBlockSequence]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1308,7 +1463,9 @@ smalltalk.method({
 selector: "visitIRClosure:",
 fn: function (anIRClosure) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRClosure]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRClosure]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1319,7 +1476,9 @@ smalltalk.method({
 selector: "visitIRDynamicArray:",
 fn: function (anIRDynamicArray) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRDynamicArray]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRDynamicArray]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1330,7 +1489,33 @@ smalltalk.method({
 selector: "visitIRDynamicDictionary:",
 fn: function (anIRDynamicDictionary) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRDynamicDictionary]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRDynamicDictionary]);
+    return $1;
+}
+}),
+smalltalk.IRVisitor);
+
+smalltalk.addMethod(
+"_visitIRInlinedClosure_",
+smalltalk.method({
+selector: "visitIRInlinedClosure:",
+fn: function (anIRInlinedClosure) {
+    var self = this;
+    return smalltalk.send(self, "_visitIRClosure_", [anIRInlinedClosure]);
+    return self;
+}
+}),
+smalltalk.IRVisitor);
+
+smalltalk.addMethod(
+"_visitIRInlinedSequence_",
+smalltalk.method({
+selector: "visitIRInlinedSequence:",
+fn: function (anIRInlinedSequence) {
+    var self = this;
+    return smalltalk.send(self, "_visitIRSequence_", [anIRInlinedSequence]);
+    return self;
 }
 }),
 smalltalk.IRVisitor);
@@ -1353,7 +1538,9 @@ smalltalk.method({
 selector: "visitIRMethod:",
 fn: function (anIRMethod) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRMethod]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRMethod]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1364,7 +1551,9 @@ smalltalk.method({
 selector: "visitIRNonLocalReturn:",
 fn: function (anIRNonLocalReturn) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRNonLocalReturn]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRNonLocalReturn]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1375,7 +1564,9 @@ smalltalk.method({
 selector: "visitIRNonLocalReturnHandling:",
 fn: function (anIRNonLocalReturnHandling) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRNonLocalReturnHandling]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRNonLocalReturnHandling]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1386,7 +1577,9 @@ smalltalk.method({
 selector: "visitIRReturn:",
 fn: function (anIRReturn) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRReturn]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRReturn]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1397,7 +1590,9 @@ smalltalk.method({
 selector: "visitIRSend:",
 fn: function (anIRSend) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRSend]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRSend]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1408,7 +1603,9 @@ smalltalk.method({
 selector: "visitIRSequence:",
 fn: function (anIRSequence) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRSequence]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRSequence]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1419,7 +1616,9 @@ smalltalk.method({
 selector: "visitIRTempDeclaration:",
 fn: function (anIRTempDeclaration) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRTempDeclaration]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRTempDeclaration]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1430,7 +1629,9 @@ smalltalk.method({
 selector: "visitIRValue:",
 fn: function (anIRValue) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRValue]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRValue]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1441,7 +1642,9 @@ smalltalk.method({
 selector: "visitIRVariable:",
 fn: function (anIRVariable) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRVariable]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRVariable]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1452,7 +1655,9 @@ smalltalk.method({
 selector: "visitIRVerbatim:",
 fn: function (anIRVerbatim) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRVerbatim]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRVerbatim]);
+    return $1;
 }
 }),
 smalltalk.IRVisitor);
@@ -1466,7 +1671,9 @@ smalltalk.method({
 selector: "contents",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_stream", []), "_contents", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_stream", []), "_contents", []);
+    return $1;
 }
 }),
 smalltalk.IRJSTranslator);
@@ -1567,7 +1774,8 @@ smalltalk.method({
 selector: "visitIRMethod:",
 fn: function (anIRMethod) {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutMethodDeclaration_with_", [anIRMethod, function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutFunctionWith_arguments_", [function () {if (smalltalk.assert(smalltalk.send(smalltalk.send(anIRMethod, "_internalVariables", []), "_notEmpty", []))) {smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutVars_", [smalltalk.send(smalltalk.send(smalltalk.send(anIRMethod, "_internalVariables", []), "_asArray", []), "_collect_", [function (each) {return smalltalk.send(smalltalk.send(each, "_variable", []), "_alias", []);}])]);}return smalltalk.send(smalltalk.send(smalltalk.send(anIRMethod, "_scope", []), "_hasNonLocalReturn", []), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutNonLocalReturnHandlingWith_", [function () {return smalltalk.send(self, "_visitIRMethod_", [anIRMethod], smalltalk.IRVisitor);}]);}, function () {return smalltalk.send(self, "_visitIRMethod_", [anIRMethod], smalltalk.IRVisitor);}]);}, smalltalk.send(anIRMethod, "_arguments", [])]);}]);
+    var $1, $2;
+    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutMethodDeclaration_with_", [anIRMethod, function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutFunctionWith_arguments_", [function () {$1 = smalltalk.send(smalltalk.send(anIRMethod, "_internalVariables", []), "_notEmpty", []);if (smalltalk.assert($1)) {smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutVars_", [smalltalk.send(smalltalk.send(smalltalk.send(anIRMethod, "_internalVariables", []), "_asArray", []), "_collect_", [function (each) {return smalltalk.send(smalltalk.send(each, "_variable", []), "_alias", []);}])]);}$2 = smalltalk.send(smalltalk.send(anIRMethod, "_scope", []), "_hasNonLocalReturn", []);if (smalltalk.assert($2)) {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutNonLocalReturnHandlingWith_", [function () {return smalltalk.send(self, "_visitIRMethod_", [anIRMethod], smalltalk.IRVisitor);}]);} else {return smalltalk.send(self, "_visitIRMethod_", [anIRMethod], smalltalk.IRVisitor);}}, smalltalk.send(anIRMethod, "_arguments", [])]);}]);
     return self;
 }
 }),
@@ -1603,12 +1811,17 @@ smalltalk.method({
 selector: "visitIRSend:",
 fn: function (anIRSend) {
     var self = this;
+    var $1;
     smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", ["smalltalk.send("]);
     smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRSend, "_instructions", []), "_first", [])]);
     smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [smalltalk.send(smalltalk.send(",\"", "__comma", [smalltalk.send(smalltalk.send(anIRSend, "_selector", []), "_asSelector", [])]), "__comma", ["\",["])]);
     smalltalk.send(smalltalk.send(smalltalk.send(anIRSend, "_instructions", []), "_allButFirst", []), "_do_separatedBy_", [function (each) {return smalltalk.send(self, "_visit_", [each]);}, function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [","]);}]);
     smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", ["]"]);
-    smalltalk.send(smalltalk.send(anIRSend, "_classSend", []), "_ifNotNil_", [function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [smalltalk.send(",", "__comma", [smalltalk.send(smalltalk.send(anIRSend, "_classSend", []), "_asJavascript", [])])]);}]);
+    $1 = smalltalk.send(anIRSend, "_classSend", []);
+    if (($receiver = $1) == nil || $receiver == undefined) {
+    } else {
+        smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [smalltalk.send(",", "__comma", [smalltalk.send(smalltalk.send(anIRSend, "_classSend", []), "_asJavascript", [])])]);
+    }
     smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [")"]);
     return self;
 }
@@ -1684,7 +1897,9 @@ smalltalk.method({
 selector: "contents",
 fn: function () {
     var self = this;
-    return smalltalk.send(self['@stream'], "_contents", []);
+    var $1;
+    $1 = smalltalk.send(self['@stream'], "_contents", []);
+    return $1;
 }
 }),
 smalltalk.JSStream);

+ 361 - 115
js/Compiler-IR.js

@@ -8,25 +8,28 @@ selector: "alias:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var $early = {};
-    try {
-        var variable = nil;
-        ($receiver = smalltalk.send(aNode, "_isValueNode", [])).klass === smalltalk.Boolean ? $receiver ? function () {return function () {throw $early = [smalltalk.send(self, "_visit_", [aNode])];}();}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return function () {throw $early = [smalltalk.send(self, "_visit_", [aNode])];}();}]);
-        variable = function ($rec) {smalltalk.send($rec, "_variable_", [smalltalk.send(smalltalk.send(smalltalk.AliasVar || AliasVar, "_new", []), "_name_", [smalltalk.send("$", "__comma", [smalltalk.send(self, "_nextAlias", [])])])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []));
-        smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [variable]);smalltalk.send($rec, "_add_", [smalltalk.send(self, "_visit_", [aNode])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []))]);
-        smalltalk.send(smalltalk.send(smalltalk.send(self, "_method", []), "_internalVariables", []), "_add_", [variable]);
-        return variable;
-        return self;
-    } catch (e) {
-        if (e === $early) {
-            return e[0];
-        }
-        throw e;
+    var $1, $2, $3, $4, $5, $6;
+    var variable;
+    $1 = smalltalk.send(aNode, "_isValueNode", []);
+    if (smalltalk.assert($1)) {
+        $2 = smalltalk.send(self, "_visit_", [aNode]);
+        return $2;
     }
+    $3 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
+    smalltalk.send($3, "_variable_", [smalltalk.send(smalltalk.send(smalltalk.AliasVar || AliasVar, "_new", []), "_name_", [smalltalk.send("$", "__comma", [smalltalk.send(self, "_nextAlias", [])])])]);
+    $4 = smalltalk.send($3, "_yourself", []);
+    variable = $4;
+    $5 = smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []);
+    smalltalk.send($5, "_add_", [variable]);
+    smalltalk.send($5, "_add_", [smalltalk.send(self, "_visit_", [aNode])]);
+    $6 = smalltalk.send($5, "_yourself", []);
+    smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [$6]);
+    smalltalk.send(smalltalk.send(smalltalk.send(self, "_method", []), "_internalVariables", []), "_add_", [variable]);
+    return variable;
 },
 args: ["aNode"],
 source: "alias: aNode\x0a\x09| variable |\x0a\x0a\x09aNode isValueNode ifTrue: [ ^ self visit: aNode ].\x0a\x0a\x09variable := IRVariable new \x0a\x09\x09variable: (AliasVar new name: '$', self nextAlias); \x0a\x09\x09yourself.\x0a\x0a\x09self sequence add: (IRAssignment new\x0a\x09\x09add: variable;\x0a\x09\x09add: (self visit: aNode);\x0a\x09\x09yourself).\x0a\x0a\x09self method internalVariables add: variable.\x0a\x0a\x09^ variable",
-messageSends: ["ifTrue:", "isValueNode", "visit:", "variable:", "name:", "new", ",", "nextAlias", "yourself", "add:", "sequence", "internalVariables", "method"],
+messageSends: ["ifTrue:", "visit:", "isValueNode", "variable:", "name:", ",", "nextAlias", "new", "yourself", "add:", "sequence", "internalVariables", "method"],
 referencedClasses: ["AliasVar", "IRVariable", "IRAssignment"]
 }),
 smalltalk.IRASTTranslator);
@@ -71,9 +74,16 @@ selector: "nextAlias",
 category: 'accessing',
 fn: function () {
     var self = this;
-    smalltalk.send(self['@nextAlias'], "_ifNil_", [function () {self['@nextAlias'] = 0;return self['@nextAlias'];}]);
+    var $1;
+    if (($receiver = self['@nextAlias']) == nil || $receiver == undefined) {
+        self['@nextAlias'] = 0;
+        self['@nextAlias'];
+    } else {
+        self['@nextAlias'];
+    }
     self['@nextAlias'] = smalltalk.send(self['@nextAlias'], "__plus", [1]);
-    return smalltalk.send(self['@nextAlias'], "_asString", []);
+    $1 = smalltalk.send(self['@nextAlias'], "_asString", []);
+    return $1;
 },
 args: [],
 source: "nextAlias\x0a\x09nextAlias ifNil: [ nextAlias := 0 ].\x0a\x09nextAlias := nextAlias + 1.\x0a\x09^ nextAlias asString",
@@ -188,18 +198,22 @@ selector: "visitAssignmentNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var left = nil;
-    var right = nil;
-    var assignment = nil;
+    var $1, $2;
+    var left;
+    var right;
+    var assignment;
     right = smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_right", [])]);
     left = smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_left", [])]);
-    smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [left]);smalltalk.send($rec, "_add_", [right]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []))]);
+    $1 = smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []);
+    smalltalk.send($1, "_add_", [left]);
+    smalltalk.send($1, "_add_", [right]);
+    $2 = smalltalk.send($1, "_yourself", []);
+    smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [$2]);
     return left;
-    return self;
 },
 args: ["aNode"],
 source: "visitAssignmentNode: aNode\x0a\x09| left right assignment |\x0a\x09right := self visit: aNode right.\x0a\x09left := self visit: aNode left.\x0a\x09self sequence add: (IRAssignment new \x0a\x09\x09add: left;\x0a\x09\x09add: right;\x0a\x09\x09yourself).\x0a\x09^ left",
-messageSends: ["visit:", "right", "left", "add:", "sequence", "yourself", "new"],
+messageSends: ["visit:", "right", "left", "add:", "new", "yourself", "sequence"],
 referencedClasses: ["IRAssignment"]
 }),
 smalltalk.IRASTTranslator);
@@ -236,13 +250,13 @@ selector: "visitBlockSequenceNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    return smalltalk.send(self, "_withSequence_do_", [smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []), function () {return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_ifNotEmpty_", [function () {smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [each])]);}]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", []), "_isReturnNode", []), "_ifFalse_ifTrue_", [function () {$1 = smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);smalltalk.send($1, "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);$2 = smalltalk.send($1, "_yourself", []);return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [$2]);}, function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);}]);}]);}]);
+    return smalltalk.send(self, "_withSequence_do_", [smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []), function () {return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_ifNotEmpty_", [function () {smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [each])]);}]);return ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", []), "_isReturnNode", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRBlockReturn || IRBlockReturn, "_new", []))]);}() : function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);}() : smalltalk.send($receiver, "_ifFalse_ifTrue_", [function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRBlockReturn || IRBlockReturn, "_new", []))]);}, function () {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])])]);}]);}]);}]);
+    return self;
 },
 args: ["aNode"],
-source: "visitBlockSequenceNode: aNode\x0a\x09^ self\x0a\x09\x09withSequence: IRBlockSequence new\x0a\x09\x09do: [ \x0a\x09\x09\x09aNode nodes ifNotEmpty: [\x0a\x09\x09\x09\x09aNode nodes allButLast do: [ :each | \x0a\x09\x09\x09\x09\x09self sequence add: (self visit: each) ].\x0a\x09\x09\x09\x09aNode nodes last isReturnNode \x0a\x09\x09\x09\x09\x09ifFalse: [ self sequence add: (IRReturn new add: (self visit: aNode nodes last); yourself) ]\x0a\x09\x09\x09\x09\x09ifTrue: [ self sequence add: (self visit: aNode nodes last) ]]]",
-messageSends: ["withSequence:do:", "new", "ifNotEmpty:", "do:", "add:", "visit:", "sequence", "allButLast", "nodes", "ifFalse:ifTrue:", "last", "yourself", "isReturnNode"],
-referencedClasses: ["IRBlockSequence", "IRReturn"]
+source: "visitBlockSequenceNode: aNode\x0a\x09^ self\x0a\x09\x09withSequence: IRBlockSequence new\x0a\x09\x09do: [ \x0a\x09\x09\x09aNode nodes ifNotEmpty: [\x0a\x09\x09\x09\x09aNode nodes allButLast do: [ :each | \x0a\x09\x09\x09\x09\x09self sequence add: (self visit: each) ].\x0a\x09\x09\x09\x09aNode nodes last isReturnNode \x0a\x09\x09\x09\x09\x09ifFalse: [ self sequence add: (IRBlockReturn new add: (self visit: aNode nodes last); yourself) ]\x0a\x09\x09\x09\x09\x09ifTrue: [ self sequence add: (self visit: aNode nodes last) ]]]",
+messageSends: ["withSequence:do:", "new", "ifNotEmpty:", "nodes", "do:", "allButLast", "add:", "sequence", "visit:", "ifFalse:ifTrue:", "isReturnNode", "last", "yourself"],
+referencedClasses: ["IRBlockSequence", "IRBlockReturn"]
 }),
 smalltalk.IRASTTranslator);
 
@@ -253,13 +267,16 @@ selector: "visitCascadeNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
+    var $1, $2;
     var alias;
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_isValueNode", []))) {
+    $1 = smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_isValueNode", []);
+    if (!smalltalk.assert($1)) {
         alias = smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_receiver", [])]);
         smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_receiver_", [smalltalk.send(smalltalk.send(smalltalk.VariableNode || VariableNode, "_new", []), "_binding_", [smalltalk.send(alias, "_variable", [])])]);}]);
     }
     smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [smalltalk.send(self, "_visit_", [each])]);}]);
-    return smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])]);
+    $2 = smalltalk.send(self, "_alias_", [smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_last", [])]);
+    return $2;
 },
 args: ["aNode"],
 source: "visitCascadeNode: aNode\x0a\x09| alias |\x0a\x0a\x09aNode receiver isValueNode ifFalse: [ \x0a\x09\x09alias := self alias: aNode receiver.\x0a\x09\x09aNode nodes do: [ :each |\x0a\x09\x09\x09each receiver: (VariableNode new binding: alias variable) ]].\x0a\x0a\x09aNode nodes allButLast do: [ :each |\x0a\x09\x09self sequence add: (self visit: each) ].\x0a\x0a\x09^ self alias: aNode nodes last",
@@ -313,11 +330,12 @@ selector: "visitJSStatementNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRVerbatim || IRVerbatim, "_new", []);
-    smalltalk.send($1, "_source_", [smalltalk.send(aNode, "_source", [])]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRVerbatim || IRVerbatim, "_new", []);
+    smalltalk.send($2, "_source_", [smalltalk.send(aNode, "_source", [])]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["aNode"],
 source: "visitJSStatementNode: aNode\x0a\x09^ IRVerbatim new\x0a\x09\x09source: aNode source;\x0a\x09\x09yourself",
@@ -333,7 +351,7 @@ selector: "visitMethodNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var $1, $2, $3, $4, $5, $6;
+    var $1, $2, $3, $4, $5, $6, $7, $8;
     $1 = smalltalk.send(smalltalk.IRMethod || IRMethod, "_new", []);
     smalltalk.send($1, "_source_", [smalltalk.send(self, "_source", [])]);
     smalltalk.send($1, "_arguments_", [smalltalk.send(aNode, "_arguments", [])]);
@@ -345,13 +363,15 @@ fn: function (aNode) {
     smalltalk.send(self, "_method_", [$2]);
     smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_scope", []), "_temps", []), "_do_", [function (each) {$3 = smalltalk.send(smalltalk.IRTempDeclaration || IRTempDeclaration, "_new", []);smalltalk.send($3, "_name_", [smalltalk.send(each, "_name", [])]);$4 = smalltalk.send($3, "_yourself", []);return smalltalk.send(smalltalk.send(self, "_method", []), "_add_", [$4]);}]);
     smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_method", []), "_add_", [smalltalk.send(self, "_visit_", [each])]);}]);
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(aNode, "_scope", []), "_hasLocalReturn", []))) {
-        $5 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
-        smalltalk.send($5, "_variable_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_scope", []), "_pseudoVars", []), "_at_", ["self"])]);
-        $6 = smalltalk.send($5, "_yourself", []);
-        smalltalk.send(smalltalk.send(smalltalk.send(self, "_method", []), "_add_", [smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", [])]), "_add_", [$6]);
+    $5 = smalltalk.send(smalltalk.send(aNode, "_scope", []), "_hasLocalReturn", []);
+    if (!smalltalk.assert($5)) {
+        $6 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
+        smalltalk.send($6, "_variable_", [smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_scope", []), "_pseudoVars", []), "_at_", ["self"])]);
+        $7 = smalltalk.send($6, "_yourself", []);
+        smalltalk.send(smalltalk.send(smalltalk.send(self, "_method", []), "_add_", [smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", [])]), "_add_", [$7]);
     }
-    return smalltalk.send(self, "_method", []);
+    $8 = smalltalk.send(self, "_method", []);
+    return $8;
 },
 args: ["aNode"],
 source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09messageSends: aNode messageSends;\x0a\x09\x09classReferences: aNode classReferences;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself).\x0a\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09self method add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode nodes do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [\x0a\x09\x09(self method add: IRReturn new) add: (IRVariable new\x0a\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ self method",
@@ -367,16 +387,21 @@ selector: "visitReturnNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var return_ = nil;
-    return_ = ($receiver = smalltalk.send(aNode, "_nonLocalReturn", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(smalltalk.IRNonLocalReturn || IRNonLocalReturn, "_new", []);}() : function () {return smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.IRNonLocalReturn || IRNonLocalReturn, "_new", []);}, function () {return smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);}]);
+    var $1;
+    var return_;
+    $1 = smalltalk.send(aNode, "_nonLocalReturn", []);
+    if (smalltalk.assert($1)) {
+        return_ = smalltalk.send(smalltalk.IRNonLocalReturn || IRNonLocalReturn, "_new", []);
+    } else {
+        return_ = smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);
+    }
     smalltalk.send(return_, "_scope_", [smalltalk.send(aNode, "_scope", [])]);
     smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {return smalltalk.send(return_, "_add_", [smalltalk.send(self, "_alias_", [each])]);}]);
     return return_;
-    return self;
 },
 args: ["aNode"],
 source: "visitReturnNode: aNode\x0a\x09| return |\x0a\x09return := aNode nonLocalReturn \x0a\x09\x09ifTrue: [ IRNonLocalReturn new ]\x0a\x09\x09ifFalse: [ IRReturn new ].\x0a\x09return scope: aNode scope.\x0a\x09aNode nodes do: [ :each |\x0a\x09\x09return add: (self alias: each) ].\x0a\x09^ return",
-messageSends: ["ifTrue:ifFalse:", "nonLocalReturn", "new", "scope:", "scope", "do:", "nodes", "add:", "alias:"],
+messageSends: ["ifTrue:ifFalse:", "new", "nonLocalReturn", "scope:", "scope", "do:", "add:", "alias:", "nodes"],
 referencedClasses: ["IRNonLocalReturn", "IRReturn"]
 }),
 smalltalk.IRASTTranslator);
@@ -388,22 +413,31 @@ selector: "visitSendNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var send = nil;
-    var receiver = nil;
-    var arguments = nil;
+    var $1, $2, $3, $4;
+    var send;
+    var receiver;
+    var arguments;
     send = smalltalk.send(smalltalk.IRSend || IRSend, "_new", []);
-    (function ($rec) {smalltalk.send($rec, "_selector_", [smalltalk.send(aNode, "_selector", [])]);return smalltalk.send($rec, "_index_", [smalltalk.send(aNode, "_index", [])]);}(send));
-    ($receiver = smalltalk.send(aNode, "_superSend", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(send, "_classSend_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_superclass", [])]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(send, "_classSend_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_superclass", [])]);}]);
-    receiver = ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeInlined", []), "_or_", [function () {return smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeAliased", []);}])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_receiver", [])]);}() : function () {return smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_receiver", [])]);}, function () {return smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);}]);
-    arguments = smalltalk.send(smalltalk.send(aNode, "_arguments", []), "_collect_", [function (each) {return ($receiver = smalltalk.send(each, "_shouldBeInlined", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(self, "_alias_", [each]);}() : function () {return smalltalk.send(self, "_visit_", [each]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(self, "_alias_", [each]);}, function () {return smalltalk.send(self, "_visit_", [each]);}]);}]);
+    smalltalk.send(send, "_selector_", [smalltalk.send(aNode, "_selector", [])]);
+    $1 = smalltalk.send(send, "_index_", [smalltalk.send(aNode, "_index", [])]);
+    $2 = smalltalk.send(aNode, "_superSend", []);
+    if (smalltalk.assert($2)) {
+        smalltalk.send(send, "_classSend_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_superclass", [])]);
+    }
+    $3 = smalltalk.send(smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeInlined", []), "_or_", [function () {return smalltalk.send(smalltalk.send(aNode, "_receiver", []), "_shouldBeAliased", []);}]);
+    if (smalltalk.assert($3)) {
+        receiver = smalltalk.send(self, "_alias_", [smalltalk.send(aNode, "_receiver", [])]);
+    } else {
+        receiver = smalltalk.send(self, "_visit_", [smalltalk.send(aNode, "_receiver", [])]);
+    }
+    arguments = smalltalk.send(smalltalk.send(aNode, "_arguments", []), "_collect_", [function (each) {$4 = smalltalk.send(each, "_shouldBeInlined", []);if (smalltalk.assert($4)) {return smalltalk.send(self, "_alias_", [each]);} else {return smalltalk.send(self, "_visit_", [each]);}}]);
     smalltalk.send(send, "_add_", [receiver]);
     smalltalk.send(arguments, "_do_", [function (each) {return smalltalk.send(send, "_add_", [each]);}]);
     return send;
-    return self;
 },
 args: ["aNode"],
 source: "visitSendNode: aNode\x0a\x09| send receiver arguments |\x0a\x09send := IRSend new.\x0a\x09send \x0a\x09\x09selector: aNode selector;\x0a\x09\x09index: aNode index.\x0a\x09aNode superSend ifTrue: [ send classSend: self theClass superclass ].\x0a\x0a\x09receiver := (aNode receiver shouldBeInlined or: [ aNode receiver shouldBeAliased ])\x0a\x09\x09ifTrue: [ self alias: aNode receiver ]\x0a\x09\x09ifFalse: [ self visit: aNode receiver ].\x0a\x0a\x09arguments := aNode arguments collect: [ :each | \x0a\x09\x09each shouldBeInlined\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ]].\x0a\x0a\x09send add: receiver.\x0a\x09arguments do: [ :each | send add: each ].\x0a\x0a\x09^ send",
-messageSends: ["new", "selector:", "selector", "index:", "index", "ifTrue:", "superSend", "classSend:", "superclass", "theClass", "ifTrue:ifFalse:", "or:", "shouldBeInlined", "receiver", "shouldBeAliased", "alias:", "visit:", "collect:", "arguments", "add:", "do:"],
+messageSends: ["new", "selector:", "selector", "index:", "index", "ifTrue:", "classSend:", "superclass", "theClass", "superSend", "ifTrue:ifFalse:", "alias:", "receiver", "visit:", "or:", "shouldBeAliased", "shouldBeInlined", "collect:", "arguments", "add:", "do:"],
 referencedClasses: ["IRSend"]
 }),
 smalltalk.IRASTTranslator);
@@ -415,7 +449,9 @@ selector: "visitSequenceNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    return smalltalk.send(self, "_withSequence_do_", [smalltalk.send(smalltalk.IRSequence || IRSequence, "_new", []), function () {return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {var instruction;instruction = smalltalk.send(self, "_visit_", [each]);if (!smalltalk.assert(smalltalk.send(instruction, "_isVariable", []))) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [instruction]);}}]);}]);
+    var $2, $1;
+    $1 = smalltalk.send(self, "_withSequence_do_", [smalltalk.send(smalltalk.IRSequence || IRSequence, "_new", []), function () {return smalltalk.send(smalltalk.send(aNode, "_nodes", []), "_do_", [function (each) {var instruction;instruction = smalltalk.send(self, "_visit_", [each]);$2 = smalltalk.send(instruction, "_isVariable", []);if (!smalltalk.assert($2)) {return smalltalk.send(smalltalk.send(self, "_sequence", []), "_add_", [instruction]);}}]);}]);
+    return $1;
 },
 args: ["aNode"],
 source: "visitSequenceNode: aNode\x0a\x09^ self \x0a\x09\x09withSequence: IRSequence new \x09\x0a\x09\x09do: [\x0a\x09\x09\x09aNode nodes do: [ :each | | instruction |\x0a\x09\x09\x09\x09instruction := self visit: each.\x0a\x09\x09\x09\x09instruction isVariable ifFalse: [\x0a\x09\x09\x09\x09\x09self sequence add: instruction ]]]",
@@ -431,11 +467,12 @@ selector: "visitValueNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRValue || IRValue, "_new", []);
-    smalltalk.send($1, "_value_", [smalltalk.send(aNode, "_value", [])]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRValue || IRValue, "_new", []);
+    smalltalk.send($2, "_value_", [smalltalk.send(aNode, "_value", [])]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["aNode"],
 source: "visitValueNode: aNode\x0a\x09^ IRValue new \x0a\x09\x09value: aNode value; \x0a\x09\x09yourself",
@@ -451,11 +488,12 @@ selector: "visitVariableNode:",
 category: 'visiting',
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
-    smalltalk.send($1, "_variable_", [smalltalk.send(aNode, "_binding", [])]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRVariable || IRVariable, "_new", []);
+    smalltalk.send($2, "_variable_", [smalltalk.send(aNode, "_binding", [])]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["aNode"],
 source: "visitVariableNode: aNode\x0a\x09^ IRVariable new \x0a\x09\x09variable: aNode binding; \x0a\x09\x09yourself",
@@ -496,7 +534,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRInstruction_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRInstruction_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInstruction: self",
@@ -512,8 +552,10 @@ selector: "add:",
 category: 'building',
 fn: function (anObject) {
     var self = this;
+    var $1;
     smalltalk.send(anObject, "_parent_", [self]);
-    return smalltalk.send(smalltalk.send(self, "_instructions", []), "_add_", [anObject]);
+    $1 = smalltalk.send(smalltalk.send(self, "_instructions", []), "_add_", [anObject]);
+    return $1;
 },
 args: ["anObject"],
 source: "add: anObject\x0a\x09anObject parent: self.\x0a\x09^ self instructions add: anObject",
@@ -545,7 +587,15 @@ selector: "instructions",
 category: 'accessing',
 fn: function () {
     var self = this;
-    return smalltalk.send(self['@instructions'], "_ifNil_", [function () {self['@instructions'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);return self['@instructions'];}]);
+    var $1;
+    if (($receiver = self['@instructions']) == nil ||
+        $receiver == undefined) {
+        self['@instructions'] = smalltalk.send(smalltalk.OrderedCollection || OrderedCollection, "_new", []);
+        $1 = self['@instructions'];
+    } else {
+        $1 = self['@instructions'];
+    }
+    return $1;
 },
 args: [],
 source: "instructions\x0a\x09^ instructions ifNil: [ instructions := OrderedCollection new ]",
@@ -792,11 +842,12 @@ selector: "on:",
 category: 'instance creation',
 fn: function (aBuilder) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(self, "_new", []);
-    smalltalk.send($1, "_builder_", [aBuilder]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(self, "_new", []);
+    smalltalk.send($2, "_builder_", [aBuilder]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: ["aBuilder"],
 source: "on: aBuilder\x0a\x09^ self new\x0a\x09\x09builder: aBuilder;\x0a\x09\x09yourself",
@@ -814,7 +865,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRAssignment_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRAssignment_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRAssignment: self",
@@ -833,7 +886,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRDynamicArray_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRDynamicArray_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRDynamicArray: self",
@@ -852,7 +907,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRDynamicDictionary_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRDynamicDictionary_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRDynamicDictionary: self",
@@ -907,7 +964,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRClosure_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRClosure_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRClosure: self",
@@ -923,7 +982,13 @@ selector: "arguments",
 category: 'accessing',
 fn: function () {
     var self = this;
-    return smalltalk.send(self['@arguments'], "_ifNil_", [function () {return [];}]);
+    var $1;
+    if (($receiver = self['@arguments']) == nil || $receiver == undefined) {
+        $1 = [];
+    } else {
+        $1 = self['@arguments'];
+    }
+    return $1;
 },
 args: [],
 source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
@@ -990,7 +1055,9 @@ selector: "sequence",
 category: 'accessing',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_instructions", []), "_last", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_instructions", []), "_last", []);
+    return $1;
 },
 args: [],
 source: "sequence\x0a\x09^ self instructions last",
@@ -1010,7 +1077,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRMethod_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRMethod_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRMethod: self",
@@ -1092,7 +1161,15 @@ selector: "internalVariables",
 category: 'accessing',
 fn: function () {
     var self = this;
-    return smalltalk.send(self['@internalVariables'], "_ifNil_", [function () {self['@internalVariables'] = smalltalk.send(smalltalk.Set || Set, "_new", []);return self['@internalVariables'];}]);
+    var $1;
+    if (($receiver = self['@internalVariables']) == nil ||
+        $receiver == undefined) {
+        self['@internalVariables'] = smalltalk.send(smalltalk.Set || Set, "_new", []);
+        $1 = self['@internalVariables'];
+    } else {
+        $1 = self['@internalVariables'];
+    }
+    return $1;
 },
 args: [],
 source: "internalVariables\x0a\x09^ internalVariables ifNil: [ internalVariables := Set new ]",
@@ -1229,7 +1306,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRReturn_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRReturn_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRReturn: self",
@@ -1254,6 +1333,23 @@ referencedClasses: []
 }),
 smalltalk.IRReturn);
 
+smalltalk.addMethod(
+"_isBlockReturn",
+smalltalk.method({
+selector: "isBlockReturn",
+category: 'testing',
+fn: function () {
+    var self = this;
+    return false;
+    return self;
+},
+args: [],
+source: "isBlockReturn\x0a\x09^ false",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.IRReturn);
+
 smalltalk.addMethod(
 "_isLocalReturn",
 smalltalk.method({
@@ -1261,11 +1357,12 @@ selector: "isLocalReturn",
 category: 'testing',
 fn: function () {
     var self = this;
-    return smalltalk.send(self, "_isReturn", []);
+    return true;
+    return self;
 },
 args: [],
-source: "isLocalReturn\x0a\x09^ self isReturn",
-messageSends: ["isReturn"],
+source: "isLocalReturn\x0a\x09^ true",
+messageSends: [],
 referencedClasses: []
 }),
 smalltalk.IRReturn);
@@ -1277,7 +1374,9 @@ selector: "isNonLocalReturn",
 category: 'testing',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_isLocalReturn", []), "_not", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_isLocalReturn", []), "_not", []);
+    return $1;
 },
 args: [],
 source: "isNonLocalReturn\x0a\x09^ self isLocalReturn not",
@@ -1304,6 +1403,44 @@ smalltalk.IRReturn);
 
 
 
+smalltalk.addClass('IRBlockReturn', smalltalk.IRReturn, [], 'Compiler-IR');
+smalltalk.IRBlockReturn.comment="Smalltalk blocks return their last statement. I am a implicit block return instruction."
+smalltalk.addMethod(
+"_accept_",
+smalltalk.method({
+selector: "accept:",
+category: 'visiting',
+fn: function (aVisitor) {
+    var self = this;
+    return smalltalk.send(aVisitor, "_visitIRBlockReturn_", [self]);
+    return self;
+},
+args: ["aVisitor"],
+source: "accept: aVisitor\x0a\x09^ aVisitor visitIRBlockReturn: self",
+messageSends: ["visitIRBlockReturn:"],
+referencedClasses: []
+}),
+smalltalk.IRBlockReturn);
+
+smalltalk.addMethod(
+"_isBlockReturn",
+smalltalk.method({
+selector: "isBlockReturn",
+category: 'testing',
+fn: function () {
+    var self = this;
+    return true;
+    return self;
+},
+args: [],
+source: "isBlockReturn\x0a\x09^ true",
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.IRBlockReturn);
+
+
+
 smalltalk.addClass('IRNonLocalReturn', smalltalk.IRReturn, [], 'Compiler-IR');
 smalltalk.IRNonLocalReturn.comment="I am a non local return instruction.\x0aNon local returns are handled using a try/catch JS statement.\x0a\x0aSee IRNonLocalReturnHandling class"
 smalltalk.addMethod(
@@ -1313,7 +1450,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRNonLocalReturn_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRNonLocalReturn_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRNonLocalReturn: self",
@@ -1349,7 +1488,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRSend_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRSend_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRSend: self",
@@ -1483,7 +1624,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRSequence_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRSequence_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRSequence: self",
@@ -1518,7 +1661,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRBlockSequence_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRBlockSequence_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRBlockSequence: self",
@@ -1538,7 +1683,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRTempDeclaration_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRTempDeclaration_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRTempDeclaration: self",
@@ -1607,7 +1754,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRValue_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRValue_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRValue: self",
@@ -1660,7 +1809,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRVariable_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRVariable_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRVariable: self",
@@ -1728,7 +1879,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRVerbatim_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRVerbatim_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRVerbatim: self",
@@ -1780,7 +1933,9 @@ selector: "visit:",
 category: 'visiting',
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(anIRInstruction, "_accept_", [self]);
+    var $1;
+    $1 = smalltalk.send(anIRInstruction, "_accept_", [self]);
+    return $1;
 },
 args: ["anIRInstruction"],
 source: "visit: anIRInstruction\x0a\x09^ anIRInstruction accept: self",
@@ -1796,7 +1951,9 @@ selector: "visitIRAssignment:",
 category: 'visiting',
 fn: function (anIRAssignment) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRAssignment]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRAssignment]);
+    return $1;
 },
 args: ["anIRAssignment"],
 source: "visitIRAssignment: anIRAssignment\x0a\x09^ self visitIRInstruction: anIRAssignment",
@@ -1805,6 +1962,23 @@ referencedClasses: []
 }),
 smalltalk.IRVisitor);
 
+smalltalk.addMethod(
+"_visitIRBlockReturn_",
+smalltalk.method({
+selector: "visitIRBlockReturn:",
+category: 'visiting',
+fn: function (anIRBlockReturn) {
+    var self = this;
+    return smalltalk.send(self, "_visitIRReturn_", [anIRBlockReturn]);
+    return self;
+},
+args: ["anIRBlockReturn"],
+source: "visitIRBlockReturn: anIRBlockReturn\x0a\x09^ self visitIRReturn: anIRBlockReturn",
+messageSends: ["visitIRReturn:"],
+referencedClasses: []
+}),
+smalltalk.IRVisitor);
+
 smalltalk.addMethod(
 "_visitIRBlockSequence_",
 smalltalk.method({
@@ -1812,7 +1986,9 @@ selector: "visitIRBlockSequence:",
 category: 'visiting',
 fn: function (anIRBlockSequence) {
     var self = this;
-    return smalltalk.send(self, "_visitIRSequence_", [anIRBlockSequence]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRSequence_", [anIRBlockSequence]);
+    return $1;
 },
 args: ["anIRBlockSequence"],
 source: "visitIRBlockSequence: anIRBlockSequence\x0a\x09^ self visitIRSequence: anIRBlockSequence",
@@ -1828,7 +2004,9 @@ selector: "visitIRClosure:",
 category: 'visiting',
 fn: function (anIRClosure) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRClosure]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRClosure]);
+    return $1;
 },
 args: ["anIRClosure"],
 source: "visitIRClosure: anIRClosure\x0a\x09^ self visitIRInstruction: anIRClosure",
@@ -1844,7 +2022,9 @@ selector: "visitIRDynamicArray:",
 category: 'visiting',
 fn: function (anIRDynamicArray) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRDynamicArray]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRDynamicArray]);
+    return $1;
 },
 args: ["anIRDynamicArray"],
 source: "visitIRDynamicArray: anIRDynamicArray\x0a\x09^ self visitIRInstruction: anIRDynamicArray",
@@ -1860,7 +2040,9 @@ selector: "visitIRDynamicDictionary:",
 category: 'visiting',
 fn: function (anIRDynamicDictionary) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRDynamicDictionary]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRDynamicDictionary]);
+    return $1;
 },
 args: ["anIRDynamicDictionary"],
 source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09^ self visitIRInstruction: anIRDynamicDictionary",
@@ -1869,6 +2051,40 @@ referencedClasses: []
 }),
 smalltalk.IRVisitor);
 
+smalltalk.addMethod(
+"_visitIRInlinedClosure_",
+smalltalk.method({
+selector: "visitIRInlinedClosure:",
+category: 'visiting',
+fn: function (anIRInlinedClosure) {
+    var self = this;
+    return smalltalk.send(self, "_visitIRClosure_", [anIRInlinedClosure]);
+    return self;
+},
+args: ["anIRInlinedClosure"],
+source: "visitIRInlinedClosure: anIRInlinedClosure\x0a\x09^ self visitIRClosure: anIRInlinedClosure",
+messageSends: ["visitIRClosure:"],
+referencedClasses: []
+}),
+smalltalk.IRVisitor);
+
+smalltalk.addMethod(
+"_visitIRInlinedSequence_",
+smalltalk.method({
+selector: "visitIRInlinedSequence:",
+category: 'visiting',
+fn: function (anIRInlinedSequence) {
+    var self = this;
+    return smalltalk.send(self, "_visitIRSequence_", [anIRInlinedSequence]);
+    return self;
+},
+args: ["anIRInlinedSequence"],
+source: "visitIRInlinedSequence: anIRInlinedSequence\x0a\x09^ self visitIRSequence: anIRInlinedSequence",
+messageSends: ["visitIRSequence:"],
+referencedClasses: []
+}),
+smalltalk.IRVisitor);
+
 smalltalk.addMethod(
 "_visitIRInstruction_",
 smalltalk.method({
@@ -1893,7 +2109,9 @@ selector: "visitIRMethod:",
 category: 'visiting',
 fn: function (anIRMethod) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRMethod]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRMethod]);
+    return $1;
 },
 args: ["anIRMethod"],
 source: "visitIRMethod: anIRMethod\x0a\x09^ self visitIRInstruction: anIRMethod",
@@ -1909,7 +2127,9 @@ selector: "visitIRNonLocalReturn:",
 category: 'visiting',
 fn: function (anIRNonLocalReturn) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRNonLocalReturn]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRNonLocalReturn]);
+    return $1;
 },
 args: ["anIRNonLocalReturn"],
 source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ self visitIRInstruction: anIRNonLocalReturn",
@@ -1925,7 +2145,9 @@ selector: "visitIRNonLocalReturnHandling:",
 category: 'visiting',
 fn: function (anIRNonLocalReturnHandling) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRNonLocalReturnHandling]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRNonLocalReturnHandling]);
+    return $1;
 },
 args: ["anIRNonLocalReturnHandling"],
 source: "visitIRNonLocalReturnHandling: anIRNonLocalReturnHandling\x0a\x09^ self visitIRInstruction: anIRNonLocalReturnHandling",
@@ -1941,7 +2163,9 @@ selector: "visitIRReturn:",
 category: 'visiting',
 fn: function (anIRReturn) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRReturn]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRReturn]);
+    return $1;
 },
 args: ["anIRReturn"],
 source: "visitIRReturn: anIRReturn\x0a\x09^ self visitIRInstruction: anIRReturn",
@@ -1957,7 +2181,9 @@ selector: "visitIRSend:",
 category: 'visiting',
 fn: function (anIRSend) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRSend]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRSend]);
+    return $1;
 },
 args: ["anIRSend"],
 source: "visitIRSend: anIRSend\x0a\x09^ self visitIRInstruction: anIRSend",
@@ -1973,7 +2199,9 @@ selector: "visitIRSequence:",
 category: 'visiting',
 fn: function (anIRSequence) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRSequence]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRSequence]);
+    return $1;
 },
 args: ["anIRSequence"],
 source: "visitIRSequence: anIRSequence\x0a\x09^ self visitIRInstruction: anIRSequence",
@@ -1989,7 +2217,9 @@ selector: "visitIRTempDeclaration:",
 category: 'visiting',
 fn: function (anIRTempDeclaration) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRTempDeclaration]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRTempDeclaration]);
+    return $1;
 },
 args: ["anIRTempDeclaration"],
 source: "visitIRTempDeclaration: anIRTempDeclaration\x0a\x09^ self visitIRInstruction: anIRTempDeclaration",
@@ -2005,7 +2235,9 @@ selector: "visitIRValue:",
 category: 'visiting',
 fn: function (anIRValue) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRValue]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRValue]);
+    return $1;
 },
 args: ["anIRValue"],
 source: "visitIRValue: anIRValue\x0a\x09^ self visitIRInstruction: anIRValue",
@@ -2021,7 +2253,9 @@ selector: "visitIRVariable:",
 category: 'visiting',
 fn: function (anIRVariable) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRVariable]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRVariable]);
+    return $1;
 },
 args: ["anIRVariable"],
 source: "visitIRVariable: anIRVariable\x0a\x09^ self visitIRInstruction: anIRVariable",
@@ -2037,7 +2271,9 @@ selector: "visitIRVerbatim:",
 category: 'visiting',
 fn: function (anIRVerbatim) {
     var self = this;
-    return smalltalk.send(self, "_visitIRInstruction_", [anIRVerbatim]);
+    var $1;
+    $1 = smalltalk.send(self, "_visitIRInstruction_", [anIRVerbatim]);
+    return $1;
 },
 args: ["anIRVerbatim"],
 source: "visitIRVerbatim: anIRVerbatim\x0a\x09^ self visitIRInstruction: anIRVerbatim",
@@ -2056,7 +2292,9 @@ selector: "contents",
 category: 'accessing',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_stream", []), "_contents", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(self, "_stream", []), "_contents", []);
+    return $1;
 },
 args: [],
 source: "contents\x0a\x09^ self stream contents",
@@ -2197,7 +2435,8 @@ selector: "visitIRMethod:",
 category: 'visiting',
 fn: function (anIRMethod) {
     var self = this;
-    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutMethodDeclaration_with_", [anIRMethod, function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutFunctionWith_arguments_", [function () {if (smalltalk.assert(smalltalk.send(smalltalk.send(anIRMethod, "_internalVariables", []), "_notEmpty", []))) {smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutVars_", [smalltalk.send(smalltalk.send(smalltalk.send(anIRMethod, "_internalVariables", []), "_asArray", []), "_collect_", [function (each) {return smalltalk.send(smalltalk.send(each, "_variable", []), "_alias", []);}])]);}return smalltalk.send(smalltalk.send(smalltalk.send(anIRMethod, "_scope", []), "_hasNonLocalReturn", []), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutNonLocalReturnHandlingWith_", [function () {return smalltalk.send(self, "_visitIRMethod_", [anIRMethod], smalltalk.IRVisitor);}]);}, function () {return smalltalk.send(self, "_visitIRMethod_", [anIRMethod], smalltalk.IRVisitor);}]);}, smalltalk.send(anIRMethod, "_arguments", [])]);}]);
+    var $1, $2;
+    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutMethodDeclaration_with_", [anIRMethod, function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutFunctionWith_arguments_", [function () {$1 = smalltalk.send(smalltalk.send(anIRMethod, "_internalVariables", []), "_notEmpty", []);if (smalltalk.assert($1)) {smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutVars_", [smalltalk.send(smalltalk.send(smalltalk.send(anIRMethod, "_internalVariables", []), "_asArray", []), "_collect_", [function (each) {return smalltalk.send(smalltalk.send(each, "_variable", []), "_alias", []);}])]);}$2 = smalltalk.send(smalltalk.send(anIRMethod, "_scope", []), "_hasNonLocalReturn", []);if (smalltalk.assert($2)) {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutNonLocalReturnHandlingWith_", [function () {return smalltalk.send(self, "_visitIRMethod_", [anIRMethod], smalltalk.IRVisitor);}]);} else {return smalltalk.send(self, "_visitIRMethod_", [anIRMethod], smalltalk.IRVisitor);}}, smalltalk.send(anIRMethod, "_arguments", [])]);}]);
     return self;
 },
 args: ["anIRMethod"],
@@ -2248,12 +2487,17 @@ selector: "visitIRSend:",
 category: 'visiting',
 fn: function (anIRSend) {
     var self = this;
+    var $1;
     smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", ["smalltalk.send("]);
     smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRSend, "_instructions", []), "_first", [])]);
     smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [smalltalk.send(smalltalk.send(",\"", "__comma", [smalltalk.send(smalltalk.send(anIRSend, "_selector", []), "_asSelector", [])]), "__comma", ["\",["])]);
     smalltalk.send(smalltalk.send(smalltalk.send(anIRSend, "_instructions", []), "_allButFirst", []), "_do_separatedBy_", [function (each) {return smalltalk.send(self, "_visit_", [each]);}, function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [","]);}]);
     smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", ["]"]);
-    smalltalk.send(smalltalk.send(anIRSend, "_classSend", []), "_ifNotNil_", [function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [smalltalk.send(",", "__comma", [smalltalk.send(smalltalk.send(anIRSend, "_classSend", []), "_asJavascript", [])])]);}]);
+    $1 = smalltalk.send(anIRSend, "_classSend", []);
+    if (($receiver = $1) == nil || $receiver == undefined) {
+    } else {
+        smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [smalltalk.send(",", "__comma", [smalltalk.send(smalltalk.send(anIRSend, "_classSend", []), "_asJavascript", [])])]);
+    }
     smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutAll_", [")"]);
     return self;
 },
@@ -2359,7 +2603,9 @@ selector: "contents",
 category: 'accessing',
 fn: function () {
     var self = this;
-    return smalltalk.send(self['@stream'], "_contents", []);
+    var $1;
+    $1 = smalltalk.send(self['@stream'], "_contents", []);
+    return $1;
 },
 args: [],
 source: "contents\x0a\x09^ stream contents",

+ 223 - 277
js/Compiler-Inlining.deploy.js

@@ -6,7 +6,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRInlinedAssignment_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRInlinedAssignment_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRInlinedAssignment);
@@ -57,7 +59,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRInlinedReturn_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRInlinedReturn_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRInlinedReturn);
@@ -82,7 +86,9 @@ smalltalk.method({
 selector: "accept:",
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRInlinedNonLocalReturn_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRInlinedNonLocalReturn_", [self]);
+    return $1;
 }
 }),
 smalltalk.IRInlinedNonLocalReturn);
@@ -212,71 +218,6 @@ smalltalk.IRInlinedSequence);
 
 
 
-smalltalk.addClass('IRAssigningInlinedSequence', smalltalk.IRInlinedSequence, ['assignTo'], 'Compiler-Inlining');
-smalltalk.addMethod(
-"_accept_",
-smalltalk.method({
-selector: "accept:",
-fn: function (aVisitor) {
-    var self = this;
-    return smalltalk.send(aVisitor, "_visitIRAssigningInlinedSequence_", [self]);
-}
-}),
-smalltalk.IRAssigningInlinedSequence);
-
-smalltalk.addMethod(
-"_assignTo",
-smalltalk.method({
-selector: "assignTo",
-fn: function () {
-    var self = this;
-    return self['@assignTo'];
-}
-}),
-smalltalk.IRAssigningInlinedSequence);
-
-smalltalk.addMethod(
-"_assignTo_",
-smalltalk.method({
-selector: "assignTo:",
-fn: function (anIRInstruction) {
-    var self = this;
-    self['@assignTo'] = anIRInstruction;
-    return self;
-}
-}),
-smalltalk.IRAssigningInlinedSequence);
-
-
-
-smalltalk.addClass('IRReturningInlinedSequence', smalltalk.IRInlinedSequence, [], 'Compiler-Inlining');
-smalltalk.addMethod(
-"_accept_",
-smalltalk.method({
-selector: "accept:",
-fn: function (aVisitor) {
-    var self = this;
-    return smalltalk.send(aVisitor, "_visitIRReturningInlinedSequence_", [self]);
-}
-}),
-smalltalk.IRReturningInlinedSequence);
-
-
-
-smalltalk.addClass('IRNonLocalReturningInlinedSequence', smalltalk.IRReturningInlinedSequence, [], 'Compiler-Inlining');
-smalltalk.addMethod(
-"_accept_",
-smalltalk.method({
-selector: "accept:",
-fn: function (aVisitor) {
-    var self = this;
-    return smalltalk.send(aVisitor, "_visitIRNonLocalReturningInlinedSequence_", [self]);
-}
-}),
-smalltalk.IRNonLocalReturningInlinedSequence);
-
-
-
 smalltalk.addClass('IRInliner', smalltalk.IRVisitor, [], 'Compiler-Inlining');
 smalltalk.addMethod(
 "_assignmentInliner",
@@ -284,11 +225,12 @@ smalltalk.method({
 selector: "assignmentInliner",
 fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRAssignmentInliner || IRAssignmentInliner, "_new", []);
-    smalltalk.send($1, "_translator_", [self]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRAssignmentInliner || IRAssignmentInliner, "_new", []);
+    smalltalk.send($2, "_translator_", [self]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -299,11 +241,12 @@ smalltalk.method({
 selector: "nonLocalReturnInliner",
 fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRNonLocalReturnInliner || IRNonLocalReturnInliner, "_new", []);
-    smalltalk.send($1, "_translator_", [self]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRNonLocalReturnInliner || IRNonLocalReturnInliner, "_new", []);
+    smalltalk.send($2, "_translator_", [self]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -314,11 +257,12 @@ smalltalk.method({
 selector: "returnInliner",
 fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRReturnInliner || IRReturnInliner, "_new", []);
-    smalltalk.send($1, "_translator_", [self]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRReturnInliner || IRReturnInliner, "_new", []);
+    smalltalk.send($2, "_translator_", [self]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -329,11 +273,12 @@ smalltalk.method({
 selector: "sendInliner",
 fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_new", []);
-    smalltalk.send($1, "_translator_", [self]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_new", []);
+    smalltalk.send($2, "_translator_", [self]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -344,7 +289,9 @@ smalltalk.method({
 selector: "shouldInlineAssignment:",
 fn: function (anIRAssignment) {
     var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(anIRAssignment, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRAssignment, "_instructions", []), "_last", []), "_isSend", []), "_and_", [function () {return smalltalk.send(self, "_shouldInlineSend_", [smalltalk.send(smalltalk.send(anIRAssignment, "_instructions", []), "_last", [])]);}]);}]);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(anIRAssignment, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRAssignment, "_instructions", []), "_last", []), "_isSend", []), "_and_", [function () {return smalltalk.send(self, "_shouldInlineSend_", [smalltalk.send(smalltalk.send(anIRAssignment, "_instructions", []), "_last", [])]);}]);}]);
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -355,7 +302,9 @@ smalltalk.method({
 selector: "shouldInlineReturn:",
 fn: function (anIRReturn) {
     var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(anIRReturn, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_first", []), "_isSend", []), "_and_", [function () {return smalltalk.send(self, "_shouldInlineSend_", [smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_first", [])]);}]);}]);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(anIRReturn, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_first", []), "_isSend", []), "_and_", [function () {return smalltalk.send(self, "_shouldInlineSend_", [smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_first", [])]);}]);}]);
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -366,7 +315,9 @@ smalltalk.method({
 selector: "shouldInlineSend:",
 fn: function (anIRSend) {
     var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(anIRSend, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_shouldInline_", [anIRSend]);}]);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(anIRSend, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_shouldInline_", [anIRSend]);}]);
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -377,19 +328,21 @@ smalltalk.method({
 selector: "transformNonLocalReturn:",
 fn: function (anIRNonLocalReturn) {
     var self = this;
-    var $1, $2;
+    var $1, $2, $3, $4;
     var localReturn;
-    if (smalltalk.assert(smalltalk.send(smalltalk.send(anIRNonLocalReturn, "_scope", []), "_canInlineNonLocalReturns", []))) {
+    $1 = smalltalk.send(smalltalk.send(anIRNonLocalReturn, "_scope", []), "_canInlineNonLocalReturns", []);
+    if (smalltalk.assert($1)) {
         smalltalk.send(smalltalk.send(smalltalk.send(anIRNonLocalReturn, "_scope", []), "_methodScope", []), "_removeNonLocalReturn_", [smalltalk.send(anIRNonLocalReturn, "_scope", [])]);
-        $1 = smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);
-        smalltalk.send($1, "_scope_", [smalltalk.send(anIRNonLocalReturn, "_scope", [])]);
-        $2 = smalltalk.send($1, "_yourself", []);
-        localReturn = $2;
+        $2 = smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);
+        smalltalk.send($2, "_scope_", [smalltalk.send(anIRNonLocalReturn, "_scope", [])]);
+        $3 = smalltalk.send($2, "_yourself", []);
+        localReturn = $3;
         smalltalk.send(smalltalk.send(anIRNonLocalReturn, "_instructions", []), "_do_", [function (each) {return smalltalk.send(localReturn, "_add_", [each]);}]);
         smalltalk.send(anIRNonLocalReturn, "_replaceWith_", [localReturn]);
         return localReturn;
     }
-    return smalltalk.send(self, "_visitIRNonLocalReturn_", [anIRNonLocalReturn], smalltalk.IRVisitor);
+    $4 = smalltalk.send(self, "_visitIRNonLocalReturn_", [anIRNonLocalReturn], smalltalk.IRVisitor);
+    return $4;
 }
 }),
 smalltalk.IRInliner);
@@ -400,7 +353,14 @@ smalltalk.method({
 selector: "visitIRAssignment:",
 fn: function (anIRAssignment) {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_shouldInlineAssignment_", [anIRAssignment]), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_assignmentInliner", []), "_inlineAssignment_", [anIRAssignment]);}, function () {return smalltalk.send(self, "_visitIRAssignment_", [anIRAssignment], smalltalk.IRVisitor);}]);
+    var $2, $1;
+    $2 = smalltalk.send(self, "_shouldInlineAssignment_", [anIRAssignment]);
+    if (smalltalk.assert($2)) {
+        $1 = smalltalk.send(smalltalk.send(self, "_assignmentInliner", []), "_inlineAssignment_", [anIRAssignment]);
+    } else {
+        $1 = smalltalk.send(self, "_visitIRAssignment_", [anIRAssignment], smalltalk.IRVisitor);
+    }
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -411,7 +371,14 @@ smalltalk.method({
 selector: "visitIRNonLocalReturn:",
 fn: function (anIRNonLocalReturn) {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_shouldInlineReturn_", [anIRNonLocalReturn]), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_nonLocalReturnInliner", []), "_inlineReturn_", [anIRNonLocalReturn]);}, function () {return smalltalk.send(self, "_transformNonLocalReturn_", [anIRNonLocalReturn]);}]);
+    var $2, $1;
+    $2 = smalltalk.send(self, "_shouldInlineReturn_", [anIRNonLocalReturn]);
+    if (smalltalk.assert($2)) {
+        $1 = smalltalk.send(smalltalk.send(self, "_nonLocalReturnInliner", []), "_inlineReturn_", [anIRNonLocalReturn]);
+    } else {
+        $1 = smalltalk.send(self, "_transformNonLocalReturn_", [anIRNonLocalReturn]);
+    }
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -422,7 +389,14 @@ smalltalk.method({
 selector: "visitIRReturn:",
 fn: function (anIRReturn) {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_shouldInlineReturn_", [anIRReturn]), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_returnInliner", []), "_inlineReturn_", [anIRReturn]);}, function () {return smalltalk.send(self, "_visitIRReturn_", [anIRReturn], smalltalk.IRVisitor);}]);
+    var $2, $1;
+    $2 = smalltalk.send(self, "_shouldInlineReturn_", [anIRReturn]);
+    if (smalltalk.assert($2)) {
+        $1 = smalltalk.send(smalltalk.send(self, "_returnInliner", []), "_inlineReturn_", [anIRReturn]);
+    } else {
+        $1 = smalltalk.send(self, "_visitIRReturn_", [anIRReturn], smalltalk.IRVisitor);
+    }
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -433,7 +407,14 @@ smalltalk.method({
 selector: "visitIRSend:",
 fn: function (anIRSend) {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_shouldInlineSend_", [anIRSend]), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_sendInliner", []), "_inlineSend_", [anIRSend]);}, function () {return smalltalk.send(self, "_visitIRSend_", [anIRSend], smalltalk.IRVisitor);}]);
+    var $2, $1;
+    $2 = smalltalk.send(self, "_shouldInlineSend_", [anIRSend]);
+    if (smalltalk.assert($2)) {
+        $1 = smalltalk.send(smalltalk.send(self, "_sendInliner", []), "_inlineSend_", [anIRSend]);
+    } else {
+        $1 = smalltalk.send(self, "_visitIRSend_", [anIRSend], smalltalk.IRVisitor);
+    }
+    return $1;
 }
 }),
 smalltalk.IRInliner);
@@ -441,20 +422,6 @@ smalltalk.IRInliner);
 
 
 smalltalk.addClass('IRInliningJSTranslator', smalltalk.IRJSTranslator, [], 'Compiler-Inlining');
-smalltalk.addMethod(
-"_visitIRAssigningInlinedSequence_",
-smalltalk.method({
-selector: "visitIRAssigningInlinedSequence:",
-fn: function (anIRInlinedSequence) {
-    var self = this;
-    var $1, $2;
-    smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(self, "_visit_", [each]);}]);}]);
-    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", []), "_canBeAssigned", []), "_ifTrue_ifFalse_", [function () {$1 = smalltalk.send(self, "_stream", []);smalltalk.send($1, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_assignTo", []), "_variable", []), "_alias", [])]);$2 = smalltalk.send($1, "_nextPutAssignment", []);$2;return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}, function () {return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}]);}]);
-    return self;
-}
-}),
-smalltalk.IRInliningJSTranslator);
-
 smalltalk.addMethod(
 "_visitIRInlinedAssignment_",
 smalltalk.method({
@@ -576,32 +543,6 @@ fn: function (anIRInlinedSequence) {
 }),
 smalltalk.IRInliningJSTranslator);
 
-smalltalk.addMethod(
-"_visitIRNonLocalReturningInlinedSequence_",
-smalltalk.method({
-selector: "visitIRNonLocalReturningInlinedSequence:",
-fn: function (anIRInlinedSequence) {
-    var self = this;
-    smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(self, "_visit_", [each]);}]);}]);
-    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", []), "_canBeAssigned", []), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutNonLocalReturnWith_", [function () {return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}]);}, function () {return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}]);}]);
-    return self;
-}
-}),
-smalltalk.IRInliningJSTranslator);
-
-smalltalk.addMethod(
-"_visitIRReturningInlinedSequence_",
-smalltalk.method({
-selector: "visitIRReturningInlinedSequence:",
-fn: function (anIRInlinedSequence) {
-    var self = this;
-    smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(self, "_visit_", [each]);}]);}]);
-    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", []), "_canBeAssigned", []), "_ifTrue_ifFalse_", [function () {smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutReturn", []);return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}, function () {return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}]);}]);
-    return self;
-}
-}),
-smalltalk.IRInliningJSTranslator);
-
 
 
 smalltalk.addClass('IRSendInliner', smalltalk.Object, ['send', 'translator'], 'Compiler-Inlining');
@@ -611,7 +552,9 @@ smalltalk.method({
 selector: "ifFalse:",
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_", [smalltalk.send(smalltalk.IRInlinedIfFalse || IRInlinedIfFalse, "_new", []), anIRInstruction]);
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_", [smalltalk.send(smalltalk.IRInlinedIfFalse || IRInlinedIfFalse, "_new", []), anIRInstruction]);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -622,7 +565,9 @@ smalltalk.method({
 selector: "ifFalse:ifTrue:",
 fn: function (anIRInstruction, anotherIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_perform_withArguments_", [smalltalk.symbolFor("ifTrue:ifFalse:"), [anotherIRInstruction, anIRInstruction]]);
+    var $1;
+    $1 = smalltalk.send(self, "_perform_withArguments_", [smalltalk.symbolFor("ifTrue:ifFalse:"), [anotherIRInstruction, anIRInstruction]]);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -633,8 +578,16 @@ smalltalk.method({
 selector: "ifNil:",
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anIRInstruction, function ($rec) {smalltalk.send($rec, "_scope_", [smalltalk.send(smalltalk.send(anIRInstruction, "_scope", []), "_copy", [])]);smalltalk.send($rec, "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []))]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRClosure || IRClosure, "_new", []))]);
-    return self;
+    var $2, $3, $4, $5, $1;
+    $2 = smalltalk.send(smalltalk.IRClosure || IRClosure, "_new", []);
+    smalltalk.send($2, "_scope_", [smalltalk.send(smalltalk.send(anIRInstruction, "_scope", []), "_copy", [])]);
+    $3 = smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []);
+    smalltalk.send($3, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
+    $4 = smalltalk.send($3, "_yourself", []);
+    smalltalk.send($2, "_add_", [$4]);
+    $5 = smalltalk.send($2, "_yourself", []);
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anIRInstruction, $5]);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -645,8 +598,9 @@ smalltalk.method({
 selector: "ifNil:ifNotNil:",
 fn: function (anIRInstruction, anotherIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anIRInstruction, anotherIRInstruction]);
-    return self;
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anIRInstruction, anotherIRInstruction]);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -657,8 +611,16 @@ smalltalk.method({
 selector: "ifNotNil:",
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), function ($rec) {smalltalk.send($rec, "_scope_", [smalltalk.send(smalltalk.send(anIRInstruction, "_scope", []), "_copy", [])]);smalltalk.send($rec, "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []))]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRClosure || IRClosure, "_new", [])), anIRInstruction]);
-    return self;
+    var $2, $3, $4, $5, $1;
+    $2 = smalltalk.send(smalltalk.IRClosure || IRClosure, "_new", []);
+    smalltalk.send($2, "_scope_", [smalltalk.send(smalltalk.send(anIRInstruction, "_scope", []), "_copy", [])]);
+    $3 = smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []);
+    smalltalk.send($3, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
+    $4 = smalltalk.send($3, "_yourself", []);
+    smalltalk.send($2, "_add_", [$4]);
+    $5 = smalltalk.send($2, "_yourself", []);
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), $5, anIRInstruction]);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -669,8 +631,9 @@ smalltalk.method({
 selector: "ifNotNil:ifNil:",
 fn: function (anIRInstruction, anotherIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anotherIRInstruction, anIRInstruction]);
-    return self;
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anotherIRInstruction, anIRInstruction]);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -681,7 +644,9 @@ smalltalk.method({
 selector: "ifTrue:",
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_", [smalltalk.send(smalltalk.IRInlinedIfTrue || IRInlinedIfTrue, "_new", []), anIRInstruction]);
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_", [smalltalk.send(smalltalk.IRInlinedIfTrue || IRInlinedIfTrue, "_new", []), anIRInstruction]);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -692,7 +657,9 @@ smalltalk.method({
 selector: "ifTrue:ifFalse:",
 fn: function (anIRInstruction, anotherIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfTrueIfFalse || IRInlinedIfTrueIfFalse, "_new", []), anIRInstruction, anotherIRInstruction]);
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfTrueIfFalse || IRInlinedIfTrueIfFalse, "_new", []), anIRInstruction, anotherIRInstruction]);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -701,46 +668,20 @@ smalltalk.addMethod(
 "_inlineClosure_",
 smalltalk.method({
 selector: "inlineClosure:",
-fn: function (anIRClosure) {
-    var self = this;
-    var inlinedClosure = nil;
-    var sequence = nil;
-    var statements = nil;
-    inlinedClosure = smalltalk.send(self, "_inlinedClosure", []);
-    smalltalk.send(inlinedClosure, "_scope_", [smalltalk.send(anIRClosure, "_scope", [])]);
-    smalltalk.send(smalltalk.send(anIRClosure, "_instructions", []), "_do_", [function (each) {return ($receiver = smalltalk.send(each, "_isSequence", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(inlinedClosure, "_add_", [each]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(inlinedClosure, "_add_", [each]);}]);}]);
-    sequence = smalltalk.send(self, "_inlinedSequence", []);
-    smalltalk.send(inlinedClosure, "_add_", [sequence]);
-    statements = smalltalk.send(smalltalk.send(smalltalk.send(anIRClosure, "_instructions", []), "_last", []), "_instructions", []);
-    smalltalk.send(statements, "_ifNotEmpty_", [function () {smalltalk.send(smalltalk.send(statements, "_allButLast", []), "_do_", [function (each) {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [each])]);}]);return ($receiver = smalltalk.send(smalltalk.send(statements, "_last", []), "_isLocalReturn", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_instructions", []), "_first", [])])]);}() : function () {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(statements, "_last", [])])]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_instructions", []), "_first", [])])]);}, function () {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(statements, "_last", [])])]);}]);}]);
-    return inlinedClosure;
-    return self;
-}
-}),
-smalltalk.IRSendInliner);
-
-smalltalk.addMethod(
-"_inlineMessageBlock_with_",
-smalltalk.method({
-selector: "inlineMessageBlock:with:",
-fn: function (anIRInstruction, anotherIRInstruction) {
-    var self = this;
-    var $1;
-    var inlinedSend;
-    var inlinedClosure;
-    if (!smalltalk.assert(smalltalk.send(anIRInstruction, "_isClosure", []))) {
-        smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0]))) {
-        smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);
-    }
-    inlinedClosure = smalltalk.send(self, "_inlineClosure_", [anIRInstruction]);
-    inlinedSend = anotherIRInstruction;
-    smalltalk.send(inlinedSend, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
-    $1 = smalltalk.send(inlinedSend, "_add_", [inlinedClosure]);
-    smalltalk.send(smalltalk.send(self, "_send", []), "_replaceWith_", [inlinedSend]);
-    return inlinedSend;
-}
+fn: function (anIRClosure){
+var self=this;
+var inlinedClosure=nil;
+var sequence=nil;
+var statements=nil;
+(inlinedClosure=smalltalk.send(self, "_inlinedClosure", []));
+smalltalk.send(inlinedClosure, "_scope_", [smalltalk.send(anIRClosure, "_scope", [])]);
+smalltalk.send(smalltalk.send(anIRClosure, "_instructions", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(each, "_isSequence", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(inlinedClosure, "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(inlinedClosure, "_add_", [each]);})]));})]);
+(sequence=smalltalk.send(self, "_inlinedSequence", []));
+smalltalk.send(inlinedClosure, "_add_", [sequence]);
+(statements=smalltalk.send(smalltalk.send(smalltalk.send(anIRClosure, "_instructions", []), "_last", []), "_instructions", []));
+smalltalk.send(statements, "_ifNotEmpty_", [(function(){smalltalk.send(smalltalk.send(statements, "_allButLast", []), "_do_", [(function(each){return smalltalk.send(sequence, "_add_", [each]);})]);return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_isReturn", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(statements, "_last", []), "_isBlockReturn", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_instructions", []), "_first", [])]);})() : (function(){return smalltalk.send(sequence, "_add_", [smalltalk.send(statements, "_last", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_instructions", []), "_first", [])]);}), (function(){return smalltalk.send(sequence, "_add_", [smalltalk.send(statements, "_last", [])]);})]));})]);
+return inlinedClosure;
+return self;}
 }),
 smalltalk.IRSendInliner);
 
@@ -752,6 +693,7 @@ fn: function (anIRSend) {
     var self = this;
     smalltalk.send(self, "_send_", [anIRSend]);
     return smalltalk.send(self, "_perform_withArguments_", [smalltalk.send(smalltalk.send(self, "_send", []), "_selector", []), smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_allButFirst", [])]);
+    return self;
 }
 }),
 smalltalk.IRSendInliner);
@@ -762,7 +704,9 @@ smalltalk.method({
 selector: "inlinedClosure",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInlinedClosure || IRInlinedClosure, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInlinedClosure || IRInlinedClosure, "_new", []);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -773,19 +717,14 @@ smalltalk.method({
 selector: "inlinedSend:with:",
 fn: function (inlinedSend, anIRInstruction) {
     var self = this;
-    var $1;
-    var inlinedClosure;
-    if (!smalltalk.assert(smalltalk.send(anIRInstruction, "_isClosure", []))) {
-        smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0]))) {
-        smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);
-    }
-    inlinedClosure = smalltalk.send(self, "_inlineClosure_", [anIRInstruction]);
-    smalltalk.send(inlinedSend, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
-    $1 = smalltalk.send(inlinedSend, "_add_", [inlinedClosure]);
+    var inlinedClosure = nil;
+    ($receiver = smalltalk.send(anIRInstruction, "_isClosure", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}]);
+    ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}]);
+    inlinedClosure = smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(self, "_inlineClosure_", [anIRInstruction])]);
+    (function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);return smalltalk.send($rec, "_add_", [inlinedClosure]);}(inlinedSend));
     smalltalk.send(smalltalk.send(self, "_send", []), "_replaceWith_", [inlinedSend]);
     return inlinedSend;
+    return self;
 }
 }),
 smalltalk.IRSendInliner);
@@ -796,28 +735,18 @@ smalltalk.method({
 selector: "inlinedSend:with:with:",
 fn: function (inlinedSend, anIRInstruction, anotherIRInstruction) {
     var self = this;
-    var $1;
-    var inlinedClosure1;
-    var inclinedClosure2;
-    if (!smalltalk.assert(smalltalk.send(anIRInstruction, "_isClosure", []))) {
-        smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0]))) {
-        smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(anotherIRInstruction, "_isClosure", []))) {
-        smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(smalltalk.send(anotherIRInstruction, "_arguments", []), "_size", []), "__eq", [0]))) {
-        smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);
-    }
-    inlinedClosure = smalltalk.send(self, "_inlineClosure_", [anIRInstruction]);
-    inlinedClosure2 = smalltalk.send(self, "_inlineClosure_", [anotherIRInstruction]);
-    smalltalk.send(inlinedSend, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
-    smalltalk.send(inlinedSend, "_add_", [inlinedClosure]);
-    $1 = smalltalk.send(inlinedSend, "_add_", [inlinedClosure2]);
+    var inlinedClosure1 = nil;
+    var inlinedClosure2 = nil;
+    ($receiver = smalltalk.send(anIRInstruction, "_isClosure", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}]);
+    ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}]);
+    ($receiver = smalltalk.send(anotherIRInstruction, "_isClosure", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}]);
+    ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(anotherIRInstruction, "_arguments", []), "_size", []), "__eq", [0])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}]);
+    inlinedClosure1 = smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(self, "_inlineClosure_", [anIRInstruction])]);
+    inlinedClosure2 = smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(self, "_inlineClosure_", [anotherIRInstruction])]);
+    (function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);smalltalk.send($rec, "_add_", [inlinedClosure1]);return smalltalk.send($rec, "_add_", [inlinedClosure2]);}(inlinedSend));
     smalltalk.send(smalltalk.send(self, "_send", []), "_replaceWith_", [inlinedSend]);
     return inlinedSend;
+    return self;
 }
 }),
 smalltalk.IRSendInliner);
@@ -828,7 +757,9 @@ smalltalk.method({
 selector: "inlinedSequence",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInlinedSequence || IRInlinedSequence, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInlinedSequence || IRInlinedSequence, "_new", []);
+    return $1;
 }
 }),
 smalltalk.IRSendInliner);
@@ -899,7 +830,6 @@ selector: "inlinedSelectors",
 fn: function () {
     var self = this;
     return ["ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:", "ifNil:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil"];
-    return self;
 }
 }),
 smalltalk.IRSendInliner.klass);
@@ -910,12 +840,14 @@ smalltalk.method({
 selector: "shouldInline:",
 fn: function (anIRInstruction) {
     var self = this;
+    var $1, $2;
     var $early = {};
     try {
-        if (!smalltalk.assert(smalltalk.send(smalltalk.send(self, "_inlinedSelectors", []), "_includes_", [smalltalk.send(anIRInstruction, "_selector", [])]))) {
+        $1 = smalltalk.send(smalltalk.send(self, "_inlinedSelectors", []), "_includes_", [smalltalk.send(anIRInstruction, "_selector", [])]);
+        if (!smalltalk.assert($1)) {
             return false;
         }
-        smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_instructions", []), "_allButFirst", []), "_do_", [function (each) {if (!smalltalk.assert(smalltalk.send(each, "_isClosure", []))) {throw $early = [false];}}]);
+        smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_instructions", []), "_allButFirst", []), "_do_", [function (each) {$2 = smalltalk.send(each, "_isClosure", []);if (!smalltalk.assert($2)) {throw $early = [false];}}]);
         return true;
     } catch (e) {
         if (e === $early) {
@@ -970,38 +902,36 @@ fn: function (anIRAssignment) {
 smalltalk.IRAssignmentInliner);
 
 smalltalk.addMethod(
-"_inlinedSequence",
+"_inlineClosure_",
 smalltalk.method({
-selector: "inlinedSequence",
-fn: function () {
+selector: "inlineClosure:",
+fn: function (anIRClosure) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRAssigningInlinedSequence || IRAssigningInlinedSequence, "_new", []);
-    smalltalk.send($1, "_assignTo_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_assignment", []), "_instructions", []), "_first", [])]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var inlinedClosure = nil;
+    var statements = nil;
+    inlinedClosure = smalltalk.send(self, "_inlineClosure_", [anIRClosure], smalltalk.IRAssignmentInliner.superclass || nil);
+    statements = smalltalk.send(smalltalk.send(smalltalk.send(inlinedClosure, "_instructions", []), "_last", []), "_instructions", []);
+    smalltalk.send(statements, "_ifNotEmpty_", [function () {return ($receiver = smalltalk.send(smalltalk.send(statements, "_last", []), "_canBeAssigned", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(smalltalk.send(statements, "_last", []), "_replaceWith_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_assignment", []), "_instructions", []), "_first", [])]);smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(statements, "_last", []), "_copy", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []))]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(smalltalk.send(statements, "_last", []), "_replaceWith_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_assignment", []), "_instructions", []), "_first", [])]);smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(statements, "_last", []), "_copy", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []))]);}]);}]);
+    return inlinedClosure;
+    return self;
 }
 }),
 smalltalk.IRAssignmentInliner);
 
 
 
-smalltalk.addClass('IRReturnInliner', smalltalk.IRSendInliner, [], 'Compiler-Inlining');
+smalltalk.addClass('IRNonLocalReturnInliner', smalltalk.IRSendInliner, [], 'Compiler-Inlining');
 smalltalk.addMethod(
-"_inlineReturn_",
+"_inlineClosure_",
 smalltalk.method({
-selector: "inlineReturn:",
-fn: function (anIRReturn) {
+selector: "inlineClosure:",
+fn: function (anIRClosure) {
     var self = this;
-    var return_;
-    return_ = smalltalk.send(self, "_inlinedReturn", []);
-    smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_do_", [function (each) {return smalltalk.send(return_, "_add_", [each]);}]);
-    smalltalk.send(anIRReturn, "_replaceWith_", [return_]);
-    smalltalk.send(self, "_inlineSend_", [smalltalk.send(smalltalk.send(return_, "_instructions", []), "_last", [])]);
-    return return_;
+    return smalltalk.send(self, "_inlineCLosure_", [anIRClosure], smalltalk.IRNonLocalReturnInliner.superclass || nil);
+    return self;
 }
 }),
-smalltalk.IRReturnInliner);
+smalltalk.IRNonLocalReturnInliner);
 
 smalltalk.addMethod(
 "_inlinedReturn",
@@ -1009,47 +939,62 @@ smalltalk.method({
 selector: "inlinedReturn",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInlinedReturn || IRInlinedReturn, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInlinedNonLocalReturn || IRInlinedNonLocalReturn, "_new", []);
+    return $1;
 }
 }),
-smalltalk.IRReturnInliner);
+smalltalk.IRNonLocalReturnInliner);
 
+
+
+smalltalk.addClass('IRReturnInliner', smalltalk.IRSendInliner, [], 'Compiler-Inlining');
 smalltalk.addMethod(
-"_inlinedSequence",
+"_inlineClosure_",
 smalltalk.method({
-selector: "inlinedSequence",
-fn: function () {
+selector: "inlineClosure:",
+fn: function (anIRClosure) {
     var self = this;
-    return smalltalk.send(smalltalk.IRReturningInlinedSequence || IRReturningInlinedSequence, "_new", []);
+    var closure = nil;
+    var statements = nil;
+    closure = smalltalk.send(self, "_inlineClosure_", [anIRClosure], smalltalk.IRReturnInliner.superclass || nil);
+    statements = smalltalk.send(smalltalk.send(smalltalk.send(closure, "_instructions", []), "_last", []), "_instructions", []);
+    smalltalk.send(statements, "_ifNotEmpty_", [function () {return ($receiver = smalltalk.send(smalltalk.send(statements, "_last", []), "_isReturn", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(smalltalk.send(statements, "_last", []), "_replaceWith_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(statements, "_last", []), "_copy", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []))]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(smalltalk.send(statements, "_last", []), "_replaceWith_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(statements, "_last", []), "_copy", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []))]);}]);}]);
+    return closure;
+    return self;
 }
 }),
 smalltalk.IRReturnInliner);
 
-
-
-smalltalk.addClass('IRNonLocalReturnInliner', smalltalk.IRReturnInliner, [], 'Compiler-Inlining');
 smalltalk.addMethod(
-"_inlinedReturn",
+"_inlineReturn_",
 smalltalk.method({
-selector: "inlinedReturn",
-fn: function () {
+selector: "inlineReturn:",
+fn: function (anIRReturn) {
     var self = this;
-    return smalltalk.send(smalltalk.IRInlinedNonLocalReturn || IRInlinedNonLocalReturn, "_new", []);
+    var return_ = nil;
+    return_ = smalltalk.send(self, "_inlinedReturn", []);
+    smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_do_", [function (each) {return smalltalk.send(return_, "_add_", [each]);}]);
+    smalltalk.send(anIRReturn, "_replaceWith_", [return_]);
+    smalltalk.send(self, "_inlineSend_", [smalltalk.send(smalltalk.send(return_, "_instructions", []), "_last", [])]);
+    return return_;
+    return self;
 }
 }),
-smalltalk.IRNonLocalReturnInliner);
+smalltalk.IRReturnInliner);
 
 smalltalk.addMethod(
-"_inlinedSequence",
+"_inlinedReturn",
 smalltalk.method({
-selector: "inlinedSequence",
+selector: "inlinedReturn",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRNonLocalReturningInlinedSequence ||
-        IRNonLocalReturningInlinedSequence, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInlinedReturn || IRInlinedReturn, "_new", []);
+    return $1;
 }
 }),
-smalltalk.IRNonLocalReturnInliner);
+smalltalk.IRReturnInliner);
 
 
 
@@ -1060,16 +1005,13 @@ smalltalk.method({
 selector: "compileNode:",
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    var ir;
-    var stream;
+    var ir = nil;
+    var stream = nil;
     smalltalk.send(smalltalk.send(self, "_semanticAnalyzer", []), "_visit_", [aNode]);
     ir = smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [aNode]);
     smalltalk.send(smalltalk.send(self, "_inliner", []), "_visit_", [ir]);
-    $1 = smalltalk.send(self, "_irTranslator", []);
-    smalltalk.send($1, "_visit_", [ir]);
-    $2 = smalltalk.send($1, "_contents", []);
-    return $2;
+    return function ($rec) {smalltalk.send($rec, "_visit_", [ir]);return smalltalk.send($rec, "_contents", []);}(smalltalk.send(self, "_irTranslator", []));
+    return self;
 }
 }),
 smalltalk.InliningCodeGenerator);
@@ -1080,7 +1022,9 @@ smalltalk.method({
 selector: "inliner",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInliner || IRInliner, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInliner || IRInliner, "_new", []);
+    return $1;
 }
 }),
 smalltalk.InliningCodeGenerator);
@@ -1091,7 +1035,9 @@ smalltalk.method({
 selector: "irTranslator",
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInliningJSTranslator || IRInliningJSTranslator, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInliningJSTranslator || IRInliningJSTranslator, "_new", []);
+    return $1;
 }
 }),
 smalltalk.InliningCodeGenerator);

+ 258 - 357
js/Compiler-Inlining.js

@@ -8,7 +8,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRInlinedAssignment_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRInlinedAssignment_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedAssignment: self",
@@ -81,7 +83,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRInlinedReturn_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRInlinedReturn_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedReturn: self",
@@ -117,7 +121,9 @@ selector: "accept:",
 category: 'visiting',
 fn: function (aVisitor) {
     var self = this;
-    return smalltalk.send(aVisitor, "_visitIRInlinedNonLocalReturn_", [self]);
+    var $1;
+    $1 = smalltalk.send(aVisitor, "_visitIRInlinedNonLocalReturn_", [self]);
+    return $1;
 },
 args: ["aVisitor"],
 source: "accept: aVisitor\x0a\x09^ aVisitor visitIRInlinedNonLocalReturn: self",
@@ -298,96 +304,6 @@ smalltalk.IRInlinedSequence);
 
 
 
-smalltalk.addClass('IRAssigningInlinedSequence', smalltalk.IRInlinedSequence, ['assignTo'], 'Compiler-Inlining');
-smalltalk.addMethod(
-"_accept_",
-smalltalk.method({
-selector: "accept:",
-category: 'accessing',
-fn: function (aVisitor) {
-    var self = this;
-    return smalltalk.send(aVisitor, "_visitIRAssigningInlinedSequence_", [self]);
-},
-args: ["aVisitor"],
-source: "accept: aVisitor\x0a\x09^ aVisitor visitIRAssigningInlinedSequence: self",
-messageSends: ["visitIRAssigningInlinedSequence:"],
-referencedClasses: []
-}),
-smalltalk.IRAssigningInlinedSequence);
-
-smalltalk.addMethod(
-"_assignTo",
-smalltalk.method({
-selector: "assignTo",
-category: 'accessing',
-fn: function () {
-    var self = this;
-    return self['@assignTo'];
-},
-args: [],
-source: "assignTo\x0a\x09^ assignTo",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.IRAssigningInlinedSequence);
-
-smalltalk.addMethod(
-"_assignTo_",
-smalltalk.method({
-selector: "assignTo:",
-category: 'accessing',
-fn: function (anIRInstruction) {
-    var self = this;
-    self['@assignTo'] = anIRInstruction;
-    return self;
-},
-args: ["anIRInstruction"],
-source: "assignTo: anIRInstruction\x0a\x09assignTo := anIRInstruction",
-messageSends: [],
-referencedClasses: []
-}),
-smalltalk.IRAssigningInlinedSequence);
-
-
-
-smalltalk.addClass('IRReturningInlinedSequence', smalltalk.IRInlinedSequence, [], 'Compiler-Inlining');
-smalltalk.addMethod(
-"_accept_",
-smalltalk.method({
-selector: "accept:",
-category: 'visiting',
-fn: function (aVisitor) {
-    var self = this;
-    return smalltalk.send(aVisitor, "_visitIRReturningInlinedSequence_", [self]);
-},
-args: ["aVisitor"],
-source: "accept: aVisitor\x0a\x09^ aVisitor visitIRReturningInlinedSequence: self",
-messageSends: ["visitIRReturningInlinedSequence:"],
-referencedClasses: []
-}),
-smalltalk.IRReturningInlinedSequence);
-
-
-
-smalltalk.addClass('IRNonLocalReturningInlinedSequence', smalltalk.IRReturningInlinedSequence, [], 'Compiler-Inlining');
-smalltalk.addMethod(
-"_accept_",
-smalltalk.method({
-selector: "accept:",
-category: 'visiting',
-fn: function (aVisitor) {
-    var self = this;
-    return smalltalk.send(aVisitor, "_visitIRNonLocalReturningInlinedSequence_", [self]);
-},
-args: ["aVisitor"],
-source: "accept: aVisitor\x0a\x09^ aVisitor visitIRNonLocalReturningInlinedSequence: self",
-messageSends: ["visitIRNonLocalReturningInlinedSequence:"],
-referencedClasses: []
-}),
-smalltalk.IRNonLocalReturningInlinedSequence);
-
-
-
 smalltalk.addClass('IRInliner', smalltalk.IRVisitor, [], 'Compiler-Inlining');
 smalltalk.IRInliner.comment="I visit an IR tree, inlining message sends and block closures.\x0a\x0aMessage selectors that can be inlined are answered by `IRSendInliner >> #inlinedSelectors`"
 smalltalk.addMethod(
@@ -397,11 +313,12 @@ selector: "assignmentInliner",
 category: 'factory',
 fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRAssignmentInliner || IRAssignmentInliner, "_new", []);
-    smalltalk.send($1, "_translator_", [self]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRAssignmentInliner || IRAssignmentInliner, "_new", []);
+    smalltalk.send($2, "_translator_", [self]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: [],
 source: "assignmentInliner\x0a\x09^ IRAssignmentInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
@@ -417,11 +334,12 @@ selector: "nonLocalReturnInliner",
 category: 'factory',
 fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRNonLocalReturnInliner || IRNonLocalReturnInliner, "_new", []);
-    smalltalk.send($1, "_translator_", [self]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRNonLocalReturnInliner || IRNonLocalReturnInliner, "_new", []);
+    smalltalk.send($2, "_translator_", [self]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: [],
 source: "nonLocalReturnInliner\x0a\x09^ IRNonLocalReturnInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
@@ -437,11 +355,12 @@ selector: "returnInliner",
 category: 'factory',
 fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRReturnInliner || IRReturnInliner, "_new", []);
-    smalltalk.send($1, "_translator_", [self]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRReturnInliner || IRReturnInliner, "_new", []);
+    smalltalk.send($2, "_translator_", [self]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: [],
 source: "returnInliner\x0a\x09^ IRReturnInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
@@ -457,11 +376,12 @@ selector: "sendInliner",
 category: 'factory',
 fn: function () {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_new", []);
-    smalltalk.send($1, "_translator_", [self]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var $2, $3, $1;
+    $2 = smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_new", []);
+    smalltalk.send($2, "_translator_", [self]);
+    $3 = smalltalk.send($2, "_yourself", []);
+    $1 = $3;
+    return $1;
 },
 args: [],
 source: "sendInliner\x0a\x09^ IRSendInliner new \x0a\x09\x09translator: self;\x0a\x09\x09yourself",
@@ -477,7 +397,9 @@ selector: "shouldInlineAssignment:",
 category: 'testing',
 fn: function (anIRAssignment) {
     var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(anIRAssignment, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRAssignment, "_instructions", []), "_last", []), "_isSend", []), "_and_", [function () {return smalltalk.send(self, "_shouldInlineSend_", [smalltalk.send(smalltalk.send(anIRAssignment, "_instructions", []), "_last", [])]);}]);}]);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(anIRAssignment, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRAssignment, "_instructions", []), "_last", []), "_isSend", []), "_and_", [function () {return smalltalk.send(self, "_shouldInlineSend_", [smalltalk.send(smalltalk.send(anIRAssignment, "_instructions", []), "_last", [])]);}]);}]);
+    return $1;
 },
 args: ["anIRAssignment"],
 source: "shouldInlineAssignment: anIRAssignment\x0a\x09^ anIRAssignment isInlined not and: [ \x0a\x09\x09anIRAssignment instructions last isSend and: [\x09\x0a\x09\x09\x09self shouldInlineSend: (anIRAssignment instructions last) ]]",
@@ -493,7 +415,9 @@ selector: "shouldInlineReturn:",
 category: 'testing',
 fn: function (anIRReturn) {
     var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(anIRReturn, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_first", []), "_isSend", []), "_and_", [function () {return smalltalk.send(self, "_shouldInlineSend_", [smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_first", [])]);}]);}]);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(anIRReturn, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_first", []), "_isSend", []), "_and_", [function () {return smalltalk.send(self, "_shouldInlineSend_", [smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_first", [])]);}]);}]);
+    return $1;
 },
 args: ["anIRReturn"],
 source: "shouldInlineReturn: anIRReturn\x0a\x09^ anIRReturn isInlined not and: [ \x0a\x09\x09anIRReturn instructions first isSend and: [\x09\x0a\x09\x09\x09self shouldInlineSend: (anIRReturn instructions first) ]]",
@@ -509,7 +433,9 @@ selector: "shouldInlineSend:",
 category: 'testing',
 fn: function (anIRSend) {
     var self = this;
-    return smalltalk.send(smalltalk.send(smalltalk.send(anIRSend, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_shouldInline_", [anIRSend]);}]);
+    var $1;
+    $1 = smalltalk.send(smalltalk.send(smalltalk.send(anIRSend, "_isInlined", []), "_not", []), "_and_", [function () {return smalltalk.send(smalltalk.IRSendInliner || IRSendInliner, "_shouldInline_", [anIRSend]);}]);
+    return $1;
 },
 args: ["anIRSend"],
 source: "shouldInlineSend: anIRSend\x0a\x09^ anIRSend isInlined not and: [\x0a\x09\x09IRSendInliner shouldInline: anIRSend ]",
@@ -525,19 +451,21 @@ selector: "transformNonLocalReturn:",
 category: 'visiting',
 fn: function (anIRNonLocalReturn) {
     var self = this;
-    var $1, $2;
+    var $1, $2, $3, $4;
     var localReturn;
-    if (smalltalk.assert(smalltalk.send(smalltalk.send(anIRNonLocalReturn, "_scope", []), "_canInlineNonLocalReturns", []))) {
+    $1 = smalltalk.send(smalltalk.send(anIRNonLocalReturn, "_scope", []), "_canInlineNonLocalReturns", []);
+    if (smalltalk.assert($1)) {
         smalltalk.send(smalltalk.send(smalltalk.send(anIRNonLocalReturn, "_scope", []), "_methodScope", []), "_removeNonLocalReturn_", [smalltalk.send(anIRNonLocalReturn, "_scope", [])]);
-        $1 = smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);
-        smalltalk.send($1, "_scope_", [smalltalk.send(anIRNonLocalReturn, "_scope", [])]);
-        $2 = smalltalk.send($1, "_yourself", []);
-        localReturn = $2;
+        $2 = smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []);
+        smalltalk.send($2, "_scope_", [smalltalk.send(anIRNonLocalReturn, "_scope", [])]);
+        $3 = smalltalk.send($2, "_yourself", []);
+        localReturn = $3;
         smalltalk.send(smalltalk.send(anIRNonLocalReturn, "_instructions", []), "_do_", [function (each) {return smalltalk.send(localReturn, "_add_", [each]);}]);
         smalltalk.send(anIRNonLocalReturn, "_replaceWith_", [localReturn]);
         return localReturn;
     }
-    return smalltalk.send(self, "_visitIRNonLocalReturn_", [anIRNonLocalReturn], smalltalk.IRVisitor);
+    $4 = smalltalk.send(self, "_visitIRNonLocalReturn_", [anIRNonLocalReturn], smalltalk.IRVisitor);
+    return $4;
 },
 args: ["anIRNonLocalReturn"],
 source: "transformNonLocalReturn: anIRNonLocalReturn\x0a\x09\x22Replace a non local return into a local return\x22\x0a\x0a\x09| localReturn |\x0a\x09anIRNonLocalReturn scope canInlineNonLocalReturns ifTrue: [\x0a\x09\x09anIRNonLocalReturn scope methodScope removeNonLocalReturn: anIRNonLocalReturn scope.\x0a\x09\x09localReturn := IRReturn new\x0a\x09\x09\x09scope: anIRNonLocalReturn scope;\x0a\x09\x09\x09yourself.\x0a\x09\x09anIRNonLocalReturn instructions do: [ :each |\x0a\x09\x09\x09localReturn add: each ].\x0a\x09\x09anIRNonLocalReturn replaceWith: localReturn.\x0a\x09\x09^ localReturn ].\x0a\x09^ super visitIRNonLocalReturn: anIRNonLocalReturn",
@@ -553,7 +481,14 @@ selector: "visitIRAssignment:",
 category: 'visiting',
 fn: function (anIRAssignment) {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_shouldInlineAssignment_", [anIRAssignment]), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_assignmentInliner", []), "_inlineAssignment_", [anIRAssignment]);}, function () {return smalltalk.send(self, "_visitIRAssignment_", [anIRAssignment], smalltalk.IRVisitor);}]);
+    var $2, $1;
+    $2 = smalltalk.send(self, "_shouldInlineAssignment_", [anIRAssignment]);
+    if (smalltalk.assert($2)) {
+        $1 = smalltalk.send(smalltalk.send(self, "_assignmentInliner", []), "_inlineAssignment_", [anIRAssignment]);
+    } else {
+        $1 = smalltalk.send(self, "_visitIRAssignment_", [anIRAssignment], smalltalk.IRVisitor);
+    }
+    return $1;
 },
 args: ["anIRAssignment"],
 source: "visitIRAssignment: anIRAssignment\x0a\x09^ (self shouldInlineAssignment: anIRAssignment) \x0a\x09\x09ifTrue: [ self assignmentInliner inlineAssignment: anIRAssignment ]\x0a\x09\x09ifFalse: [ super visitIRAssignment: anIRAssignment ]",
@@ -569,7 +504,14 @@ selector: "visitIRNonLocalReturn:",
 category: 'visiting',
 fn: function (anIRNonLocalReturn) {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_shouldInlineReturn_", [anIRNonLocalReturn]), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_nonLocalReturnInliner", []), "_inlineReturn_", [anIRNonLocalReturn]);}, function () {return smalltalk.send(self, "_transformNonLocalReturn_", [anIRNonLocalReturn]);}]);
+    var $2, $1;
+    $2 = smalltalk.send(self, "_shouldInlineReturn_", [anIRNonLocalReturn]);
+    if (smalltalk.assert($2)) {
+        $1 = smalltalk.send(smalltalk.send(self, "_nonLocalReturnInliner", []), "_inlineReturn_", [anIRNonLocalReturn]);
+    } else {
+        $1 = smalltalk.send(self, "_transformNonLocalReturn_", [anIRNonLocalReturn]);
+    }
+    return $1;
 },
 args: ["anIRNonLocalReturn"],
 source: "visitIRNonLocalReturn: anIRNonLocalReturn\x0a\x09^ (self shouldInlineReturn: anIRNonLocalReturn) \x0a\x09\x09ifTrue: [ self nonLocalReturnInliner inlineReturn: anIRNonLocalReturn ]\x0a\x09\x09ifFalse: [ self transformNonLocalReturn: anIRNonLocalReturn ]",
@@ -585,7 +527,14 @@ selector: "visitIRReturn:",
 category: 'visiting',
 fn: function (anIRReturn) {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_shouldInlineReturn_", [anIRReturn]), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_returnInliner", []), "_inlineReturn_", [anIRReturn]);}, function () {return smalltalk.send(self, "_visitIRReturn_", [anIRReturn], smalltalk.IRVisitor);}]);
+    var $2, $1;
+    $2 = smalltalk.send(self, "_shouldInlineReturn_", [anIRReturn]);
+    if (smalltalk.assert($2)) {
+        $1 = smalltalk.send(smalltalk.send(self, "_returnInliner", []), "_inlineReturn_", [anIRReturn]);
+    } else {
+        $1 = smalltalk.send(self, "_visitIRReturn_", [anIRReturn], smalltalk.IRVisitor);
+    }
+    return $1;
 },
 args: ["anIRReturn"],
 source: "visitIRReturn: anIRReturn\x0a\x09^ (self shouldInlineReturn: anIRReturn) \x0a\x09\x09ifTrue: [ self returnInliner inlineReturn: anIRReturn ]\x0a\x09\x09ifFalse: [ super visitIRReturn: anIRReturn ]",
@@ -601,7 +550,14 @@ selector: "visitIRSend:",
 category: 'visiting',
 fn: function (anIRSend) {
     var self = this;
-    return smalltalk.send(smalltalk.send(self, "_shouldInlineSend_", [anIRSend]), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_sendInliner", []), "_inlineSend_", [anIRSend]);}, function () {return smalltalk.send(self, "_visitIRSend_", [anIRSend], smalltalk.IRVisitor);}]);
+    var $2, $1;
+    $2 = smalltalk.send(self, "_shouldInlineSend_", [anIRSend]);
+    if (smalltalk.assert($2)) {
+        $1 = smalltalk.send(smalltalk.send(self, "_sendInliner", []), "_inlineSend_", [anIRSend]);
+    } else {
+        $1 = smalltalk.send(self, "_visitIRSend_", [anIRSend], smalltalk.IRVisitor);
+    }
+    return $1;
 },
 args: ["anIRSend"],
 source: "visitIRSend: anIRSend\x0a\x09^ (self shouldInlineSend: anIRSend)\x0a\x09\x09ifTrue: [ self sendInliner inlineSend: anIRSend ]\x0a\x09\x09ifFalse: [ super visitIRSend: anIRSend ]",
@@ -614,25 +570,6 @@ smalltalk.IRInliner);
 
 smalltalk.addClass('IRInliningJSTranslator', smalltalk.IRJSTranslator, [], 'Compiler-Inlining');
 smalltalk.IRInliningJSTranslator.comment="I am a specialized JavaScript translator able to write inlined IR instructions to JavaScript stream (`JSStream` instance)."
-smalltalk.addMethod(
-"_visitIRAssigningInlinedSequence_",
-smalltalk.method({
-selector: "visitIRAssigningInlinedSequence:",
-category: 'visiting',
-fn: function (anIRInlinedSequence) {
-    var self = this;
-    var $1, $2;
-    smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(self, "_visit_", [each]);}]);}]);
-    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", []), "_canBeAssigned", []), "_ifTrue_ifFalse_", [function () {$1 = smalltalk.send(self, "_stream", []);smalltalk.send($1, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_assignTo", []), "_variable", []), "_alias", [])]);$2 = smalltalk.send($1, "_nextPutAssignment", []);$2;return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}, function () {return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}]);}]);
-    return self;
-},
-args: ["anIRInlinedSequence"],
-source: "visitIRAssigningInlinedSequence: anIRInlinedSequence\x0a\x0a\x09anIRInlinedSequence instructions allButLast do: [ :each | \x0a\x09\x09self stream nextPutStatementWith: [ self visit: each ]].\x0a\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09anIRInlinedSequence instructions last canBeAssigned \x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09self stream \x0a\x09\x09\x09\x09\x09nextPutAll: anIRInlinedSequence assignTo variable alias;\x0a                                \x09nextPutAssignment.\x0a\x09\x09\x09\x09self visit: anIRInlinedSequence instructions last ]\x0a\x09\x09\x09ifFalse: [ self visit: anIRInlinedSequence instructions last ]]",
-messageSends: ["do:", "nextPutStatementWith:", "visit:", "stream", "allButLast", "instructions", "ifTrue:ifFalse:", "nextPutAll:", "alias", "variable", "assignTo", "nextPutAssignment", "last", "canBeAssigned"],
-referencedClasses: []
-}),
-smalltalk.IRInliningJSTranslator);
-
 smalltalk.addMethod(
 "_visitIRInlinedAssignment_",
 smalltalk.method({
@@ -713,7 +650,7 @@ fn: function (anIRInlinedIfNilIfNotNil) {
 },
 args: ["anIRInlinedIfNilIfNotNil"],
 source: "visitIRInlinedIfNilIfNotNil: anIRInlinedIfNilIfNotNil\x0a\x09self stream \x0a\x09\x09nextPutIfElse: [ \x0a\x09\x09\x09self stream nextPutAll: '($receiver = '. \x0a\x09\x09\x09self visit: anIRInlinedIfNilIfNotNil instructions first.\x0a\x09\x09\x09self stream nextPutAll: ') == nil || $receiver == undefined' ]\x0a\x09\x09with: [ self visit: anIRInlinedIfNilIfNotNil instructions second ]\x0a\x09\x09with: [ self visit: anIRInlinedIfNilIfNotNil instructions third ]",
-messageSends: ["nextPutIfElse:with:with:", "stream", "nextPutAll:", "visit:", "first", "instructions", "second", "third"],
+messageSends: ["nextPutIfElse:with:with:", "nextPutAll:", "stream", "visit:", "first", "instructions", "second", "third"],
 referencedClasses: []
 }),
 smalltalk.IRInliningJSTranslator);
@@ -804,42 +741,6 @@ referencedClasses: []
 }),
 smalltalk.IRInliningJSTranslator);
 
-smalltalk.addMethod(
-"_visitIRNonLocalReturningInlinedSequence_",
-smalltalk.method({
-selector: "visitIRNonLocalReturningInlinedSequence:",
-category: 'visiting',
-fn: function (anIRInlinedSequence) {
-    var self = this;
-    smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(self, "_visit_", [each]);}]);}]);
-    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", []), "_canBeAssigned", []), "_ifTrue_ifFalse_", [function () {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutNonLocalReturnWith_", [function () {return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}]);}, function () {return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}]);}]);
-    return self;
-},
-args: ["anIRInlinedSequence"],
-source: "visitIRNonLocalReturningInlinedSequence: anIRInlinedSequence\x0a\x0a\x09anIRInlinedSequence instructions allButLast do: [ :each | \x0a\x09\x09self stream nextPutStatementWith: [ self visit: each ]].\x0a\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09anIRInlinedSequence instructions last canBeAssigned \x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09self stream nextPutNonLocalReturnWith: [\x0a\x09\x09\x09\x09\x09self visit: anIRInlinedSequence instructions last ]]\x0a\x09\x09\x09ifFalse: [ self visit: anIRInlinedSequence instructions last ]]",
-messageSends: ["do:", "nextPutStatementWith:", "visit:", "stream", "allButLast", "instructions", "ifTrue:ifFalse:", "nextPutNonLocalReturnWith:", "last", "canBeAssigned"],
-referencedClasses: []
-}),
-smalltalk.IRInliningJSTranslator);
-
-smalltalk.addMethod(
-"_visitIRReturningInlinedSequence_",
-smalltalk.method({
-selector: "visitIRReturningInlinedSequence:",
-category: 'visiting',
-fn: function (anIRInlinedSequence) {
-    var self = this;
-    smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_allButLast", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(self, "_visit_", [each]);}]);}]);
-    smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutStatementWith_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", []), "_canBeAssigned", []), "_ifTrue_ifFalse_", [function () {smalltalk.send(smalltalk.send(self, "_stream", []), "_nextPutReturn", []);return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}, function () {return smalltalk.send(self, "_visit_", [smalltalk.send(smalltalk.send(anIRInlinedSequence, "_instructions", []), "_last", [])]);}]);}]);
-    return self;
-},
-args: ["anIRInlinedSequence"],
-source: "visitIRReturningInlinedSequence: anIRInlinedSequence\x0a\x0a\x09anIRInlinedSequence instructions allButLast do: [ :each | \x0a\x09\x09self stream nextPutStatementWith: [ self visit: each ]].\x0a\x0a\x09self stream nextPutStatementWith: [\x0a\x09\x09anIRInlinedSequence instructions last canBeAssigned \x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09self stream nextPutReturn.\x0a\x09\x09\x09\x09self visit: anIRInlinedSequence instructions last ]\x0a\x09\x09\x09ifFalse: [ self visit: anIRInlinedSequence instructions last ]]",
-messageSends: ["do:", "nextPutStatementWith:", "visit:", "stream", "allButLast", "instructions", "ifTrue:ifFalse:", "nextPutReturn", "last", "canBeAssigned"],
-referencedClasses: []
-}),
-smalltalk.IRInliningJSTranslator);
-
 
 
 smalltalk.addClass('IRSendInliner', smalltalk.Object, ['send', 'translator'], 'Compiler-Inlining');
@@ -851,7 +752,9 @@ selector: "ifFalse:",
 category: 'inlining',
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_", [smalltalk.send(smalltalk.IRInlinedIfFalse || IRInlinedIfFalse, "_new", []), anIRInstruction]);
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_", [smalltalk.send(smalltalk.IRInlinedIfFalse || IRInlinedIfFalse, "_new", []), anIRInstruction]);
+    return $1;
 },
 args: ["anIRInstruction"],
 source: "ifFalse: anIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfFalse new with: anIRInstruction",
@@ -867,7 +770,9 @@ selector: "ifFalse:ifTrue:",
 category: 'inlining',
 fn: function (anIRInstruction, anotherIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_perform_withArguments_", [smalltalk.symbolFor("ifTrue:ifFalse:"), [anotherIRInstruction, anIRInstruction]]);
+    var $1;
+    $1 = smalltalk.send(self, "_perform_withArguments_", [smalltalk.symbolFor("ifTrue:ifFalse:"), [anotherIRInstruction, anIRInstruction]]);
+    return $1;
 },
 args: ["anIRInstruction", "anotherIRInstruction"],
 source: "ifFalse: anIRInstruction ifTrue: anotherIRInstruction\x0a\x09^ self perform: #ifTrue:ifFalse: withArguments: { anotherIRInstruction. anIRInstruction }",
@@ -883,13 +788,21 @@ selector: "ifNil:",
 category: 'inlining',
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anIRInstruction, function ($rec) {smalltalk.send($rec, "_scope_", [smalltalk.send(smalltalk.send(anIRInstruction, "_scope", []), "_copy", [])]);smalltalk.send($rec, "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []))]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRClosure || IRClosure, "_new", []))]);
-    return self;
+    var $2, $3, $4, $5, $1;
+    $2 = smalltalk.send(smalltalk.IRClosure || IRClosure, "_new", []);
+    smalltalk.send($2, "_scope_", [smalltalk.send(smalltalk.send(anIRInstruction, "_scope", []), "_copy", [])]);
+    $3 = smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []);
+    smalltalk.send($3, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
+    $4 = smalltalk.send($3, "_yourself", []);
+    smalltalk.send($2, "_add_", [$4]);
+    $5 = smalltalk.send($2, "_yourself", []);
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anIRInstruction, $5]);
+    return $1;
 },
 args: ["anIRInstruction"],
 source: "ifNil: anIRInstruction\x0a\x09^ self \x0a\x09\x09inlinedSend: IRInlinedIfNilIfNotNil new \x0a\x09\x09with: anIRInstruction\x0a\x09\x09with: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: self send instructions first;\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)",
 messageSends: ["inlinedSend:with:with:", "new", "scope:", "copy", "scope", "add:", "first", "instructions", "send", "yourself"],
-referencedClasses: ["IRInlinedIfNilIfNotNil", "IRBlockSequence", "IRClosure"]
+referencedClasses: ["IRInlinedIfNilIfNotNil", "IRClosure", "IRBlockSequence"]
 }),
 smalltalk.IRSendInliner);
 
@@ -900,8 +813,9 @@ selector: "ifNil:ifNotNil:",
 category: 'inlining',
 fn: function (anIRInstruction, anotherIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anIRInstruction, anotherIRInstruction]);
-    return self;
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anIRInstruction, anotherIRInstruction]);
+    return $1;
 },
 args: ["anIRInstruction", "anotherIRInstruction"],
 source: "ifNil: anIRInstruction ifNotNil: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfNilIfNotNil new with: anIRInstruction with: anotherIRInstruction",
@@ -917,13 +831,21 @@ selector: "ifNotNil:",
 category: 'inlining',
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), function ($rec) {smalltalk.send($rec, "_scope_", [smalltalk.send(smalltalk.send(anIRInstruction, "_scope", []), "_copy", [])]);smalltalk.send($rec, "_add_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []))]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRClosure || IRClosure, "_new", [])), anIRInstruction]);
-    return self;
+    var $2, $3, $4, $5, $1;
+    $2 = smalltalk.send(smalltalk.IRClosure || IRClosure, "_new", []);
+    smalltalk.send($2, "_scope_", [smalltalk.send(smalltalk.send(anIRInstruction, "_scope", []), "_copy", [])]);
+    $3 = smalltalk.send(smalltalk.IRBlockSequence || IRBlockSequence, "_new", []);
+    smalltalk.send($3, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
+    $4 = smalltalk.send($3, "_yourself", []);
+    smalltalk.send($2, "_add_", [$4]);
+    $5 = smalltalk.send($2, "_yourself", []);
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), $5, anIRInstruction]);
+    return $1;
 },
 args: ["anIRInstruction"],
 source: "ifNotNil: anIRInstruction\x0a\x09^ self \x0a\x09\x09inlinedSend: IRInlinedIfNilIfNotNil new\x0a\x09\x09with: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: self send instructions first;\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)\x0a\x09\x09with: anIRInstruction",
 messageSends: ["inlinedSend:with:with:", "new", "scope:", "copy", "scope", "add:", "first", "instructions", "send", "yourself"],
-referencedClasses: ["IRInlinedIfNilIfNotNil", "IRBlockSequence", "IRClosure"]
+referencedClasses: ["IRInlinedIfNilIfNotNil", "IRClosure", "IRBlockSequence"]
 }),
 smalltalk.IRSendInliner);
 
@@ -934,8 +856,9 @@ selector: "ifNotNil:ifNil:",
 category: 'inlining',
 fn: function (anIRInstruction, anotherIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anotherIRInstruction, anIRInstruction]);
-    return self;
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfNilIfNotNil || IRInlinedIfNilIfNotNil, "_new", []), anotherIRInstruction, anIRInstruction]);
+    return $1;
 },
 args: ["anIRInstruction", "anotherIRInstruction"],
 source: "ifNotNil: anIRInstruction ifNil: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfNilIfNotNil new with: anotherIRInstruction with: anIRInstruction",
@@ -951,7 +874,9 @@ selector: "ifTrue:",
 category: 'inlining',
 fn: function (anIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_", [smalltalk.send(smalltalk.IRInlinedIfTrue || IRInlinedIfTrue, "_new", []), anIRInstruction]);
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_", [smalltalk.send(smalltalk.IRInlinedIfTrue || IRInlinedIfTrue, "_new", []), anIRInstruction]);
+    return $1;
 },
 args: ["anIRInstruction"],
 source: "ifTrue: anIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfTrue new with: anIRInstruction",
@@ -967,7 +892,9 @@ selector: "ifTrue:ifFalse:",
 category: 'inlining',
 fn: function (anIRInstruction, anotherIRInstruction) {
     var self = this;
-    return smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfTrueIfFalse || IRInlinedIfTrueIfFalse, "_new", []), anIRInstruction, anotherIRInstruction]);
+    var $1;
+    $1 = smalltalk.send(self, "_inlinedSend_with_with_", [smalltalk.send(smalltalk.IRInlinedIfTrueIfFalse || IRInlinedIfTrueIfFalse, "_new", []), anIRInstruction, anotherIRInstruction]);
+    return $1;
 },
 args: ["anIRInstruction", "anotherIRInstruction"],
 source: "ifTrue: anIRInstruction ifFalse: anotherIRInstruction\x0a\x09^ self inlinedSend: IRInlinedIfTrueIfFalse new with: anIRInstruction with: anotherIRInstruction",
@@ -981,54 +908,23 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "inlineClosure:",
 category: 'inlining',
-fn: function (anIRClosure) {
-    var self = this;
-    var inlinedClosure = nil;
-    var sequence = nil;
-    var statements = nil;
-    inlinedClosure = smalltalk.send(self, "_inlinedClosure", []);
-    smalltalk.send(inlinedClosure, "_scope_", [smalltalk.send(anIRClosure, "_scope", [])]);
-    smalltalk.send(smalltalk.send(anIRClosure, "_instructions", []), "_do_", [function (each) {return ($receiver = smalltalk.send(each, "_isSequence", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(inlinedClosure, "_add_", [each]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(inlinedClosure, "_add_", [each]);}]);}]);
-    sequence = smalltalk.send(self, "_inlinedSequence", []);
-    smalltalk.send(inlinedClosure, "_add_", [sequence]);
-    statements = smalltalk.send(smalltalk.send(smalltalk.send(anIRClosure, "_instructions", []), "_last", []), "_instructions", []);
-    smalltalk.send(statements, "_ifNotEmpty_", [function () {smalltalk.send(smalltalk.send(statements, "_allButLast", []), "_do_", [function (each) {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [each])]);}]);return ($receiver = smalltalk.send(smalltalk.send(statements, "_last", []), "_isLocalReturn", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_instructions", []), "_first", [])])]);}() : function () {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(statements, "_last", [])])]);}() : smalltalk.send($receiver, "_ifTrue_ifFalse_", [function () {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_instructions", []), "_first", [])])]);}, function () {return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(statements, "_last", [])])]);}]);}]);
-    return inlinedClosure;
-    return self;
-},
+fn: function (anIRClosure){
+var self=this;
+var inlinedClosure=nil;
+var sequence=nil;
+var statements=nil;
+(inlinedClosure=smalltalk.send(self, "_inlinedClosure", []));
+smalltalk.send(inlinedClosure, "_scope_", [smalltalk.send(anIRClosure, "_scope", [])]);
+smalltalk.send(smalltalk.send(anIRClosure, "_instructions", []), "_do_", [(function(each){return ((($receiver = smalltalk.send(each, "_isSequence", [])).klass === smalltalk.Boolean) ? (! $receiver ? (function(){return smalltalk.send(inlinedClosure, "_add_", [each]);})() : nil) : smalltalk.send($receiver, "_ifFalse_", [(function(){return smalltalk.send(inlinedClosure, "_add_", [each]);})]));})]);
+(sequence=smalltalk.send(self, "_inlinedSequence", []));
+smalltalk.send(inlinedClosure, "_add_", [sequence]);
+(statements=smalltalk.send(smalltalk.send(smalltalk.send(anIRClosure, "_instructions", []), "_last", []), "_instructions", []));
+smalltalk.send(statements, "_ifNotEmpty_", [(function(){smalltalk.send(smalltalk.send(statements, "_allButLast", []), "_do_", [(function(each){return smalltalk.send(sequence, "_add_", [each]);})]);return ((($receiver = smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_isReturn", []), "_and_", [(function(){return smalltalk.send(smalltalk.send(statements, "_last", []), "_isBlockReturn", []);})])).klass === smalltalk.Boolean) ? ($receiver ? (function(){return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_instructions", []), "_first", [])]);})() : (function(){return smalltalk.send(sequence, "_add_", [smalltalk.send(statements, "_last", [])]);})()) : smalltalk.send($receiver, "_ifTrue_ifFalse_", [(function(){return smalltalk.send(sequence, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(statements, "_last", []), "_instructions", []), "_first", [])]);}), (function(){return smalltalk.send(sequence, "_add_", [smalltalk.send(statements, "_last", [])]);})]));})]);
+return inlinedClosure;
+return self;},
 args: ["anIRClosure"],
-source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure sequence statements |\x0a\x0a\x09inlinedClosure := self inlinedClosure.\x0a\x09inlinedClosure scope: anIRClosure scope.\x0a\x0a\x09\x22Add the possible temp declarations\x22\x0a\x09anIRClosure instructions do: [ :each | \x0a\x09\x09each isSequence ifFalse: [\x0a\x09\x09\x09inlinedClosure add: each ]].\x0a\x0a\x09\x22Add a block sequence\x22\x0a\x09sequence := self inlinedSequence.\x0a\x09inlinedClosure add: sequence.\x0a\x0a\x09\x22Get all the statements\x22\x0a\x09statements := anIRClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements allButLast do: [ :each | sequence add: (self translator visit: each) ].\x0a\x09\x09\x22Inlined closures don't have implicit local returns\x22\x0a\x09\x09statements last isLocalReturn \x0a\x09\x09\x09ifTrue: [ sequence add: (self translator visit: statements last instructions first) ]\x0a\x09\x09\x09ifFalse: [ sequence add: (self translator visit: statements last) ]].\x0a\x0a\x09^ inlinedClosure",
-messageSends: ["inlinedClosure", "scope:", "scope", "do:", "instructions", "ifFalse:", "isSequence", "add:", "inlinedSequence", "last", "ifNotEmpty:", "allButLast", "visit:", "translator", "ifTrue:ifFalse:", "isLocalReturn", "first"],
-referencedClasses: []
-}),
-smalltalk.IRSendInliner);
-
-smalltalk.addMethod(
-"_inlineMessageBlock_with_",
-smalltalk.method({
-selector: "inlineMessageBlock:with:",
-category: 'inlining',
-fn: function (anIRInstruction, anotherIRInstruction) {
-    var self = this;
-    var $1;
-    var inlinedSend;
-    var inlinedClosure;
-    if (!smalltalk.assert(smalltalk.send(anIRInstruction, "_isClosure", []))) {
-        smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0]))) {
-        smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);
-    }
-    inlinedClosure = smalltalk.send(self, "_inlineClosure_", [anIRInstruction]);
-    inlinedSend = anotherIRInstruction;
-    smalltalk.send(inlinedSend, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
-    $1 = smalltalk.send(inlinedSend, "_add_", [inlinedClosure]);
-    smalltalk.send(smalltalk.send(self, "_send", []), "_replaceWith_", [inlinedSend]);
-    return inlinedSend;
-},
-args: ["anIRInstruction", "anotherIRInstruction"],
-source: "inlineMessageBlock: anIRInstruction with: anotherIRInstruction\x0a\x09| inlinedSend inlinedClosure |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure := self inlineClosure: anIRInstruction.\x0a\x0a\x09inlinedSend := anotherIRInstruction.\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09^ inlinedSend",
-messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "inlineClosure:", "add:", "first", "instructions", "send", "replaceWith:"],
+source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure sequence statements |\x0a\x0a\x09inlinedClosure := self inlinedClosure.\x0a\x09inlinedClosure scope: anIRClosure scope.\x0a\x0a\x09\x22Add the possible temp declarations\x22\x0a\x09anIRClosure instructions do: [ :each | \x0a\x09\x09each isSequence ifFalse: [\x0a\x09\x09\x09inlinedClosure add: each ]].\x0a\x0a\x09\x22Add a block sequence\x22\x0a\x09sequence := self inlinedSequence.\x0a\x09inlinedClosure add: sequence.\x0a\x0a\x09\x22Get all the statements\x22\x0a\x09statements := anIRClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements allButLast do: [ :each | sequence add: each ].\x0a\x0a\x09\x09\x22Inlined closures don't have implicit local returns\x22\x0a\x09\x09(statements last isReturn and: [ statements last isBlockReturn ])\x0a\x09\x09\x09ifTrue: [ sequence add: statements last instructions first ]\x0a\x09\x09\x09ifFalse: [ sequence add: statements last ] ].\x0a\x0a\x09^ inlinedClosure",
+messageSends: ["inlinedClosure", "scope:", "scope", "do:", "instructions", "ifFalse:", "isSequence", "add:", "inlinedSequence", "last", "ifNotEmpty:", "allButLast", "ifTrue:ifFalse:", "and:", "isReturn", "isBlockReturn", "first"],
 referencedClasses: []
 }),
 smalltalk.IRSendInliner);
@@ -1042,9 +938,10 @@ fn: function (anIRSend) {
     var self = this;
     smalltalk.send(self, "_send_", [anIRSend]);
     return smalltalk.send(self, "_perform_withArguments_", [smalltalk.send(smalltalk.send(self, "_send", []), "_selector", []), smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_allButFirst", [])]);
+    return self;
 },
 args: ["anIRSend"],
-source: "inlineSend: anIRSend\x0a\x09self send: anIRSend.\x0a\x09^ self perform: self send selector withArguments: self send instructions allButFirst",
+source: "inlineSend: anIRSend\x0a\x09self send: anIRSend.\x0a\x09^ self \x0a\x09\x09perform: self send selector \x0a\x09\x09withArguments: self send instructions allButFirst",
 messageSends: ["send:", "perform:withArguments:", "selector", "send", "allButFirst", "instructions"],
 referencedClasses: []
 }),
@@ -1057,7 +954,9 @@ selector: "inlinedClosure",
 category: 'factory',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInlinedClosure || IRInlinedClosure, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInlinedClosure || IRInlinedClosure, "_new", []);
+    return $1;
 },
 args: [],
 source: "inlinedClosure\x0a\x09^ IRInlinedClosure new",
@@ -1073,23 +972,18 @@ selector: "inlinedSend:with:",
 category: 'inlining',
 fn: function (inlinedSend, anIRInstruction) {
     var self = this;
-    var $1;
-    var inlinedClosure;
-    if (!smalltalk.assert(smalltalk.send(anIRInstruction, "_isClosure", []))) {
-        smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0]))) {
-        smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);
-    }
-    inlinedClosure = smalltalk.send(self, "_inlineClosure_", [anIRInstruction]);
-    smalltalk.send(inlinedSend, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
-    $1 = smalltalk.send(inlinedSend, "_add_", [inlinedClosure]);
+    var inlinedClosure = nil;
+    ($receiver = smalltalk.send(anIRInstruction, "_isClosure", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}]);
+    ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}]);
+    inlinedClosure = smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(self, "_inlineClosure_", [anIRInstruction])]);
+    (function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);return smalltalk.send($rec, "_add_", [inlinedClosure]);}(inlinedSend));
     smalltalk.send(smalltalk.send(self, "_send", []), "_replaceWith_", [inlinedSend]);
     return inlinedSend;
+    return self;
 },
 args: ["inlinedSend", "anIRInstruction"],
-source: "inlinedSend: inlinedSend with: anIRInstruction\x0a\x09| inlinedClosure |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure := self inlineClosure: anIRInstruction.\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09^ inlinedSend",
-messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "inlineClosure:", "add:", "first", "instructions", "send", "replaceWith:"],
+source: "inlinedSend: inlinedSend with: anIRInstruction\x0a\x09| inlinedClosure |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x0a\x09^ inlinedSend",
+messageSends: ["ifFalse:", "isClosure", "inliningError:", "=", "size", "arguments", "visit:", "translator", "inlineClosure:", "add:", "first", "instructions", "send", "replaceWith:"],
 referencedClasses: []
 }),
 smalltalk.IRSendInliner);
@@ -1101,32 +995,22 @@ selector: "inlinedSend:with:with:",
 category: 'inlining',
 fn: function (inlinedSend, anIRInstruction, anotherIRInstruction) {
     var self = this;
-    var $1;
-    var inlinedClosure1;
-    var inclinedClosure2;
-    if (!smalltalk.assert(smalltalk.send(anIRInstruction, "_isClosure", []))) {
-        smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0]))) {
-        smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(anotherIRInstruction, "_isClosure", []))) {
-        smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);
-    }
-    if (!smalltalk.assert(smalltalk.send(smalltalk.send(smalltalk.send(anotherIRInstruction, "_arguments", []), "_size", []), "__eq", [0]))) {
-        smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);
-    }
-    inlinedClosure = smalltalk.send(self, "_inlineClosure_", [anIRInstruction]);
-    inlinedClosure2 = smalltalk.send(self, "_inlineClosure_", [anotherIRInstruction]);
-    smalltalk.send(inlinedSend, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);
-    smalltalk.send(inlinedSend, "_add_", [inlinedClosure]);
-    $1 = smalltalk.send(inlinedSend, "_add_", [inlinedClosure2]);
+    var inlinedClosure1 = nil;
+    var inlinedClosure2 = nil;
+    ($receiver = smalltalk.send(anIRInstruction, "_isClosure", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}]);
+    ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_arguments", []), "_size", []), "__eq", [0])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}]);
+    ($receiver = smalltalk.send(anotherIRInstruction, "_isClosure", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Message argument should be a block"]);}]);
+    ($receiver = smalltalk.send(smalltalk.send(smalltalk.send(anotherIRInstruction, "_arguments", []), "_size", []), "__eq", [0])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(self, "_inliningError_", ["Inlined block should have zero argument"]);}]);
+    inlinedClosure1 = smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(self, "_inlineClosure_", [anIRInstruction])]);
+    inlinedClosure2 = smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [smalltalk.send(self, "_inlineClosure_", [anotherIRInstruction])]);
+    (function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_send", []), "_instructions", []), "_first", [])]);smalltalk.send($rec, "_add_", [inlinedClosure1]);return smalltalk.send($rec, "_add_", [inlinedClosure2]);}(inlinedSend));
     smalltalk.send(smalltalk.send(self, "_send", []), "_replaceWith_", [inlinedSend]);
     return inlinedSend;
+    return self;
 },
 args: ["inlinedSend", "anIRInstruction", "anotherIRInstruction"],
-source: "inlinedSend: inlinedSend with: anIRInstruction with: anotherIRInstruction\x0a\x09| inlinedClosure1 inclinedClosure2 |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09anotherIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anotherIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure := self inlineClosure: anIRInstruction.\x0a\x09inlinedClosure2 := self inlineClosure: anotherIRInstruction.\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure;\x0a\x09\x09add: inlinedClosure2.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09^ inlinedSend",
-messageSends: ["ifFalse:", "inliningError:", "isClosure", "=", "size", "arguments", "inlineClosure:", "add:", "first", "instructions", "send", "replaceWith:"],
+source: "inlinedSend: inlinedSend with: anIRInstruction with: anotherIRInstruction\x0a\x09| inlinedClosure1 inlinedClosure2 |\x0a\x0a\x09anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09anotherIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].\x0a\x09anotherIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].\x0a\x0a\x09inlinedClosure1 := self translator visit: (self inlineClosure: anIRInstruction).\x0a\x09inlinedClosure2 := self translator visit: (self inlineClosure: anotherIRInstruction).\x0a\x0a\x0a\x09inlinedSend\x0a\x09\x09add: self send instructions first;\x0a\x09\x09add: inlinedClosure1;\x0a\x09\x09add: inlinedClosure2.\x0a\x0a\x09self send replaceWith: inlinedSend.\x0a\x09^ inlinedSend",
+messageSends: ["ifFalse:", "isClosure", "inliningError:", "=", "size", "arguments", "visit:", "translator", "inlineClosure:", "add:", "first", "instructions", "send", "replaceWith:"],
 referencedClasses: []
 }),
 smalltalk.IRSendInliner);
@@ -1138,7 +1022,9 @@ selector: "inlinedSequence",
 category: 'factory',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInlinedSequence || IRInlinedSequence, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInlinedSequence || IRInlinedSequence, "_new", []);
+    return $1;
 },
 args: [],
 source: "inlinedSequence\x0a\x09^ IRInlinedSequence new",
@@ -1239,7 +1125,6 @@ category: 'accessing',
 fn: function () {
     var self = this;
     return ["ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:", "ifNil:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil"];
-    return self;
 },
 args: [],
 source: "inlinedSelectors\x0a\x09^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil')",
@@ -1255,12 +1140,14 @@ selector: "shouldInline:",
 category: 'accessing',
 fn: function (anIRInstruction) {
     var self = this;
+    var $1, $2;
     var $early = {};
     try {
-        if (!smalltalk.assert(smalltalk.send(smalltalk.send(self, "_inlinedSelectors", []), "_includes_", [smalltalk.send(anIRInstruction, "_selector", [])]))) {
+        $1 = smalltalk.send(smalltalk.send(self, "_inlinedSelectors", []), "_includes_", [smalltalk.send(anIRInstruction, "_selector", [])]);
+        if (!smalltalk.assert($1)) {
             return false;
         }
-        smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_instructions", []), "_allButFirst", []), "_do_", [function (each) {if (!smalltalk.assert(smalltalk.send(each, "_isClosure", []))) {throw $early = [false];}}]);
+        smalltalk.send(smalltalk.send(smalltalk.send(anIRInstruction, "_instructions", []), "_allButFirst", []), "_do_", [function (each) {$2 = smalltalk.send(each, "_isClosure", []);if (!smalltalk.assert($2)) {throw $early = [false];}}]);
         return true;
     } catch (e) {
         if (e === $early) {
@@ -1335,49 +1222,46 @@ referencedClasses: ["IRInlinedAssignment"]
 smalltalk.IRAssignmentInliner);
 
 smalltalk.addMethod(
-"_inlinedSequence",
+"_inlineClosure_",
 smalltalk.method({
-selector: "inlinedSequence",
-category: 'factory',
-fn: function () {
+selector: "inlineClosure:",
+category: 'inlining',
+fn: function (anIRClosure) {
     var self = this;
-    var $1, $2;
-    $1 = smalltalk.send(smalltalk.IRAssigningInlinedSequence || IRAssigningInlinedSequence, "_new", []);
-    smalltalk.send($1, "_assignTo_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_assignment", []), "_instructions", []), "_first", [])]);
-    $2 = smalltalk.send($1, "_yourself", []);
-    return $2;
+    var inlinedClosure = nil;
+    var statements = nil;
+    inlinedClosure = smalltalk.send(self, "_inlineClosure_", [anIRClosure], smalltalk.IRAssignmentInliner.superclass || nil);
+    statements = smalltalk.send(smalltalk.send(smalltalk.send(inlinedClosure, "_instructions", []), "_last", []), "_instructions", []);
+    smalltalk.send(statements, "_ifNotEmpty_", [function () {return ($receiver = smalltalk.send(smalltalk.send(statements, "_last", []), "_canBeAssigned", [])).klass === smalltalk.Boolean ? $receiver ? function () {return smalltalk.send(smalltalk.send(statements, "_last", []), "_replaceWith_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_assignment", []), "_instructions", []), "_first", [])]);smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(statements, "_last", []), "_copy", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []))]);}() : nil : smalltalk.send($receiver, "_ifTrue_", [function () {return smalltalk.send(smalltalk.send(statements, "_last", []), "_replaceWith_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_assignment", []), "_instructions", []), "_first", [])]);smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(statements, "_last", []), "_copy", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRAssignment || IRAssignment, "_new", []))]);}]);}]);
+    return inlinedClosure;
+    return self;
 },
-args: [],
-source: "inlinedSequence\x0a\x09^ IRAssigningInlinedSequence new\x0a\x09\x09assignTo: self assignment instructions first;\x0a\x09\x09yourself",
-messageSends: ["assignTo:", "first", "instructions", "assignment", "new", "yourself"],
-referencedClasses: ["IRAssigningInlinedSequence"]
+args: ["anIRClosure"],
+source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last canBeAssigned ifTrue: [\x0a\x09\x09\x09statements last replaceWith: (IRAssignment new\x0a\x09\x09\x09\x09add: self assignment instructions first;\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself) ] ].\x0a\x0a\x09^ inlinedClosure",
+messageSends: ["inlineClosure:", "instructions", "last", "ifNotEmpty:", "ifTrue:", "canBeAssigned", "replaceWith:", "add:", "first", "assignment", "copy", "yourself", "new"],
+referencedClasses: ["IRAssignment"]
 }),
 smalltalk.IRAssignmentInliner);
 
 
 
-smalltalk.addClass('IRReturnInliner', smalltalk.IRSendInliner, [], 'Compiler-Inlining');
-smalltalk.IRReturnInliner.comment="I inline message sends with inlined closure together with a return instruction."
+smalltalk.addClass('IRNonLocalReturnInliner', smalltalk.IRSendInliner, [], 'Compiler-Inlining');
 smalltalk.addMethod(
-"_inlineReturn_",
+"_inlineClosure_",
 smalltalk.method({
-selector: "inlineReturn:",
+selector: "inlineClosure:",
 category: 'inlining',
-fn: function (anIRReturn) {
+fn: function (anIRClosure) {
     var self = this;
-    var return_;
-    return_ = smalltalk.send(self, "_inlinedReturn", []);
-    smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_do_", [function (each) {return smalltalk.send(return_, "_add_", [each]);}]);
-    smalltalk.send(anIRReturn, "_replaceWith_", [return_]);
-    smalltalk.send(self, "_inlineSend_", [smalltalk.send(smalltalk.send(return_, "_instructions", []), "_last", [])]);
-    return return_;
+    return smalltalk.send(self, "_inlineCLosure_", [anIRClosure], smalltalk.IRNonLocalReturnInliner.superclass || nil);
+    return self;
 },
-args: ["anIRReturn"],
-source: "inlineReturn: anIRReturn\x0a\x09| return |\x0a\x09return := self inlinedReturn.\x0a\x09anIRReturn instructions do: [ :each |\x0a\x09\x09return add: each ].\x0a\x09anIRReturn replaceWith: return.\x0a\x09self inlineSend: return instructions last.\x0a\x09^ return",
-messageSends: ["inlinedReturn", "do:", "add:", "instructions", "replaceWith:", "inlineSend:", "last"],
+args: ["anIRClosure"],
+source: "inlineClosure: anIRClosure\x0a\x09\x22| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last replaceWith: (IRNonLocalReturn new\x0a\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ inlinedClosure\x22\x0a\x0a\x09^ super inlineCLosure: anIRClosure",
+messageSends: ["inlineCLosure:"],
 referencedClasses: []
 }),
-smalltalk.IRReturnInliner);
+smalltalk.IRNonLocalReturnInliner);
 
 smalltalk.addMethod(
 "_inlinedReturn",
@@ -1386,66 +1270,82 @@ selector: "inlinedReturn",
 category: 'factory',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInlinedReturn || IRInlinedReturn, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInlinedNonLocalReturn || IRInlinedNonLocalReturn, "_new", []);
+    return $1;
 },
 args: [],
-source: "inlinedReturn\x0a\x09^ IRInlinedReturn new",
+source: "inlinedReturn\x0a\x09^ IRInlinedNonLocalReturn new",
 messageSends: ["new"],
-referencedClasses: ["IRInlinedReturn"]
+referencedClasses: ["IRInlinedNonLocalReturn"]
 }),
-smalltalk.IRReturnInliner);
+smalltalk.IRNonLocalReturnInliner);
+
 
+
+smalltalk.addClass('IRReturnInliner', smalltalk.IRSendInliner, [], 'Compiler-Inlining');
+smalltalk.IRReturnInliner.comment="I inline message sends with inlined closure together with a return instruction."
 smalltalk.addMethod(
-"_inlinedSequence",
+"_inlineClosure_",
 smalltalk.method({
-selector: "inlinedSequence",
-category: 'factory',
-fn: function () {
+selector: "inlineClosure:",
+category: 'inlining',
+fn: function (anIRClosure) {
     var self = this;
-    return smalltalk.send(smalltalk.IRReturningInlinedSequence || IRReturningInlinedSequence, "_new", []);
+    var closure = nil;
+    var statements = nil;
+    closure = smalltalk.send(self, "_inlineClosure_", [anIRClosure], smalltalk.IRReturnInliner.superclass || nil);
+    statements = smalltalk.send(smalltalk.send(smalltalk.send(closure, "_instructions", []), "_last", []), "_instructions", []);
+    smalltalk.send(statements, "_ifNotEmpty_", [function () {return ($receiver = smalltalk.send(smalltalk.send(statements, "_last", []), "_isReturn", [])).klass === smalltalk.Boolean ? !$receiver ? function () {return smalltalk.send(smalltalk.send(statements, "_last", []), "_replaceWith_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(statements, "_last", []), "_copy", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []))]);}() : nil : smalltalk.send($receiver, "_ifFalse_", [function () {return smalltalk.send(smalltalk.send(statements, "_last", []), "_replaceWith_", [function ($rec) {smalltalk.send($rec, "_add_", [smalltalk.send(smalltalk.send(statements, "_last", []), "_copy", [])]);return smalltalk.send($rec, "_yourself", []);}(smalltalk.send(smalltalk.IRReturn || IRReturn, "_new", []))]);}]);}]);
+    return closure;
+    return self;
 },
-args: [],
-source: "inlinedSequence\x0a\x09^ IRReturningInlinedSequence new",
-messageSends: ["new"],
-referencedClasses: ["IRReturningInlinedSequence"]
+args: ["anIRClosure"],
+source: "inlineClosure: anIRClosure\x0a\x09| closure statements |\x0a\x0a\x09closure := super inlineClosure: anIRClosure.\x0a\x09statements := closure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last isReturn\x0a\x09\x09\x09ifFalse: [ statements last replaceWith: (IRReturn new\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself)] ].\x0a\x0a\x09^ closure",
+messageSends: ["inlineClosure:", "instructions", "last", "ifNotEmpty:", "ifFalse:", "isReturn", "replaceWith:", "add:", "copy", "yourself", "new"],
+referencedClasses: ["IRReturn"]
 }),
 smalltalk.IRReturnInliner);
 
-
-
-smalltalk.addClass('IRNonLocalReturnInliner', smalltalk.IRReturnInliner, [], 'Compiler-Inlining');
 smalltalk.addMethod(
-"_inlinedReturn",
+"_inlineReturn_",
 smalltalk.method({
-selector: "inlinedReturn",
-category: 'factory',
-fn: function () {
+selector: "inlineReturn:",
+category: 'inlining',
+fn: function (anIRReturn) {
     var self = this;
-    return smalltalk.send(smalltalk.IRInlinedNonLocalReturn || IRInlinedNonLocalReturn, "_new", []);
+    var return_ = nil;
+    return_ = smalltalk.send(self, "_inlinedReturn", []);
+    smalltalk.send(smalltalk.send(anIRReturn, "_instructions", []), "_do_", [function (each) {return smalltalk.send(return_, "_add_", [each]);}]);
+    smalltalk.send(anIRReturn, "_replaceWith_", [return_]);
+    smalltalk.send(self, "_inlineSend_", [smalltalk.send(smalltalk.send(return_, "_instructions", []), "_last", [])]);
+    return return_;
+    return self;
 },
-args: [],
-source: "inlinedReturn\x0a\x09^ IRInlinedNonLocalReturn new",
-messageSends: ["new"],
-referencedClasses: ["IRInlinedNonLocalReturn"]
+args: ["anIRReturn"],
+source: "inlineReturn: anIRReturn\x0a\x09| return |\x0a\x09return := self inlinedReturn.\x0a\x09anIRReturn instructions do: [ :each |\x0a\x09\x09return add: each ].\x0a\x09anIRReturn replaceWith: return.\x0a\x09self inlineSend: return instructions last.\x0a\x09^ return",
+messageSends: ["inlinedReturn", "do:", "instructions", "add:", "replaceWith:", "inlineSend:", "last"],
+referencedClasses: []
 }),
-smalltalk.IRNonLocalReturnInliner);
+smalltalk.IRReturnInliner);
 
 smalltalk.addMethod(
-"_inlinedSequence",
+"_inlinedReturn",
 smalltalk.method({
-selector: "inlinedSequence",
+selector: "inlinedReturn",
 category: 'factory',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRNonLocalReturningInlinedSequence ||
-        IRNonLocalReturningInlinedSequence, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInlinedReturn || IRInlinedReturn, "_new", []);
+    return $1;
 },
 args: [],
-source: "inlinedSequence\x0a\x09^ IRNonLocalReturningInlinedSequence new",
+source: "inlinedReturn\x0a\x09^ IRInlinedReturn new",
 messageSends: ["new"],
-referencedClasses: ["IRNonLocalReturningInlinedSequence"]
+referencedClasses: ["IRInlinedReturn"]
 }),
-smalltalk.IRNonLocalReturnInliner);
+smalltalk.IRReturnInliner);
 
 
 
@@ -1458,20 +1358,17 @@ selector: "compileNode:",
 category: 'compiling',
 fn: function (aNode) {
     var self = this;
-    var $1, $2;
-    var ir;
-    var stream;
+    var ir = nil;
+    var stream = nil;
     smalltalk.send(smalltalk.send(self, "_semanticAnalyzer", []), "_visit_", [aNode]);
     ir = smalltalk.send(smalltalk.send(self, "_translator", []), "_visit_", [aNode]);
     smalltalk.send(smalltalk.send(self, "_inliner", []), "_visit_", [ir]);
-    $1 = smalltalk.send(self, "_irTranslator", []);
-    smalltalk.send($1, "_visit_", [ir]);
-    $2 = smalltalk.send($1, "_contents", []);
-    return $2;
+    return function ($rec) {smalltalk.send($rec, "_visit_", [ir]);return smalltalk.send($rec, "_contents", []);}(smalltalk.send(self, "_irTranslator", []));
+    return self;
 },
 args: ["aNode"],
-source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09self inliner visit: ir.\x0a\x09^ self irTranslator\x0a\x09\x09visit: ir;\x0a\x09\x09contents",
-messageSends: ["visit:", "semanticAnalyzer", "translator", "inliner", "irTranslator", "contents"],
+source: "compileNode: aNode\x0a\x09| ir stream |\x0a\x0a\x09self semanticAnalyzer visit: aNode.\x0a\x09ir := self translator visit: aNode.\x0a\x09self inliner visit: ir.\x0a\x0a\x09^ self irTranslator\x0a\x09\x09visit: ir;\x0a\x09\x09contents",
+messageSends: ["visit:", "semanticAnalyzer", "translator", "inliner", "contents", "irTranslator"],
 referencedClasses: []
 }),
 smalltalk.InliningCodeGenerator);
@@ -1483,7 +1380,9 @@ selector: "inliner",
 category: 'compiling',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInliner || IRInliner, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInliner || IRInliner, "_new", []);
+    return $1;
 },
 args: [],
 source: "inliner\x0a\x09^ IRInliner new",
@@ -1499,7 +1398,9 @@ selector: "irTranslator",
 category: 'compiling',
 fn: function () {
     var self = this;
-    return smalltalk.send(smalltalk.IRInliningJSTranslator || IRInliningJSTranslator, "_new", []);
+    var $1;
+    $1 = smalltalk.send(smalltalk.IRInliningJSTranslator || IRInliningJSTranslator, "_new", []);
+    return $1;
 },
 args: [],
 source: "irTranslator\x0a\x09^ IRInliningJSTranslator new",

+ 11 - 0
js/Compiler-Semantic.deploy.js

@@ -90,6 +90,17 @@ return self;}
 }),
 smalltalk.LexicalScope);
 
+smalltalk.addMethod(
+"_isBlockScope",
+smalltalk.method({
+selector: "isBlockScope",
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_isMethodScope", []), "_not", []);
+return self;}
+}),
+smalltalk.LexicalScope);
+
 smalltalk.addMethod(
 "_isInlined",
 smalltalk.method({

+ 16 - 0
js/Compiler-Semantic.js

@@ -131,6 +131,22 @@ referencedClasses: []
 }),
 smalltalk.LexicalScope);
 
+smalltalk.addMethod(
+"_isBlockScope",
+smalltalk.method({
+selector: "isBlockScope",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.send(smalltalk.send(self, "_isMethodScope", []), "_not", []);
+return self;},
+args: [],
+source: "isBlockScope\x0a\x09^ self isMethodScope not",
+messageSends: ["not", "isMethodScope"],
+referencedClasses: []
+}),
+smalltalk.LexicalScope);
+
 smalltalk.addMethod(
 "_isInlined",
 smalltalk.method({

+ 452 - 138
js/Compiler-Tests.deploy.js

@@ -1,15 +1,301 @@
 smalltalk.addPackage('Compiler-Tests', {});
-smalltalk.addClass('IRASTTranslatorTest', smalltalk.TestCase, [], 'Compiler-Tests');
+smalltalk.addClass('CodeGeneratorTest', smalltalk.TestCase, ['receiver'], 'Compiler-Tests');
 smalltalk.addMethod(
-"_testIRMethod",
+"_codeGeneratorClass",
 smalltalk.method({
-selector: "testIRMethod",
+selector: "codeGeneratorClass",
 fn: function (){
 var self=this;
+return (smalltalk.CodeGenerator || CodeGenerator);
+return self;}
+}),
+smalltalk.CodeGeneratorTest);
 
+smalltalk.addMethod(
+"_compiler",
+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;}
 }),
-smalltalk.IRASTTranslatorTest);
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_setUp",
+smalltalk.method({
+selector: "setUp",
+fn: function (){
+var self=this;
+(self['@receiver']=smalltalk.send(smalltalk.send(self, "_targetClass", []), "_new", []));
+return self;}
+}),
+smalltalk.CodeGeneratorTest);
+
+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;}
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_targetClass",
+smalltalk.method({
+selector: "targetClass",
+fn: function (){
+var self=this;
+return (smalltalk.DoIt || DoIt);
+return self;}
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_tearDown",
+smalltalk.method({
+selector: "tearDown",
+fn: function (){
+var self=this;
+
+return self;}
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testAssignment",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testBlockReturn",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testCascades",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testLiterals",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testLocalReturn",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testMessageSends",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testNestedIfTrue",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testNonLocalReturn",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifFalse",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifFalseIfTrue",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifNil",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifNilIfNotNil",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifNotNil",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifTrue",
+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.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifTrueIfFalse",
+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.CodeGeneratorTest);
+
+
+
+smalltalk.addClass('InliningCodeGeneratorTest', smalltalk.CodeGeneratorTest, [], 'Compiler-Tests');
+smalltalk.addMethod(
+"_codeGeneratorClass",
+smalltalk.method({
+selector: "codeGeneratorClass",
+fn: function (){
+var self=this;
+return (smalltalk.InliningCodeGenerator || InliningCodeGenerator);
+return self;}
+}),
+smalltalk.InliningCodeGeneratorTest);
 
 
 
@@ -20,11 +306,15 @@ smalltalk.method({
 selector: "testClassRefVar",
 fn: function (){
 var self=this;
-var node=nil;
-(node=(function($rec){smalltalk.send($rec, "_value_", ["Object"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassReferenceNode || ClassReferenceNode), "_new", [])));
-smalltalk.send(smalltalk.send((smalltalk.SemanticAnalyzer || SemanticAnalyzer), "_new", []), "_visit_", [node]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(node, "_binding", []), "_isClassRefVar", [])]);
-return self;}
+var $1,$2;
+var node;
+$1=smalltalk.send((smalltalk.ClassReferenceNode || ClassReferenceNode),"_new",[]);
+smalltalk.send($1,"_value_",["Object"]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+smalltalk.send(smalltalk.send((smalltalk.SemanticAnalyzer || SemanticAnalyzer),"_new",[]),"_visit_",[node]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(node,"_binding",[]),"_isClassRefVar",[])]);
+return self}
 }),
 smalltalk.ScopeVarTest);
 
@@ -34,13 +324,17 @@ smalltalk.method({
 selector: "testInstanceVar",
 fn: function (){
 var self=this;
-var node=nil;
-var scope=nil;
-(node=(function($rec){smalltalk.send($rec, "_value_", ["bzzz"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", [])));
-(scope=smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope), "_new", []));
-smalltalk.send(scope, "_addIVar_", ["bzzz"]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(scope, "_bindingFor_", [node]), "_isInstanceVar", [])]);
-return self;}
+var $1,$2;
+var node;
+var scope;
+$1=smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]);
+smalltalk.send($1,"_value_",["bzzz"]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+scope=smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope),"_new",[]);
+smalltalk.send(scope,"_addIVar_",["bzzz"]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(scope,"_bindingFor_",[node]),"_isInstanceVar",[])]);
+return self}
 }),
 smalltalk.ScopeVarTest);
 
@@ -50,11 +344,19 @@ smalltalk.method({
 selector: "testPseudoVar",
 fn: function (){
 var self=this;
-var node=nil;
-var pseudoVars=nil;
-(pseudoVars=["self", "super", "true", "false", "nil"]);
-smalltalk.send(pseudoVars, "_do_", [(function(each){(node=(function($rec){smalltalk.send($rec, "_value_", [each]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", [])));return smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope), "_new", []), "_bindingFor_", [node]), "_isPseudoVar", [])]);})]);
-return self;}
+var $1,$2;
+var node;
+var pseudoVars;
+pseudoVars=["self", "super", "true", "false", "nil"];
+smalltalk.send(pseudoVars,"_do_",[(function(each){
+$1=smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]);
+smalltalk.send($1,"_value_",[each]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+node;
+return smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope),"_new",[]),"_bindingFor_",[node]),"_isPseudoVar",[])]);
+})]);
+return self}
 }),
 smalltalk.ScopeVarTest);
 
@@ -64,13 +366,17 @@ smalltalk.method({
 selector: "testTempVar",
 fn: function (){
 var self=this;
-var node=nil;
-var scope=nil;
-(node=(function($rec){smalltalk.send($rec, "_value_", ["bzzz"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", [])));
-(scope=smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope), "_new", []));
-smalltalk.send(scope, "_addTemp_", ["bzzz"]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(scope, "_bindingFor_", [node]), "_isTempVar", [])]);
-return self;}
+var $1,$2;
+var node;
+var scope;
+$1=smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]);
+smalltalk.send($1,"_value_",["bzzz"]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+scope=smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope),"_new",[]);
+smalltalk.send(scope,"_addTemp_",["bzzz"]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(scope,"_bindingFor_",[node]),"_isTempVar",[])]);
+return self}
 }),
 smalltalk.ScopeVarTest);
 
@@ -80,10 +386,14 @@ smalltalk.method({
 selector: "testUnknownVar",
 fn: function (){
 var self=this;
-var node=nil;
-(node=(function($rec){smalltalk.send($rec, "_value_", ["bzzz"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", [])));
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope), "_new", []), "_bindingFor_", [node]), "_isNil", [])]);
-return self;}
+var $1,$2;
+var node;
+$1=smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]);
+smalltalk.send($1,"_value_",["bzzz"]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope),"_new",[]),"_bindingFor_",[node]),"_isNil",[])]);
+return self}
 }),
 smalltalk.ScopeVarTest);
 
@@ -94,10 +404,10 @@ smalltalk.addMethod(
 "_setUp",
 smalltalk.method({
 selector: "setUp",
-fn: function () {
+fn: function (){
 var self=this;
-(self['@analyzer']=smalltalk.send((smalltalk.SemanticAnalyzer || SemanticAnalyzer), "_on_", [(smalltalk.Object || Object)]));
-return self;}
+self["@analyzer"]=smalltalk.send((smalltalk.SemanticAnalyzer || SemanticAnalyzer),"_on_",[(smalltalk.Object || Object)]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -105,11 +415,11 @@ smalltalk.addMethod(
 "_testAssignment",
 smalltalk.method({
 selector: "testAssignment",
-fn: function () {
+fn: function (){
 var self=this;
 var src=nil;
 var ast=nil;
-(src="foo self  := 1");
+(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;}
@@ -122,13 +432,13 @@ smalltalk.method({
 selector: "testNonLocalReturn",
 fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. ^ a");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(ast, "_scope", []), "_hasNonLocalReturn", [])]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. ^ a";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(ast,"_scope",[]),"_hasNonLocalReturn",[])]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -138,13 +448,13 @@ smalltalk.method({
 selector: "testNonLocalReturn2",
 fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ ^ a] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(ast, "_scope", []), "_hasNonLocalReturn", [])]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ [ ^ a] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(ast,"_scope",[]),"_hasNonLocalReturn",[])]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -152,15 +462,15 @@ smalltalk.addMethod(
 "_testScope",
 smalltalk.method({
 selector: "testScope",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ | b | b := a ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_scope", []), "__eq_eq", [smalltalk.send(ast, "_scope", [])])]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ | b | b := a ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_scope",[]),"__eq_eq",[smalltalk.send(ast,"_scope",[])])]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -168,15 +478,15 @@ smalltalk.addMethod(
 "_testScope2",
 smalltalk.method({
 selector: "testScope2",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ | b | b := a ] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_scope", []), "__eq_eq", [smalltalk.send(ast, "_scope", [])])]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ [ | b | b := a ] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_scope",[]),"__eq_eq",[smalltalk.send(ast,"_scope",[])])]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -184,16 +494,16 @@ smalltalk.addMethod(
 "_testScopeLevel",
 smalltalk.method({
 selector: "testScopeLevel",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ | b | b := a ] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(ast, "_scope", []), "_scopeLevel", []), "__eq", [(1)])]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_scope", []), "_scopeLevel", []), "__eq", [(3)])]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ [ | b | b := a ] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(ast,"_scope",[]),"_scopeLevel",[]),"__eq",[(1)])]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_scope",[]),"_scopeLevel",[]),"__eq",[(3)])]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -201,15 +511,15 @@ smalltalk.addMethod(
 "_testUnknownVariables",
 smalltalk.method({
 selector: "testUnknownVariables",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | b + a");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(ast, "_scope", []), "_unknownVariables", []), "__eq", [["b"]])]);
-return self;}
+var src;
+var ast;
+src="foo | a | b + a";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(ast,"_scope",[]),"_unknownVariables",[]),"__eq",[["b"]])]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -217,15 +527,15 @@ smalltalk.addMethod(
 "_testUnknownVariablesWithScope",
 smalltalk.method({
 selector: "testUnknownVariablesWithScope",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a b | [ c + 1. [ a + 1. d + 1 ]]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(ast, "_scope", []), "_unknownVariables", []), "__eq", [["c", "d"]])]);
-return self;}
+var src;
+var ast;
+src="foo | a b | [ c + 1. [ a + 1. d + 1 ]]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(ast,"_scope",[]),"_unknownVariables",[]),"__eq",[["c", "d"]])]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -233,14 +543,14 @@ smalltalk.addMethod(
 "_testVariableShadowing",
 smalltalk.method({
 selector: "testVariableShadowing",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -248,14 +558,16 @@ smalltalk.addMethod(
 "_testVariableShadowing2",
 smalltalk.method({
 selector: "testVariableShadowing2",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ | a | a := 2 ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(self['@analyzer'], "_visit_", [ast]);}), (smalltalk.ShadowingVariableError || ShadowingVariableError)]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ | a | a := 2 ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self,"_should_raise_",[(function(){
+return smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+}),(smalltalk.ShadowingVariableError || ShadowingVariableError)]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -263,14 +575,14 @@ smalltalk.addMethod(
 "_testVariableShadowing3",
 smalltalk.method({
 selector: "testVariableShadowing3",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ | b | b := 2 ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ | b | b := 2 ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -278,14 +590,14 @@ smalltalk.addMethod(
 "_testVariableShadowing4",
 smalltalk.method({
 selector: "testVariableShadowing4",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -293,14 +605,16 @@ smalltalk.addMethod(
 "_testVariableShadowing5",
 smalltalk.method({
 selector: "testVariableShadowing5",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(self['@analyzer'], "_visit_", [ast]);}), (smalltalk.ShadowingVariableError || ShadowingVariableError)]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self,"_should_raise_",[(function(){
+return smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+}),(smalltalk.ShadowingVariableError || ShadowingVariableError)]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -308,18 +622,18 @@ smalltalk.addMethod(
 "_testVariablesLookup",
 smalltalk.method({
 selector: "testVariablesLookup",
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ | b | b := a ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_receiver", []), "_binding", []), "_isTempVar", [])]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_receiver", []), "_binding", []), "_scope", []), "__eq_eq", [smalltalk.send(ast, "_scope", [])])]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_left", []), "_binding", []), "_isTempVar", [])]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_left", []), "_binding", []), "_scope", []), "__eq_eq", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_scope", [])])]);
-return self;}
+var src;
+var ast;
+src="foo | a | a + 1. [ | b | b := a ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_receiver",[]),"_binding",[]),"_isTempVar",[])]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_receiver",[]),"_binding",[]),"_scope",[]),"__eq_eq",[smalltalk.send(ast,"_scope",[])])]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_left",[]),"_binding",[]),"_isTempVar",[])]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_left",[]),"_binding",[]),"_scope",[]),"__eq_eq",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_scope",[])])]);
+return self}
 }),
 smalltalk.SemanticAnalyzerTest);
 

+ 566 - 147
js/Compiler-Tests.js

@@ -1,20 +1,411 @@
 smalltalk.addPackage('Compiler-Tests', {});
-smalltalk.addClass('IRASTTranslatorTest', smalltalk.TestCase, [], 'Compiler-Tests');
+smalltalk.addClass('CodeGeneratorTest', smalltalk.TestCase, ['receiver'], 'Compiler-Tests');
 smalltalk.addMethod(
-"_testIRMethod",
+"_codeGeneratorClass",
 smalltalk.method({
-selector: "testIRMethod",
-category: 'tests',
+selector: "codeGeneratorClass",
+category: 'accessing',
+fn: function (){
+var self=this;
+return (smalltalk.CodeGenerator || CodeGenerator);
+return self;},
+args: [],
+source: "codeGeneratorClass\x0a\x09^ CodeGenerator",
+messageSends: [],
+referencedClasses: ["CodeGenerator"]
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_compiler",
+smalltalk.method({
+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;},
+args: [],
+source: "compiler\x0a\x09^ Compiler new\x0a\x09\x09codeGeneratorClass: self codeGeneratorClass;\x0a\x09\x09yourself",
+messageSends: ["codeGeneratorClass:", "codeGeneratorClass", "yourself", "new"],
+referencedClasses: ["Compiler"]
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_setUp",
+smalltalk.method({
+selector: "setUp",
+category: 'initialization',
 fn: function (){
 var self=this;
+(self['@receiver']=smalltalk.send(smalltalk.send(self, "_targetClass", []), "_new", []));
+return self;},
+args: [],
+source: "setUp\x0a\x09receiver := self targetClass new",
+messageSends: ["new", "targetClass"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_should_return_",
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
 
+smalltalk.addMethod(
+"_targetClass",
+smalltalk.method({
+selector: "targetClass",
+category: 'accessing',
+fn: function (){
+var self=this;
+return (smalltalk.DoIt || DoIt);
 return self;},
 args: [],
-source: "testIRMethod",
+source: "targetClass\x0a\x09^ DoIt",
+messageSends: [],
+referencedClasses: ["DoIt"]
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_tearDown",
+smalltalk.method({
+selector: "tearDown",
+category: 'initialization',
+fn: function (){
+var self=this;
+
+return self;},
+args: [],
+source: "tearDown\x0a\x09\x22receiver := nil\x22",
 messageSends: [],
 referencedClasses: []
 }),
-smalltalk.IRASTTranslatorTest);
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testAssignment",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testBlockReturn",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testCascades",
+smalltalk.method({
+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;},
+args: [],
+source: "testCascades\x0a\x09\x0a\x09self should: 'foo ^ Array new add: 3; add: 4; yourself' return: #(3 4)",
+messageSends: ["should:return:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testLiterals",
+smalltalk.method({
+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;},
+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:", "->"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testLocalReturn",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testMessageSends",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testNestedIfTrue",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testNonLocalReturn",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifFalse",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifFalseIfTrue",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifNil",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifNilIfNotNil",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifNotNil",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifTrue",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+smalltalk.addMethod(
+"_testifTrueIfFalse",
+smalltalk.method({
+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;},
+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:"],
+referencedClasses: []
+}),
+smalltalk.CodeGeneratorTest);
+
+
+
+smalltalk.addClass('InliningCodeGeneratorTest', smalltalk.CodeGeneratorTest, [], 'Compiler-Tests');
+smalltalk.addMethod(
+"_codeGeneratorClass",
+smalltalk.method({
+selector: "codeGeneratorClass",
+category: 'accessing',
+fn: function (){
+var self=this;
+return (smalltalk.InliningCodeGenerator || InliningCodeGenerator);
+return self;},
+args: [],
+source: "codeGeneratorClass\x0a\x09^ InliningCodeGenerator",
+messageSends: [],
+referencedClasses: ["InliningCodeGenerator"]
+}),
+smalltalk.InliningCodeGeneratorTest);
 
 
 
@@ -26,14 +417,18 @@ selector: "testClassRefVar",
 category: 'tests',
 fn: function (){
 var self=this;
-var node=nil;
-(node=(function($rec){smalltalk.send($rec, "_value_", ["Object"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.ClassReferenceNode || ClassReferenceNode), "_new", [])));
-smalltalk.send(smalltalk.send((smalltalk.SemanticAnalyzer || SemanticAnalyzer), "_new", []), "_visit_", [node]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(node, "_binding", []), "_isClassRefVar", [])]);
-return self;},
+var $1,$2;
+var node;
+$1=smalltalk.send((smalltalk.ClassReferenceNode || ClassReferenceNode),"_new",[]);
+smalltalk.send($1,"_value_",["Object"]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+smalltalk.send(smalltalk.send((smalltalk.SemanticAnalyzer || SemanticAnalyzer),"_new",[]),"_visit_",[node]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(node,"_binding",[]),"_isClassRefVar",[])]);
+return self},
 args: [],
 source: "testClassRefVar\x0a\x09| node |\x0a\x09node := ClassReferenceNode new\x0a\x09\x09value: 'Object';\x0a\x09\x09yourself.\x0a\x09SemanticAnalyzer new visit: node.\x0a\x09self assert: node binding isClassRefVar",
-messageSends: ["value:", "yourself", "new", "visit:", "assert:", "isClassRefVar", "binding"],
+messageSends: ["value:", "new", "yourself", "visit:", "assert:", "isClassRefVar", "binding"],
 referencedClasses: ["ClassReferenceNode", "SemanticAnalyzer"]
 }),
 smalltalk.ScopeVarTest);
@@ -45,16 +440,20 @@ selector: "testInstanceVar",
 category: 'tests',
 fn: function (){
 var self=this;
-var node=nil;
-var scope=nil;
-(node=(function($rec){smalltalk.send($rec, "_value_", ["bzzz"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", [])));
-(scope=smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope), "_new", []));
-smalltalk.send(scope, "_addIVar_", ["bzzz"]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(scope, "_bindingFor_", [node]), "_isInstanceVar", [])]);
-return self;},
+var $1,$2;
+var node;
+var scope;
+$1=smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]);
+smalltalk.send($1,"_value_",["bzzz"]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+scope=smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope),"_new",[]);
+smalltalk.send(scope,"_addIVar_",["bzzz"]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(scope,"_bindingFor_",[node]),"_isInstanceVar",[])]);
+return self},
 args: [],
 source: "testInstanceVar\x0a\x09| node scope |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'bzzz';\x0a\x09\x09yourself.\x0a\x09scope := MethodLexicalScope new.\x0a\x09scope addIVar: 'bzzz'.\x0a\x09self assert: (scope bindingFor: node) isInstanceVar",
-messageSends: ["value:", "yourself", "new", "addIVar:", "assert:", "isInstanceVar", "bindingFor:"],
+messageSends: ["value:", "new", "yourself", "addIVar:", "assert:", "isInstanceVar", "bindingFor:"],
 referencedClasses: ["VariableNode", "MethodLexicalScope"]
 }),
 smalltalk.ScopeVarTest);
@@ -66,14 +465,22 @@ selector: "testPseudoVar",
 category: 'tests',
 fn: function (){
 var self=this;
-var node=nil;
-var pseudoVars=nil;
-(pseudoVars=["self", "super", "true", "false", "nil"]);
-smalltalk.send(pseudoVars, "_do_", [(function(each){(node=(function($rec){smalltalk.send($rec, "_value_", [each]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", [])));return smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope), "_new", []), "_bindingFor_", [node]), "_isPseudoVar", [])]);})]);
-return self;},
+var $1,$2;
+var node;
+var pseudoVars;
+pseudoVars=["self", "super", "true", "false", "nil"];
+smalltalk.send(pseudoVars,"_do_",[(function(each){
+$1=smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]);
+smalltalk.send($1,"_value_",[each]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+node;
+return smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope),"_new",[]),"_bindingFor_",[node]),"_isPseudoVar",[])]);
+})]);
+return self},
 args: [],
 source: "testPseudoVar\x0a\x09| node pseudoVars |\x0a\x09pseudoVars := #('self' 'super' 'true' 'false' 'nil').\x0a\x09pseudoVars do: [:each |\x0a\x09\x09node := VariableNode new\x0a\x09\x09value: each;\x0a\x09\x09yourself.\x0a\x09\x09self assert: (MethodLexicalScope new bindingFor: node) isPseudoVar ]",
-messageSends: ["do:", "value:", "yourself", "new", "assert:", "isPseudoVar", "bindingFor:"],
+messageSends: ["do:", "value:", "new", "yourself", "assert:", "isPseudoVar", "bindingFor:"],
 referencedClasses: ["VariableNode", "MethodLexicalScope"]
 }),
 smalltalk.ScopeVarTest);
@@ -85,16 +492,20 @@ selector: "testTempVar",
 category: 'tests',
 fn: function (){
 var self=this;
-var node=nil;
-var scope=nil;
-(node=(function($rec){smalltalk.send($rec, "_value_", ["bzzz"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", [])));
-(scope=smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope), "_new", []));
-smalltalk.send(scope, "_addTemp_", ["bzzz"]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(scope, "_bindingFor_", [node]), "_isTempVar", [])]);
-return self;},
+var $1,$2;
+var node;
+var scope;
+$1=smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]);
+smalltalk.send($1,"_value_",["bzzz"]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+scope=smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope),"_new",[]);
+smalltalk.send(scope,"_addTemp_",["bzzz"]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(scope,"_bindingFor_",[node]),"_isTempVar",[])]);
+return self},
 args: [],
 source: "testTempVar\x0a\x09| node scope |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'bzzz';\x0a\x09\x09yourself.\x0a\x09scope := MethodLexicalScope new.\x0a\x09scope addTemp: 'bzzz'.\x0a\x09self assert: (scope bindingFor: node) isTempVar",
-messageSends: ["value:", "yourself", "new", "addTemp:", "assert:", "isTempVar", "bindingFor:"],
+messageSends: ["value:", "new", "yourself", "addTemp:", "assert:", "isTempVar", "bindingFor:"],
 referencedClasses: ["VariableNode", "MethodLexicalScope"]
 }),
 smalltalk.ScopeVarTest);
@@ -106,13 +517,17 @@ selector: "testUnknownVar",
 category: 'tests',
 fn: function (){
 var self=this;
-var node=nil;
-(node=(function($rec){smalltalk.send($rec, "_value_", ["bzzz"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send((smalltalk.VariableNode || VariableNode), "_new", [])));
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope), "_new", []), "_bindingFor_", [node]), "_isNil", [])]);
-return self;},
+var $1,$2;
+var node;
+$1=smalltalk.send((smalltalk.VariableNode || VariableNode),"_new",[]);
+smalltalk.send($1,"_value_",["bzzz"]);
+$2=smalltalk.send($1,"_yourself",[]);
+node=$2;
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send((smalltalk.MethodLexicalScope || MethodLexicalScope),"_new",[]),"_bindingFor_",[node]),"_isNil",[])]);
+return self},
 args: [],
 source: "testUnknownVar\x0a\x09| node |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'bzzz';\x0a\x09\x09yourself.\x0a\x09self assert: (MethodLexicalScope new bindingFor: node) isNil",
-messageSends: ["value:", "yourself", "new", "assert:", "isNil", "bindingFor:"],
+messageSends: ["value:", "new", "yourself", "assert:", "isNil", "bindingFor:"],
 referencedClasses: ["VariableNode", "MethodLexicalScope"]
 }),
 smalltalk.ScopeVarTest);
@@ -125,14 +540,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "setUp",
 category: 'running',
-fn: function () {
+fn: function (){
 var self=this;
-(self['@analyzer']=smalltalk.send((smalltalk.SemanticAnalyzer || SemanticAnalyzer), "_on_", [(smalltalk.Object || Object)]));
-return self;},
+self["@analyzer"]=smalltalk.send((smalltalk.SemanticAnalyzer || SemanticAnalyzer),"_on_",[(smalltalk.Object || Object)]);
+return self},
 args: [],
 source: "setUp\x0a\x09analyzer := SemanticAnalyzer on: Object",
 messageSends: ["on:"],
-referencedClasses: ["SemanticAnalyzer", "Object"]
+referencedClasses: ["Object", "SemanticAnalyzer"]
 }),
 smalltalk.SemanticAnalyzerTest);
 
@@ -141,16 +556,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testAssignment",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
 var src=nil;
 var ast=nil;
-(src="foo self  := 1");
+(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;},
 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",
+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:"],
 referencedClasses: ["InvalidAssignmentError"]
 }),
@@ -163,13 +578,13 @@ selector: "testNonLocalReturn",
 category: 'tests',
 fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. ^ a");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(ast, "_scope", []), "_hasNonLocalReturn", [])]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. ^ a";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(ast,"_scope",[]),"_hasNonLocalReturn",[])]);
+return self},
 args: [],
 source: "testNonLocalReturn\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. ^ a'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self deny: ast scope hasNonLocalReturn",
 messageSends: ["parse:", "visit:", "deny:", "hasNonLocalReturn", "scope"],
@@ -184,13 +599,13 @@ selector: "testNonLocalReturn2",
 category: 'tests',
 fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ ^ a] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(ast, "_scope", []), "_hasNonLocalReturn", [])]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ [ ^ a] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(ast,"_scope",[]),"_hasNonLocalReturn",[])]);
+return self},
 args: [],
 source: "testNonLocalReturn2\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ [ ^ a] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self assert: ast scope hasNonLocalReturn",
 messageSends: ["parse:", "visit:", "assert:", "hasNonLocalReturn", "scope"],
@@ -203,15 +618,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testScope",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ | b | b := a ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_scope", []), "__eq_eq", [smalltalk.send(ast, "_scope", [])])]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ | b | b := a ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_scope",[]),"__eq_eq",[smalltalk.send(ast,"_scope",[])])]);
+return self},
 args: [],
 source: "testScope\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ | b | b := a ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self deny: ast nodes first nodes last scope == ast scope.",
 messageSends: ["parse:", "visit:", "deny:", "==", "scope", "last", "nodes", "first"],
@@ -224,15 +639,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testScope2",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ | b | b := a ] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_deny_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_scope", []), "__eq_eq", [smalltalk.send(ast, "_scope", [])])]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ [ | b | b := a ] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_deny_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_scope",[]),"__eq_eq",[smalltalk.send(ast,"_scope",[])])]);
+return self},
 args: [],
 source: "testScope2\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self deny: ast nodes first nodes last nodes first nodes first scope == ast scope.",
 messageSends: ["parse:", "visit:", "deny:", "==", "scope", "first", "nodes", "last"],
@@ -245,16 +660,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testScopeLevel",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ | b | b := a ] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(ast, "_scope", []), "_scopeLevel", []), "__eq", [(1)])]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_scope", []), "_scopeLevel", []), "__eq", [(3)])]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ [ | b | b := a ] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(ast,"_scope",[]),"_scopeLevel",[]),"__eq",[(1)])]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_scope",[]),"_scopeLevel",[]),"__eq",[(3)])]);
+return self},
 args: [],
 source: "testScopeLevel\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self assert: ast scope scopeLevel = 1.\x0a\x09self assert: ast nodes first nodes last nodes first nodes first scope scopeLevel = 3",
 messageSends: ["parse:", "visit:", "assert:", "=", "scopeLevel", "scope", "first", "nodes", "last"],
@@ -267,15 +682,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testUnknownVariables",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | b + a");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(ast, "_scope", []), "_unknownVariables", []), "__eq", [["b"]])]);
-return self;},
+var src;
+var ast;
+src="foo | a | b + a";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(ast,"_scope",[]),"_unknownVariables",[]),"__eq",[["b"]])]);
+return self},
 args: [],
 source: "testUnknownVariables\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | b + a'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self assert: ast scope unknownVariables = #('b')",
 messageSends: ["parse:", "visit:", "assert:", "=", "unknownVariables", "scope"],
@@ -288,15 +703,15 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testUnknownVariablesWithScope",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a b | [ c + 1. [ a + 1. d + 1 ]]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(ast, "_scope", []), "_unknownVariables", []), "__eq", [["c", "d"]])]);
-return self;},
+var src;
+var ast;
+src="foo | a b | [ c + 1. [ a + 1. d + 1 ]]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(ast,"_scope",[]),"_unknownVariables",[]),"__eq",[["c", "d"]])]);
+return self},
 args: [],
 source: "testUnknownVariablesWithScope\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a b | [ c + 1. [ a + 1. d + 1 ]]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09self assert: ast scope unknownVariables = #('c' 'd' )",
 messageSends: ["parse:", "visit:", "assert:", "=", "unknownVariables", "scope"],
@@ -309,14 +724,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testVariableShadowing",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+return self},
 args: [],
 source: "testVariableShadowing\x0a\x09| src ast |\x0a\x09src := 'foo | a | a + 1'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast",
 messageSends: ["parse:", "visit:"],
@@ -329,14 +744,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testVariableShadowing2",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ | a | a := 2 ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(self['@analyzer'], "_visit_", [ast]);}), (smalltalk.ShadowingVariableError || ShadowingVariableError)]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ | a | a := 2 ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self,"_should_raise_",[(function(){
+return smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+}),(smalltalk.ShadowingVariableError || ShadowingVariableError)]);
+return self},
 args: [],
 source: "testVariableShadowing2\x0a\x09| src ast |\x0a\x09src := 'foo | a | a + 1. [ | a | a := 2 ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09self should: [analyzer visit: ast] raise: ShadowingVariableError",
 messageSends: ["parse:", "should:raise:", "visit:"],
@@ -349,14 +766,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testVariableShadowing3",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ | b | b := 2 ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ | b | b := 2 ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+return self},
 args: [],
 source: "testVariableShadowing3\x0a\x09| src ast |\x0a\x09src := 'foo | a | a + 1. [ | b | b := 2 ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast",
 messageSends: ["parse:", "visit:"],
@@ -369,14 +786,14 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testVariableShadowing4",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+return self},
 args: [],
 source: "testVariableShadowing4\x0a\x09| src ast |\x0a\x09src := 'foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast",
 messageSends: ["parse:", "visit:"],
@@ -389,14 +806,16 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testVariableShadowing5",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self, "_should_raise_", [(function(){return smalltalk.send(self['@analyzer'], "_visit_", [ast]);}), (smalltalk.ShadowingVariableError || ShadowingVariableError)]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self,"_should_raise_",[(function(){
+return smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+}),(smalltalk.ShadowingVariableError || ShadowingVariableError)]);
+return self},
 args: [],
 source: "testVariableShadowing5\x0a\x09| src ast |\x0a\x09src := 'foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09self should: [analyzer visit: ast] raise: ShadowingVariableError",
 messageSends: ["parse:", "should:raise:", "visit:"],
@@ -409,18 +828,18 @@ smalltalk.addMethod(
 smalltalk.method({
 selector: "testVariablesLookup",
 category: 'tests',
-fn: function () {
+fn: function (){
 var self=this;
-var src=nil;
-var ast=nil;
-(src="foo | a | a + 1. [ | b | b := a ]");
-(ast=smalltalk.send((typeof smalltalk == 'undefined' ? nil : smalltalk), "_parse_", [src]));
-smalltalk.send(self['@analyzer'], "_visit_", [ast]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_receiver", []), "_binding", []), "_isTempVar", [])]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_receiver", []), "_binding", []), "_scope", []), "__eq_eq", [smalltalk.send(ast, "_scope", [])])]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_left", []), "_binding", []), "_isTempVar", [])]);
-smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_nodes", []), "_first", []), "_nodes", []), "_first", []), "_left", []), "_binding", []), "_scope", []), "__eq_eq", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast, "_nodes", []), "_first", []), "_nodes", []), "_last", []), "_scope", [])])]);
-return self;},
+var src;
+var ast;
+src="foo | a | a + 1. [ | b | b := a ]";
+ast=smalltalk.send(smalltalk,"_parse_",[src]);
+smalltalk.send(self["@analyzer"],"_visit_",[ast]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_receiver",[]),"_binding",[]),"_isTempVar",[])]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_receiver",[]),"_binding",[]),"_scope",[]),"__eq_eq",[smalltalk.send(ast,"_scope",[])])]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_left",[]),"_binding",[]),"_isTempVar",[])]);
+smalltalk.send(self,"_assert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_nodes",[]),"_first",[]),"_nodes",[]),"_first",[]),"_left",[]),"_binding",[]),"_scope",[]),"__eq_eq",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(ast,"_nodes",[]),"_first",[]),"_nodes",[]),"_last",[]),"_scope",[])])]);
+return self},
 args: [],
 source: "testVariablesLookup\x0a\x09| src ast |\x0a\x0a\x09src := 'foo | a | a + 1. [ | b | b := a ]'.\x0a\x09ast := smalltalk parse: src.\x0a\x09analyzer visit: ast.\x0a\x0a\x09\x22Binding for `a` in the message send\x22\x0a\x09self assert: ast nodes first nodes first receiver binding isTempVar.\x0a\x09self assert: ast nodes first nodes first receiver binding scope == ast scope.\x0a\x0a\x09\x22Binding for `b`\x22\x0a\x09self assert: ast nodes first nodes last nodes first nodes first left binding isTempVar.\x0a\x09self assert: ast nodes first nodes last nodes first nodes first left binding scope == ast nodes first nodes last scope.",
 messageSends: ["parse:", "visit:", "assert:", "isTempVar", "binding", "receiver", "first", "nodes", "==", "scope", "left", "last"],

+ 36 - 2
st/Compiler-IR.st

@@ -109,7 +109,7 @@ visitBlockSequenceNode: aNode
 				aNode nodes allButLast do: [ :each | 
 					self sequence add: (self visit: each) ].
 				aNode nodes last isReturnNode 
-					ifFalse: [ self sequence add: (IRReturn new add: (self visit: aNode nodes last); yourself) ]
+					ifFalse: [ self sequence add: (IRBlockReturn new add: (self visit: aNode nodes last); yourself) ]
 					ifTrue: [ self sequence add: (self visit: aNode nodes last) ]]]
 !
 
@@ -482,8 +482,12 @@ canBeAssigned
 	^ false
 !
 
+isBlockReturn
+	^ false
+!
+
 isLocalReturn
-	^ self isReturn
+	^ true
 !
 
 isNonLocalReturn
@@ -500,6 +504,24 @@ accept: aVisitor
 	^ aVisitor visitIRReturn: self
 ! !
 
+IRReturn subclass: #IRBlockReturn
+	instanceVariableNames: ''
+	package: 'Compiler-IR'!
+!IRBlockReturn commentStamp!
+Smalltalk blocks return their last statement. I am a implicit block return instruction.!
+
+!IRBlockReturn methodsFor: 'testing'!
+
+isBlockReturn
+	^ true
+! !
+
+!IRBlockReturn methodsFor: 'visiting'!
+
+accept: aVisitor
+	^ aVisitor visitIRBlockReturn: self
+! !
+
 IRReturn subclass: #IRNonLocalReturn
 	instanceVariableNames: ''
 	package: 'Compiler-IR'!
@@ -701,6 +723,10 @@ visitIRAssignment: anIRAssignment
 	^ self visitIRInstruction: anIRAssignment
 !
 
+visitIRBlockReturn: anIRBlockReturn
+	^ self visitIRReturn: anIRBlockReturn
+!
+
 visitIRBlockSequence: anIRBlockSequence
 	^ self visitIRSequence: anIRBlockSequence
 !
@@ -717,6 +743,14 @@ visitIRDynamicDictionary: anIRDynamicDictionary
 	^ self visitIRInstruction: anIRDynamicDictionary
 !
 
+visitIRInlinedClosure: anIRInlinedClosure
+	^ self visitIRClosure: anIRInlinedClosure
+!
+
+visitIRInlinedSequence: anIRInlinedSequence
+	^ self visitIRSequence: anIRInlinedSequence
+!
+
 visitIRInstruction: anIRInstruction
 	anIRInstruction instructions do: [ :each | self visit: each ].
 	^ anIRInstruction

+ 76 - 132
st/Compiler-Inlining.st

@@ -147,44 +147,6 @@ accept: aVisitor
 	aVisitor visitIRInlinedSequence: self
 ! !
 
-IRInlinedSequence subclass: #IRAssigningInlinedSequence
-	instanceVariableNames: 'assignTo'
-	package: 'Compiler-Inlining'!
-
-!IRAssigningInlinedSequence methodsFor: 'accessing'!
-
-accept: aVisitor
-	^ aVisitor visitIRAssigningInlinedSequence: self
-!
-
-assignTo
-	^ assignTo
-!
-
-assignTo: anIRInstruction
-	assignTo := anIRInstruction
-! !
-
-IRInlinedSequence subclass: #IRReturningInlinedSequence
-	instanceVariableNames: ''
-	package: 'Compiler-Inlining'!
-
-!IRReturningInlinedSequence methodsFor: 'visiting'!
-
-accept: aVisitor
-	^ aVisitor visitIRReturningInlinedSequence: self
-! !
-
-IRReturningInlinedSequence subclass: #IRNonLocalReturningInlinedSequence
-	instanceVariableNames: ''
-	package: 'Compiler-Inlining'!
-
-!IRNonLocalReturningInlinedSequence methodsFor: 'visiting'!
-
-accept: aVisitor
-	^ aVisitor visitIRNonLocalReturningInlinedSequence: self
-! !
-
 IRVisitor subclass: #IRInliner
 	instanceVariableNames: ''
 	package: 'Compiler-Inlining'!
@@ -288,21 +250,6 @@ I am a specialized JavaScript translator able to write inlined IR instructions t
 
 !IRInliningJSTranslator methodsFor: 'visiting'!
 
-visitIRAssigningInlinedSequence: anIRInlinedSequence
-
-	anIRInlinedSequence instructions allButLast do: [ :each | 
-		self stream nextPutStatementWith: [ self visit: each ]].
-
-	self stream nextPutStatementWith: [
-		anIRInlinedSequence instructions last canBeAssigned 
-			ifTrue: [
-				self stream 
-					nextPutAll: anIRInlinedSequence assignTo variable alias;
-                                	nextPutAssignment.
-				self visit: anIRInlinedSequence instructions last ]
-			ifFalse: [ self visit: anIRInlinedSequence instructions last ]]
-!
-
 visitIRInlinedAssignment: anIRInlinedAssignment
 	self visit: anIRInlinedAssignment instructions last
 !
@@ -369,32 +316,6 @@ visitIRInlinedReturn: anIRInlinedReturn
 visitIRInlinedSequence: anIRInlinedSequence
 	anIRInlinedSequence instructions do: [ :each | 
 		self stream nextPutStatementWith: [ self visit: each ]]
-!
-
-visitIRNonLocalReturningInlinedSequence: anIRInlinedSequence
-
-	anIRInlinedSequence instructions allButLast do: [ :each | 
-		self stream nextPutStatementWith: [ self visit: each ]].
-
-	self stream nextPutStatementWith: [
-		anIRInlinedSequence instructions last canBeAssigned 
-			ifTrue: [
-				self stream nextPutNonLocalReturnWith: [
-					self visit: anIRInlinedSequence instructions last ]]
-			ifFalse: [ self visit: anIRInlinedSequence instructions last ]]
-!
-
-visitIRReturningInlinedSequence: anIRInlinedSequence
-
-	anIRInlinedSequence instructions allButLast do: [ :each | 
-		self stream nextPutStatementWith: [ self visit: each ]].
-
-	self stream nextPutStatementWith: [
-		anIRInlinedSequence instructions last canBeAssigned 
-			ifTrue: [
-				self stream nextPutReturn.
-				self visit: anIRInlinedSequence instructions last ]
-			ifFalse: [ self visit: anIRInlinedSequence instructions last ]]
 ! !
 
 Object subclass: #IRSendInliner
@@ -506,35 +427,21 @@ inlineClosure: anIRClosure
 	statements := anIRClosure instructions last instructions.
 	
 	statements ifNotEmpty: [
-		statements allButLast do: [ :each | sequence add: (self translator visit: each) ].
+		statements allButLast do: [ :each | sequence add: each ].
+
 		"Inlined closures don't have implicit local returns"
-		statements last isLocalReturn 
-			ifTrue: [ sequence add: (self translator visit: statements last instructions first) ]
-			ifFalse: [ sequence add: (self translator visit: statements last) ]].
+		(statements last isReturn and: [ statements last isBlockReturn ])
+			ifTrue: [ sequence add: statements last instructions first ]
+			ifFalse: [ sequence add: statements last ] ].
 
 	^ inlinedClosure
 !
 
-inlineMessageBlock: anIRInstruction with: anotherIRInstruction
-	| inlinedSend inlinedClosure |
-
-	anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].
-	anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].
-
-	inlinedClosure := self inlineClosure: anIRInstruction.
-
-	inlinedSend := anotherIRInstruction.
-	inlinedSend
-		add: self send instructions first;
-		add: inlinedClosure.
-
-	self send replaceWith: inlinedSend.
-	^ inlinedSend
-!
-
 inlineSend: anIRSend
 	self send: anIRSend.
-	^ self perform: self send selector withArguments: self send instructions allButFirst
+	^ self 
+		perform: self send selector 
+		withArguments: self send instructions allButFirst
 !
 
 inlinedSend: inlinedSend with: anIRInstruction
@@ -543,18 +450,19 @@ inlinedSend: inlinedSend with: anIRInstruction
 	anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].
 	anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].
 
-	inlinedClosure := self inlineClosure: anIRInstruction.
+	inlinedClosure := self translator visit: (self inlineClosure: anIRInstruction).
 
 	inlinedSend
 		add: self send instructions first;
 		add: inlinedClosure.
 
 	self send replaceWith: inlinedSend.
+
 	^ inlinedSend
 !
 
 inlinedSend: inlinedSend with: anIRInstruction with: anotherIRInstruction
-	| inlinedClosure1 inclinedClosure2 |
+	| inlinedClosure1 inlinedClosure2 |
 
 	anIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].
 	anIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].
@@ -562,12 +470,13 @@ inlinedSend: inlinedSend with: anIRInstruction with: anotherIRInstruction
 	anotherIRInstruction isClosure ifFalse: [ self inliningError: 'Message argument should be a block' ].
 	anotherIRInstruction arguments size = 0 ifFalse: [ self inliningError: 'Inlined block should have zero argument' ].
 
-	inlinedClosure := self inlineClosure: anIRInstruction.
-	inlinedClosure2 := self inlineClosure: anotherIRInstruction.
+	inlinedClosure1 := self translator visit: (self inlineClosure: anIRInstruction).
+	inlinedClosure2 := self translator visit: (self inlineClosure: anotherIRInstruction).
+
 
 	inlinedSend
 		add: self send instructions first;
-		add: inlinedClosure;
+		add: inlinedClosure1;
 		add: inlinedClosure2.
 
 	self send replaceWith: inlinedSend.
@@ -615,14 +524,6 @@ assignment: aNode
 	assignment := aNode
 ! !
 
-!IRAssignmentInliner methodsFor: 'factory'!
-
-inlinedSequence
-	^ IRAssigningInlinedSequence new
-		assignTo: self assignment instructions first;
-		yourself
-! !
-
 !IRAssignmentInliner methodsFor: 'inlining'!
 
 inlineAssignment: anIRAssignment
@@ -634,6 +535,50 @@ inlineAssignment: anIRAssignment
 	anIRAssignment replaceWith: inlinedAssignment.
 	self inlineSend: inlinedAssignment instructions last.
 	^ inlinedAssignment
+!
+
+inlineClosure: anIRClosure
+	| inlinedClosure statements |
+
+	inlinedClosure := super inlineClosure: anIRClosure.
+	statements := inlinedClosure instructions last instructions.
+	
+	statements ifNotEmpty: [
+		statements last canBeAssigned ifTrue: [
+			statements last replaceWith: (IRAssignment new
+				add: self assignment instructions first;
+				add: statements last copy;
+				yourself) ] ].
+
+	^ inlinedClosure
+! !
+
+IRSendInliner subclass: #IRNonLocalReturnInliner
+	instanceVariableNames: ''
+	package: 'Compiler-Inlining'!
+
+!IRNonLocalReturnInliner methodsFor: 'factory'!
+
+inlinedReturn
+	^ IRInlinedNonLocalReturn new
+! !
+
+!IRNonLocalReturnInliner methodsFor: 'inlining'!
+
+inlineClosure: anIRClosure
+	"| inlinedClosure statements |
+
+	inlinedClosure := super inlineClosure: anIRClosure.
+	statements := inlinedClosure instructions last instructions.
+	
+	statements ifNotEmpty: [
+		statements last replaceWith: (IRNonLocalReturn new
+			add: statements last copy;
+			yourself) ].
+
+	^ inlinedClosure"
+
+	^ super inlineCLosure: anIRClosure
 ! !
 
 IRSendInliner subclass: #IRReturnInliner
@@ -646,14 +591,25 @@ I inline message sends with inlined closure together with a return instruction.!
 
 inlinedReturn
 	^ IRInlinedReturn new
-!
-
-inlinedSequence
-	^ IRReturningInlinedSequence new
 ! !
 
 !IRReturnInliner methodsFor: 'inlining'!
 
+inlineClosure: anIRClosure
+	| closure statements |
+
+	closure := super inlineClosure: anIRClosure.
+	statements := closure instructions last instructions.
+	
+	statements ifNotEmpty: [
+		statements last isReturn
+			ifFalse: [ statements last replaceWith: (IRReturn new
+				add: statements last copy;
+				yourself)] ].
+
+	^ closure
+!
+
 inlineReturn: anIRReturn
 	| return |
 	return := self inlinedReturn.
@@ -664,20 +620,6 @@ inlineReturn: anIRReturn
 	^ return
 ! !
 
-IRReturnInliner subclass: #IRNonLocalReturnInliner
-	instanceVariableNames: ''
-	package: 'Compiler-Inlining'!
-
-!IRNonLocalReturnInliner methodsFor: 'factory'!
-
-inlinedReturn
-	^ IRInlinedNonLocalReturn new
-!
-
-inlinedSequence
-	^ IRNonLocalReturningInlinedSequence new
-! !
-
 CodeGenerator subclass: #InliningCodeGenerator
 	instanceVariableNames: ''
 	package: 'Compiler-Inlining'!
@@ -688,9 +630,11 @@ I am a specialized code generator that uses inlining to produce more optimized J
 
 compileNode: aNode
 	| ir stream |
+
 	self semanticAnalyzer visit: aNode.
 	ir := self translator visit: aNode.
 	self inliner visit: ir.
+
 	^ self irTranslator
 		visit: ir;
 		contents

+ 4 - 0
st/Compiler-Semantic.st

@@ -97,6 +97,10 @@ canInlineNonLocalReturns
 	^ self isInlined and: [ self outerScope canInlineNonLocalReturns ]
 !
 
+isBlockScope
+	^ self isMethodScope not
+!
+
 isInlined
 	^ self instruction isInlined
 !

+ 169 - 4
st/Compiler-Tests.st

@@ -1,11 +1,176 @@
 Smalltalk current createPackage: 'Compiler-Tests' properties: #{}!
-TestCase subclass: #IRASTTranslatorTest
+TestCase subclass: #CodeGeneratorTest
+	instanceVariableNames: 'receiver'
+	package: 'Compiler-Tests'!
+
+!CodeGeneratorTest methodsFor: 'accessing'!
+
+codeGeneratorClass
+	^ CodeGenerator
+!
+
+targetClass
+	^ DoIt
+! !
+
+!CodeGeneratorTest methodsFor: 'factory'!
+
+compiler
+	^ Compiler new
+		codeGeneratorClass: self codeGeneratorClass;
+		yourself
+! !
+
+!CodeGeneratorTest methodsFor: 'initialization'!
+
+setUp
+	receiver := self targetClass new
+!
+
+tearDown
+	"receiver := nil"
+! !
+
+!CodeGeneratorTest methodsFor: 'testing'!
+
+should: aString return: anObject
+	| method result |
+
+	method := self compiler install: aString forClass: self targetClass category: 'tests'.
+	result := receiver perform: method selector.
+	self targetClass removeCompiledMethod: method.
+	self assert: anObject equals: result
+! !
+
+!CodeGeneratorTest methodsFor: 'tests'!
+
+testAssignment
+	self should: 'foo | a | a := true ifTrue: [ 1 ]. ^ a' return: 1.
+	self should: 'foo | a | a := false ifTrue: [ 1 ]. ^ a' return: nil.
+
+	self should: 'foo | a | ^ a := true ifTrue: [ 1 ]' return: 1
+!
+
+testBlockReturn
+	self should: 'foo ^ #(1 2 3) collect: [ :each | true ifTrue: [ each + 1 ] ]' return: #(2 3 4).
+	self should: 'foo ^ #(1 2 3) collect: [ :each | false ifFalse: [ each + 1 ] ]' return: #(2 3 4).
+	self should: 'foo ^ #(1 2 3) collect: [ :each | each odd ifTrue: [ each + 1 ] ifFalse: [ each - 1 ] ]' return: #(2 1 4).
+!
+
+testCascades
+	
+	self should: 'foo ^ Array new add: 3; add: 4; yourself' return: #(3 4)
+!
+
+testLiterals
+	self should: 'foo ^ 1' return: 1.
+	self should: 'foo ^ ''hello''' return: 'hello'.
+	self should: 'foo ^ #(1 2 3 4)' return: #(1 2 3 4).
+	self should: 'foo ^ {1. [:x | x ] value: 2. 3. [4] value}' return: #(1 2 3 4).
+	self should: 'foo ^ true' return: true.
+	self should: 'foo ^ false' return: false.
+	self should: 'foo ^ #{1->2. 3->4}' return: #{1->2. 3->4}.
+	self should: 'foo ^ #hello' return: #hello.
+	self should: 'foo ^ -123.456' return: -123.456
+!
+
+testLocalReturn
+	self should: 'foo ^ 1' return: 1.
+	self should: 'foo ^ 1 + 1' return: 2.
+	self should: 'foo ' return: receiver.
+	self should: 'foo self asString' return: receiver.
+	self should: 'foo | a b | a := 1. b := 2. ^ a + b' return: 3
+!
+
+testMessageSends
+	self should: 'foo ^ 1 asString' return: '1'.
+
+	self should: 'foo ^ 1 + 1' return: 2.
+	self should: 'foo ^ 1 + 2 * 3' return: 9.
+
+	self should: 'foo ^ 1 to: 3' return: #(1 2 3).
+	self should: 'foo ^ 1 to: 5 by: 2' return: #(1 3 5)
+!
+
+testNestedIfTrue
+	self should: 'foo ^ true ifTrue: [ false ifFalse: [ 1 ] ]' return: 1.
+	self should: 'foo ^ true ifTrue: [ false ifTrue: [ 1 ] ]' return: nil.
+
+	self should: 'foo true ifTrue: [ false ifFalse: [ ^ 1 ] ]' return: 1.
+	self should: 'foo true ifTrue: [ false ifTrue: [ ^ 1 ] ]' return: receiver.
+!
+
+testNonLocalReturn
+	self should: 'foo [ ^ 1 ] value' return: 1.
+	self should: 'foo [ ^ 1 + 1 ] value' return: 2.
+	self should: 'foo | a b | a := 1. b := 2. [ ^ a + b ] value. self halt' return: 3.
+	self should: 'foo [ :x | ^ x + x ] value: 4. ^ 2' return: 8
+!
+
+testifFalse
+	self should: 'foo true ifFalse: [ ^ 1 ]' return: receiver.
+	self should: 'foo false ifFalse: [ ^ 2 ]' return: 2.
+	
+	self should: 'foo ^ true ifFalse: [ 1 ]' return: nil.
+	self should: 'foo ^ false ifFalse: [ 2 ]' return: 2.
+!
+
+testifFalseIfTrue
+	self should: 'foo true ifFalse: [ ^ 1 ] ifTrue: [ ^ 2 ]' return: 2.
+	self should: 'foo false ifFalse: [ ^ 2 ] ifTrue: [ ^1 ]' return: 2.
+	
+	self should: 'foo ^ true ifFalse: [ 1 ] ifTrue: [ 2 ]' return: 2.
+	self should: 'foo ^ false ifFalse: [ 2 ] ifTrue: [ 1 ]' return: 2.
+!
+
+testifNil
+	self should: 'foo ^ 1 ifNil: [ 2 ]' return: 1.
+	self should: 'foo ^ nil ifNil: [ 2 ]' return: 2.
+
+	self should: 'foo 1 ifNil: [ ^ 2 ]' return: receiver.
+	self should: 'foo nil ifNil: [ ^ 2 ]' return: 2.
+!
+
+testifNilIfNotNil
+	self should: 'foo ^ 1 ifNil: [ 2 ] ifNotNil: [ 3 ]' return: 3.
+	self should: 'foo ^ nil ifNil: [ 2 ] ifNotNil: [ 3 ]' return: 2.
+
+	self should: 'foo 1 ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]' return: 3.
+	self should: 'foo nil ifNil: [ ^ 2 ] ifNotNil: [ ^3 ]' return: 2.
+!
+
+testifNotNil
+	self should: 'foo ^ 1 ifNotNil: [ 2 ]' return: 2.
+	self should: 'foo ^ nil ifNotNil: [ 2 ]' return: nil.
+
+	self should: 'foo 1 ifNotNil: [ ^ 2 ]' return: 2.
+	self should: 'foo nil ifNotNil: [ ^ 2 ]' return: receiver.
+!
+
+testifTrue
+	self should: 'foo false ifTrue: [ ^ 1 ]' return: receiver.
+	self should: 'foo true ifTrue: [ ^ 2 ]' return: 2.
+	
+	self should: 'foo ^ false ifTrue: [ 1 ]' return: nil.
+	self should: 'foo ^ true ifTrue: [ 2 ]' return: 2.
+!
+
+testifTrueIfFalse
+	self should: 'foo false ifTrue: [ ^ 1 ] ifFalse: [ ^2 ]' return: 2.
+	self should: 'foo true ifTrue: [ ^ 1 ] ifFalse: [ ^ 2 ]' return: 1.
+	
+	self should: 'foo ^ false ifTrue: [ 2 ] ifFalse: [ 1 ]' return: 1.
+	self should: 'foo ^ true ifTrue: [ 2 ] ifFalse: [ 1 ]' return: 2.
+! !
+
+CodeGeneratorTest subclass: #InliningCodeGeneratorTest
 	instanceVariableNames: ''
 	package: 'Compiler-Tests'!
 
-!IRASTTranslatorTest methodsFor: 'tests'!
+!InliningCodeGeneratorTest methodsFor: 'accessing'!
 
-testIRMethod
+codeGeneratorClass
+	^ InliningCodeGenerator
 ! !
 
 TestCase subclass: #ScopeVarTest
@@ -76,7 +241,7 @@ setUp
 testAssignment
 	| src ast |
 
-	src := 'foo self  := 1'.
+	src := 'foo self := 1'.
 	ast := smalltalk parse: src.
 	self should: [analyzer visit: ast] raise: InvalidAssignmentError
 !

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor