Browse Source

Keep formatting unchanged.

JS function .toString() started to spew out versions
without space (`function(){...}`) when they were created as such
in newer browsers.

To keep diff in .js files minimal, generate function for method's `fn`
_with_ a space.
Herby Vojčík 6 years ago
parent
commit
5ebd060e0b
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/Compiler-IR.js
  2. 1 1
      src/Compiler-IR.st

+ 2 - 2
src/Compiler-IR.js

@@ -4978,7 +4978,7 @@ var self=this,$self=this;
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1,$2,$3,$4,$5;
-$recv($self["@stream"])._nextPutAll_("fn: function(");
+$recv($self["@stream"])._nextPutAll_("fn: function (");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=1;
 //>>excludeEnd("ctx");
@@ -5031,7 +5031,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock", "anArray"],
-source: "nextPutFunctionWith: aBlock arguments: anArray\x0a\x09stream nextPutAll: 'fn: function('.\x0a\x09anArray\x0a\x09\x09do: [ :each | stream nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ stream nextPut: ',' ].\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09stream nextPutAll: 'var self=this,$self=this;'; lf.\x0a\x09aBlock value.\x0a\x09stream lf; nextPutAll: '}'",
+source: "nextPutFunctionWith: aBlock arguments: anArray\x0a\x09stream nextPutAll: 'fn: function ('.\x0a\x09anArray\x0a\x09\x09do: [ :each | stream nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ stream nextPut: ',' ].\x0a\x09stream nextPutAll: '){'; lf.\x0a\x09stream nextPutAll: 'var self=this,$self=this;'; lf.\x0a\x09aBlock value.\x0a\x09stream lf; nextPutAll: '}'",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: ["nextPutAll:", "do:separatedBy:", "asVariableName", "nextPut:", "lf", "value"]

+ 1 - 1
src/Compiler-IR.st

@@ -1172,7 +1172,7 @@ nextPutContextFor: aMethod during: aBlock
 !
 
 nextPutFunctionWith: aBlock arguments: anArray
-	stream nextPutAll: 'fn: function('.
+	stream nextPutAll: 'fn: function ('.
 	anArray
 		do: [ :each | stream nextPutAll: each asVariableName ]
 		separatedBy: [ stream nextPut: ',' ].