Browse Source

Removing hard spaces (\xa0).

Herbert Vojčík 9 years ago
parent
commit
c122a06cc7

+ 2 - 2
src/Compiler-Interpreter.js

@@ -2293,7 +2293,7 @@ $recv(str)._nextPutAll_(aString);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["nextPutAll:"]=5;
 //>>excludeEnd("ctx");
-$4=$recv(str)._nextPutAll_("})() })");
+$4=$recv(str)._nextPutAll_("})()})");
 return $4;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)});
@@ -2308,7 +2308,7 @@ return $5;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "eval: aString\x0a\x09\x22Evaluate aString as JS source inside an JS function.\x0a\x09aString is not sandboxed.\x22\x0a\x09\x0a\x09| source function |\x0a\x09\x0a\x09source := String streamContents: [ :str |\x0a\x09\x09str nextPutAll: '0,(function('.\x0a\x09\x09self context locals keys\x0a\x09\x09\x09do: [ :each | str nextPutAll: each ]\x0a\x09\x09\x09separatedBy: [ str nextPutAll: ',' ].\x0a\x09\x09str\x0a\x09\x09\x09nextPutAll: '){ return (function() {';\x0a\x09\x09\x09nextPutAll: aString;\x0a\x09\x09\x09nextPutAll: '})() })' ].\x0a\x09\x09\x09\x0a\x09function := Compiler new eval: source.\x0a\x09\x0a\x09^ function valueWithPossibleArguments: self context locals values",
+source: "eval: aString\x0a\x09\x22Evaluate aString as JS source inside an JS function.\x0a\x09aString is not sandboxed.\x22\x0a\x09\x0a\x09| source function |\x0a\x09\x0a\x09source := String streamContents: [ :str |\x0a\x09\x09str nextPutAll: '0,(function('.\x0a\x09\x09self context locals keys\x0a\x09\x09\x09do: [ :each | str nextPutAll: each ]\x0a\x09\x09\x09separatedBy: [ str nextPutAll: ',' ].\x0a\x09\x09str\x0a\x09\x09\x09nextPutAll: '){ return (function() {';\x0a\x09\x09\x09nextPutAll: aString;\x0a\x09\x09\x09nextPutAll: '})()})' ].\x0a\x09\x09\x09\x0a\x09function := Compiler new eval: source.\x0a\x09\x0a\x09^ function valueWithPossibleArguments: self context locals values",
 referencedClasses: ["String", "Compiler"],
 //>>excludeEnd("ide");
 messageSends: ["streamContents:", "nextPutAll:", "do:separatedBy:", "keys", "locals", "context", "eval:", "new", "valueWithPossibleArguments:", "values"]

+ 1 - 1
src/Compiler-Interpreter.st

@@ -672,7 +672,7 @@ eval: aString
 		str
 			nextPutAll: '){ return (function() {';
 			nextPutAll: aString;
-			nextPutAll: '})() })' ].
+			nextPutAll: '})()})' ].
 			
 	function := Compiler new eval: source.
 	

+ 11 - 11
src/Compiler-Tests.js

@@ -2140,7 +2140,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 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 ]",
+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]",
 referencedClasses: ["VariableNode", "MethodLexicalScope"],
 //>>excludeEnd("ide");
 messageSends: ["do:", "value:", "new", "yourself", "assert:", "isPseudoVar", "bindingFor:"]
@@ -2325,7 +2325,7 @@ function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
-src="foo | a | a + 1. [ [ ^ a] ]";
+src="foo | a | a + 1. [ [ ^ a] ]";
 ast=$recv($Smalltalk())._parse_(src);
 $recv(self["@analyzer"])._visit_(ast);
 self._assert_($recv($recv(ast)._scope())._hasNonLocalReturn());
@@ -2336,7 +2336,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 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",
+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",
 referencedClasses: ["Smalltalk"],
 //>>excludeEnd("ide");
 messageSends: ["parse:", "visit:", "assert:", "hasNonLocalReturn", "scope"]
@@ -2395,7 +2395,7 @@ function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?
 return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $8,$7,$6,$5,$4,$3,$2,$1;
-src="foo | a | a + 1. [ [ | b | b := a ] ]";
+src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=$recv($Smalltalk())._parse_(src);
 $recv(self["@analyzer"])._visit_(ast);
 $8=$recv($recv($recv(ast)._nodes())._first())._nodes();
@@ -2432,7 +2432,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 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.",
+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.",
 referencedClasses: ["Smalltalk"],
 //>>excludeEnd("ide");
 messageSends: ["parse:", "visit:", "deny:", "==", "scope", "first", "nodes", "last"]
@@ -2451,7 +2451,7 @@ function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?
 return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
 var $2,$1,$10,$9,$8,$7,$6,$5,$4,$3;
-src="foo | a | a + 1. [ [ | b | b := a ] ]";
+src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=$recv($Smalltalk())._parse_(src);
 $recv(self["@analyzer"])._visit_(ast);
 $2=$recv(ast)._scope();
@@ -2497,7 +2497,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 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 equals: 1.\x0a\x09self assert: ast nodes first nodes last nodes first nodes first scope scopeLevel equals: 3",
+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 equals: 1.\x0a\x09self assert: ast nodes first nodes last nodes first nodes first scope scopeLevel equals: 3",
 referencedClasses: ["Smalltalk"],
 //>>excludeEnd("ide");
 messageSends: ["parse:", "visit:", "assert:equals:", "scopeLevel", "scope", "first", "nodes", "last"]
@@ -2682,7 +2682,7 @@ function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
-src="foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]";
+src="foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]";
 ast=$recv($Smalltalk())._parse_(src);
 $recv(self["@analyzer"])._visit_(ast);
 return self;
@@ -2692,7 +2692,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 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",
+source: "testVariableShadowing4\x0a\x09| src ast |\x0a\x09src := 'foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]'.\x0a\x09ast := Smalltalk parse: src.\x0a\x09analyzer visit: ast",
 referencedClasses: ["Smalltalk"],
 //>>excludeEnd("ide");
 messageSends: ["parse:", "visit:"]
@@ -2711,7 +2711,7 @@ function $ShadowingVariableError(){return $globals.ShadowingVariableError||(type
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
-src="foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]";
+src="foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]";
 ast=$recv($Smalltalk())._parse_(src);
 self._should_raise_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -2729,7 +2729,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 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",
+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",
 referencedClasses: ["Smalltalk", "ShadowingVariableError"],
 //>>excludeEnd("ide");
 messageSends: ["parse:", "should:raise:", "visit:"]

+ 6 - 6
src/Compiler-Tests.st

@@ -592,7 +592,7 @@ testPseudoVar
 		node := VariableNode new
 		value: each;
 		yourself.
-		self assert: (MethodLexicalScope new bindingFor: node) isPseudoVar ]
+		self assert: (MethodLexicalScope new bindingFor: node) isPseudoVar]
 !
 
 testTempVar
@@ -646,7 +646,7 @@ testNonLocalReturn
 testNonLocalReturn2
 	| src ast |
 
-	src := 'foo | a | a + 1. [ [ ^ a] ]'.
+	src := 'foo | a | a + 1. [ [ ^ a] ]'.
 	ast := Smalltalk parse: src.
 	analyzer visit: ast.
 
@@ -666,7 +666,7 @@ testScope
 testScope2
 	| src ast |
 
-	src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.
+	src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.
 	ast := Smalltalk parse: src.
 	analyzer visit: ast.
 
@@ -676,7 +676,7 @@ testScope2
 testScopeLevel
 	| src ast |
 
-	src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.
+	src := 'foo | a | a + 1. [ [ | b | b := a ] ]'.
 	ast := Smalltalk parse: src.
 	analyzer visit: ast.
 
@@ -725,14 +725,14 @@ testVariableShadowing3
 
 testVariableShadowing4
 	| src ast |
-	src := 'foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]'.
+	src := 'foo | a | a + 1. [ [ [ | b | b := 2 ] ] ]'.
 	ast := Smalltalk parse: src.
 	analyzer visit: ast
 !
 
 testVariableShadowing5
 	| src ast |
-	src := 'foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]'.
+	src := 'foo | a | a + 1. [ [ [ | a | a := 2 ] ] ]'.
 	ast := Smalltalk parse: src.
 	self should: [analyzer visit: ast] raise: ShadowingVariableError
 !

+ 1 - 1
src/Kernel-Classes.js

@@ -2919,7 +2919,7 @@ return $5;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["className", "aClass", "aCollection", "packageName"],
-source: "migrateClassNamed: className superclass: aClass instanceVariableNames: aCollection package: packageName\x0a\x09| oldClass newClass tmp |\x0a\x09\x0a\x09tmp := 'new*', className.\x0a\x09oldClass := Smalltalk globals at: className.\x0a\x09\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass\x0a\x09\x09named: tmp\x0a\x09\x09instanceVariableNames: aCollection\x0a\x09\x09package: packageName.\x0a\x0a\x09self basicSwapClassNames: oldClass with: newClass.\x0a\x0a\x09[ self copyClass: oldClass to: newClass ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :exception |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09basicSwapClassNames: oldClass with: newClass;\x0a\x09\x09\x09\x09basicRemoveClass: newClass.\x0a\x09\x09\x09exception signal ].\x0a\x0a\x09self\x0a\x09\x09rawRenameClass: oldClass to: tmp;\x0a\x09\x09rawRenameClass: newClass to: className.\x0a\x0a\x09oldClass subclasses \x0a\x09\x09do: [ :each | self migrateClass: each superclass: newClass ].\x0a\x0a\x09self basicRemoveClass: oldClass.\x0a\x09\x0a\x09SystemAnnouncer current announce: (ClassMigrated new\x0a\x09\x09theClass: newClass;\x0a\x09\x09oldClass: oldClass;\x0a\x09\x09yourself).\x0a\x09\x0a\x09^ newClass",
+source: "migrateClassNamed: className superclass: aClass instanceVariableNames: aCollection package: packageName\x0a\x09| oldClass newClass tmp |\x0a\x09\x0a\x09tmp := 'new*', className.\x0a\x09oldClass := Smalltalk globals at: className.\x0a\x09\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass\x0a\x09\x09named: tmp\x0a\x09\x09instanceVariableNames: aCollection\x0a\x09\x09package: packageName.\x0a\x0a\x09self basicSwapClassNames: oldClass with: newClass.\x0a\x0a\x09[ self copyClass: oldClass to: newClass ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :exception |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09basicSwapClassNames: oldClass with: newClass;\x0a\x09\x09\x09\x09basicRemoveClass: newClass.\x0a\x09\x09\x09exception signal ].\x0a\x0a\x09self\x0a\x09\x09rawRenameClass: oldClass to: tmp;\x0a\x09\x09rawRenameClass: newClass to: className.\x0a\x0a\x09oldClass subclasses \x0a\x09\x09do: [ :each | self migrateClass: each superclass: newClass ].\x0a\x0a\x09self basicRemoveClass: oldClass.\x0a\x09\x0a\x09SystemAnnouncer current announce: (ClassMigrated new\x0a\x09\x09theClass: newClass;\x0a\x09\x09oldClass: oldClass;\x0a\x09\x09yourself).\x0a\x09\x0a\x09^ newClass",
 referencedClasses: ["Smalltalk", "Error", "SystemAnnouncer", "ClassMigrated"],
 //>>excludeEnd("ide");
 messageSends: [",", "at:", "globals", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "copyClass:to:", "basicRemoveClass:", "signal", "rawRenameClass:to:", "do:", "subclasses", "migrateClass:superclass:", "announce:", "current", "theClass:", "new", "oldClass:", "yourself"]

+ 1 - 1
src/Kernel-Classes.st

@@ -627,7 +627,7 @@ migrateClassNamed: className superclass: aClass instanceVariableNames: aCollecti
 
 	[ self copyClass: oldClass to: newClass ]
 		on: Error
-		do: [ :exception |
+		do: [ :exception |
 			self
 				basicSwapClassNames: oldClass with: newClass;
 				basicRemoveClass: newClass.

+ 2 - 2
src/Kernel-Methods.js

@@ -2519,7 +2519,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) { 
 //>>excludeEnd("ctx");
-return self.outerContext || self.homeContext;
+return self.outerContext || self.homeContext;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"outerContext",{},$globals.MethodContext)});
@@ -2527,7 +2527,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "outerContext\x0a\x09<return self.outerContext || self.homeContext>",
+source: "outerContext\x0a\x09<return self.outerContext || self.homeContext>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 1 - 1
src/Kernel-Methods.st

@@ -621,7 +621,7 @@ methodContext
 !
 
 outerContext
-	<return self.outerContext || self.homeContext>
+	<return self.outerContext || self.homeContext>
 !
 
 receiver