Browse Source

Inline #and: and #or:.

Herby Vojčík 4 years ago
parent
commit
9647046724

+ 39 - 57
cli/src/AmberCli.js

@@ -1018,37 +1018,30 @@ var header,token,auth,parts;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1,$2;
+var $1,$2,$3,$4;
 var $early={};
 try {
-if($core.assert([$recv([$recv($self.username)._isNil()
+if($core.assert([$recv($self.username)._isNil()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["isNil"]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv($self.password)._isNil();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=1
-//>>excludeEnd("ctx");
 ][0])){
+$1=$recv($self.password)._isNil();
+} else {
+$1=false;
+}
+if($core.assert($1)){
 return true;
 }
-$1=[$recv($recv(aRequest)._headers())._at_("authorization")
+$2=[$recv($recv(aRequest)._headers())._at_("authorization")
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["at:"]=1
 //>>excludeEnd("ctx");
 ][0];
-if($1 == null || $1.a$nil){
+if($2 == null || $2.a$nil){
 header="";
 } else {
-header=$1;
+header=$2;
 }
 $recv(header)._ifEmpty_ifNotEmpty_((function(){
 throw $early=[false];
@@ -1057,15 +1050,15 @@ throw $early=[false];
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$2=[$recv(header)._tokenize_(" ")
+$3=[$recv(header)._tokenize_(" ")
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["tokenize:"]=1
 //>>excludeEnd("ctx");
 ][0];
-if($2 == null || $2.a$nil){
+if($3 == null || $3.a$nil){
 token="";
 } else {
-token=$2;
+token=$3;
 }
 auth=$self._base64Decode_([$recv(token)._at_((2))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -1073,7 +1066,7 @@ auth=$self._base64Decode_([$recv(token)._at_((2))
 //>>excludeEnd("ctx");
 ][0]);
 parts=$recv(auth)._tokenize_(":");
-if($core.assert($recv([$recv($self.username).__eq([$recv(parts)._at_((1))
+if($core.assert([$recv($self.username).__eq([$recv(parts)._at_((1))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["at:"]=3
 //>>excludeEnd("ctx");
@@ -1081,15 +1074,12 @@ if($core.assert($recv([$recv($self.username).__eq([$recv(parts)._at_((1))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return $recv($self.password).__eq($recv(parts)._at_((2)));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)});
-//>>excludeEnd("ctx");
-})))){
+][0])){
+$4=$recv($self.password).__eq($recv(parts)._at_((2)));
+} else {
+$4=false;
+}
+if($core.assert($4)){
 throw $early=[true];
 } else {
 throw $early=[false];
@@ -2756,15 +2746,11 @@ return result;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return $recv($recv($recv($globals.Smalltalk)._isError_(e))._not())._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx4) {
-//>>excludeEnd("ctx");
+if($core.assert($recv($recv($globals.Smalltalk)._isError_(e))._not())){
+return true;
+} else {
 return $recv($recv(e)._context())._isNil();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
-//>>excludeEnd("ctx");
-}));
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,3)});
 //>>excludeEnd("ctx");
@@ -2996,15 +2982,13 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-if($core.assert($recv($recv(key)._ctrl())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv($recv(key)._name()).__eq("l");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-})))){
+var $1;
+if($core.assert($recv(key)._ctrl())){
+$1=$recv($recv(key)._name()).__eq("l");
+} else {
+$1=false;
+}
+if($core.assert($1)){
 $self._clearScreen();
 }
 return self;
@@ -3031,6 +3015,7 @@ var assignment;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1;
 assignment=$recv($recv(aString)._tokenize_(":="))._collect_((function(s){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
@@ -3040,19 +3025,16 @@ return $recv(s)._trimBoth();
 }, function($ctx2) {$ctx2.fillBlock({s:s},$ctx1,1)});
 //>>excludeEnd("ctx");
 }));
-if($core.assert($recv($recv($recv(assignment)._size()).__eq((2)))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $self._isIdentifier_([$recv(assignment)._first()
+if($core.assert($recv($recv(assignment)._size()).__eq((2)))){
+$1=$self._isIdentifier_([$recv(assignment)._first()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["first"]=1
+,$ctx1.sendIdx["first"]=1
 //>>excludeEnd("ctx");
 ][0]);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-})))){
+} else {
+$1=false;
+}
+if($core.assert($1)){
 return [$recv(aBlock)._value_value_($recv(assignment)._first(),$recv(assignment)._last())
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["value:value:"]=1

+ 8 - 16
lang/src/Compiler-AST.js

@@ -24,15 +24,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($recv($self._positionStart()).__lt_eq(aPoint))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($recv($self._positionStart()).__lt_eq(aPoint))){
 return $recv($self._positionEnd()).__gt_eq(aPoint);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"inPosition:",{aPoint:aPoint})});
 //>>excludeEnd("ctx");
@@ -126,15 +122,11 @@ children=$recv($self._allDagChildren())._select_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv($recv(each)._isNavigationNode())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
+if($core.assert($recv(each)._isNavigationNode())){
 return $recv(each)._inPosition_(aPoint);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
 //>>excludeEnd("ctx");

+ 140 - 54
lang/src/Compiler-Inlining.js

@@ -509,31 +509,19 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return [$recv($recv($recv(anIRAssignment)._isInlined())._not())._and_((function(){
+if($core.assert($recv($recv(anIRAssignment)._isInlined())._not())){
+if($core.assert($recv([$recv(anIRAssignment)._right()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv($recv([$recv(anIRAssignment)._right()
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["right"]=1
-//>>excludeEnd("ctx");
-][0])._isSend())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
+,$ctx1.sendIdx["right"]=1
 //>>excludeEnd("ctx");
+][0])._isSend())){
 return $self._shouldInlineSend_($recv(anIRAssignment)._right());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-}));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=1
-//>>excludeEnd("ctx");
-][0];
+} else {
+return false;
+}
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"shouldInlineAssignment:",{anIRAssignment:anIRAssignment})});
 //>>excludeEnd("ctx");
@@ -556,31 +544,19 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return [$recv($recv($recv(anIRReturn)._isInlined())._not())._and_((function(){
+if($core.assert($recv($recv(anIRReturn)._isInlined())._not())){
+if($core.assert($recv([$recv(anIRReturn)._expression()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv($recv([$recv(anIRReturn)._expression()
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["expression"]=1
-//>>excludeEnd("ctx");
-][0])._isSend())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
+,$ctx1.sendIdx["expression"]=1
 //>>excludeEnd("ctx");
+][0])._isSend())){
 return $self._shouldInlineSend_($recv(anIRReturn)._expression());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-}));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=1
-//>>excludeEnd("ctx");
-][0];
+} else {
+return false;
+}
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"shouldInlineReturn:",{anIRReturn:anIRReturn})});
 //>>excludeEnd("ctx");
@@ -603,15 +579,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($recv($recv(anIRSend)._isInlined())._not())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($recv($recv(anIRSend)._isInlined())._not())){
 return $recv($globals.IRSendInliner)._shouldInline_(anIRSend);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"shouldInlineSend:",{anIRSend:anIRSend})});
 //>>excludeEnd("ctx");
@@ -1111,6 +1083,63 @@ $core.addClass("IRSendInliner", $globals.Object, ["send", "translator"], "Compil
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.IRSendInliner.comment="I inline some message sends and block closure arguments. I heavily rely on #perform: to dispatch inlining methods.";
 //>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "and:",
+protocol: "inlining",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anIRInstruction"],
+source: "and: anIRInstruction\x0a\x09self mustBeNiladicClosure: anIRInstruction.\x0a\x09^ self\x0a\x09\x09inlinedSend: IRInlinedIfTrueIfFalse new\x0a\x09\x09withBlock: anIRInstruction\x0a\x09\x09withBlock: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: (IRValue new value: false; yourself);\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)",
+referencedClasses: ["IRInlinedIfTrueIfFalse", "IRClosure", "IRBlockSequence", "IRValue"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["mustBeNiladicClosure:", "inlinedSend:withBlock:withBlock:", "new", "scope:", "copy", "scope", "add:", "value:", "yourself"]
+}, function ($methodClass){ return function (anIRInstruction){
+var self=this,$self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$3,$4;
+$self._mustBeNiladicClosure_(anIRInstruction);
+$1=[$recv($globals.IRInlinedIfTrueIfFalse)._new()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["new"]=1
+//>>excludeEnd("ctx");
+][0];
+$2=[$recv($globals.IRClosure)._new()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["new"]=2
+//>>excludeEnd("ctx");
+][0];
+$recv($2)._scope_($recv($recv(anIRInstruction)._scope())._copy());
+$3=[$recv($globals.IRBlockSequence)._new()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["new"]=3
+//>>excludeEnd("ctx");
+][0];
+$4=$recv($globals.IRValue)._new();
+$recv($4)._value_(false);
+$recv($3)._add_([$recv($4)._yourself()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["yourself"]=1
+//>>excludeEnd("ctx");
+][0]);
+[$recv($2)._add_([$recv($3)._yourself()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["yourself"]=2
+//>>excludeEnd("ctx");
+][0])
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["add:"]=1
+//>>excludeEnd("ctx");
+][0];
+return $self._inlinedSend_withBlock_withBlock_($1,anIRInstruction,$recv($2)._yourself());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"and:",{anIRInstruction:anIRInstruction})});
+//>>excludeEnd("ctx");
+}; }),
+$globals.IRSendInliner);
+
 $core.addMethod(
 $core.method({
 selector: "ifFalse:",
@@ -1843,6 +1872,63 @@ return self;
 }; }),
 $globals.IRSendInliner);
 
+$core.addMethod(
+$core.method({
+selector: "or:",
+protocol: "inlining",
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anIRInstruction"],
+source: "or: anIRInstruction\x0a\x09self mustBeNiladicClosure: anIRInstruction.\x0a\x09^ self\x0a\x09\x09inlinedSend: IRInlinedIfTrueIfFalse new\x0a\x09\x09withBlock: (IRClosure new\x0a\x09\x09\x09scope: anIRInstruction scope copy;\x0a\x09\x09\x09add: (IRBlockSequence new\x0a\x09\x09\x09\x09add: (IRValue new value: true; yourself);\x0a\x09\x09\x09\x09yourself);\x0a\x09\x09\x09yourself)\x0a\x09\x09withBlock: anIRInstruction",
+referencedClasses: ["IRInlinedIfTrueIfFalse", "IRClosure", "IRBlockSequence", "IRValue"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["mustBeNiladicClosure:", "inlinedSend:withBlock:withBlock:", "new", "scope:", "copy", "scope", "add:", "value:", "yourself"]
+}, function ($methodClass){ return function (anIRInstruction){
+var self=this,$self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$3,$4;
+$self._mustBeNiladicClosure_(anIRInstruction);
+$1=[$recv($globals.IRInlinedIfTrueIfFalse)._new()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["new"]=1
+//>>excludeEnd("ctx");
+][0];
+$2=[$recv($globals.IRClosure)._new()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["new"]=2
+//>>excludeEnd("ctx");
+][0];
+$recv($2)._scope_($recv($recv(anIRInstruction)._scope())._copy());
+$3=[$recv($globals.IRBlockSequence)._new()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["new"]=3
+//>>excludeEnd("ctx");
+][0];
+$4=$recv($globals.IRValue)._new();
+$recv($4)._value_(true);
+$recv($3)._add_([$recv($4)._yourself()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["yourself"]=1
+//>>excludeEnd("ctx");
+][0]);
+[$recv($2)._add_([$recv($3)._yourself()
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["yourself"]=2
+//>>excludeEnd("ctx");
+][0])
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+,$ctx1.sendIdx["add:"]=1
+//>>excludeEnd("ctx");
+][0];
+return $self._inlinedSend_withBlock_withBlock_($1,$recv($2)._yourself(),anIRInstruction);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"or:",{anIRInstruction:anIRInstruction})});
+//>>excludeEnd("ctx");
+}; }),
+$globals.IRSendInliner);
+
 $core.addMethod(
 $core.method({
 selector: "send",
@@ -1924,14 +2010,14 @@ selector: "inlinedSelectors",
 protocol: "accessing",
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "inlinedSelectors\x0a\x09^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil:')",
+source: "inlinedSelectors\x0a\x09^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil:' 'and:' 'or:')",
 referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
 messageSends: []
 }, function ($methodClass){ return function (){
 var self=this,$self=this;
-return ["ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:", "ifNil:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:"];
+return ["ifTrue:", "ifFalse:", "ifTrue:ifFalse:", "ifFalse:ifTrue:", "ifNil:", "ifNotNil:", "ifNil:ifNotNil:", "ifNotNil:ifNil:", "and:", "or:"];
 
 }; }),
 $globals.IRSendInliner.a$cls);

+ 27 - 1
lang/src/Compiler-Inlining.st

@@ -315,6 +315,19 @@ inlinedSequence
 
 !IRSendInliner methodsFor: 'inlining'!
 
+and: anIRInstruction
+	self mustBeNiladicClosure: anIRInstruction.
+	^ self
+		inlinedSend: IRInlinedIfTrueIfFalse new
+		withBlock: anIRInstruction
+		withBlock: (IRClosure new
+			scope: anIRInstruction scope copy;
+			add: (IRBlockSequence new
+				add: (IRValue new value: false; yourself);
+				yourself);
+			yourself)
+!
+
 ifFalse: anIRInstruction
 	self mustBeNiladicClosure: anIRInstruction.
 	^ self inlinedSend: IRInlinedIfFalse new withBlock: anIRInstruction
@@ -432,6 +445,19 @@ inlinedClosure: closure wrapFinalValueIn: aBlock
 	final yieldsValue ifTrue: [ sequence replace: final with: (aBlock value: final) ].
 
 	^ closure
+!
+
+or: anIRInstruction
+	self mustBeNiladicClosure: anIRInstruction.
+	^ self
+		inlinedSend: IRInlinedIfTrueIfFalse new
+		withBlock: (IRClosure new
+			scope: anIRInstruction scope copy;
+			add: (IRBlockSequence new
+				add: (IRValue new value: true; yourself);
+				yourself);
+			yourself)
+		withBlock: anIRInstruction
 ! !
 
 !IRSendInliner methodsFor: 'private'!
@@ -490,7 +516,7 @@ mustBeNiladicOrUnaryClosure: anIRInstruction
 !IRSendInliner class methodsFor: 'accessing'!
 
 inlinedSelectors
-	^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil:')
+	^ #('ifTrue:' 'ifFalse:' 'ifTrue:ifFalse:' 'ifFalse:ifTrue:' 'ifNil:' 'ifNotNil:' 'ifNil:ifNotNil:' 'ifNotNil:ifNil:' 'and:' 'or:')
 !
 
 inlinedSelectorsNeedingIdempotentReceiver

+ 13 - 25
lang/src/Compiler-Interpreter.js

@@ -1661,15 +1661,11 @@ return true;
 } else {
 $1;
 }
-return $recv($recv($self._interpreter())._atEnd())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($recv($self._interpreter())._atEnd())){
 return $recv($self._context())._isTopContext();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"atEnd",{})});
 //>>excludeEnd("ctx");
@@ -2237,15 +2233,11 @@ return $core.withContext(function($ctx1) {
 if($core.assert($self.forceAtEnd)){
 return true;
 }
-return $recv($self._hasReturned())._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($self._hasReturned())){
+return true;
+} else {
 return $recv($self._node())._isNil();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-}));
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"atEnd",{})});
 //>>excludeEnd("ctx");
@@ -3092,19 +3084,15 @@ $recv((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv($recv([$self._node()
+if($core.assert($recv([$self._node()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["node"]=1
 //>>excludeEnd("ctx");
-][0])._isNil())._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
+][0])._isNil())){
+return true;
+} else {
 return $recv($self._node())._isSteppingNode();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-}));
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");

+ 14 - 21
lang/src/Compiler-Semantic.js

@@ -543,15 +543,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($self._isInlined())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($self._isInlined())){
 return $recv($self._outerScope())._canFlattenNonLocalReturns();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"canFlattenNonLocalReturns",{})});
 //>>excludeEnd("ctx");
@@ -1961,7 +1957,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1,$2;
+var $1,$2,$3;
 if($core.assert($recv(aString)._isCapitalized())){
 $recv($self._classReferences())._add_(aString);
 $1=[$recv($globals.ClassRefVar)._new()
@@ -1980,18 +1976,15 @@ return [$recv($1)._yourself()
 //>>excludeEnd("ctx");
 ][0];
 }
-if($core.assert($recv($recv($recv($globals.Smalltalk)._globalJsVariables())._includes_(aString))._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $self._isVariableKnown_inPackage_(aString,$self._thePackage());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-})))){
-$2=$recv($globals.ExternallyKnownVar)._new();
-$recv($2)._name_(aString);
-return $recv($2)._yourself();
+if($core.assert($recv($recv($globals.Smalltalk)._globalJsVariables())._includes_(aString))){
+$2=true;
+} else {
+$2=$self._isVariableKnown_inPackage_(aString,$self._thePackage());
+}
+if($core.assert($2)){
+$3=$recv($globals.ExternallyKnownVar)._new();
+$recv($3)._name_(aString);
+return $recv($3)._yourself();
 }
 $self._errorUnknownVariable_(aString);
 return self;

+ 8 - 16
lang/src/Kernel-Classes.js

@@ -336,10 +336,9 @@ var self=this,$self=this;
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-return $recv($self._includesSelector_($recv(aSelector)._asString()))._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($self._includesSelector_($recv(aSelector)._asString()))){
+return true;
+} else {
 $1=$self._superclass();
 if($1 == null || $1.a$nil){
 return false;
@@ -348,10 +347,7 @@ var superClass;
 superClass=$1;
 return $recv(superClass)._canUnderstand_(aSelector);
 }
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"canUnderstand:",{aSelector:aSelector})});
 //>>excludeEnd("ctx");
@@ -374,15 +370,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($self.__eq_eq(aClass))._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($self.__eq_eq(aClass))){
+return true;
+} else {
 return $self._inheritsFrom_(aClass);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"includesBehavior:",{aClass:aClass})});
 //>>excludeEnd("ctx");

+ 68 - 107
lang/src/Kernel-Collections.js

@@ -24,7 +24,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return [$recv([$recv([$self._class()
+if($core.assert([$recv([$self._class()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["class"]=1
 //>>excludeEnd("ctx");
@@ -32,39 +32,27 @@ return [$recv([$recv([$self._class()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv([$recv([$self._key()
+][0])){
+if($core.assert([$recv([$self._key()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["key"]=1
+,$ctx1.sendIdx["key"]=1
 //>>excludeEnd("ctx");
 ][0]).__eq($recv(anAssociation)._key())
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["="]=2
-//>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
+,$ctx1.sendIdx["="]=2
 //>>excludeEnd("ctx");
+][0])){
 return $recv([$self._value()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx3.sendIdx["value"]=1
+,$ctx1.sendIdx["value"]=1
 //>>excludeEnd("ctx");
 ][0]).__eq($recv(anAssociation)._value());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-}));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=1
-//>>excludeEnd("ctx");
-][0];
+} else {
+return false;
+}
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"=",{anAssociation:anAssociation})});
 //>>excludeEnd("ctx");
@@ -1268,25 +1256,23 @@ var set,outputSet;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1;
 set=$self._asSet();
 outputSet=$recv($globals.Set)._new();
 $recv(aCollection)._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-if($core.assert($recv([$recv(set)._includes_(each)
+if($core.assert([$recv(set)._includes_(each)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["includes:"]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return $recv($recv(outputSet)._includes_(each))._not();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-})))){
+][0])){
+$1=$recv($recv(outputSet)._includes_(each))._not();
+} else {
+$1=false;
+}
+if($core.assert($1)){
 return $recv(outputSet)._add_(each);
 }
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -3767,9 +3753,10 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1;
 var $early={};
 try {
-if(!$core.assert($recv([$recv([$self._class()
+if($core.assert([$recv([$self._class()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["class"]=1
 //>>excludeEnd("ctx");
@@ -3777,23 +3764,20 @@ if(!$core.assert($recv([$recv([$self._class()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return [$recv([$self._size()
+][0])){
+$1=[$recv([$self._size()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["size"]=1
+,$ctx1.sendIdx["size"]=1
 //>>excludeEnd("ctx");
 ][0]).__eq($recv(aCollection)._size())
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["="]=2
+,$ctx1.sendIdx["="]=2
 //>>excludeEnd("ctx");
 ][0];
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-})))){
+} else {
+$1=false;
+}
+if(!$core.assert($1)){
 return false;
 }
 $self._withIndexDo_((function(each,i){
@@ -6022,15 +6006,13 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-if(!$core.assert($recv($recv(anObject)._isString())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv($recv(anObject)._size()).__eq((1));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-})))){
+var $1;
+if($core.assert($recv(anObject)._isString())){
+$1=$recv($recv(anObject)._size()).__eq((1));
+} else {
+$1=false;
+}
+if(!$core.assert($1)){
 $self._error_([$recv(["Cannot put ".__comma($recv($recv(anObject)._class())._name())
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx[","]=2
@@ -6389,15 +6371,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($recv($self._size()).__eq((1)))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($recv($self._size()).__eq((1)))){
 return "aeiou"._includes_($self._asLowercase());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"isVowel",{})});
 //>>excludeEnd("ctx");
@@ -6472,6 +6450,7 @@ var cr,lf,start,sz,nextLF,nextCR;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1,$2;
 var $early={};
 try {
 start=(1);
@@ -6500,27 +6479,20 @@ return $recv(start).__lt_eq(sz);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-if($core.assert([$recv([$recv(nextLF).__eq((0))
+if($core.assert([$recv(nextLF).__eq((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return [$recv(nextCR).__eq((0))
+][0])){
+$1=[$recv(nextCR).__eq((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx3.sendIdx["="]=2
+,$ctx2.sendIdx["="]=2
 //>>excludeEnd("ctx");
 ][0];
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
-//>>excludeEnd("ctx");
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["and:"]=1
-//>>excludeEnd("ctx");
-][0])){
+} else {
+$1=false;
+}
+if($core.assert($1)){
 [$recv(aBlock)._value_value_value_(start,sz,sz)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["value:value:value:"]=1
@@ -6528,31 +6500,24 @@ return [$recv(nextCR).__eq((0))
 ][0];
 throw $early=[self];
 }
-if($core.assert($recv([$recv(nextCR).__eq((0))
+if($core.assert([$recv(nextCR).__eq((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["="]=3
 //>>excludeEnd("ctx");
-][0])._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return $recv([(0).__lt(nextLF)
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx3.sendIdx["<"]=1
-//>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx4) {
-//>>excludeEnd("ctx");
-return $recv(nextLF).__lt(nextCR);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)});
-//>>excludeEnd("ctx");
-}));
+][0])){
+$2=true;
+} else {
+if($core.assert([(0).__lt(nextLF)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
+,$ctx2.sendIdx["<"]=1
 //>>excludeEnd("ctx");
-})))){
+][0])){
+$2=$recv(nextLF).__lt(nextCR);
+} else {
+$2=false;
+}
+}
+if($core.assert($2)){
 [$recv(aBlock)._value_value_value_(start,[$recv(nextLF).__minus((1))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["-"]=1
@@ -8541,15 +8506,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($self._atStart())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($self._atStart())){
 return $self._atEnd();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"isEmpty",{})});
 //>>excludeEnd("ctx");

+ 20 - 32
lang/src/Kernel-Exceptions.js

@@ -366,11 +366,12 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1;
 return $recv(aContext)._findContextSuchThat_((function(one){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv($recv([$recv([$recv(one)._receiver()
+if($core.assert([$recv([$recv(one)._receiver()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["receiver"]=1
 //>>excludeEnd("ctx");
@@ -378,15 +379,12 @@ return $recv($recv([$recv([$recv(one)._receiver()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["=="]=1
 //>>excludeEnd("ctx");
-][0])._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return $recv($recv(one)._receiver()).__eq_eq($self._class());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-})))._not();
+][0])){
+$1=true;
+} else {
+$1=$recv($recv(one)._receiver()).__eq_eq($self._class());
+}
+return $recv($1)._not();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({one:one},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -524,11 +522,12 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1;
 return $recv(aContext)._findContextSuchThat_((function(one){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv([$recv([$recv([$recv(one)._receiver()
+if($core.assert([$recv([$recv(one)._receiver()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["receiver"]=1
 //>>excludeEnd("ctx");
@@ -536,27 +535,16 @@ return $recv([$recv([$recv([$recv(one)._receiver()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["=="]=1
 //>>excludeEnd("ctx");
-][0])._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return $recv($recv($recv(one)._receiver()).__eq_eq($self._class()))._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx4) {
-//>>excludeEnd("ctx");
-return $recv($recv($recv(one)._method())._selector()).__eq("halt");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
-//>>excludeEnd("ctx");
-}));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["or:"]=1
-//>>excludeEnd("ctx");
-][0])._not();
+][0])){
+$1=true;
+} else {
+if($core.assert($recv($recv(one)._receiver()).__eq_eq($self._class()))){
+$1=true;
+} else {
+$1=$recv($recv($recv(one)._method())._selector()).__eq("halt");
+}
+}
+return $recv($1)._not();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({one:one},$ctx1,1)});
 //>>excludeEnd("ctx");

+ 20 - 36
lang/src/Kernel-Infrastructure.js

@@ -1856,15 +1856,11 @@ return $recv($recv([each,$recv(each)._theMetaClass()])._copyWithout_(nil))._anyS
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return $recv($recv($recv(any)._protocols())._includes_(starCategoryName))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx4) {
-//>>excludeEnd("ctx");
+if($core.assert($recv($recv(any)._protocols())._includes_(starCategoryName))){
 return $recv($recv(any)._ownMethodsInProtocol_(starCategoryName))._notEmpty();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx3) {$ctx3.fillBlock({any:any},$ctx2,3)});
 //>>excludeEnd("ctx");
@@ -2085,7 +2081,7 @@ return $recv($recv($self._imports())._asArray())._sorted_((function(a,b){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv($recv($recv([$recv(a)._isString()
+if($core.assert($recv($recv([$recv(a)._isString()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["isString"]=1
 //>>excludeEnd("ctx");
@@ -2093,31 +2089,23 @@ return $recv($recv($recv([$recv(a)._isString()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["isString"]=2
 //>>excludeEnd("ctx");
-][0]))._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return $recv($recv([$recv(a)._isString()
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx3.sendIdx["isString"]=3
-//>>excludeEnd("ctx");
-][0]).__eq($recv(b)._isString()))._and_((function(){
+][0]))){
+return true;
+} else {
+if($core.assert($recv([$recv(a)._isString()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx4) {
+,$ctx2.sendIdx["isString"]=3
 //>>excludeEnd("ctx");
+][0]).__eq($recv(b)._isString()))){
 return $recv([$recv(a)._value()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx4.sendIdx["value"]=1
+,$ctx2.sendIdx["value"]=1
 //>>excludeEnd("ctx");
 ][0]).__lt_eq($recv(b)._value());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
-//>>excludeEnd("ctx");
-}));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -3374,15 +3362,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($self._isSmalltalkObject_(anObject))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($self._isSmalltalkObject_(anObject))){
 return $recv(anObject)._isError();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"isError:",{anObject:anObject})});
 //>>excludeEnd("ctx");

+ 8 - 10
lang/src/Kernel-Methods.js

@@ -3724,19 +3724,17 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-if($core.assert($recv($self._isBlockContext())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv([$self._outerContext()
+var $1;
+if($core.assert($self._isBlockContext())){
+$1=$recv([$self._outerContext()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["outerContext"]=1
+,$ctx1.sendIdx["outerContext"]=1
 //>>excludeEnd("ctx");
 ][0])._notNil();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-})))){
+} else {
+$1=false;
+}
+if($core.assert($1)){
 return $recv($self._outerContext())._receiver();
 } else {
 return $self._basicReceiver();

+ 62 - 104
lang/src/Kernel-Objects.js

@@ -2434,7 +2434,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv([$recv([$recv(aDate)._class()
+if($core.assert([$recv([$recv(aDate)._class()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["class"]=1
 //>>excludeEnd("ctx");
@@ -2442,19 +2442,15 @@ return $recv([$recv([$recv(aDate)._class()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["=="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+][0])){
 return $recv([$self._asMilliseconds()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["asMilliseconds"]=1
+,$ctx1.sendIdx["asMilliseconds"]=1
 //>>excludeEnd("ctx");
 ][0]).__eq_eq($recv(aDate)._asMilliseconds());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"=",{aDate:aDate})});
 //>>excludeEnd("ctx");
@@ -3992,15 +3988,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($self.__gt_eq(min))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($self.__gt_eq(min))){
 return $self.__lt_eq(max);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"between:and:",{min:min,max:max})});
 //>>excludeEnd("ctx");
@@ -5873,7 +5865,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv([$recv([$self._x()
+if($core.assert([$recv([$self._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["x"]=1
 //>>excludeEnd("ctx");
@@ -5881,19 +5873,15 @@ return $recv([$recv([$self._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["<"]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+][0])){
 return $recv([$self._y()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["y"]=1
+,$ctx1.sendIdx["y"]=1
 //>>excludeEnd("ctx");
 ][0]).__lt($recv(aPoint)._y());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"<",{aPoint:aPoint})});
 //>>excludeEnd("ctx");
@@ -5916,7 +5904,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv([$recv([$self._x()
+if($core.assert([$recv([$self._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["x"]=1
 //>>excludeEnd("ctx");
@@ -5924,19 +5912,15 @@ return $recv([$recv([$self._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["<="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+][0])){
 return $recv([$self._y()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["y"]=1
+,$ctx1.sendIdx["y"]=1
 //>>excludeEnd("ctx");
 ][0]).__lt_eq($recv(aPoint)._y());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"<=",{aPoint:aPoint})});
 //>>excludeEnd("ctx");
@@ -5959,7 +5943,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv([$recv([$recv(aPoint)._class()
+if($core.assert([$recv([$recv(aPoint)._class()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["class"]=1
 //>>excludeEnd("ctx");
@@ -5967,27 +5951,23 @@ return $recv([$recv([$recv(aPoint)._class()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+][0])){
 return $recv([$recv([$recv(aPoint)._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["x"]=1
+,$ctx1.sendIdx["x"]=1
 //>>excludeEnd("ctx");
 ][0]).__eq($self._x())
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["="]=2
+,$ctx1.sendIdx["="]=2
 //>>excludeEnd("ctx");
 ][0]).__and($recv([$recv(aPoint)._y()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["y"]=1
+,$ctx1.sendIdx["y"]=1
 //>>excludeEnd("ctx");
 ][0]).__eq($self._y()));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint})});
 //>>excludeEnd("ctx");
@@ -6010,7 +5990,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv([$recv([$self._x()
+if($core.assert([$recv([$self._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["x"]=1
 //>>excludeEnd("ctx");
@@ -6018,19 +5998,15 @@ return $recv([$recv([$self._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx[">"]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+][0])){
 return $recv([$self._y()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["y"]=1
+,$ctx1.sendIdx["y"]=1
 //>>excludeEnd("ctx");
 ][0]).__gt($recv(aPoint)._y());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,">",{aPoint:aPoint})});
 //>>excludeEnd("ctx");
@@ -6053,7 +6029,7 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv([$recv([$self._x()
+if($core.assert([$recv([$self._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["x"]=1
 //>>excludeEnd("ctx");
@@ -6061,19 +6037,15 @@ return $recv([$recv([$self._x()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx[">="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+][0])){
 return $recv([$self._y()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx["y"]=1
+,$ctx1.sendIdx["y"]=1
 //>>excludeEnd("ctx");
 ][0]).__gt_eq($recv(aPoint)._y());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,">=",{aPoint:aPoint})});
 //>>excludeEnd("ctx");
@@ -6327,21 +6299,19 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1;
 [$recv($self.x)._printOn_(aStream)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["printOn:"]=1
 //>>excludeEnd("ctx");
 ][0];
 $recv(aStream)._nextPutAll_("@");
-if($core.assert($recv($recv($self.y)._notNil())._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv($self.y)._negative();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-})))){
+if($core.assert($recv($self.y)._notNil())){
+$1=$recv($self.y)._negative();
+} else {
+$1=false;
+}
+if($core.assert($1)){
 $recv(aStream)._space();
 }
 $recv($self.y)._printOn_(aStream);
@@ -6631,19 +6601,15 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv([$recv($self.origin).__eq($recv(aRectangle)._origin())
+if($core.assert([$recv($self.origin).__eq($recv(aRectangle)._origin())
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["="]=1
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+][0])){
 return $recv($self.corner).__eq($recv(aRectangle)._corner());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"=",{aRectangle:aRectangle})});
 //>>excludeEnd("ctx");
@@ -6666,15 +6632,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($recv($self.origin).__lt_eq(aPoint))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($recv($self.origin).__lt_eq(aPoint))){
 return $recv($self.corner).__gt_eq(aPoint);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"containsPoint:",{aPoint:aPoint})});
 //>>excludeEnd("ctx");
@@ -6697,15 +6659,11 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return $recv($recv($recv(aRect)._origin()).__gt_eq($self.origin))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
+if($core.assert($recv($recv(aRect)._origin()).__gt_eq($self.origin))){
 return $recv($recv(aRect)._corner()).__lt_eq($self.corner);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
+} else {
+return false;
+}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"containsRect:",{aRect:aRect})});
 //>>excludeEnd("ctx");

+ 92 - 131
lang/src/Kernel-Tests.js

@@ -1724,206 +1724,167 @@ var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-[$self._assert_([true._and_((function(){
-return true;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=1
-//>>excludeEnd("ctx");
-][0])
+var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14;
+if($core.assert(true)){
+$1=true;
+} else {
+$1=false;
+}
+[$self._assert_($1)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["assert:"]=1
 //>>excludeEnd("ctx");
 ][0];
-[$self._deny_([true._and_((function(){
-return false;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=2
-//>>excludeEnd("ctx");
-][0])
+if($core.assert(true)){
+$2=false;
+} else {
+$2=false;
+}
+[$self._deny_($2)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["deny:"]=1
 //>>excludeEnd("ctx");
 ][0];
-[$self._deny_([false._and_((function(){
-return true;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=3
-//>>excludeEnd("ctx");
-][0])
+if($core.assert(false)){
+$3=true;
+} else {
+$3=false;
+}
+[$self._deny_($3)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["deny:"]=2
 //>>excludeEnd("ctx");
 ][0];
-[$self._deny_([false._and_((function(){
-return false;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=4
-//>>excludeEnd("ctx");
-][0])
+if($core.assert(false)){
+$4=false;
+} else {
+$4=false;
+}
+[$self._deny_($4)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["deny:"]=3
 //>>excludeEnd("ctx");
 ][0];
-[$self._assert_([true._or_((function(){
-return true;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["or:"]=1
-//>>excludeEnd("ctx");
-][0])
+if($core.assert(true)){
+$5=true;
+} else {
+$5=true;
+}
+[$self._assert_($5)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["assert:"]=2
 //>>excludeEnd("ctx");
 ][0];
-[$self._assert_([true._or_((function(){
-return false;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["or:"]=2
-//>>excludeEnd("ctx");
-][0])
+if($core.assert(true)){
+$6=true;
+} else {
+$6=false;
+}
+[$self._assert_($6)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["assert:"]=3
 //>>excludeEnd("ctx");
 ][0];
-[$self._assert_([false._or_((function(){
-return true;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["or:"]=3
-//>>excludeEnd("ctx");
-][0])
+if($core.assert(false)){
+$7=true;
+} else {
+$7=true;
+}
+[$self._assert_($7)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["assert:"]=4
 //>>excludeEnd("ctx");
 ][0];
-[$self._deny_([false._or_((function(){
-return false;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["or:"]=4
-//>>excludeEnd("ctx");
-][0])
+if($core.assert(false)){
+$8=true;
+} else {
+$8=false;
+}
+[$self._deny_($8)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["deny:"]=4
 //>>excludeEnd("ctx");
 ][0];
-[$self._assert_([true._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return [(1).__gt((0))
+if($core.assert(true)){
+$9=[(1).__gt((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx[">"]=1
+,$ctx1.sendIdx[">"]=1
 //>>excludeEnd("ctx");
 ][0];
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,9)});
-//>>excludeEnd("ctx");
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=5
-//>>excludeEnd("ctx");
-][0])
+} else {
+$9=false;
+}
+[$self._assert_($9)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["assert:"]=5
 //>>excludeEnd("ctx");
 ][0];
-[$self._deny_([$recv([(1).__gt((0))
+if($core.assert([(1).__gt((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx[">"]=2
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-return false;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["and:"]=6
-//>>excludeEnd("ctx");
-][0])
+][0])){
+$10=false;
+} else {
+$10=false;
+}
+[$self._deny_($10)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["deny:"]=5
 //>>excludeEnd("ctx");
 ][0];
-$self._deny_($recv([(1).__gt((0))
+if($core.assert([(1).__gt((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx[">"]=3
 //>>excludeEnd("ctx");
-][0])._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return [(1).__gt((2))
+][0])){
+$11=[(1).__gt((2))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx[">"]=4
+,$ctx1.sendIdx[">"]=4
 //>>excludeEnd("ctx");
 ][0];
+} else {
+$11=false;
+}
+$self._deny_($11);
+if($core.assert(false)){
+$12=true;
+} else {
+$12=[(1).__gt((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,11)});
-//>>excludeEnd("ctx");
-})));
-[$self._assert_([false._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return [(1).__gt((0))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx2.sendIdx[">"]=5
+,$ctx1.sendIdx[">"]=5
 //>>excludeEnd("ctx");
 ][0];
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,12)});
-//>>excludeEnd("ctx");
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["or:"]=5
-//>>excludeEnd("ctx");
-][0])
+}
+[$self._assert_($12)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["assert:"]=6
 //>>excludeEnd("ctx");
 ][0];
-[$self._assert_([$recv([(1).__gt((0))
+if($core.assert([(1).__gt((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx[">"]=6
 //>>excludeEnd("ctx");
-][0])._or_((function(){
-return false;
-
-}))
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx1.sendIdx["or:"]=6
-//>>excludeEnd("ctx");
-][0])
+][0])){
+$13=true;
+} else {
+$13=false;
+}
+[$self._assert_($13)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["assert:"]=7
 //>>excludeEnd("ctx");
 ][0];
-$self._assert_($recv([(1).__gt((0))
+if($core.assert([(1).__gt((0))
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx[">"]=7
 //>>excludeEnd("ctx");
-][0])._or_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return (1).__gt((2));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,14)});
-//>>excludeEnd("ctx");
-})));
+][0])){
+$14=true;
+} else {
+$14=(1).__gt((2));
+}
+$self._assert_($14);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testLogicKeywords",{})});

+ 8 - 10
lang/src/Platform-ImportExport.js

@@ -2982,6 +2982,7 @@ var xhr;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1;
 xhr=$recv($globals.Platform)._newXhr();
 $recv(xhr)._open_url_async_("PUT",aURL,true);
 $recv(xhr)._onreadystatechange_((function(){
@@ -2989,19 +2990,16 @@ $recv(xhr)._onreadystatechange_((function(){
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 if($core.assert($recv($recv(xhr)._readyState()).__eq((4)))){
-return $recv($recv($recv([$recv(xhr)._status()
+if($core.assert($recv([$recv(xhr)._status()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx2.sendIdx["status"]=1
 //>>excludeEnd("ctx");
-][0]).__gt_eq((200)))._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return $recv($recv(xhr)._status()).__lt((300));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
-//>>excludeEnd("ctx");
-})))._ifTrue_ifFalse_(aBlock,anotherBlock);
+][0]).__gt_eq((200)))){
+$1=$recv($recv(xhr)._status()).__lt((300));
+} else {
+$1=false;
+}
+return $recv($1)._ifTrue_ifFalse_(aBlock,anotherBlock);
 }
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});

+ 8 - 10
lang/src/SUnit.js

@@ -1055,6 +1055,7 @@ var failed;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
+var $1;
 [$recv($self.testCase)._context_(self)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 ,$ctx1.sendIdx["context:"]=1
@@ -1076,19 +1077,16 @@ return failed;
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 $recv($self.testCase)._context_(nil);
-if($core.assert($recv(failed)._and_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx3) {
-//>>excludeEnd("ctx");
-return [$recv($self.testCase)._isAsync()
+if($core.assert(failed)){
+$1=[$recv($self.testCase)._isAsync()
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-,$ctx3.sendIdx["isAsync"]=1
+,$ctx2.sendIdx["isAsync"]=1
 //>>excludeEnd("ctx");
 ][0];
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
-//>>excludeEnd("ctx");
-})))){
+} else {
+$1=false;
+}
+if($core.assert($1)){
 $recv($self.testCase)._finished();
 }
 if(!$core.assert($recv($self.testCase)._isAsync())){