|
@@ -3880,7 +3880,7 @@ var self=this;
|
|
|
|
|
|
return $core.withContext(function($ctx1) {
|
|
|
|
|
|
-var $1,$2,$3,$4,$5,$6,$8,$7,$9,$10;
|
|
|
+var $1,$2,$3,$4,$5,$7,$6,$8,$9;
|
|
|
$1=self._stream();
|
|
|
|
|
|
$ctx1.sendIdx["stream"]=1;
|
|
@@ -3917,49 +3917,36 @@ $recv($3)._nextPutVars_($4);
|
|
|
|
|
|
$ctx3.sendIdx["nextPutVars:"]=1;
|
|
|
|
|
|
-$recv($recv(anIRMethod)._classReferences())._do_((function(each){
|
|
|
-
|
|
|
-return $core.withContext(function($ctx4) {
|
|
|
-
|
|
|
$5=self._stream();
|
|
|
|
|
|
-$ctx4.sendIdx["stream"]=4;
|
|
|
-
|
|
|
-return $recv($5)._nextPutClassRefFunction_(each);
|
|
|
-
|
|
|
-}, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,4)});
|
|
|
-
|
|
|
-}));
|
|
|
-$6=self._stream();
|
|
|
-
|
|
|
-$ctx3.sendIdx["stream"]=5;
|
|
|
+$ctx3.sendIdx["stream"]=4;
|
|
|
|
|
|
-return $recv($6)._nextPutContextFor_during_(anIRMethod,(function(){
|
|
|
+return $recv($5)._nextPutContextFor_during_(anIRMethod,(function(){
|
|
|
|
|
|
return $core.withContext(function($ctx4) {
|
|
|
|
|
|
-$8=$recv(anIRMethod)._internalVariables();
|
|
|
+$7=$recv(anIRMethod)._internalVariables();
|
|
|
|
|
|
$ctx4.sendIdx["internalVariables"]=1;
|
|
|
|
|
|
-$7=$recv($8)._notEmpty();
|
|
|
-if($core.assert($7)){
|
|
|
-$9=self._stream();
|
|
|
+$6=$recv($7)._notEmpty();
|
|
|
+if($core.assert($6)){
|
|
|
+$8=self._stream();
|
|
|
|
|
|
-$ctx4.sendIdx["stream"]=6;
|
|
|
+$ctx4.sendIdx["stream"]=5;
|
|
|
|
|
|
-$recv($9)._nextPutVars_($recv($recv($recv(anIRMethod)._internalVariables())._asSet())._collect_((function(each){
|
|
|
+$recv($8)._nextPutVars_($recv($recv($recv(anIRMethod)._internalVariables())._asSet())._collect_((function(each){
|
|
|
|
|
|
return $core.withContext(function($ctx5) {
|
|
|
|
|
|
return $recv($recv(each)._variable())._alias();
|
|
|
|
|
|
-}, function($ctx5) {$ctx5.fillBlock({each:each},$ctx4,7)});
|
|
|
+}, function($ctx5) {$ctx5.fillBlock({each:each},$ctx4,6)});
|
|
|
|
|
|
})));
|
|
|
};
|
|
|
-$10=$recv($recv(anIRMethod)._scope())._hasNonLocalReturn();
|
|
|
-if($core.assert($10)){
|
|
|
+$9=$recv($recv(anIRMethod)._scope())._hasNonLocalReturn();
|
|
|
+if($core.assert($9)){
|
|
|
return $recv(self._stream())._nextPutNonLocalReturnHandlingWith_((function(){
|
|
|
|
|
|
return $core.withContext(function($ctx5) {
|
|
@@ -3976,7 +3963,7 @@ $ctx5.supercall = false;
|
|
|
$ctx5.sendIdx["visitIRMethod:"]=1;
|
|
|
|
|
|
|
|
|
-}, function($ctx5) {$ctx5.fillBlock({},$ctx4,9)});
|
|
|
+}, function($ctx5) {$ctx5.fillBlock({},$ctx4,8)});
|
|
|
|
|
|
}));
|
|
|
} else {
|
|
@@ -3990,7 +3977,7 @@ $ctx4.supercall = false;
|
|
|
|
|
|
};
|
|
|
|
|
|
-}, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
|
|
|
+}, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
|
|
|
|
|
|
}));
|
|
|
|
|
@@ -4008,10 +3995,10 @@ return self;
|
|
|
},
|
|
|
|
|
|
args: ["anIRMethod"],
|
|
|
-source: "visitIRMethod: anIRMethod\x0a\x0a\x09self stream\x0a\x09\x09nextPutMethodDeclaration: anIRMethod\x0a\x09\x09with: [ self stream\x0a\x09\x09\x09nextPutFunctionWith: [\x0a\x09\x09\x09\x09self stream nextPutVars: (anIRMethod tempDeclarations collect: [ :each |\x0a\x09\x09\x09\x09\x09each name asVariableName ]).\x0a\x09\x09\x09\x09anIRMethod classReferences do: [ :each | self stream nextPutClassRefFunction: each ].\x0a\x09\x09\x09\x09self stream nextPutContextFor: anIRMethod during: [\x0a\x09\x09\x09\x09anIRMethod internalVariables notEmpty ifTrue: [\x0a\x09\x09\x09\x09\x09self stream nextPutVars: (anIRMethod internalVariables asSet collect: [ :each |\x0a\x09\x09\x09\x09\x09\x09each variable alias ]) ].\x0a\x09\x09\x09\x09anIRMethod scope hasNonLocalReturn\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09self stream nextPutNonLocalReturnHandlingWith: [\x0a\x09\x09\x09\x09\x09\x09\x09super visitIRMethod: anIRMethod ] ]\x0a\x09\x09\x09\x09\x09ifFalse: [ super visitIRMethod: anIRMethod ] ]]\x0a\x09\x09\x09arguments: anIRMethod arguments ]",
|
|
|
+source: "visitIRMethod: anIRMethod\x0a\x0a\x09self stream\x0a\x09\x09nextPutMethodDeclaration: anIRMethod\x0a\x09\x09with: [ self stream\x0a\x09\x09\x09nextPutFunctionWith: [\x0a\x09\x09\x09\x09self stream nextPutVars: (anIRMethod tempDeclarations collect: [ :each |\x0a\x09\x09\x09\x09\x09each name asVariableName ]).\x0a\x09\x09\x09\x09self stream nextPutContextFor: anIRMethod during: [\x0a\x09\x09\x09\x09anIRMethod internalVariables notEmpty ifTrue: [\x0a\x09\x09\x09\x09\x09self stream nextPutVars: (anIRMethod internalVariables asSet collect: [ :each |\x0a\x09\x09\x09\x09\x09\x09each variable alias ]) ].\x0a\x09\x09\x09\x09anIRMethod scope hasNonLocalReturn\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09self stream nextPutNonLocalReturnHandlingWith: [\x0a\x09\x09\x09\x09\x09\x09\x09super visitIRMethod: anIRMethod ] ]\x0a\x09\x09\x09\x09\x09ifFalse: [ super visitIRMethod: anIRMethod ] ]]\x0a\x09\x09\x09arguments: anIRMethod arguments ]",
|
|
|
referencedClasses: [],
|
|
|
|
|
|
-messageSends: ["nextPutMethodDeclaration:with:", "stream", "nextPutFunctionWith:arguments:", "nextPutVars:", "collect:", "tempDeclarations", "asVariableName", "name", "do:", "classReferences", "nextPutClassRefFunction:", "nextPutContextFor:during:", "ifTrue:", "notEmpty", "internalVariables", "asSet", "alias", "variable", "ifTrue:ifFalse:", "hasNonLocalReturn", "scope", "nextPutNonLocalReturnHandlingWith:", "visitIRMethod:", "arguments"]
|
|
|
+messageSends: ["nextPutMethodDeclaration:with:", "stream", "nextPutFunctionWith:arguments:", "nextPutVars:", "collect:", "tempDeclarations", "asVariableName", "name", "nextPutContextFor:during:", "ifTrue:", "notEmpty", "internalVariables", "asSet", "alias", "variable", "ifTrue:ifFalse:", "hasNonLocalReturn", "scope", "nextPutNonLocalReturnHandlingWith:", "visitIRMethod:", "arguments"]
|
|
|
}),
|
|
|
$globals.IRJSTranslator);
|
|
|
|
|
@@ -4887,65 +4874,6 @@ messageSends: ["ifFalse:", "requiresSmalltalkContext", "value", "nextPutAll:", "
|
|
|
}),
|
|
|
$globals.JSStream);
|
|
|
|
|
|
-$core.addMethod(
|
|
|
-$core.method({
|
|
|
-selector: "nextPutClassRefFunction:",
|
|
|
-protocol: 'streaming',
|
|
|
-fn: function (aString){
|
|
|
-var self=this;
|
|
|
-
|
|
|
-return $core.withContext(function($ctx1) {
|
|
|
-
|
|
|
-var $1;
|
|
|
-$1=self["@stream"];
|
|
|
-$recv($1)._nextPutAll_("function $");
|
|
|
-
|
|
|
-$ctx1.sendIdx["nextPutAll:"]=1;
|
|
|
-
|
|
|
-$recv($1)._nextPutAll_(aString);
|
|
|
-
|
|
|
-$ctx1.sendIdx["nextPutAll:"]=2;
|
|
|
-
|
|
|
-$recv($1)._nextPutAll_("(){return $globals.");
|
|
|
-
|
|
|
-$ctx1.sendIdx["nextPutAll:"]=3;
|
|
|
-
|
|
|
-$recv($1)._nextPutAll_(aString);
|
|
|
-
|
|
|
-$ctx1.sendIdx["nextPutAll:"]=4;
|
|
|
-
|
|
|
-$recv($1)._nextPutAll_("||(typeof ");
|
|
|
-
|
|
|
-$ctx1.sendIdx["nextPutAll:"]=5;
|
|
|
-
|
|
|
-$recv($1)._nextPutAll_(aString);
|
|
|
-
|
|
|
-$ctx1.sendIdx["nextPutAll:"]=6;
|
|
|
-
|
|
|
-$recv($1)._nextPutAll_("==\x22undefined\x22?nil:");
|
|
|
-
|
|
|
-$ctx1.sendIdx["nextPutAll:"]=7;
|
|
|
-
|
|
|
-$recv($1)._nextPutAll_(aString);
|
|
|
-
|
|
|
-$ctx1.sendIdx["nextPutAll:"]=8;
|
|
|
-
|
|
|
-$recv($1)._nextPutAll_(")}");
|
|
|
-$recv($1)._lf();
|
|
|
-return self;
|
|
|
-
|
|
|
-}, function($ctx1) {$ctx1.fill(self,"nextPutClassRefFunction:",{aString:aString},$globals.JSStream)});
|
|
|
-
|
|
|
-},
|
|
|
-
|
|
|
-args: ["aString"],
|
|
|
-source: "nextPutClassRefFunction: aString\x0a\x09\x22Creates an inner function $aString into method and called as `$Foo()`whenever the global is accessed.\x0a\x09This ensures that undefined global access will answer `nil`\x22\x0a\x09\x0a\x09stream\x0a\x09\x09nextPutAll: 'function $';\x0a\x09\x09nextPutAll: aString;\x0a\x09\x09nextPutAll: '(){return $globals.';\x0a\x09\x09nextPutAll: aString;\x0a\x09\x09nextPutAll: '||(typeof ';\x0a\x09\x09nextPutAll: aString;\x0a\x09\x09nextPutAll: '==\x22undefined\x22?nil:';\x0a\x09\x09nextPutAll: aString;\x0a\x09\x09nextPutAll: ')}';\x0a\x09\x09lf",
|
|
|
-referencedClasses: [],
|
|
|
-
|
|
|
-messageSends: ["nextPutAll:", "lf"]
|
|
|
-}),
|
|
|
-$globals.JSStream);
|
|
|
-
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "nextPutClosureWith:arguments:",
|