Browse Source

reformatting to follow the coding conventions

Nicolas Petton 11 năm trước cách đây
mục cha
commit
26a757a05f
53 tập tin đã thay đổi với 1718 bổ sung1719 xóa
  1. 112 112
      js/Canvas.js
  2. 27 27
      js/Compiler-AST.js
  3. 21 21
      js/Compiler-Core.js
  4. 13 13
      js/Compiler-IR.js
  5. 2 2
      js/Compiler-Interpreter.js
  6. 1 1
      js/Compiler-Semantic.js
  7. 1 1
      js/Compiler-Tests.js
  8. 3 3
      js/Examples.js
  9. 3 3
      js/Helios-Browser.js
  10. 6 6
      js/Helios-Core.js
  11. 2 2
      js/Helios-Inspector.js
  12. 1 1
      js/Helios-KeyBindings.js
  13. 2 2
      js/Helios-References.js
  14. 11 11
      js/Helios-Workspace.js
  15. 81 81
      js/IDE.js
  16. 22 22
      js/Importer-Exporter.js
  17. 1 1
      js/Kernel-Announcements.js
  18. 32 32
      js/Kernel-Classes.js
  19. 112 112
      js/Kernel-Collections.js
  20. 10 10
      js/Kernel-Exceptions.js
  21. 26 26
      js/Kernel-Infrastructure.js
  22. 17 17
      js/Kernel-Methods.js
  23. 92 92
      js/Kernel-Objects.js
  24. 30 30
      js/Kernel-Tests.js
  25. 1 1
      js/Kernel-Transcript.js
  26. 5 5
      js/SUnit-Tests.js
  27. 27 27
      js/SUnit.js
  28. 129 129
      st/Canvas.st
  29. 29 29
      st/Compiler-AST.st
  30. 26 26
      st/Compiler-Core.st
  31. 17 17
      st/Compiler-IR.st
  32. 2 2
      st/Compiler-Interpreter.st
  33. 1 1
      st/Compiler-Semantic.st
  34. 4 4
      st/Examples.st
  35. 3 3
      st/Helios-Browser.st
  36. 6 6
      st/Helios-Core.st
  37. 3 3
      st/Helios-Inspector.st
  38. 1 1
      st/Helios-KeyBindings.st
  39. 2 2
      st/Helios-References.st
  40. 11 11
      st/Helios-Workspace.st
  41. 214 214
      st/IDE.st
  42. 40 40
      st/Importer-Exporter.st
  43. 1 1
      st/Kernel-Announcements.st
  44. 45 45
      st/Kernel-Classes.st
  45. 172 172
      st/Kernel-Collections.st
  46. 10 10
      st/Kernel-Exceptions.st
  47. 36 36
      st/Kernel-Infrastructure.st
  48. 18 18
      st/Kernel-Methods.st
  49. 115 115
      st/Kernel-Objects.st
  50. 125 125
      st/Kernel-Tests.st
  51. 1 1
      st/Kernel-Transcript.st
  52. 8 8
      st/SUnit-Tests.st
  53. 38 39
      st/SUnit.st

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 112 - 112
js/Canvas.js


+ 27 - 27
js/Compiler-AST.js

@@ -65,7 +65,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.Node)})},
 args: [],
-source: "isBlockNode\x0a\x09^false",
+source: "isBlockNode\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -81,7 +81,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.Node)})},
 args: [],
-source: "isBlockSequenceNode\x0a\x09^false",
+source: "isBlockSequenceNode\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -204,7 +204,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isReturnNode",{},smalltalk.Node)})},
 args: [],
-source: "isReturnNode\x0a\x09^false",
+source: "isReturnNode\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -220,7 +220,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isSendNode",{},smalltalk.Node)})},
 args: [],
-source: "isSendNode\x0a\x09^false",
+source: "isSendNode\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -252,7 +252,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.Node)})},
 args: [],
-source: "isValueNode\x0a\x09^false",
+source: "isValueNode\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -397,7 +397,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.Node)})},
 args: [],
-source: "nodes\x0a\x09^nodes ifNil: [nodes := Array new]",
+source: "nodes\x0a\x09^ nodes ifNil: [ nodes := Array new ]",
 messageSends: ["ifNil:", "new"],
 referencedClasses: ["Array"]
 }),
@@ -642,7 +642,7 @@ $ctx1.sendIdx["or:"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subtreeNeedsAliasing",{},smalltalk.Node)})},
 args: [],
-source: "subtreeNeedsAliasing\x0a\x09^(self shouldBeAliased or: [ self shouldBeInlined ]) or: [\x0a\x09\x09(self nodes detect: [ :each | each subtreeNeedsAliasing ] ifNone: [ false ]) ~= false ]",
+source: "subtreeNeedsAliasing\x0a\x09^ (self shouldBeAliased or: [ self shouldBeInlined ]) or: [\x0a\x09\x09(self nodes detect: [ :each | each subtreeNeedsAliasing ] ifNone: [ false ]) ~= false ]",
 messageSends: ["or:", "shouldBeAliased", "shouldBeInlined", "~=", "detect:ifNone:", "nodes", "subtreeNeedsAliasing"],
 referencedClasses: []
 }),
@@ -698,7 +698,7 @@ $1=self["@left"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"left",{},smalltalk.AssignmentNode)})},
 args: [],
-source: "left\x0a\x09^left",
+source: "left\x0a\x09^ left",
 messageSends: [],
 referencedClasses: []
 }),
@@ -752,7 +752,7 @@ $1=self["@right"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"right",{},smalltalk.AssignmentNode)})},
 args: [],
-source: "right\x0a\x09^right",
+source: "right\x0a\x09^ right",
 messageSends: [],
 referencedClasses: []
 }),
@@ -828,7 +828,7 @@ return smalltalk.withContext(function($ctx1) {
 return true;
 }, function($ctx1) {$ctx1.fill(self,"isBlockNode",{},smalltalk.BlockNode)})},
 args: [],
-source: "isBlockNode\x0a\x09^true",
+source: "isBlockNode\x0a\x09^ true",
 messageSends: [],
 referencedClasses: []
 }),
@@ -885,7 +885,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parameters",{},smalltalk.BlockNode)})},
 args: [],
-source: "parameters\x0a\x09^parameters ifNil: [parameters := Array new]",
+source: "parameters\x0a\x09^ parameters ifNil: [ parameters := Array new ]",
 messageSends: ["ifNil:", "new"],
 referencedClasses: ["Array"]
 }),
@@ -1012,7 +1012,7 @@ $1=self["@receiver"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.CascadeNode)})},
 args: [],
-source: "receiver\x0a\x09^receiver",
+source: "receiver\x0a\x09^ receiver",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1133,7 +1133,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.JSStatementNode)})},
 args: [],
-source: "source\x0a\x09^source ifNil: ['']",
+source: "source\x0a\x09^ source ifNil: [ '' ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -1194,7 +1194,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.MethodNode)})},
 args: [],
-source: "arguments\x0a\x09^arguments ifNil: [#()]",
+source: "arguments\x0a\x09^ arguments ifNil: [ #() ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -1354,7 +1354,7 @@ $1=self["@selector"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.MethodNode)})},
 args: [],
-source: "selector\x0a\x09^selector",
+source: "selector\x0a\x09^ selector",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1422,7 +1422,7 @@ $1=self["@source"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.MethodNode)})},
 args: [],
-source: "source\x0a\x09^source",
+source: "source\x0a\x09^ source",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1608,7 +1608,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.SendNode)})},
 args: [],
-source: "arguments\x0a\x09^arguments ifNil: [arguments := #()]",
+source: "arguments\x0a\x09^ arguments ifNil: [ arguments := #() ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -1661,7 +1661,7 @@ $3=$5;
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"cascadeNodeWithMessages:",{aCollection:aCollection,first:first},smalltalk.SendNode)})},
 args: ["aCollection"],
-source: "cascadeNodeWithMessages: aCollection\x0a\x09| first |\x0a\x09first := SendNode new\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself.\x0a\x09^CascadeNode new\x0a\x09\x09receiver: self receiver;\x0a\x09\x09nodes: (Array with: first), aCollection;\x0a\x09\x09yourself",
+source: "cascadeNodeWithMessages: aCollection\x0a\x09| first |\x0a\x09first := SendNode new\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself.\x0a\x09^ CascadeNode new\x0a\x09\x09receiver: self receiver;\x0a\x09\x09nodes: (Array with: first), aCollection;\x0a\x09\x09yourself",
 messageSends: ["selector:", "new", "selector", "arguments:", "arguments", "yourself", "receiver:", "receiver", "nodes:", ",", "with:"],
 referencedClasses: ["SendNode", "CascadeNode", "Array"]
 }),
@@ -1779,7 +1779,7 @@ $1=self["@receiver"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.SendNode)})},
 args: [],
-source: "receiver\x0a\x09^receiver",
+source: "receiver\x0a\x09^ receiver",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1818,7 +1818,7 @@ $1=self["@selector"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.SendNode)})},
 args: [],
-source: "selector\x0a\x09^selector",
+source: "selector\x0a\x09^ selector",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1952,7 +1952,7 @@ $1=$6;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"valueForReceiver:",{anObject:anObject},smalltalk.SendNode)})},
 args: ["anObject"],
-source: "valueForReceiver: anObject\x0a\x09^SendNode new\x0a\x09\x09position: self position;\x0a\x09\x09receiver: (self receiver\x0a\x09\x09ifNil: [anObject]\x0a\x09\x09ifNotNil: [self receiver valueForReceiver: anObject]);\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself",
+source: "valueForReceiver: anObject\x0a\x09^ SendNode new\x0a\x09\x09position: self position;\x0a\x09\x09receiver: (self receiver\x0a\x09\x09ifNil: [ anObject ] \x0a\x09\x09ifNotNil: [ self receiver valueForReceiver: anObject ]);\x0a\x09\x09selector: self selector;\x0a\x09\x09arguments: self arguments;\x0a\x09\x09yourself",
 messageSends: ["position:", "new", "position", "receiver:", "ifNil:ifNotNil:", "receiver", "valueForReceiver:", "selector:", "selector", "arguments:", "arguments", "yourself"],
 referencedClasses: ["SendNode"]
 }),
@@ -1998,7 +1998,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asBlockSequenceNode",{},smalltalk.SequenceNode)})},
 args: [],
-source: "asBlockSequenceNode\x0a\x09^BlockSequenceNode new\x0a\x09\x09position: self position;\x0a\x09\x09nodes: self nodes;\x0a\x09\x09temps: self temps;\x0a\x09\x09yourself",
+source: "asBlockSequenceNode\x0a\x09^ BlockSequenceNode new\x0a\x09\x09position: self position;\x0a\x09\x09nodes: self nodes;\x0a\x09\x09temps: self temps;\x0a\x09\x09yourself",
 messageSends: ["position:", "new", "position", "nodes:", "nodes", "temps:", "temps", "yourself"],
 referencedClasses: ["BlockSequenceNode"]
 }),
@@ -2071,7 +2071,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"temps",{},smalltalk.SequenceNode)})},
 args: [],
-source: "temps\x0a\x09^temps ifNil: [#()]",
+source: "temps\x0a\x09^ temps ifNil: [ #() ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -2125,7 +2125,7 @@ return smalltalk.withContext(function($ctx1) {
 return true;
 }, function($ctx1) {$ctx1.fill(self,"isBlockSequenceNode",{},smalltalk.BlockSequenceNode)})},
 args: [],
-source: "isBlockSequenceNode\x0a\x09^true",
+source: "isBlockSequenceNode\x0a\x09^ true",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2181,7 +2181,7 @@ return smalltalk.withContext(function($ctx1) {
 return true;
 }, function($ctx1) {$ctx1.fill(self,"isValueNode",{},smalltalk.ValueNode)})},
 args: [],
-source: "isValueNode\x0a\x09^true",
+source: "isValueNode\x0a\x09^ true",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2199,7 +2199,7 @@ $1=self["@value"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.ValueNode)})},
 args: [],
-source: "value\x0a\x09^value",
+source: "value\x0a\x09^ value",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2278,7 +2278,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"assigned",{},smalltalk.VariableNode)})},
 args: [],
-source: "assigned\x0a\x09^assigned ifNil: [false]",
+source: "assigned\x0a\x09^ assigned ifNil: [ false ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),

+ 21 - 21
js/Compiler-Core.js

@@ -28,7 +28,7 @@ $1=_st(aClass)._name();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass},smalltalk.AbstractCodeGenerator)})},
 args: ["aClass"],
-source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09\x09ifTrue: [aClass instanceClass name, '.klass']\x0a\x09\x09ifFalse: [\x0a\x09\x09aClass isNil\x0a\x09\x09\x09ifTrue: ['nil']\x0a\x09\x09\x09ifFalse: [aClass name]]",
+source: "classNameFor: aClass\x0a\x09^ aClass isMetaclass\x0a\x09\x09ifTrue: [ aClass instanceClass name, '.klass' ]\x0a\x09\x09ifFalse: [\x0a\x09\x09aClass isNil\x0a\x09\x09\x09ifTrue: [ 'nil' ]\x0a\x09\x09\x09ifFalse: [ aClass name ]]",
 messageSends: ["ifTrue:ifFalse:", "isMetaclass", ",", "name", "instanceClass", "isNil"],
 referencedClasses: []
 }),
@@ -62,7 +62,7 @@ $1=self["@currentClass"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.AbstractCodeGenerator)})},
 args: [],
-source: "currentClass\x0a\x09^currentClass",
+source: "currentClass\x0a\x09^ currentClass",
 messageSends: [],
 referencedClasses: []
 }),
@@ -121,7 +121,7 @@ $1=aString;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"safeVariableNameFor:",{aString:aString},smalltalk.AbstractCodeGenerator)})},
 args: ["aString"],
-source: "safeVariableNameFor: aString\x0a\x09^(Smalltalk current reservedWords includes: aString)\x0a\x09\x09ifTrue: [aString, '_']\x0a\x09\x09ifFalse: [aString]",
+source: "safeVariableNameFor: aString\x0a\x09^ (Smalltalk current reservedWords includes: aString)\x0a\x09\x09ifTrue: [ aString, '_' ]\x0a\x09\x09ifFalse: [ aString ]",
 messageSends: ["ifTrue:ifFalse:", "includes:", "reservedWords", "current", ","],
 referencedClasses: ["Smalltalk"]
 }),
@@ -144,7 +144,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.AbstractCodeGenerator)})},
 args: [],
-source: "source\x0a\x09^source ifNil: ['']",
+source: "source\x0a\x09^ source ifNil: [ '' ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -280,7 +280,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"codeGeneratorClass",{},smalltalk.Compiler)})},
 args: [],
-source: "codeGeneratorClass\x0a\x09^codeGeneratorClass ifNil: [InliningCodeGenerator]",
+source: "codeGeneratorClass\x0a\x09^ codeGeneratorClass ifNil: [ InliningCodeGenerator ]",
 messageSends: ["ifNil:"],
 referencedClasses: ["InliningCodeGenerator"]
 }),
@@ -314,7 +314,7 @@ $1=self._compileNode_(self._parse_(aString));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString},smalltalk.Compiler)})},
 args: ["aString"],
-source: "compile: aString\x0a\x09^self compileNode: (self parse: aString)",
+source: "compile: aString\x0a\x09^ self compileNode: (self parse: aString)",
 messageSends: ["compileNode:", "parse:"],
 referencedClasses: []
 }),
@@ -334,7 +334,7 @@ $1=self._compile_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"compile:forClass:",{aString:aString,aClass:aClass},smalltalk.Compiler)})},
 args: ["aString", "aClass"],
-source: "compile: aString forClass: aClass\x0a\x09self currentClass: aClass.\x0a\x09self source: aString.\x0a\x09^self compile: aString",
+source: "compile: aString forClass: aClass\x0a\x09self currentClass: aClass.\x0a\x09self source: aString.\x0a\x09^ self compile: aString",
 messageSends: ["currentClass:", "source:", "compile:"],
 referencedClasses: []
 }),
@@ -350,14 +350,14 @@ function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 self._currentClass_($DoIt());
-$1=_st("doIt ^[".__comma(aString)).__comma("] value");
+$1=_st("doIt ^ [ ".__comma(aString)).__comma(" ] value");
 $ctx1.sendIdx[","]=1;
 self._source_($1);
 $2=self._compileNode_(self._parse_(self._source()));
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"compileExpression:",{aString:aString},smalltalk.Compiler)})},
 args: ["aString"],
-source: "compileExpression: aString\x0a\x09self currentClass: DoIt.\x0a\x09self source: 'doIt ^[', aString, '] value'.\x0a\x09^self compileNode: (self parse: self source)",
+source: "compileExpression: aString\x0a\x09self currentClass: DoIt.\x0a\x09self source: 'doIt ^ [ ', aString, ' ] value'.\x0a\x09^ self compileNode: (self parse: self source)",
 messageSends: ["currentClass:", "source:", ",", "compileNode:", "parse:", "source"],
 referencedClasses: ["DoIt"]
 }),
@@ -372,14 +372,14 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 self._currentClass_(_st(anObject)._class());
-$1=_st("xxxDoIt ^[".__comma(aString)).__comma("] value");
+$1=_st("xxxDoIt ^ [ ".__comma(aString)).__comma(" ] value");
 $ctx1.sendIdx[","]=1;
 self._source_($1);
 $2=self._compileNode_(self._parse_(self._source()));
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"compileExpression:on:",{aString:aString,anObject:anObject},smalltalk.Compiler)})},
 args: ["aString", "anObject"],
-source: "compileExpression: aString on: anObject\x0a\x09self currentClass: anObject class.\x0a\x09self source: 'xxxDoIt ^[', aString, '] value'.\x0a\x09^self compileNode: (self parse: self source)",
+source: "compileExpression: aString on: anObject\x0a\x09self currentClass: anObject class.\x0a\x09self source: 'xxxDoIt ^ [ ', aString, ' ] value'.\x0a\x09^ self compileNode: (self parse: self source)",
 messageSends: ["currentClass:", "class", "source:", ",", "compileNode:", "parse:", "source"],
 referencedClasses: []
 }),
@@ -404,7 +404,7 @@ $3=result;
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"compileNode:",{aNode:aNode,generator:generator,result:result},smalltalk.Compiler)})},
 args: ["aNode"],
-source: "compileNode: aNode\x0a\x09| generator result |\x0a\x09generator := self codeGeneratorClass new.\x0a\x09generator\x0a\x09\x09source: self source;\x0a\x09\x09currentClass: self currentClass.\x0a\x09result := generator compileNode: aNode.\x0a\x09self unknownVariables: #().\x0a\x09^result",
+source: "compileNode: aNode\x0a\x09| generator result |\x0a\x09generator := self codeGeneratorClass new.\x0a\x09generator\x0a\x09\x09source: self source;\x0a\x09\x09currentClass: self currentClass.\x0a\x09result := generator compileNode: aNode.\x0a\x09self unknownVariables: #().\x0a\x09^ result",
 messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "compileNode:", "unknownVariables:"],
 referencedClasses: []
 }),
@@ -422,7 +422,7 @@ $1=self["@currentClass"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"currentClass",{},smalltalk.Compiler)})},
 args: [],
-source: "currentClass\x0a\x09^currentClass",
+source: "currentClass\x0a\x09^ currentClass",
 messageSends: [],
 referencedClasses: []
 }),
@@ -499,7 +499,7 @@ $2=result;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"evaluateExpression:on:",{aString:aString,anObject:anObject,result:result,method:method},smalltalk.Compiler)})},
 args: ["aString", "anObject"],
-source: "evaluateExpression: aString on: anObject\x0a\x09\x22Unlike #eval: evaluate a Smalltalk expression with anObject as the receiver and answer the returned object\x22\x0a\x09| result method |\x0a\x09method := self eval: (self compileExpression: aString on: anObject).\x0a\x09method category: 'xxxDoIt'.\x0a\x09anObject class addCompiledMethod: method.\x0a\x09result := anObject xxxDoIt.\x0a\x09anObject class removeCompiledMethod: method.\x0a\x09^result",
+source: "evaluateExpression: aString on: anObject\x0a\x09\x22Unlike #eval: evaluate a Smalltalk expression with anObject as the receiver and answer the returned object\x22\x0a\x09| result method |\x0a\x09method := self eval: (self compileExpression: aString on: anObject).\x0a\x09method category: 'xxxDoIt'.\x0a\x09anObject class addCompiledMethod: method.\x0a\x09result := anObject xxxDoIt.\x0a\x09anObject class removeCompiledMethod: method.\x0a\x09^ result",
 messageSends: ["eval:", "compileExpression:on:", "category:", "addCompiledMethod:", "class", "xxxDoIt", "removeCompiledMethod:"],
 referencedClasses: []
 }),
@@ -537,7 +537,7 @@ $1=_st(_st($Smalltalk())._current())._parse_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString},smalltalk.Compiler)})},
 args: ["aString"],
-source: "parse: aString\x0a\x09^Smalltalk current parse: aString",
+source: "parse: aString\x0a\x09^ Smalltalk current parse: aString",
 messageSends: ["parse:", "current"],
 referencedClasses: ["Smalltalk"]
 }),
@@ -551,13 +551,13 @@ fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $2,$1;
-$2=_st("doIt ^[".__comma(aString)).__comma("] value");
+$2=_st("doIt ^ [ ".__comma(aString)).__comma(" ] value");
 $ctx1.sendIdx[","]=1;
 $1=self._parse_($2);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parseExpression:",{aString:aString},smalltalk.Compiler)})},
 args: ["aString"],
-source: "parseExpression: aString\x0a\x09^self parse: 'doIt ^[', aString, '] value'",
+source: "parseExpression: aString\x0a\x09^ self parse: 'doIt ^ [ ', aString, ' ] value'",
 messageSends: ["parse:", ","],
 referencedClasses: []
 }),
@@ -601,7 +601,7 @@ return self._recompile_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),"Compiling all classes...");
 return self}, function($ctx1) {$ctx1.fill(self,"recompileAll",{},smalltalk.Compiler)})},
 args: [],
-source: "recompileAll\x0a\x09Smalltalk current classes \x0a\x09\x09do: [:each | self recompile: each ]\x0a\x09\x09displayingProgress: 'Compiling all classes...'",
+source: "recompileAll\x0a\x09Smalltalk current classes \x0a\x09\x09do: [ :each | self recompile: each ]\x0a\x09\x09displayingProgress: 'Compiling all classes...'",
 messageSends: ["do:displayingProgress:", "classes", "current", "recompile:"],
 referencedClasses: ["Smalltalk"]
 }),
@@ -624,7 +624,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Compiler)})},
 args: [],
-source: "source\x0a\x09^source ifNil: ['']",
+source: "source\x0a\x09^ source ifNil: [ '' ]",
 messageSends: ["ifNil:"],
 referencedClasses: []
 }),
@@ -658,7 +658,7 @@ $1=self["@unknownVariables"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"unknownVariables",{},smalltalk.Compiler)})},
 args: [],
-source: "unknownVariables\x0a\x09^unknownVariables",
+source: "unknownVariables\x0a\x09^ unknownVariables",
 messageSends: [],
 referencedClasses: []
 }),
@@ -711,7 +711,7 @@ return self._recompile_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"recompileAll",{},smalltalk.Compiler.klass)})},
 args: [],
-source: "recompileAll\x0a\x09Smalltalk current classes do: [:each |\x0a\x09\x09self recompile: each]",
+source: "recompileAll\x0a\x09Smalltalk current classes do: [ :each |\x0a\x09\x09self recompile: each ]",
 messageSends: ["do:", "classes", "current", "recompile:"],
 referencedClasses: ["Smalltalk"]
 }),

+ 13 - 13
js/Compiler-IR.js

@@ -89,7 +89,7 @@ $5=result;
 return $5;
 }, function($ctx1) {$ctx1.fill(self,"aliasTemporally:",{aCollection:aCollection,threshold:threshold,result:result},smalltalk.IRASTTranslator)})},
 args: ["aCollection"],
-source: "aliasTemporally: aCollection\x0a\x09\x22https://github.com/NicolasPetton/amber/issues/296\x0a\x09\x0a\x09If a node is aliased, all preceding ones are aliased as well.\x0a\x09The tree is iterated twice. First we get the aliasing dependency,\x0a\x09then the aliasing itself is done\x22\x0a\x0a\x09| threshold result |\x0a\x09threshold := 0.\x0a\x09\x0a\x09aCollection withIndexDo: [ :each :i |\x0a\x09\x09each subtreeNeedsAliasing\x0a\x09\x09\x09ifTrue: [ threshold := i ]].\x0a\x0a\x09result := OrderedCollection new.\x0a\x09aCollection withIndexDo: [ :each :i |\x0a\x09\x09result add: (i <= threshold\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ])].\x0a\x0a\x09^result",
+source: "aliasTemporally: aCollection\x0a\x09\x22https://github.com/NicolasPetton/amber/issues/296\x0a\x09\x0a\x09If a node is aliased, all preceding ones are aliased as well.\x0a\x09The tree is iterated twice. First we get the aliasing dependency,\x0a\x09then the aliasing itself is done\x22\x0a\x0a\x09| threshold result |\x0a\x09threshold := 0.\x0a\x09\x0a\x09aCollection withIndexDo: [ :each :i |\x0a\x09\x09each subtreeNeedsAliasing\x0a\x09\x09\x09ifTrue: [ threshold := i ] ].\x0a\x0a\x09result := OrderedCollection new.\x0a\x09aCollection withIndexDo: [ :each :i |\x0a\x09\x09result add: (i <= threshold\x0a\x09\x09\x09ifTrue: [ self alias: each ]\x0a\x09\x09\x09ifFalse: [ self visit: each ]) ].\x0a\x0a\x09^ result",
 messageSends: ["withIndexDo:", "ifTrue:", "subtreeNeedsAliasing", "new", "add:", "ifTrue:ifFalse:", "<=", "alias:", "visit:"],
 referencedClasses: ["OrderedCollection"]
 }),
@@ -398,7 +398,7 @@ $ctx3.sendIdx["add:"]=2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"visitBlockSequenceNode:",{aNode:aNode},smalltalk.IRASTTranslator)})},
 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 visitOrAlias: each) ].\x0a\x09\x09\x09\x09aNode nodes last isReturnNode\x0a\x09\x09\x09\x09\x09ifFalse: [ self sequence add: (IRBlockReturn new add: (self visitOrAlias: aNode nodes last); yourself) ]\x0a\x09\x09\x09\x09\x09ifTrue: [ self sequence add: (self visitOrAlias: aNode nodes last) ]]]",
+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 visitOrAlias: each) ].\x0a\x09\x09\x09\x09aNode nodes last isReturnNode\x0a\x09\x09\x09\x09\x09ifFalse: [ self sequence add: (IRBlockReturn new add: (self visitOrAlias: aNode nodes last); yourself) ]\x0a\x09\x09\x09\x09\x09ifTrue: [ self sequence add: (self visitOrAlias: aNode nodes last) ] ]]",
 messageSends: ["withSequence:do:", "new", "ifNotEmpty:", "nodes", "do:", "allButLast", "add:", "sequence", "visitOrAlias:", "ifFalse:ifTrue:", "isReturnNode", "last", "yourself"],
 referencedClasses: ["IRBlockSequence", "IRBlockReturn"]
 }),
@@ -471,7 +471,7 @@ $1=array;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"visitDynamicArrayNode:",{aNode:aNode,array:array},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
-source: "visitDynamicArrayNode: aNode\x0a\x09| array |\x0a\x09array := IRDynamicArray new.\x0a\x09(self aliasTemporally: aNode nodes) do: [:each | array add: each].\x0a\x09^ array",
+source: "visitDynamicArrayNode: aNode\x0a\x09| array |\x0a\x09array := IRDynamicArray new.\x0a\x09(self aliasTemporally: aNode nodes) do: [ :each | array add: each ].\x0a\x09^ array",
 messageSends: ["new", "do:", "aliasTemporally:", "nodes", "add:"],
 referencedClasses: ["IRDynamicArray"]
 }),
@@ -496,7 +496,7 @@ $1=dictionary;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"visitDynamicDictionaryNode:",{aNode:aNode,dictionary:dictionary},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
-source: "visitDynamicDictionaryNode: aNode\x0a\x09| dictionary |\x0a\x09dictionary := IRDynamicDictionary new.\x0a\x09(self aliasTemporally: aNode nodes) do: [:each | dictionary add: each].\x0a\x09^ dictionary",
+source: "visitDynamicDictionaryNode: aNode\x0a\x09| dictionary |\x0a\x09dictionary := IRDynamicDictionary new.\x0a\x09(self aliasTemporally: aNode nodes) do: [ :each | dictionary add: each ].\x0a\x09^ dictionary",
 messageSends: ["new", "do:", "aliasTemporally:", "nodes", "add:"],
 referencedClasses: ["IRDynamicDictionary"]
 }),
@@ -725,7 +725,7 @@ return _st(self._sequence())._add_(instruction);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"visitSequenceNode:",{aNode:aNode},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
-source: "visitSequenceNode: aNode\x0a\x09^ self\x0a\x09\x09withSequence: IRSequence new\x0a\x09\x09do: [\x0a\x09\x09\x09aNode nodes do: [ :each | | instruction |\x0a\x09\x09\x09\x09instruction := self visitOrAlias: each.\x0a\x09\x09\x09\x09instruction isVariable ifFalse: [\x0a\x09\x09\x09\x09\x09self sequence add: instruction ]]]",
+source: "visitSequenceNode: aNode\x0a\x09^ self\x0a\x09\x09withSequence: IRSequence new\x0a\x09\x09do: [\x0a\x09\x09\x09aNode nodes do: [ :each | | instruction |\x0a\x09\x09\x09\x09instruction := self visitOrAlias: each.\x0a\x09\x09\x09\x09instruction isVariable ifFalse: [\x0a\x09\x09\x09\x09\x09self sequence add: instruction ] ]]",
 messageSends: ["withSequence:do:", "new", "do:", "nodes", "visitOrAlias:", "ifFalse:", "isVariable", "add:", "sequence"],
 referencedClasses: ["IRSequence"]
 }),
@@ -2287,7 +2287,7 @@ $1=self["@value"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"value",{},smalltalk.IRValue)})},
 args: [],
-source: "value\x0a\x09^value",
+source: "value\x0a\x09^ value",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3034,7 +3034,7 @@ $ctx2.sendIdx["nextPutAll:"]=2;
 _st(self._stream())._nextPutAll_("])");
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRDynamicDictionary:",{anIRDynamicDictionary:anIRDynamicDictionary},smalltalk.IRJSTranslator)})},
 args: ["anIRDynamicDictionary"],
-source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09self stream nextPutAll: 'smalltalk.HashedCollection._from_(['.\x0a\x09\x09anIRDynamicDictionary instructions\x0a\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09separatedBy: [self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: '])'",
+source: "visitIRDynamicDictionary: anIRDynamicDictionary\x0a\x09self stream nextPutAll: 'smalltalk.HashedCollection._from_(['.\x0a\x09\x09anIRDynamicDictionary instructions\x0a\x09\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: '])'",
 messageSends: ["nextPutAll:", "stream", "do:separatedBy:", "instructions", "visit:"],
 referencedClasses: []
 }),
@@ -3101,7 +3101,7 @@ return smalltalk.IRJSTranslator.superclass.fn.prototype._visitIRMethod_.apply(_s
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRMethod:",{anIRMethod:anIRMethod},smalltalk.IRJSTranslator)})},
 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 asArray 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\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 asArray 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 ]",
 messageSends: ["nextPutMethodDeclaration:with:", "stream", "nextPutFunctionWith:arguments:", "nextPutVars:", "collect:", "tempDeclarations", "asVariableName", "name", "do:", "classReferences", "nextPutClassRefFunction:", "nextPutContextFor:during:", "ifTrue:", "notEmpty", "internalVariables", "asArray", "alias", "variable", "ifTrue:ifFalse:", "hasNonLocalReturn", "scope", "nextPutNonLocalReturnHandlingWith:", "visitIRMethod:", "arguments"],
 referencedClasses: []
 }),
@@ -3195,7 +3195,7 @@ return _st(self._stream())._nextPutStatementWith_(self._visit_(each));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRSequence:",{anIRSequence:anIRSequence},smalltalk.IRJSTranslator)})},
 args: ["anIRSequence"],
-source: "visitIRSequence: anIRSequence\x0a\x09self stream nextPutSequenceWith: [\x0a\x09\x09anIRSequence instructions do: [ :each |\x0a\x09\x09\x09self stream nextPutStatementWith: (self visit: each) ]]",
+source: "visitIRSequence: anIRSequence\x0a\x09self stream nextPutSequenceWith: [\x0a\x09\x09anIRSequence instructions do: [ :each |\x0a\x09\x09\x09self stream nextPutStatementWith: (self visit: each) ] ]",
 messageSends: ["nextPutSequenceWith:", "stream", "do:", "instructions", "nextPutStatementWith:", "visit:"],
 referencedClasses: []
 }),
@@ -3563,7 +3563,7 @@ $ctx1.sendIdx[","]=6;
 $16=self._nextPutAll_($17);
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutBlockContextFor:during:",{anIRClosure:anIRClosure,aBlock:aBlock},smalltalk.JSStream)})},
 args: ["anIRClosure", "aBlock"],
-source: "nextPutBlockContextFor: anIRClosure during: aBlock\x0a\x09self\x0a\x09\x09nextPutAll: 'return smalltalk.withContext(function(', anIRClosure scope alias, ') {'; lf.\x0a\x09\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '}, function(', anIRClosure scope alias, ') {';\x0a\x09\x09nextPutAll: anIRClosure scope alias, '.fillBlock({'.\x0a\x09\x0a\x09anIRClosure locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: anIRClosure scope outerScope alias, ',', anIRClosure scope blockIndex asString, ')})'",
+source: "nextPutBlockContextFor: anIRClosure during: aBlock\x0a\x09self\x0a\x09\x09nextPutAll: 'return smalltalk.withContext(function(', anIRClosure scope alias, ') {'; lf.\x0a\x09\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '}, function(', anIRClosure scope alias, ') {';\x0a\x09\x09nextPutAll: anIRClosure scope alias, '.fillBlock({'.\x0a\x09\x0a\x09anIRClosure locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: anIRClosure scope outerScope alias, ',', anIRClosure scope blockIndex asString, ')})'",
 messageSends: ["nextPutAll:", ",", "alias", "scope", "lf", "value", "do:separatedBy:", "locals", "asVariableName", "outerScope", "asString", "blockIndex"],
 referencedClasses: []
 }),
@@ -3698,7 +3698,7 @@ $ctx1.sendIdx["nextPutAll:"]=9;
 $17=self._nextPutAll_(")})");
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutContextFor:during:",{aMethod:aMethod,aBlock:aBlock},smalltalk.JSStream)})},
 args: ["aMethod", "aBlock"],
-source: "nextPutContextFor: aMethod during: aBlock\x0a\x09self\x0a\x09\x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; lf.\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '}, function(', aMethod scope alias, ') {', aMethod scope alias;\x0a\x09\x09nextPutAll: '.fill(self,', aMethod selector asJavascript, ',{'.\x0a\x0a\x09aMethod locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: aMethod theClass asJavascript;\x0a\x09\x09nextPutAll: ')})'",
+source: "nextPutContextFor: aMethod during: aBlock\x0a\x09self\x0a\x09\x09nextPutAll: 'return smalltalk.withContext(function(', aMethod scope alias, ') { '; lf.\x0a\x09aBlock value.\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '}, function(', aMethod scope alias, ') {', aMethod scope alias;\x0a\x09\x09nextPutAll: '.fill(self,', aMethod selector asJavascript, ',{'.\x0a\x0a\x09aMethod locals\x0a\x09\x09do: [ :each |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09nextPutAll: each asVariableName;\x0a\x09\x09\x09\x09nextPutAll: ':';\x0a\x09\x09\x09\x09nextPutAll: each asVariableName ]\x0a\x09\x09separatedBy: [ self nextPutAll: ',' ].\x0a\x09\x0a\x09self\x0a\x09\x09nextPutAll: '},';\x0a\x09\x09nextPutAll: aMethod theClass asJavascript;\x0a\x09\x09nextPutAll: ')})'",
 messageSends: ["nextPutAll:", ",", "alias", "scope", "lf", "value", "asJavascript", "selector", "do:separatedBy:", "locals", "asVariableName", "theClass"],
 referencedClasses: []
 }),
@@ -3888,7 +3888,7 @@ $ctx1.sendIdx["nextPutAll:"]=10;
 $26=_st($25)._nextPutAll_("})");
 return self}, function($ctx1) {$ctx1.fill(self,"nextPutMethodDeclaration:with:",{aMethod:aMethod,aBlock:aBlock},smalltalk.JSStream)})},
 args: ["aMethod", "aBlock"],
-source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream\x0a\x09\x09nextPutAll: 'smalltalk.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf.\x0a\x09aBlock value.\x0a\x09stream\x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: aMethod messageSends asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09aMethod classReferences\x0a\x09\x09do: [:each | stream nextPutAll: each asJavascript]\x0a\x09\x09separatedBy: [stream nextPutAll: ','].\x0a\x09stream\x0a\x09\x09nextPutAll: ']';\x0a\x09\x09nextPutAll: '})'",
+source: "nextPutMethodDeclaration: aMethod with: aBlock\x0a\x09stream\x0a\x09\x09nextPutAll: 'smalltalk.method({'; lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf.\x0a\x09aBlock value.\x0a\x09stream\x0a\x09\x09nextPutAll: ',', String lf, 'messageSends: ';\x0a\x09\x09nextPutAll: aMethod messageSends asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ['.\x0a\x09aMethod classReferences\x0a\x09\x09do: [ :each | stream nextPutAll: each asJavascript ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream\x0a\x09\x09nextPutAll: ']';\x0a\x09\x09nextPutAll: '})'",
 messageSends: ["nextPutAll:", "lf", ",", "asJavascript", "selector", "source", "value", "asArray", "messageSends", "collect:", "arguments", "do:separatedBy:", "classReferences"],
 referencedClasses: ["String"]
 }),
@@ -4075,7 +4075,7 @@ return self}
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"nextPutVars:",{aCollection:aCollection},smalltalk.JSStream)})},
 args: ["aCollection"],
-source: "nextPutVars: aCollection\x0a\x09aCollection ifEmpty: [ ^self ].\x0a\x09\x0a\x09stream nextPutAll: 'var '.\x0a\x09aCollection\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ';'; lf",
+source: "nextPutVars: aCollection\x0a\x09aCollection ifEmpty: [ ^ self ].\x0a\x09\x0a\x09stream nextPutAll: 'var '.\x0a\x09aCollection\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ',' ].\x0a\x09stream nextPutAll: ';'; lf",
 messageSends: ["ifEmpty:", "nextPutAll:", "do:separatedBy:", "lf"],
 referencedClasses: []
 }),

+ 2 - 2
js/Compiler-Interpreter.js

@@ -600,7 +600,7 @@ return _st(context)._localAt_ifAbsent_(aString,aBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"localAt:ifAbsent:",{aString:aString,aBlock:aBlock},smalltalk.AIContext)})},
 args: ["aString", "aBlock"],
-source: "localAt: aString ifAbsent: aBlock\x0a\x09\x22Lookup the local value up to the method context\x22\x0a\x0a\x09^ self locals at: aString ifAbsent: [ \x0a\x09\x09self outerContext \x0a\x09\x09\x09ifNotNil: [ :context | context localAt: aString ifAbsent: aBlock ]\x0a\x09\x09\x09ifNil: [aBlock value] ]",
+source: "localAt: aString ifAbsent: aBlock\x0a\x09\x22Lookup the local value up to the method context\x22\x0a\x0a\x09^ self locals at: aString ifAbsent: [ \x0a\x09\x09self outerContext \x0a\x09\x09\x09ifNotNil: [ :context | context localAt: aString ifAbsent: aBlock ]\x0a\x09\x09\x09ifNil: [ aBlock value ] ]",
 messageSends: ["at:ifAbsent:", "locals", "ifNotNil:ifNil:", "outerContext", "localAt:ifAbsent:", "value"],
 referencedClasses: []
 }),
@@ -2097,7 +2097,7 @@ return _st(_st($PlatformInterface())._globals())._at_(_st(aNode)._value());
 self._push_($7);
 return self}, function($ctx1) {$ctx1.fill(self,"visitVariableNode:",{aNode:aNode},smalltalk.ASTInterpreter)})},
 args: ["aNode"],
-source: "visitVariableNode: aNode\x0a\x09aNode binding isUnknownVar ifTrue: [\x0a\x09\x09^ self push: (PlatformInterface globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].\x0a\x09\x09\x0a\x09self push: (aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode value ]\x0a\x09\x09ifFalse: [ self context \x0a\x09\x09\x09localAt: aNode value\x0a\x09\x09\x09ifAbsent: [\x0a\x09\x09\x09\x09aNode value isCapitalized\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09Smalltalk current \x0a\x09\x09\x09\x09\x09\x09\x09at: aNode value \x0a\x09\x09\x09\x09\x09\x09\x09ifAbsent: [ PlatformInterface globals at: aNode value ]]]])",
+source: "visitVariableNode: aNode\x0a\x09aNode binding isUnknownVar ifTrue: [\x0a\x09\x09^ self push: (PlatformInterface globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].\x0a\x09\x09\x0a\x09self push: (aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode value ]\x0a\x09\x09ifFalse: [ self context \x0a\x09\x09\x09localAt: aNode value\x0a\x09\x09\x09ifAbsent: [\x0a\x09\x09\x09\x09aNode value isCapitalized\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09Smalltalk current \x0a\x09\x09\x09\x09\x09\x09\x09at: aNode value \x0a\x09\x09\x09\x09\x09\x09\x09ifAbsent: [ PlatformInterface globals at: aNode value ] ] ] ])",
 messageSends: ["ifTrue:", "isUnknownVar", "binding", "push:", "at:ifAbsent:", "globals", "value", "error:", "ifTrue:ifFalse:", "isInstanceVar", "instVarAt:", "receiver", "context", "localAt:ifAbsent:", "isCapitalized", "current", "at:"],
 referencedClasses: ["PlatformInterface", "Smalltalk"]
 }),

+ 1 - 1
js/Compiler-Semantic.js

@@ -1775,7 +1775,7 @@ $1=_st(aNode)._superSends_(_st(self._superSends())._keys());
 self._popScope();
 return self}, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
-source: "visitMethodNode: aNode\x0a\x09self pushScope: self newMethodScope.\x0a\x09aNode scope: currentScope.\x0a\x09currentScope node: aNode.\x0a\x0a\x09self theClass allInstanceVariableNames do: [:each |\x0a\x09\x09currentScope addIVar: each ].\x0a\x09aNode arguments do: [ :each |\x0a\x09\x09self validateVariableScope: each.\x0a\x09\x09currentScope addArg: each ].\x0a\x0a\x09super visitMethodNode: aNode.\x0a\x0a\x09aNode\x0a\x09\x09classReferences: self classReferences;\x0a\x09\x09sendIndexes: self messageSends;\x0a\x09\x09superSends: self superSends keys.\x0a\x09self popScope",
+source: "visitMethodNode: aNode\x0a\x09self pushScope: self newMethodScope.\x0a\x09aNode scope: currentScope.\x0a\x09currentScope node: aNode.\x0a\x0a\x09self theClass allInstanceVariableNames do: [ :each |\x0a\x09\x09currentScope addIVar: each ].\x0a\x09aNode arguments do: [ :each |\x0a\x09\x09self validateVariableScope: each.\x0a\x09\x09currentScope addArg: each ].\x0a\x0a\x09super visitMethodNode: aNode.\x0a\x0a\x09aNode\x0a\x09\x09classReferences: self classReferences;\x0a\x09\x09sendIndexes: self messageSends;\x0a\x09\x09superSends: self superSends keys.\x0a\x09self popScope",
 messageSends: ["pushScope:", "newMethodScope", "scope:", "node:", "do:", "allInstanceVariableNames", "theClass", "addIVar:", "arguments", "validateVariableScope:", "addArg:", "visitMethodNode:", "classReferences:", "classReferences", "sendIndexes:", "messageSends", "superSends:", "keys", "superSends", "popScope"],
 referencedClasses: []
 }),

+ 1 - 1
js/Compiler-Tests.js

@@ -834,7 +834,7 @@ $ctx1.sendIdx["should:return:"]=5;
 self._should_return_("foo | AVariable | AVariable := 1. ^ AVariable",(1));
 return self}, function($ctx1) {$ctx1.fill(self,"testTempVariables",{},smalltalk.CodeGeneratorTest)})},
 args: [],
-source: "testTempVariables\x0a\x09self should: 'foo | a | ^ a' return: nil.\x0a\x09self should: 'foo | AVariable | ^ AVariable' return: nil.\x0a\x09self should: 'foo | a b c | ^ c' return: nil.\x0a\x09self should: 'foo | a | [ | d | ^ d ] value' return: nil.\x0a\x09\x0a\x09self should: 'foo | a | a:= 1. ^ a' return: 1.\x0a\x09self should: 'foo | AVariable | AVariable := 1. ^ AVariable' return: 1.\x09",
+source: "testTempVariables\x0a\x09self should: 'foo | a | ^ a' return: nil.\x0a\x09self should: 'foo | AVariable | ^ AVariable' return: nil.\x0a\x09self should: 'foo | a b c | ^ c' return: nil.\x0a\x09self should: 'foo | a | [ | d | ^ d ] value' return: nil.\x0a\x09\x0a\x09self should: 'foo | a | a:= 1. ^ a' return: 1.\x0a\x09self should: 'foo | AVariable | AVariable := 1. ^ AVariable' return: 1.",
 messageSends: ["should:return:"],
 referencedClasses: []
 }),

+ 3 - 3
js/Examples.js

@@ -18,7 +18,7 @@ return _st(html)._with_(_st(self["@count"])._asString());
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"decrease",{},smalltalk.Counter)})},
 args: [],
-source: "decrease\x0a\x09count := count - 1.\x0a\x09header contents: [:html | html with: count asString]",
+source: "decrease\x0a\x09count := count - 1.\x0a\x09header contents: [ :html | html with: count asString ]",
 messageSends: ["-", "contents:", "with:", "asString"],
 referencedClasses: []
 }),
@@ -38,7 +38,7 @@ return _st(html)._with_(_st(self["@count"])._asString());
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"increase",{},smalltalk.Counter)})},
 args: [],
-source: "increase\x0a\x09count := count + 1.\x0a\x09header contents: [:html | html with: count asString]",
+source: "increase\x0a\x09count := count + 1.\x0a\x09header contents: [ :html | html with: count asString ]",
 messageSends: ["+", "contents:", "with:", "asString"],
 referencedClasses: []
 }),
@@ -91,7 +91,7 @@ return self._decrease();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.Counter)})},
 args: ["html"],
-source: "renderOn: html\x0a\x09header := html h1\x0a\x09\x09with: count asString;\x0a\x09\x09yourself.\x0a\x09html button\x0a\x09\x09with: '++';\x0a\x09\x09onClick: [self increase].\x0a\x09html button\x0a\x09\x09with: '--';\x0a\x09\x09onClick: [self decrease]",
+source: "renderOn: html\x0a\x09header := html h1\x0a\x09\x09with: count asString;\x0a\x09\x09yourself.\x0a\x09html button\x0a\x09\x09with: '++';\x0a\x09\x09onClick: [ self increase ].\x0a\x09html button\x0a\x09\x09with: '--';\x0a\x09\x09onClick: [ self decrease ]",
 messageSends: ["with:", "h1", "asString", "yourself", "button", "onClick:", "increase", "decrease"],
 referencedClasses: []
 }),

+ 3 - 3
js/Helios-Browser.js

@@ -874,7 +874,7 @@ return _st(self._announcer())._announce_(_st($HLShowInstanceToggled())._new());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"showInstance:",{aBoolean:aBoolean},smalltalk.HLBrowserModel)})},
 args: ["aBoolean"],
-source: "showInstance: aBoolean\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09showInstance := aBoolean.\x0a\x0a    \x09self selectedClass ifNotNil: [\x0a    \x09\x09self selectedClass: (aBoolean\x0a    \x09\x09\x09ifTrue: [self selectedClass theNonMetaClass ]\x0a\x09    \x09  \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a    \x0a\x09\x09self announcer announce: HLShowInstanceToggled new ]",
+source: "showInstance: aBoolean\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09showInstance := aBoolean.\x0a\x0a    \x09self selectedClass ifNotNil: [\x0a    \x09\x09self selectedClass: (aBoolean\x0a    \x09\x09\x09ifTrue: [ self selectedClass theNonMetaClass ]\x0a\x09    \x09  \x09ifFalse: [ self selectedClass theMetaClass ]) ].\x0a    \x0a\x09\x09self announcer announce: HLShowInstanceToggled new ]",
 messageSends: ["withChangesDo:", "ifNotNil:", "selectedClass", "selectedClass:", "ifTrue:ifFalse:", "theNonMetaClass", "theMetaClass", "announce:", "announcer", "new"],
 referencedClasses: ["HLShowInstanceToggled"]
 }),
@@ -1807,7 +1807,7 @@ return _st(str)._nextPutAll_(_st(aClass)._name());
 }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)})})));
 return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:level:on:",{aClass:aClass,anInteger:anInteger,html:html},smalltalk.HLClassesListWidget)})},
 args: ["aClass", "anInteger", "html"],
-source: "renderItemLabel: aClass level: anInteger on: html\x0a\x09html span asJQuery html: (String streamContents: [ :str |\x0a\x09\x09anInteger timesRepeat: [\x0a\x09\x09\x09str nextPutAll: '&nbsp;&nbsp;&nbsp;&nbsp;'].\x0a\x09\x09\x09str nextPutAll: aClass name ])",
+source: "renderItemLabel: aClass level: anInteger on: html\x0a\x09html span asJQuery html: (String streamContents: [ :str |\x0a\x09\x09anInteger timesRepeat: [\x0a\x09\x09\x09str nextPutAll: '&nbsp;&nbsp;&nbsp;&nbsp;' ].\x0a\x09\x09\x09str nextPutAll: aClass name ])",
 messageSends: ["html:", "asJQuery", "span", "streamContents:", "timesRepeat:", "nextPutAll:", "name"],
 referencedClasses: ["String"]
 }),
@@ -1888,7 +1888,7 @@ return _st($2).__lt(_st(b)._name());
 self._items_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"setItemsForPackage:",{aPackage:aPackage},smalltalk.HLClassesListWidget)})},
 args: ["aPackage"],
-source: "setItemsForPackage: aPackage\x0a\x09self items: (aPackage \x0a    \x09ifNil: [ #() ]\x0a  \x09\x09ifNotNil: [ ((aPackage classes \x0a        \x09collect: [ :each | each theNonMetaClass ]) asSet asArray) \x0a            \x09sort: [:a :b | a name < b name ] ]).",
+source: "setItemsForPackage: aPackage\x0a\x09self items: (aPackage \x0a    \x09ifNil: [ #() ]\x0a  \x09\x09ifNotNil: [ ((aPackage classes \x0a        \x09collect: [ :each | each theNonMetaClass ]) asSet asArray) \x0a            \x09sort: [ :a :b | a name < b name ] ]).",
 messageSends: ["items:", "ifNil:ifNotNil:", "sort:", "asArray", "asSet", "collect:", "classes", "theNonMetaClass", "<", "name"],
 referencedClasses: []
 }),

+ 6 - 6
js/Helios-Core.js

@@ -1050,12 +1050,12 @@ return smalltalk.withContext(function($ctx1) {
 var $1;
 $1=_st(_st(self._selectedClass())._isNil())._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(aString)._match_("^[A-Z]");
+return _st(aString)._match_("^ [A-Z]");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},smalltalk.HLToolModel)})},
 args: ["aString"],
-source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^[A-Z]' ]",
+source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^ [A-Z]' ]",
 messageSends: ["or:", "isNil", "selectedClass", "match:"],
 referencedClasses: []
 }),
@@ -1112,7 +1112,7 @@ return self._handleCompileError_(ex);
 $ctx1.sendIdx["evaluate:on:do:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},smalltalk.HLToolModel)})},
 args: ["aBlock"],
-source: "withCompileErrorHandling: aBlock\x0a\x09self environment\x0a\x09\x09evaluate: [\x0a\x09\x09\x09self environment \x0a\x09\x09\x09evaluate: [\x0a\x09\x09\x09\x09self environment \x0a\x09\x09\x09\x09\x09evaluate: aBlock\x0a\x09\x09\x09\x09\x09on: ParseError\x0a\x09\x09\x09\x09\x09do: [:ex | self handleParseError: ex ] ]\x0a\x09\x09\x09on: UnknownVariableError\x0a\x09\x09\x09do: [ :ex | self handleUnkownVariableError: ex ] ]\x0a\x09\x09on: CompilerError\x0a\x09\x09do: [ :ex | self handleCompileError: ex ]",
+source: "withCompileErrorHandling: aBlock\x0a\x09self environment\x0a\x09\x09evaluate: [\x0a\x09\x09\x09self environment \x0a\x09\x09\x09evaluate: [\x0a\x09\x09\x09\x09self environment \x0a\x09\x09\x09\x09\x09evaluate: aBlock\x0a\x09\x09\x09\x09\x09on: ParseError\x0a\x09\x09\x09\x09\x09do: [ :ex | self handleParseError: ex ] ]\x0a\x09\x09\x09on: UnknownVariableError\x0a\x09\x09\x09do: [ :ex | self handleUnkownVariableError: ex ] ]\x0a\x09\x09on: CompilerError\x0a\x09\x09do: [ :ex | self handleCompileError: ex ]",
 messageSends: ["evaluate:on:do:", "environment", "handleParseError:", "handleUnkownVariableError:", "handleCompileError:"],
 referencedClasses: ["ParseError", "UnknownVariableError", "CompilerError"]
 }),
@@ -2166,7 +2166,7 @@ self._selectItem_(item);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},smalltalk.HLListWidget)})},
 args: ["aListItem"],
-source: "activateListItem: aListItem\x0a\x09| item |\x0a\x09\x0a\x09(aListItem get: 0) ifNil: [ ^self ].\x0a\x09aListItem parent children removeClass: 'active'.\x0a\x09aListItem addClass: 'active'.\x0a    \x0a\x09self ensureVisible: aListItem.\x0a    \x0a   \x22Activate the corresponding item\x22\x0a   item := aListItem data: 'item'.\x0a   self selectedItem == item ifFalse: [\x0a\x09   self selectItem: item ]",
+source: "activateListItem: aListItem\x0a\x09| item |\x0a\x09\x0a\x09(aListItem get: 0) ifNil: [ ^ self ].\x0a\x09aListItem parent children removeClass: 'active'.\x0a\x09aListItem addClass: 'active'.\x0a    \x0a\x09self ensureVisible: aListItem.\x0a    \x0a   \x22Activate the corresponding item\x22\x0a   item := aListItem data: 'item'.\x0a   self selectedItem == item ifFalse: [\x0a\x09   self selectItem: item ]",
 messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "addClass:", "ensureVisible:", "data:", "ifFalse:", "==", "selectedItem", "selectItem:"],
 referencedClasses: []
 }),
@@ -2317,7 +2317,7 @@ _st($18)._scrollTop_($19);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,parent:parent,position:position},smalltalk.HLListWidget)})},
 args: ["aListItem"],
-source: "ensureVisible: aListItem\x09\x0a\x09\x22Move the scrollbar to show the active element\x22\x0a\x09\x0a\x09| parent position |\x0a\x09(aListItem get: 0) ifNil: [ ^self ].\x0a\x09position := self positionOf: aListItem.\x0a\x09parent := aListItem parent.\x0a\x09\x0a    aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a    aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ]",
+source: "ensureVisible: aListItem\x09\x0a\x09\x22Move the scrollbar to show the active element\x22\x0a\x09\x0a\x09| parent position |\x0a\x09(aListItem get: 0) ifNil: [ ^ self ].\x0a\x09position := self positionOf: aListItem.\x0a\x09parent := aListItem parent.\x0a\x09\x0a    aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a    aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ]",
 messageSends: ["ifNil:", "get:", "positionOf:", "parent", "ifTrue:", "<", "top", "position", "scrollTop:", "-", "+", "scrollTop", ">", "height"],
 referencedClasses: []
 }),
@@ -2342,7 +2342,7 @@ $1=_st($2)._eq_((0));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"findListItemFor:",{anObject:anObject},smalltalk.HLListWidget)})},
 args: ["anObject"],
-source: "findListItemFor: anObject\x0a\x09^(((wrapper asJQuery find: 'li') \x0a\x09\x09filter: [:thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject] currySelf) eq: 0)",
+source: "findListItemFor: anObject\x0a\x09^ (((wrapper asJQuery find: 'li') \x0a\x09\x09filter: [ :thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject ] currySelf) eq: 0)",
 messageSends: ["eq:", "filter:", "find:", "asJQuery", "currySelf", "=", "data:"],
 referencedClasses: []
 }),

+ 2 - 2
js/Helios-Inspector.js

@@ -72,7 +72,7 @@ $1="";
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selectionDisplayString",{selection:selection},smalltalk.HLInspectorDisplayWidget)})},
 args: [],
-source: "selectionDisplayString\x0a\x09|selection|\x0a\x09selection := model selection.\x0a    ^ (model variables keys includes: selection)\x0a    \x09ifTrue:[(model instVarObjectAt: selection) printString]\x0a      \x09ifFalse:['']",
+source: "selectionDisplayString\x0a\x09|selection|\x0a\x09selection := model selection.\x0a    ^ (model variables keys includes: selection)\x0a    \x09ifTrue:[ (model instVarObjectAt: selection) printString ]\x0a      \x09ifFalse:[ '' ]",
 messageSends: ["selection", "ifTrue:ifFalse:", "includes:", "keys", "variables", "printString", "instVarObjectAt:"],
 referencedClasses: []
 }),
@@ -100,7 +100,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.HLInspectorModel)})},
 args: [],
-source: "announcer\x0a\x09^ announcer ifNil: [announcer := Announcer new ]",
+source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
 messageSends: ["ifNil:", "new"],
 referencedClasses: ["Announcer"]
 }),

+ 1 - 1
js/Helios-KeyBindings.js

@@ -805,7 +805,7 @@ return self._errorStatus();
 }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"evaluate:",{aString:aString},smalltalk.HLBindingActionInputWidget)})},
 args: ["aString"],
-source: "evaluate: aString\x09\x0a\x09[ self callback value: aString ]\x0a\x09\x09on: Error\x0a\x09\x09do: [:ex |\x0a\x09\x09\x09self input asJQuery \x0a\x09\x09\x09\x09one: 'keydown' \x0a\x09\x09\x09\x09do: [ self clearStatus ].\x0a\x09\x09\x09self message: ex messageText.\x0a\x09\x09\x09self errorStatus ]",
+source: "evaluate: aString\x09\x0a\x09[ self callback value: aString ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :ex |\x0a\x09\x09\x09self input asJQuery \x0a\x09\x09\x09\x09one: 'keydown' \x0a\x09\x09\x09\x09do: [ self clearStatus ].\x0a\x09\x09\x09self message: ex messageText.\x0a\x09\x09\x09self errorStatus ]",
 messageSends: ["on:do:", "value:", "callback", "one:do:", "asJQuery", "input", "clearStatus", "message:", "messageText", "errorStatus"],
 referencedClasses: ["Error"]
 }),

+ 2 - 2
js/Helios-References.js

@@ -1089,7 +1089,7 @@ return $2;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"updateClassesAndMetaclassesCache",{},smalltalk.HLReferencesModel)})},
 args: [],
-source: "updateClassesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache := OrderedCollection new.\x0a\x09\x0a\x09self environment classes do: [:each |\x0a\x09\x09classesAndMetaclassesCache\x0a\x09\x09\x09\x09add: each; \x0a\x09\x09\x09\x09add: each class ]",
+source: "updateClassesAndMetaclassesCache\x0a\x09classesAndMetaclassesCache := OrderedCollection new.\x0a\x09\x0a\x09self environment classes do: [ :each |\x0a\x09\x09classesAndMetaclassesCache\x0a\x09\x09\x09\x09add: each; \x0a\x09\x09\x09\x09add: each class ]",
 messageSends: ["new", "do:", "classes", "environment", "add:", "class"],
 referencedClasses: ["OrderedCollection"]
 }),
@@ -1110,7 +1110,7 @@ return _st(self["@methodsCache"])._addAll_(_st(each)._methods());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsCache",{},smalltalk.HLReferencesModel)})},
 args: [],
-source: "updateMethodsCache\x0a\x09methodsCache := OrderedCollection new.\x0a\x09\x0a\x09self classesAndMetaclasses\x0a\x09\x09do: [:each | methodsCache addAll: each methods ]",
+source: "updateMethodsCache\x0a\x09methodsCache := OrderedCollection new.\x0a\x09\x0a\x09self classesAndMetaclasses\x0a\x09\x09do: [ :each | methodsCache addAll: each methods ]",
 messageSends: ["new", "do:", "classesAndMetaclasses", "addAll:", "methods"],
 referencedClasses: ["OrderedCollection"]
 }),

+ 11 - 11
js/Helios-Workspace.js

@@ -591,7 +591,7 @@ return smalltalk.withContext(function($ctx1) {
 self._doIt();
 return self}, function($ctx1) {$ctx1.fill(self,"onDoIt",{},smalltalk.HLCodeWidget)})},
 args: [],
-source: "onDoIt\x0a\x09\x0a    self doIt",
+source: "onDoIt\x0a\x09\x0a\x09self doIt",
 messageSends: ["doIt"],
 referencedClasses: []
 }),
@@ -721,7 +721,7 @@ self._print_(_st(result)._printString());
 self._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"printIt",{result:result},smalltalk.HLCodeWidget)})},
 args: [],
-source: "printIt\x0a\x09| result |\x0a\x0a\x09result:=  self doIt.       \x0a\x09self model announcer announce: (HLPrintItRequested on: model).\x0a    self print: result printString.\x0a\x09\x0a\x09self focus.",
+source: "printIt\x0a\x09| result |\x0a\x0a\x09result := self doIt.       \x0a\x09self model announcer announce: (HLPrintItRequested on: model).\x0a\x09self print: result printString.\x0a\x09\x0a\x09self focus.",
 messageSends: ["doIt", "announce:", "announcer", "model", "on:", "print:", "printString", "focus"],
 referencedClasses: ["HLPrintItRequested"]
 }),
@@ -1291,12 +1291,12 @@ return smalltalk.withContext(function($ctx1) {
  
 		CodeMirror.keyMap.default.fallthrough = ["basic"];
 		CodeMirror.commands.autocomplete = function(cm) {
-        	CodeMirror.showHint(cm, self._hintFor_options_);
-      	}
+			CodeMirror.showHint(cm, self._hintFor_options_);
+		}
 	;
 return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
-source: "setupCodeMirror\x0a\x09< \x0a\x09\x09CodeMirror.keyMap.default.fallthrough = [\x22basic\x22];\x0a\x09\x09CodeMirror.commands.autocomplete = function(cm) {\x0a        \x09CodeMirror.showHint(cm, self._hintFor_options_);\x0a      \x09}\x0a\x09>",
+source: "setupCodeMirror\x0a\x09< \x0a\x09\x09CodeMirror.keyMap.default.fallthrough = [\x22basic\x22];\x0a\x09\x09CodeMirror.commands.autocomplete = function(cm) {\x0a\x09\x09\x09CodeMirror.showHint(cm, self._hintFor_options_);\x0a\x09\x09}\x0a\x09>",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1703,7 +1703,7 @@ $1;
 self._contents_(_st(class_)._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,class_:class_},smalltalk.HLBrowserCodeWidget)})},
 args: ["anAnnouncement"],
-source: "onClassSelected: anAnnouncement\x0a\x09| class |\x0a\x09\x0a\x09class:= anAnnouncement item.\x0a\x09\x0a\x09class ifNil: [ ^ self contents: '' ].\x0a    self contents: class definition",
+source: "onClassSelected: anAnnouncement\x0a\x09| class |\x0a\x09\x0a\x09class:= anAnnouncement item.\x0a\x09\x0a\x09class ifNil: [ ^ self contents: '' ].\x0a\x09self contents: class definition",
 messageSends: ["item", "ifNil:", "contents:", "definition"],
 referencedClasses: []
 }),
@@ -1777,7 +1777,7 @@ return self;
 self._refresh();
 return self}, function($ctx1) {$ctx1.fill(self,"onMethodModified:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
 args: ["anAnnouncement"],
-source: "onMethodModified: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement method.\x0a\x09\x0a\x09self browserModel selectedClass = method methodClass ifFalse: [ ^ self ].\x0a\x09self browserModel selectedMethod ifNil: [ ^ self ].\x0a    self browserModel selectedMethod selector = method selector ifFalse: [ ^ self ].\x0a\x0a\x09self refresh",
+source: "onMethodModified: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement method.\x0a\x09\x0a\x09self browserModel selectedClass = method methodClass ifFalse: [ ^ self ].\x0a\x09self browserModel selectedMethod ifNil: [ ^ self ].\x0a\x09self browserModel selectedMethod selector = method selector ifFalse: [ ^ self ].\x0a\x0a\x09self refresh",
 messageSends: ["method", "ifFalse:", "=", "selectedClass", "browserModel", "methodClass", "ifNil:", "selectedMethod", "selector", "refresh"],
 referencedClasses: []
 }),
@@ -1804,7 +1804,7 @@ $1;
 self._contents_(_st(method)._source());
 return self}, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{anAnnouncement:anAnnouncement,method:method},smalltalk.HLBrowserCodeWidget)})},
 args: ["anAnnouncement"],
-source: "onMethodSelected: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement item.\x0a\x09\x0a\x09method ifNil: [ ^ self contents: '' ].\x0a    self contents: method source",
+source: "onMethodSelected: anAnnouncement\x0a\x09| method |\x0a\x09\x0a\x09method := anAnnouncement item.\x0a\x09\x0a\x09method ifNil: [ ^ self contents: '' ].\x0a\x09self contents: method source",
 messageSends: ["item", "ifNil:", "contents:", "source"],
 referencedClasses: []
 }),
@@ -1831,7 +1831,7 @@ $1;
 self._contents_(_st(package_)._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onPackageSelected:",{anAnnouncement:anAnnouncement,package_:package_},smalltalk.HLBrowserCodeWidget)})},
 args: ["anAnnouncement"],
-source: "onPackageSelected: anAnnouncement\x0a\x09| package |\x0a\x09\x0a\x09package := anAnnouncement item.\x0a\x09\x0a\x09package ifNil: [ ^ self contents: '' ].\x0a    self contents: package definition",
+source: "onPackageSelected: anAnnouncement\x0a\x09| package |\x0a\x09\x0a\x09package := anAnnouncement item.\x0a\x09\x0a\x09package ifNil: [ ^ self contents: '' ].\x0a\x09self contents: package definition",
 messageSends: ["item", "ifNil:", "contents:", "definition"],
 referencedClasses: []
 }),
@@ -1911,7 +1911,7 @@ $1;
 self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onProtocolSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLBrowserCodeWidget)})},
 args: ["anAnnouncement"],
-source: "onProtocolSelected: anAnnouncement\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a    self contents: self browserModel selectedClass definition",
+source: "onProtocolSelected: anAnnouncement\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a\x09self contents: self browserModel selectedClass definition",
 messageSends: ["ifNil:", "selectedClass", "browserModel", "contents:", "definition"],
 referencedClasses: []
 }),
@@ -1955,7 +1955,7 @@ $1;
 self._contents_(_st(_st(self._browserModel())._selectedClass())._definition());
 return self}, function($ctx1) {$ctx1.fill(self,"onShowInstanceToggled",{},smalltalk.HLBrowserCodeWidget)})},
 args: [],
-source: "onShowInstanceToggled\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a    \x0a    self contents: self browserModel selectedClass definition",
+source: "onShowInstanceToggled\x0a\x09self browserModel selectedClass ifNil: [ ^ self contents: '' ].\x0a    \x0a\x09self contents: self browserModel selectedClass definition",
 messageSends: ["ifNil:", "selectedClass", "browserModel", "contents:", "definition"],
 referencedClasses: []
 }),

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 81 - 81
js/IDE.js


+ 22 - 22
js/Importer-Exporter.js

@@ -16,7 +16,7 @@ $1=_st(_st(aString)._replace_with_("!","!!"))._trimBoth();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"chunkEscape:",{aString:aString},smalltalk.AbstractExporter)})},
 args: ["aString"],
-source: "chunkEscape: aString\x0a\x09\x22Replace all occurrences of ! with !! and trim at both ends.\x22\x0a\x0a\x09^(aString replace: '!' with: '!!') trimBoth",
+source: "chunkEscape: aString\x0a\x09\x22Replace all occurrences of ! with !! and trim at both ends.\x22\x0a\x0a\x09^ (aString replace: '!' with: '!!') trimBoth",
 messageSends: ["trimBoth", "replace:with:"],
 referencedClasses: []
 }),
@@ -46,7 +46,7 @@ $1=_st(aClass)._name();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass},smalltalk.AbstractExporter)})},
 args: ["aClass"],
-source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09\x09ifTrue: [ aClass instanceClass name, ' class' ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09aClass isNil\x0a\x09\x09\x09\x09ifTrue: [ 'nil' ]\x0a\x09\x09\x09\x09ifFalse: [ aClass name ] ]",
+source: "classNameFor: aClass\x0a\x09^ aClass isMetaclass\x0a\x09\x09ifTrue: [ aClass instanceClass name, ' class' ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09aClass isNil\x0a\x09\x09\x09\x09ifTrue: [ 'nil' ]\x0a\x09\x09\x09\x09ifFalse: [ aClass name ] ]",
 messageSends: ["ifTrue:ifFalse:", "isMetaclass", ",", "name", "instanceClass", "isNil"],
 referencedClasses: []
 }),
@@ -122,7 +122,7 @@ $2=result;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"extensionProtocolsOfPackage:",{aPackage:aPackage,extensionName:extensionName,result:result},smalltalk.AbstractExporter)})},
 args: ["aPackage"],
-source: "extensionProtocolsOfPackage: aPackage\x0a\x09| extensionName result |\x0a\x09\x0a\x09extensionName := '*', aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09\x0a\x09\x22The classes must be loaded since it is extensions only.\x0a\x09Therefore sorting (dependency resolution) does not matter here.\x0a\x09Not sorting improves the speed by a number of magnitude.\x22\x0a\x09\x0a\x09Smalltalk current classes do: [ :each |\x0a\x09\x09{each. each class} do: [ :behavior |\x0a\x09\x09\x09(behavior protocols includes: extensionName) ifTrue: [\x0a\x09\x09\x09\x09result add: (ExportMethodProtocol name: extensionName theClass: behavior) ] ] ].\x0a\x0a\x09^result",
+source: "extensionProtocolsOfPackage: aPackage\x0a\x09| extensionName result |\x0a\x09\x0a\x09extensionName := '*', aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09\x0a\x09\x22The classes must be loaded since it is extensions only.\x0a\x09Therefore sorting (dependency resolution) does not matter here.\x0a\x09Not sorting improves the speed by a number of magnitude.\x22\x0a\x09\x0a\x09Smalltalk current classes do: [ :each |\x0a\x09\x09{each. each class} do: [ :behavior |\x0a\x09\x09\x09(behavior protocols includes: extensionName) ifTrue: [\x0a\x09\x09\x09\x09result add: (ExportMethodProtocol name: extensionName theClass: behavior) ] ] ].\x0a\x0a\x09^ result",
 messageSends: [",", "name", "new", "do:", "classes", "current", "class", "ifTrue:", "includes:", "protocols", "add:", "name:theClass:"],
 referencedClasses: ["OrderedCollection", "Smalltalk", "ExportMethodProtocol"]
 }),
@@ -241,7 +241,7 @@ $12;
 _st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aClass", "aStream"],
-source: "exportDefinitionOf: aClass on: aStream\x0a\x09\x22Chunk format.\x22\x0a\x0a\x09aStream\x0a\x09\x09nextPutAll: (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;\x0a\x09\x09tab; nextPutAll: 'instanceVariableNames: '''.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: each]\x0a\x09\x09separatedBy: [aStream nextPutAll: ' '].\x0a\x09aStream\x0a\x09\x09nextPutAll: ''''; lf;\x0a\x09\x09tab; nextPutAll: 'package: ''', aClass category, '''!'; lf.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aClass), ' commentStamp!';lf;\x0a\x09\x09nextPutAll: (self chunkEscape: aClass comment), '!';lf].\x0a\x09aStream lf",
+source: "exportDefinitionOf: aClass on: aStream\x0a\x09\x22Chunk format.\x22\x0a\x0a\x09aStream\x0a\x09\x09nextPutAll: (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;\x0a\x09\x09tab; nextPutAll: 'instanceVariableNames: '''.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [ :each | aStream nextPutAll: each ]\x0a\x09\x09separatedBy: [ aStream nextPutAll: ' ' ].\x0a\x09aStream\x0a\x09\x09nextPutAll: ''''; lf;\x0a\x09\x09tab; nextPutAll: 'package: ''', aClass category, '''!'; lf.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09nextPutAll: '!', (self classNameFor: aClass), ' commentStamp!';lf;\x0a\x09\x09nextPutAll: (self chunkEscape: aClass comment), '!';lf ].\x0a\x09aStream lf",
 messageSends: ["nextPutAll:", "classNameFor:", "superclass", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "chunkEscape:"],
 referencedClasses: []
 }),
@@ -286,7 +286,7 @@ $7;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aClass", "aStream"],
-source: "exportMetaDefinitionOf: aClass on: aStream\x0a\x0a\x09aClass class instanceVariableNames isEmpty ifFalse: [\x0a\x09\x09aStream\x0a\x09\x09\x09nextPutAll: (self classNameFor: aClass class);\x0a\x09\x09\x09nextPutAll: ' instanceVariableNames: '''.\x0a\x09\x09aClass class instanceVariableNames\x0a\x09\x09\x09do: [:each | aStream nextPutAll: each]\x0a\x09\x09\x09separatedBy: [aStream nextPutAll: ' '].\x0a\x09\x09aStream\x0a\x09\x09\x09nextPutAll: '''!'; lf; lf]",
+source: "exportMetaDefinitionOf: aClass on: aStream\x0a\x0a\x09aClass class instanceVariableNames isEmpty ifFalse: [\x0a\x09\x09aStream\x0a\x09\x09\x09nextPutAll: (self classNameFor: aClass class);\x0a\x09\x09\x09nextPutAll: ' instanceVariableNames: '''.\x0a\x09\x09aClass class instanceVariableNames\x0a\x09\x09\x09do: [ :each | aStream nextPutAll: each ]\x0a\x09\x09\x09separatedBy: [ aStream nextPutAll: ' ' ].\x0a\x09\x09aStream\x0a\x09\x09\x09nextPutAll: '''!'; lf; lf ]",
 messageSends: ["ifFalse:", "isEmpty", "instanceVariableNames", "class", "nextPutAll:", "classNameFor:", "do:separatedBy:", "lf"],
 referencedClasses: []
 }),
@@ -492,7 +492,7 @@ $2=result;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"extensionCategoriesOfPackage:",{aPackage:aPackage,name:name,map:map,result:result},smalltalk.ChunkExporter)})},
 args: ["aPackage"],
-source: "extensionCategoriesOfPackage: aPackage\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| name map result |\x0a\x09name := aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [ :each |\x0a\x09\x09{each. each class} do: [ :aClass |\x0a\x09\x09\x09map := Dictionary new.\x0a\x09\x09\x09aClass protocolsDo: [ :category :methods |\x0a\x09\x09\x09\x09category = ('*', name) ifTrue: [ map at: category put: methods ] ].\x0a\x09\x09\x09result addAll: ((map keys sorted: [:a :b | a <= b ]) collect: [ :category |\x0a\x09\x09\x09\x09MethodCategory name: category theClass: aClass methods: (map at: category) ]) ] ].\x0a\x09^result",
+source: "extensionCategoriesOfPackage: aPackage\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| name map result |\x0a\x09name := aPackage name.\x0a\x09result := OrderedCollection new.\x0a\x09(Package sortedClasses: Smalltalk current classes) do: [ :each |\x0a\x09\x09{each. each class} do: [ :aClass |\x0a\x09\x09\x09map := Dictionary new.\x0a\x09\x09\x09aClass protocolsDo: [ :category :methods |\x0a\x09\x09\x09\x09category = ('*', name) ifTrue: [ map at: category put: methods ] ].\x0a\x09\x09\x09result addAll: ((map keys sorted: [ :a :b | a <= b ]) collect: [ :category |\x0a\x09\x09\x09\x09MethodCategory name: category theClass: aClass methods: (map at: category) ]) ] ].\x0a\x09^ result",
 messageSends: ["name", "new", "do:", "sortedClasses:", "classes", "current", "class", "protocolsDo:", "ifTrue:", "=", ",", "at:put:", "addAll:", "collect:", "sorted:", "keys", "<=", "name:theClass:methods:", "at:"],
 referencedClasses: ["OrderedCollection", "Package", "Smalltalk", "Dictionary", "MethodCategory"]
 }),
@@ -527,7 +527,7 @@ return _st($MethodCategory())._name_theClass_methods_(each,aClass,_st(map)._at_(
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"ownCategoriesOfClass:",{aClass:aClass,map:map},smalltalk.ChunkExporter)})},
 args: ["aClass"],
-source: "ownCategoriesOfClass: aClass\x0a\x09\x22Answer the protocols of aClass that are not package extensions\x22\x0a\x09\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| map |\x0a\x09map := Dictionary new.\x0a\x09aClass protocolsDo: [ :each :methods |\x0a\x09\x09(each match: '^\x5c*') ifFalse: [ map at: each put: methods ] ].\x0a\x09^(map keys sorted: [:a :b | a <= b ]) collect: [ :each |\x0a\x09\x09MethodCategory name: each theClass: aClass methods: (map at: each) ]",
+source: "ownCategoriesOfClass: aClass\x0a\x09\x22Answer the protocols of aClass that are not package extensions\x22\x0a\x09\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09| map |\x0a\x09map := Dictionary new.\x0a\x09aClass protocolsDo: [ :each :methods |\x0a\x09\x09(each match: '^\x5c*') ifFalse: [ map at: each put: methods ] ].\x0a\x09^ (map keys sorted: [ :a :b | a <= b ]) collect: [ :each |\x0a\x09\x09MethodCategory name: each theClass: aClass methods: (map at: each) ]",
 messageSends: ["new", "protocolsDo:", "ifFalse:", "match:", "at:put:", "collect:", "sorted:", "keys", "<=", "name:theClass:methods:", "at:"],
 referencedClasses: ["Dictionary", "MethodCategory"]
 }),
@@ -545,7 +545,7 @@ $1=self._ownCategoriesOfClass_(_st(aClass)._class());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ownCategoriesOfMetaClass:",{aClass:aClass},smalltalk.ChunkExporter)})},
 args: ["aClass"],
-source: "ownCategoriesOfMetaClass: aClass\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09^self ownCategoriesOfClass: aClass class",
+source: "ownCategoriesOfMetaClass: aClass\x0a\x09\x22Issue #143: sort protocol alphabetically\x22\x0a\x0a\x09^ self ownCategoriesOfClass: aClass class",
 messageSends: ["ownCategoriesOfClass:", "class"],
 referencedClasses: []
 }),
@@ -601,7 +601,7 @@ $1=_st(aClass)._name();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"classNameFor:",{aClass:aClass},smalltalk.Exporter)})},
 args: ["aClass"],
-source: "classNameFor: aClass\x0a\x09^aClass isMetaclass\x0a\x09\x09ifTrue: [ aClass instanceClass name, '.klass' ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09aClass isNil\x0a\x09\x09\x09\x09ifTrue: [ 'nil' ]\x0a\x09\x09\x09\x09ifFalse: [ aClass name ] ]",
+source: "classNameFor: aClass\x0a\x09^ aClass isMetaclass\x0a\x09\x09ifTrue: [ aClass instanceClass name, '.klass' ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09aClass isNil\x0a\x09\x09\x09\x09ifTrue: [ 'nil' ]\x0a\x09\x09\x09\x09ifFalse: [ aClass name ] ]",
 messageSends: ["ifTrue:ifFalse:", "isMetaclass", ",", "name", "instanceClass", "isNil"],
 referencedClasses: []
 }),
@@ -674,7 +674,7 @@ $12;
 _st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
 args: ["aClass", "aStream"],
-source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.addClass(';\x0a\x09\x09nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09\x09separatedBy: [aStream nextPutAll: ', '].\x0a\x09aStream\x0a\x09\x09nextPutAll: '], ''';\x0a\x09\x09nextPutAll: aClass category, '''';\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.';\x0a\x09\x09nextPutAll: (self classNameFor: aClass);\x0a\x09\x09nextPutAll: '.comment=';\x0a\x09\x09nextPutAll: aClass comment asJavascript;\x0a\x09\x09nextPutAll: ';'].\x0a\x09aStream lf",
+source: "exportDefinitionOf: aClass on: aStream\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.addClass(';\x0a\x09\x09nextPutAll: '''', (self classNameFor: aClass), ''', ';\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);\x0a\x09\x09nextPutAll: ', ['.\x0a\x09aClass instanceVariableNames\x0a\x09\x09do: [ :each | aStream nextPutAll: '''', each, '''' ]\x0a\x09\x09separatedBy: [ aStream nextPutAll: ', ' ].\x0a\x09aStream\x0a\x09\x09nextPutAll: '], ''';\x0a\x09\x09nextPutAll: aClass category, '''';\x0a\x09\x09nextPutAll: ');'.\x0a\x09aClass comment notEmpty ifTrue: [\x0a\x09\x09aStream\x0a\x09\x09\x09lf;\x0a\x09\x09nextPutAll: 'smalltalk.';\x0a\x09\x09nextPutAll: (self classNameFor: aClass);\x0a\x09\x09nextPutAll: '.comment=';\x0a\x09\x09nextPutAll: aClass comment asJavascript;\x0a\x09\x09nextPutAll: ';' ].\x0a\x09aStream lf",
 messageSends: ["lf", "nextPutAll:", ",", "classNameFor:", "superclass", "do:separatedBy:", "instanceVariableNames", "category", "ifTrue:", "notEmpty", "comment", "asJavascript"],
 referencedClasses: []
 }),
@@ -724,7 +724,7 @@ _st(aStream)._nextPutAll_("];".__comma(_st($String())._lf()));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"exportMetaDefinitionOf:on:",{aClass:aClass,aStream:aStream},smalltalk.Exporter)})},
 args: ["aClass", "aStream"],
-source: "exportMetaDefinitionOf: aClass on: aStream\x0a\x09aStream lf.\x0a\x09aClass class instanceVariableNames isEmpty ifFalse: [\x0a\x09\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass class);\x0a\x09\x09nextPutAll: '.iVarNames = ['.\x0a\x09\x09aClass class instanceVariableNames\x0a\x09\x09do: [:each | aStream nextPutAll: '''', each, '''']\x0a\x09\x09separatedBy: [aStream nextPutAll: ','].\x0a\x09\x09aStream nextPutAll: '];', String lf]",
+source: "exportMetaDefinitionOf: aClass on: aStream\x0a\x09aStream lf.\x0a\x09aClass class instanceVariableNames isEmpty ifFalse: [\x0a\x09\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aClass class);\x0a\x09\x09nextPutAll: '.iVarNames = ['.\x0a\x09\x09aClass class instanceVariableNames\x0a\x09\x09do: [ :each | aStream nextPutAll: '''', each, '''' ]\x0a\x09\x09separatedBy: [ aStream nextPutAll: ',' ].\x0a\x09\x09aStream nextPutAll: '];', String lf ]",
 messageSends: ["lf", "ifFalse:", "isEmpty", "instanceVariableNames", "class", "nextPutAll:", ",", "classNameFor:", "do:separatedBy:"],
 referencedClasses: ["String"]
 }),
@@ -974,7 +974,7 @@ return _st(_st(each)._category())._match_("^\x5c*");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ownMethodsOfClass:",{aClass:aClass},smalltalk.Exporter)})},
 args: ["aClass"],
-source: "ownMethodsOfClass: aClass\x0a\x09\x22Issue #143: sort methods alphabetically\x22\x0a\x0a\x09^((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector])\x0a\x09\x09reject: [:each | (each category match: '^\x5c*')]",
+source: "ownMethodsOfClass: aClass\x0a\x09\x22Issue #143: sort methods alphabetically\x22\x0a\x0a\x09^ ((aClass methodDictionary values) sorted: [ :a :b | a selector <= b selector ])\x0a\x09\x09reject: [ :each | (each category match: '^\x5c*') ]",
 messageSends: ["reject:", "sorted:", "values", "methodDictionary", "<=", "selector", "match:", "category"],
 referencedClasses: []
 }),
@@ -992,7 +992,7 @@ $1=self._ownMethodsOfClass_(_st(aClass)._class());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ownMethodsOfMetaClass:",{aClass:aClass},smalltalk.Exporter)})},
 args: ["aClass"],
-source: "ownMethodsOfMetaClass: aClass\x0a\x09\x22Issue #143: sort methods alphabetically\x22\x0a\x0a\x09^self ownMethodsOfClass: aClass class",
+source: "ownMethodsOfMetaClass: aClass\x0a\x09\x22Issue #143: sort methods alphabetically\x22\x0a\x0a\x09^ self ownMethodsOfClass: aClass class",
 messageSends: ["ownMethodsOfClass:", "class"],
 referencedClasses: []
 }),
@@ -1145,7 +1145,7 @@ return nil;
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"nextChunk",{char:char,result:result,chunk:chunk},smalltalk.ChunkParser)})},
 args: [],
-source: "nextChunk\x0a\x09\x22The chunk format (Smalltalk Interchange Format or Fileout format)\x0a\x09is a trivial format but can be a bit tricky to understand:\x0a\x09\x09- Uses the exclamation mark as delimiter of chunks.\x0a\x09\x09- Inside a chunk a normal exclamation mark must be doubled.\x0a\x09\x09- A non empty chunk must be a valid Smalltalk expression.\x0a\x09\x09- A chunk on top level with a preceding empty chunk is an instruction chunk:\x0a\x09\x09\x09- The object created by the expression then takes over reading chunks.\x0a\x0a\x09This method returns next chunk as a String (trimmed), empty String (all whitespace) or nil.\x22\x0a\x0a\x09| char result chunk |\x0a\x09result := '' writeStream.\x0a\x09\x09[char := stream next.\x0a\x09\x09char notNil] whileTrue: [\x0a\x09\x09\x09\x09char = '!' ifTrue: [\x0a\x09\x09\x09\x09\x09\x09stream peek = '!'\x0a\x09\x09\x09\x09\x09\x09\x09\x09ifTrue: [stream next \x22skipping the escape double\x22]\x0a\x09\x09\x09\x09\x09\x09\x09\x09ifFalse: [^result contents trimBoth \x22chunk end marker found\x22]].\x0a\x09\x09\x09\x09result nextPut: char].\x0a\x09^nil \x22a chunk needs to end with !\x22",
+source: "nextChunk\x0a\x09\x22The chunk format (Smalltalk Interchange Format or Fileout format)\x0a\x09is a trivial format but can be a bit tricky to understand:\x0a\x09\x09- Uses the exclamation mark as delimiter of chunks.\x0a\x09\x09- Inside a chunk a normal exclamation mark must be doubled.\x0a\x09\x09- A non empty chunk must be a valid Smalltalk expression.\x0a\x09\x09- A chunk on top level with a preceding empty chunk is an instruction chunk:\x0a\x09\x09\x09- The object created by the expression then takes over reading chunks.\x0a\x0a\x09This method returns next chunk as a String (trimmed), empty String (all whitespace) or nil.\x22\x0a\x0a\x09| char result chunk |\x0a\x09result := '' writeStream.\x0a\x09\x09[ char := stream next.\x0a\x09\x09char notNil ] whileTrue: [\x0a\x09\x09\x09\x09char = '!' ifTrue: [\x0a\x09\x09\x09\x09\x09\x09stream peek = '!'\x0a\x09\x09\x09\x09\x09\x09\x09\x09ifTrue: [ stream next \x22skipping the escape double\x22 ]\x0a\x09\x09\x09\x09\x09\x09\x09\x09ifFalse: [ ^ result contents trimBoth \x22chunk end marker found\x22 ]].\x0a\x09\x09\x09\x09result nextPut: char ].\x0a\x09^ nil \x22a chunk needs to end with !\x22",
 messageSends: ["writeStream", "whileTrue:", "next", "notNil", "ifTrue:", "=", "ifTrue:ifFalse:", "peek", "trimBoth", "contents", "nextPut:"],
 referencedClasses: []
 }),
@@ -1180,7 +1180,7 @@ $1=_st(self._new())._stream_(aStream);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"on:",{aStream:aStream},smalltalk.ChunkParser.klass)})},
 args: ["aStream"],
-source: "on: aStream\x0a\x09^self new stream: aStream",
+source: "on: aStream\x0a\x09^ self new stream: aStream",
 messageSends: ["stream:", "new"],
 referencedClasses: []
 }),
@@ -1224,7 +1224,7 @@ $1=self["@name"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"name",{},smalltalk.ExportMethodProtocol)})},
 args: [],
-source: "name\x0a\x09^name",
+source: "name\x0a\x09^ name",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1258,7 +1258,7 @@ $1=self["@theClass"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ExportMethodProtocol)})},
 args: [],
-source: "theClass\x0a\x09^theClass",
+source: "theClass\x0a\x09^ theClass",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1297,7 +1297,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"name:theClass:",{aString:aString,aClass:aClass},smalltalk.ExportMethodProtocol.klass)})},
 args: ["aString", "aClass"],
-source: "name: aString theClass: aClass\x0a\x09^self new\x0a\x09\x09name: aString;\x0a\x09\x09theClass: aClass;\x0a\x09\x09yourself",
+source: "name: aString theClass: aClass\x0a\x09^ self new\x0a\x09\x09name: aString;\x0a\x09\x09theClass: aClass;\x0a\x09\x09yourself",
 messageSends: ["name:", "new", "theClass:", "yourself"],
 referencedClasses: []
 }),
@@ -1343,7 +1343,7 @@ return _st(result)._scanFrom_(parser);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"import:",{aStream:aStream,chunk:chunk,result:result,parser:parser,lastEmpty:lastEmpty},smalltalk.Importer)})},
 args: ["aStream"],
-source: "import: aStream\x0a\x09| chunk result parser lastEmpty |\x0a\x09parser := ChunkParser on: aStream.\x0a\x09lastEmpty := false.\x0a\x09[chunk := parser nextChunk.\x0a\x09chunk isNil] whileFalse: [\x0a\x09\x09chunk isEmpty\x0a\x09\x09\x09ifTrue: [lastEmpty := true]\x0a\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09result := Compiler new evaluateExpression: chunk.\x0a\x09\x09\x09\x09lastEmpty\x0a\x09\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09lastEmpty := false.\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09result scanFrom: parser]]]",
+source: "import: aStream\x0a\x09| chunk result parser lastEmpty |\x0a\x09parser := ChunkParser on: aStream.\x0a\x09lastEmpty := false.\x0a\x09[ chunk := parser nextChunk.\x0a\x09chunk isNil ] whileFalse: [\x0a\x09\x09chunk isEmpty\x0a\x09\x09\x09ifTrue: [ lastEmpty := true ]\x0a\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09result := Compiler new evaluateExpression: chunk.\x0a\x09\x09\x09\x09lastEmpty\x0a\x09\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09lastEmpty := false.\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09result scanFrom: parser ]] ]",
 messageSends: ["on:", "whileFalse:", "nextChunk", "isNil", "ifTrue:ifFalse:", "isEmpty", "evaluateExpression:", "new", "ifTrue:", "scanFrom:"],
 referencedClasses: ["ChunkParser", "Compiler"]
 }),
@@ -1382,7 +1382,7 @@ return self._alert_($6);
 self._ajax_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:",{aURL:aURL,aString:aString},smalltalk.PackageHandler)})},
 args: ["aURL", "aString"],
-source: "ajaxPutAt: aURL data: aString\x0a\x09self\x0a\x09\x09ajax: #{\x0a\x09\x09\x09'url' -> aURL.\x0a\x09\x09\x09'type' -> 'PUT'.\x0a\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09'error' -> [ :xhr | self alert: 'Commiting ' , aURL , ' failed with reason: \x22' , (xhr responseText) , '\x22'] }",
+source: "ajaxPutAt: aURL data: aString\x0a\x09self\x0a\x09\x09ajax: #{\x0a\x09\x09\x09'url' -> aURL.\x0a\x09\x09\x09'type' -> 'PUT'.\x0a\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09'error' -> [ :xhr | self alert: 'Commiting ' , aURL , ' failed with reason: \x22' , (xhr responseText) , '\x22' ] }",
 messageSends: ["ajax:", "->", "alert:", ",", "responseText"],
 referencedClasses: []
 }),
@@ -1617,7 +1617,7 @@ $1=self._toUrl_(self._namespaceFor_(aPackage));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"commitPathJsFor:",{aPackage:aPackage},smalltalk.AmdPackageHandler)})},
 args: ["aPackage"],
-source: "commitPathJsFor: aPackage\x0a\x09^self toUrl: (self namespaceFor: aPackage)",
+source: "commitPathJsFor: aPackage\x0a\x09^ self toUrl: (self namespaceFor: aPackage)",
 messageSends: ["toUrl:", "namespaceFor:"],
 referencedClasses: []
 }),
@@ -1635,7 +1635,7 @@ $1=self._toUrl_(_st(self._namespaceFor_(aPackage)).__comma("/_source"));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"commitPathStFor:",{aPackage:aPackage},smalltalk.AmdPackageHandler)})},
 args: ["aPackage"],
-source: "commitPathStFor: aPackage\x0a\x09\x22if _source is not mapped, .st commit will likely fail\x22\x0a\x09^self toUrl: (self namespaceFor: aPackage), '/_source'.",
+source: "commitPathStFor: aPackage\x0a\x09\x22if _source is not mapped, .st commit will likely fail\x22\x0a\x09^ self toUrl: (self namespaceFor: aPackage), '/_source'.",
 messageSends: ["toUrl:", ",", "namespaceFor:"],
 referencedClasses: []
 }),

+ 1 - 1
js/Kernel-Announcements.js

@@ -88,7 +88,7 @@ _st(self._valuable())._value_(anAnnouncement);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"deliver:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},
 args: ["anAnnouncement"],
-source: "deliver: anAnnouncement\x0a\x09(self handlesAnnouncement: anAnnouncement)\x0a\x09\x09ifTrue: [self valuable value: anAnnouncement]",
+source: "deliver: anAnnouncement\x0a\x09(self handlesAnnouncement: anAnnouncement)\x0a\x09\x09ifTrue: [ self valuable value: anAnnouncement ]",
 messageSends: ["ifTrue:", "handlesAnnouncement:", "value:", "valuable"],
 referencedClasses: []
 }),

+ 32 - 32
js/Kernel-Classes.js

@@ -92,7 +92,7 @@ $2=result;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"allInstanceVariableNames",{result:result},smalltalk.Behavior)})},
 args: [],
-source: "allInstanceVariableNames\x0a\x09| result |\x0a\x09result := self instanceVariableNames copy.\x0a\x09self superclass ifNotNil: [\x0a\x09\x09result addAll: self superclass allInstanceVariableNames].\x0a\x09^result",
+source: "allInstanceVariableNames\x0a\x09| result |\x0a\x09result := self instanceVariableNames copy.\x0a\x09self superclass ifNotNil: [\x0a\x09\x09result addAll: self superclass allInstanceVariableNames ].\x0a\x09^ result",
 messageSends: ["copy", "instanceVariableNames", "ifNotNil:", "superclass", "addAll:", "allInstanceVariableNames"],
 referencedClasses: []
 }),
@@ -275,7 +275,7 @@ return _st(self._superclass())._canUnderstand_(aSelector);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"canUnderstand:",{aSelector:aSelector},smalltalk.Behavior)})},
 args: ["aSelector"],
-source: "canUnderstand: aSelector\x0a\x09^(self methodDictionary keys includes: aSelector asString) or: [\x0a\x09\x09self superclass notNil and: [self superclass canUnderstand: aSelector]]",
+source: "canUnderstand: aSelector\x0a\x09^ (self methodDictionary keys includes: aSelector asString) or: [\x0a\x09\x09self superclass notNil and: [ self superclass canUnderstand: aSelector ]]",
 messageSends: ["or:", "includes:", "keys", "methodDictionary", "asString", "and:", "notNil", "superclass", "canUnderstand:"],
 referencedClasses: []
 }),
@@ -298,7 +298,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"comment",{},smalltalk.Behavior)})},
 args: [],
-source: "comment\x0a\x09^(self basicAt: 'comment') ifNil: ['']",
+source: "comment\x0a\x09^ (self basicAt: 'comment') ifNil: [ '' ]",
 messageSends: ["ifNil:", "basicAt:"],
 referencedClasses: []
 }),
@@ -343,7 +343,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"commentStamp",{},smalltalk.Behavior)})},
 args: [],
-source: "commentStamp\x0a\x09^ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
+source: "commentStamp\x0a\x09^ ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
 messageSends: ["class:", "new", "yourself"],
 referencedClasses: ["ClassCommentReader"]
 }),
@@ -361,7 +361,7 @@ $1=self._commentStamp();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"commentStamp:prior:",{aStamp:aStamp,prior:prior},smalltalk.Behavior)})},
 args: ["aStamp", "prior"],
-source: "commentStamp: aStamp prior: prior\x0a\x09\x09^self commentStamp",
+source: "commentStamp: aStamp prior: prior\x0a\x09\x09^ self commentStamp",
 messageSends: ["commentStamp"],
 referencedClasses: []
 }),
@@ -665,7 +665,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methodsFor:",{aString:aString},smalltalk.Behavior)})},
 args: ["aString"],
-source: "methodsFor: aString\x0a\x09^ClassCategoryReader new\x0a\x09\x09class: self category: aString;\x0a\x09\x09yourself",
+source: "methodsFor: aString\x0a\x09^ ClassCategoryReader new\x0a\x09\x09class: self category: aString;\x0a\x09\x09yourself",
 messageSends: ["class:category:", "new", "yourself"],
 referencedClasses: ["ClassCategoryReader"]
 }),
@@ -683,7 +683,7 @@ $1=self._methodsFor_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methodsFor:stamp:",{aString:aString,aStamp:aStamp},smalltalk.Behavior)})},
 args: ["aString", "aStamp"],
-source: "methodsFor: aString stamp: aStamp\x0a\x09\x22Added for compatibility, right now ignores stamp.\x22\x0a\x09^self methodsFor: aString",
+source: "methodsFor: aString stamp: aStamp\x0a\x09\x22Added for compatibility, right now ignores stamp.\x22\x0a\x09^ self methodsFor: aString",
 messageSends: ["methodsFor:"],
 referencedClasses: []
 }),
@@ -738,7 +738,7 @@ $1=_st(self._basicNew())._initialize();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.Behavior)})},
 args: [],
-source: "new\x0a\x09^self basicNew initialize",
+source: "new\x0a\x09^ self basicNew initialize",
 messageSends: ["initialize", "basicNew"],
 referencedClasses: []
 }),
@@ -854,7 +854,7 @@ return _st(aBlock)._value_value_(category,_st(methodsByCategory)._at_(category))
 }, function($ctx2) {$ctx2.fillBlock({category:category},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"protocolsDo:",{aBlock:aBlock,methodsByCategory:methodsByCategory},smalltalk.Behavior)})},
 args: ["aBlock"],
-source: "protocolsDo: aBlock\x0a\x09\x22Execute aBlock for each method category with\x0a\x09its collection of methods in the sort order of category name.\x22\x0a\x0a\x09| methodsByCategory |\x0a\x09methodsByCategory := HashedCollection new.\x0a\x09self methodDictionary values do: [:m |\x0a\x09\x09(methodsByCategory at: m category ifAbsentPut: [Array new])\x0a\x09\x09\x09add: m].\x0a\x09self protocols do: [:category |\x0a\x09\x09aBlock value: category value: (methodsByCategory at: category)]",
+source: "protocolsDo: aBlock\x0a\x09\x22Execute aBlock for each method category with\x0a\x09its collection of methods in the sort order of category name.\x22\x0a\x0a\x09| methodsByCategory |\x0a\x09methodsByCategory := HashedCollection new.\x0a\x09self methodDictionary values do: [ :m |\x0a\x09\x09(methodsByCategory at: m category ifAbsentPut: [ Array new ])\x0a\x09\x09\x09add: m ].\x0a\x09self protocols do: [ :category |\x0a\x09\x09aBlock value: category value: (methodsByCategory at: category) ]",
 messageSends: ["new", "do:", "values", "methodDictionary", "add:", "at:ifAbsentPut:", "category", "protocols", "value:value:", "at:"],
 referencedClasses: ["HashedCollection", "Array"]
 }),
@@ -1029,7 +1029,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"withAllSubclasses",{},smalltalk.Behavior)})},
 args: [],
-source: "withAllSubclasses\x0a\x09^(Array with: self) addAll: self allSubclasses; yourself",
+source: "withAllSubclasses\x0a\x09^ (Array with: self) addAll: self allSubclasses; yourself",
 messageSends: ["addAll:", "with:", "allSubclasses", "yourself"],
 referencedClasses: ["Array"]
 }),
@@ -1075,7 +1075,7 @@ $1=_st(self._package())._name();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.Class)})},
 args: [],
-source: "category\x0a\x09^self package ifNil: ['Unclassified'] ifNotNil: [self package name]",
+source: "category\x0a\x09^ self package ifNil: [ 'Unclassified' ] ifNotNil: [ self package name ]",
 messageSends: ["ifNil:ifNotNil:", "package", "name"],
 referencedClasses: []
 }),
@@ -1148,7 +1148,7 @@ return smalltalk.withContext(function($ctx1) {
 return true;
 }, function($ctx1) {$ctx1.fill(self,"isClass",{},smalltalk.Class)})},
 args: [],
-source: "isClass\x0a\x09^true",
+source: "isClass\x0a\x09^ true",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1253,7 +1253,7 @@ $1=self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.Class)})},
 args: ["aString", "anotherString"],
-source: "subclass: aString instanceVariableNames: anotherString\x0a\x09\x22Kept for compatibility.\x22\x0a\x09^self subclass: aString instanceVariableNames: anotherString package: nil",
+source: "subclass: aString instanceVariableNames: anotherString\x0a\x09\x22Kept for compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: anotherString package: nil",
 messageSends: ["subclass:instanceVariableNames:package:"],
 referencedClasses: []
 }),
@@ -1272,7 +1272,7 @@ $1=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.Class)})},
 args: ["aString", "aString2", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for compatibility.\x22\x0a\x09self deprecatedAPI.\x0a\x09^self subclass: aString instanceVariableNames: aString2 package: aString3",
+source: "subclass: aString instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for compatibility.\x22\x0a\x09self deprecatedAPI.\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
 messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
 referencedClasses: []
 }),
@@ -1290,7 +1290,7 @@ $1=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",{aString:aString,aString2:aString2,classVars:classVars,pools:pools,aString3:aString3},smalltalk.Class)})},
 args: ["aString", "aString2", "classVars", "pools", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Just ignore class variables and pools. Added for compatibility.\x22\x0a\x09^self subclass: aString instanceVariableNames: aString2 package: aString3",
+source: "subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Just ignore class variables and pools. Added for compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
 messageSends: ["subclass:instanceVariableNames:package:"],
 referencedClasses: []
 }),
@@ -1309,7 +1309,7 @@ $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_p
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.Class)})},
 args: ["aString", "aString2", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ClassBuilder new\x0a\x09\x09superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3",
+source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3",
 messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"],
 referencedClasses: ["ClassBuilder"]
 }),
@@ -1433,7 +1433,7 @@ return smalltalk.withContext(function($ctx1) {
 return true;
 }, function($ctx1) {$ctx1.fill(self,"isMetaclass",{},smalltalk.Metaclass)})},
 args: [],
-source: "isMetaclass\x0a\x09^true",
+source: "isMetaclass\x0a\x09^ true",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1603,7 +1603,7 @@ self._error_(_st(_st(aClass)._name()).__comma(" is not a metaclass"));
 _st(aClass)._basicAt_put_("iVarNames",aCollection);
 return self}, function($ctx1) {$ctx1.fill(self,"basicClass:instanceVariables:",{aClass:aClass,aCollection:aCollection},smalltalk.ClassBuilder)})},
 args: ["aClass", "aCollection"],
-source: "basicClass: aClass instanceVariables: aCollection\x0a\x0a\x09aClass isMetaclass ifFalse: [self error: aClass name, ' is not a metaclass'].\x0a\x09aClass basicAt: 'iVarNames' put: aCollection",
+source: "basicClass: aClass instanceVariables: aCollection\x0a\x0a\x09aClass isMetaclass ifFalse: [ self error: aClass name, ' is not a metaclass' ].\x0a\x09aClass basicAt: 'iVarNames' put: aCollection",
 messageSends: ["ifFalse:", "isMetaclass", "error:", ",", "name", "basicAt:put:"],
 referencedClasses: []
 }),
@@ -1710,7 +1710,7 @@ $3=newClass;
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"copyClass:named:",{aClass:aClass,className:className,newClass:newClass},smalltalk.ClassBuilder)})},
 args: ["aClass", "className"],
-source: "copyClass: aClass named: className\x0a\x09| newClass |\x0a\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass superclass\x0a\x09\x09named: className\x0a\x09\x09instanceVariableNames: aClass instanceVariableNames\x0a\x09\x09package: aClass package name.\x0a\x0a\x09self copyClass: aClass to: newClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassAdded new\x0a\x09\x09\x09theClass: newClass;\x0a\x09\x09\x09yourself).\x0a\x09\x0a\x09^newClass",
+source: "copyClass: aClass named: className\x0a\x09| newClass |\x0a\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass superclass\x0a\x09\x09named: className\x0a\x09\x09instanceVariableNames: aClass instanceVariableNames\x0a\x09\x09package: aClass package name.\x0a\x0a\x09self copyClass: aClass to: newClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassAdded new\x0a\x09\x09\x09theClass: newClass;\x0a\x09\x09\x09yourself).\x0a\x09\x0a\x09^ newClass",
 messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "instanceVariableNames", "name", "package", "copyClass:to:", "announce:", "current", "theClass:", "new", "yourself"],
 referencedClasses: ["SystemAnnouncer", "ClassAdded"]
 }),
@@ -1801,7 +1801,7 @@ self._setupClass_(aBehavior);
 return aCompiledMethod;
 }, function($ctx1) {$ctx1.fill(self,"installMethod:forClass:category:",{aCompiledMethod:aCompiledMethod,aBehavior:aBehavior,aString:aString},smalltalk.ClassBuilder)})},
 args: ["aCompiledMethod", "aBehavior", "aString"],
-source: "installMethod: aCompiledMethod forClass: aBehavior category: aString\x0a\x09aCompiledMethod category: aString.\x0a\x09aBehavior addCompiledMethod: aCompiledMethod.\x0a\x09self setupClass: aBehavior.\x0a\x09^aCompiledMethod",
+source: "installMethod: aCompiledMethod forClass: aBehavior category: aString\x0a\x09aCompiledMethod category: aString.\x0a\x09aBehavior addCompiledMethod: aCompiledMethod.\x0a\x09self setupClass: aBehavior.\x0a\x09^ aCompiledMethod",
 messageSends: ["category:", "addCompiledMethod:", "setupClass:"],
 referencedClasses: []
 }),
@@ -1822,7 +1822,7 @@ return _st(each)._isEmpty();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"instanceVariableNamesFor:",{aString:aString},smalltalk.ClassBuilder)})},
 args: ["aString"],
-source: "instanceVariableNamesFor: aString\x0a\x09^(aString tokenize: ' ') reject: [ :each | each isEmpty ]",
+source: "instanceVariableNamesFor: aString\x0a\x09^ (aString tokenize: ' ') reject: [ :each | each isEmpty ]",
 messageSends: ["reject:", "tokenize:", "isEmpty"],
 referencedClasses: []
 }),
@@ -1901,7 +1901,7 @@ $9=newClass;
 return $9;
 }, function($ctx1) {$ctx1.fill(self,"migrateClassNamed:superclass:instanceVariableNames:package:",{className:className,aClass:aClass,aCollection:aCollection,packageName:packageName,oldClass:oldClass,newClass:newClass,tmp:tmp},smalltalk.ClassBuilder)})},
 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 current 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\x09\x09displayingProgress: 'Recompiling ', newClass name, '...'.\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 current 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\x09\x09displayingProgress: 'Recompiling ', newClass name, '...'.\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",
 messageSends: [",", "at:", "current", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "copyClass:to:", "basicRemoveClass:", "signal", "rawRenameClass:to:", "do:displayingProgress:", "subclasses", "migrateClass:superclass:", "name", "announce:", "theClass:", "new", "oldClass:", "yourself"],
 referencedClasses: ["Smalltalk", "Error", "SystemAnnouncer", "ClassMigrated"]
 }),
@@ -1977,7 +1977,7 @@ $1=self._superclass_subclass_instanceVariableNames_package_(aClass,className,"",
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"superclass:subclass:",{aClass:aClass,className:className},smalltalk.ClassBuilder)})},
 args: ["aClass", "className"],
-source: "superclass: aClass subclass: className\x0a\x09^self superclass: aClass subclass: className instanceVariableNames: '' package: nil",
+source: "superclass: aClass subclass: className\x0a\x09^ self superclass: aClass subclass: className instanceVariableNames: '' package: nil",
 messageSends: ["superclass:subclass:instanceVariableNames:package:"],
 referencedClasses: []
 }),
@@ -2010,7 +2010,7 @@ $5=newClass;
 return $5;
 }, function($ctx1) {$ctx1.fill(self,"superclass:subclass:instanceVariableNames:package:",{aClass:aClass,className:className,ivarNames:ivarNames,packageName:packageName,newClass:newClass},smalltalk.ClassBuilder)})},
 args: ["aClass", "className", "ivarNames", "packageName"],
-source: "superclass: aClass subclass: className instanceVariableNames: ivarNames package: packageName\x0a\x09| newClass |\x0a\x09\x0a\x09newClass := self addSubclassOf: aClass\x0a\x09\x09named: className instanceVariableNames: (self instanceVariableNamesFor: ivarNames)\x0a\x09\x09package: (packageName ifNil: ['unclassified']).\x0a\x09self setupClass: newClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassAdded new\x0a\x09\x09\x09theClass: newClass;\x0a\x09\x09\x09yourself).\x0a\x09\x0a\x09^newClass",
+source: "superclass: aClass subclass: className instanceVariableNames: ivarNames package: packageName\x0a\x09| newClass |\x0a\x09\x0a\x09newClass := self addSubclassOf: aClass\x0a\x09\x09named: className instanceVariableNames: (self instanceVariableNamesFor: ivarNames)\x0a\x09\x09package: (packageName ifNil: [ 'unclassified' ]).\x0a\x09self setupClass: newClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassAdded new\x0a\x09\x09\x09theClass: newClass;\x0a\x09\x09\x09yourself).\x0a\x09\x0a\x09^ newClass",
 messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "instanceVariableNamesFor:", "ifNil:", "setupClass:", "announce:", "current", "theClass:", "new", "yourself"],
 referencedClasses: ["SystemAnnouncer", "ClassAdded"]
 }),
@@ -2091,7 +2091,7 @@ return self._compileMethod_(chunk);
 _st(_st($ClassBuilder())._new())._setupClass_(self["@class"]);
 return self}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},smalltalk.ClassCategoryReader)})},
 args: ["aChunkParser"],
-source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09[chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty] whileFalse: [\x0a\x09\x09self compileMethod: chunk].\x0a\x09ClassBuilder new setupClass: class",
+source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09[ chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty ] whileFalse: [\x0a\x09\x09self compileMethod: chunk ].\x0a\x09ClassBuilder new setupClass: class",
 messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:", "setupClass:", "new"],
 referencedClasses: ["ClassBuilder"]
 }),
@@ -2149,7 +2149,7 @@ self._setComment_(chunk);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},smalltalk.ClassCommentReader)})},
 args: ["aChunkParser"],
-source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty ifFalse: [\x0a\x09\x09self setComment: chunk].",
+source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty ifFalse: [\x0a\x09\x09self setComment: chunk ].",
 messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"],
 referencedClasses: []
 }),
@@ -2203,7 +2203,7 @@ return _st($ClassSorterNode())._on_classes_level_(each,others,_st(self._level())
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},smalltalk.ClassSorterNode)})},
 args: ["aCollection"],
-source: "getNodesFrom: aCollection\x0a\x09| children others |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09aCollection do: [:each |\x0a\x09\x09(each superclass = self theClass)\x0a\x09\x09\x09ifTrue: [children add: each]\x0a\x09\x09\x09ifFalse: [others add: each]].\x0a\x09nodes:= children collect: [:each |\x0a\x09\x09ClassSorterNode on: each classes: others level: self level + 1]",
+source: "getNodesFrom: aCollection\x0a\x09| children others |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09aCollection do: [ :each |\x0a\x09\x09(each superclass = self theClass)\x0a\x09\x09\x09ifTrue: [ children add: each ]\x0a\x09\x09\x09ifFalse: [ others add: each ]].\x0a\x09nodes:= children collect: [ :each |\x0a\x09\x09ClassSorterNode on: each classes: others level: self level + 1 ]",
 messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:classes:level:", "+", "level"],
 referencedClasses: ["ClassSorterNode"]
 }),
@@ -2221,7 +2221,7 @@ $1=self["@level"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"level",{},smalltalk.ClassSorterNode)})},
 args: [],
-source: "level\x0a\x09^level",
+source: "level\x0a\x09^ level",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2255,7 +2255,7 @@ $1=self["@nodes"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.ClassSorterNode)})},
 args: [],
-source: "nodes\x0a\x09^nodes",
+source: "nodes\x0a\x09^ nodes",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2273,7 +2273,7 @@ $1=self["@theClass"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassSorterNode)})},
 args: [],
-source: "theClass\x0a\x09^theClass",
+source: "theClass\x0a\x09^ theClass",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2319,7 +2319,7 @@ return _st(aNode)._traverseClassesWith_(aCollection);
 }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"traverseClassesWith:",{aCollection:aCollection},smalltalk.ClassSorterNode)})},
 args: ["aCollection"],
-source: "traverseClassesWith: aCollection\x0a\x09\x22sort classes alphabetically Issue #143\x22\x0a\x0a\x09aCollection add: self theClass.\x0a\x09(self nodes sorted: [:a :b | a theClass name <= b theClass name ]) do: [:aNode |\x0a\x09\x09aNode traverseClassesWith: aCollection ].",
+source: "traverseClassesWith: aCollection\x0a\x09\x22sort classes alphabetically Issue #143\x22\x0a\x0a\x09aCollection add: self theClass.\x0a\x09(self nodes sorted: [ :a :b | a theClass name <= b theClass name ]) do: [ :aNode |\x0a\x09\x09aNode traverseClassesWith: aCollection ].",
 messageSends: ["add:", "theClass", "do:", "sorted:", "nodes", "<=", "name", "traverseClassesWith:"],
 referencedClasses: []
 }),
@@ -2343,7 +2343,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"on:classes:level:",{aClass:aClass,aCollection:aCollection,anInteger:anInteger},smalltalk.ClassSorterNode.klass)})},
 args: ["aClass", "aCollection", "anInteger"],
-source: "on: aClass classes: aCollection level: anInteger\x0a\x09^self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09level: anInteger;\x0a\x09\x09getNodesFrom: aCollection;\x0a\x09\x09yourself",
+source: "on: aClass classes: aCollection level: anInteger\x0a\x09^ self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09level: anInteger;\x0a\x09\x09getNodesFrom: aCollection;\x0a\x09\x09yourself",
 messageSends: ["theClass:", "new", "level:", "getNodesFrom:", "yourself"],
 referencedClasses: []
 }),

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 112 - 112
js/Kernel-Collections.js


+ 10 - 10
js/Kernel-Exceptions.js

@@ -80,7 +80,7 @@ $1=self["@messageText"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.Error)})},
 args: [],
-source: "messageText\x0a\x09^messageText",
+source: "messageText\x0a\x09^ messageText",
 messageSends: [],
 referencedClasses: []
 }),
@@ -180,7 +180,7 @@ $1=_st(self._new())._signal();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"signal",{},smalltalk.Error.klass)})},
 args: [],
-source: "signal\x0a\x09^self new signal",
+source: "signal\x0a\x09^ self new signal",
 messageSends: ["signal", "new"],
 referencedClasses: []
 }),
@@ -198,7 +198,7 @@ $1=_st(self._new())._signal_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"signal:",{aString:aString},smalltalk.Error.klass)})},
 args: ["aString"],
-source: "signal: aString\x0a\x09\x09^self new\x0a\x09\x09signal: aString",
+source: "signal: aString\x0a\x09^ self new\x0a\x09\x09signal: aString",
 messageSends: ["signal:", "new"],
 referencedClasses: []
 }),
@@ -332,7 +332,7 @@ $1=self["@message"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"message",{},smalltalk.MessageNotUnderstood)})},
 args: [],
-source: "message\x0a\x09^message",
+source: "message\x0a\x09^ message",
 messageSends: [],
 referencedClasses: []
 }),
@@ -367,7 +367,7 @@ $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.MessageNotUnderstood)})},
 args: [],
-source: "messageText\x0a\x09^self receiver asString, ' does not understand #', self message selector",
+source: "messageText\x0a\x09^ self receiver asString, ' does not understand #', self message selector",
 messageSends: [",", "asString", "receiver", "selector", "message"],
 referencedClasses: []
 }),
@@ -385,7 +385,7 @@ $1=self["@receiver"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.MessageNotUnderstood)})},
 args: [],
-source: "receiver\x0a\x09^receiver",
+source: "receiver\x0a\x09^ receiver",
 messageSends: [],
 referencedClasses: []
 }),
@@ -467,7 +467,7 @@ self._logErrorContext_(_st(anError)._context());
 self._logError_(anError);
 return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.ErrorHandler)})},
 args: ["anError"],
-source: "handleError: anError\x0a\x09anError context ifNotNil: [self logErrorContext: anError context].\x0a\x09self logError: anError",
+source: "handleError: anError\x0a\x09anError context ifNotNil: [ self logErrorContext: anError context ].\x0a\x09self logError: anError",
 messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"],
 referencedClasses: []
 }),
@@ -507,7 +507,7 @@ self._logContext_(_st(aContext)._home());
 self._log_(_st(aContext)._asString());
 return self}, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext},smalltalk.ErrorHandler)})},
 args: ["aContext"],
-source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home].\x0a\x09self log: aContext asString",
+source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home ].\x0a\x09self log: aContext asString",
 messageSends: ["ifNotNil:", "home", "logContext:", "log:", "asString"],
 referencedClasses: []
 }),
@@ -550,7 +550,7 @@ self._logContext_(_st(aContext)._home());
 };
 return self}, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext},smalltalk.ErrorHandler)})},
 args: ["aContext"],
-source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home]]",
+source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home ]]",
 messageSends: ["ifNotNil:", "home", "logContext:"],
 referencedClasses: []
 }),
@@ -576,7 +576,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ErrorHandler.klass)})},
 args: [],
-source: "current\x0a\x09^current ifNil: [current := self new]",
+source: "current\x0a\x09^ current ifNil: [ current := self new ]",
 messageSends: ["ifNil:", "new"],
 referencedClasses: []
 }),

+ 26 - 26
js/Kernel-Infrastructure.js

@@ -81,7 +81,7 @@ $1=_st($PlatformInterface())._ajax_(anObject);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.InterfacingObject)})},
 args: ["anObject"],
-source: "ajax: anObject\x0a\x09^PlatformInterface ajax: anObject",
+source: "ajax: anObject\x0a\x09^ PlatformInterface ajax: anObject",
 messageSends: ["ajax:"],
 referencedClasses: ["PlatformInterface"]
 }),
@@ -100,7 +100,7 @@ $1=_st($PlatformInterface())._alert_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.InterfacingObject)})},
 args: ["aString"],
-source: "alert: aString\x0a\x09^PlatformInterface alert: aString",
+source: "alert: aString\x0a\x09^ PlatformInterface alert: aString",
 messageSends: ["alert:"],
 referencedClasses: ["PlatformInterface"]
 }),
@@ -119,7 +119,7 @@ $1=_st($PlatformInterface())._confirm_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.InterfacingObject)})},
 args: ["aString"],
-source: "confirm: aString\x0a\x09^PlatformInterface confirm: aString",
+source: "confirm: aString\x0a\x09^ PlatformInterface confirm: aString",
 messageSends: ["confirm:"],
 referencedClasses: ["PlatformInterface"]
 }),
@@ -138,7 +138,7 @@ $1=_st($PlatformInterface())._prompt_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.InterfacingObject)})},
 args: ["aString"],
-source: "prompt: aString\x0a\x09^PlatformInterface prompt: aString",
+source: "prompt: aString\x0a\x09^ PlatformInterface prompt: aString",
 messageSends: ["prompt:"],
 referencedClasses: ["PlatformInterface"]
 }),
@@ -993,7 +993,7 @@ $1=self["@jsObject"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"jsObject",{},smalltalk.JSObjectProxy)})},
 args: [],
-source: "jsObject\x0a\x09^jsObject",
+source: "jsObject\x0a\x09^ jsObject",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1126,7 +1126,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"on:",{aJSObject:aJSObject},smalltalk.JSObjectProxy.klass)})},
 args: ["aJSObject"],
-source: "on: aJSObject\x0a\x09^self new\x0a\x09\x09jsObject: aJSObject;\x0a\x09\x09yourself",
+source: "on: aJSObject\x0a\x09^ self new\x0a\x09\x09jsObject: aJSObject;\x0a\x09\x09yourself",
 messageSends: ["jsObject:", "new", "yourself"],
 referencedClasses: []
 }),
@@ -1382,7 +1382,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"loadDependencies",{classes:classes,packages:packages},smalltalk.Package)})},
 args: [],
-source: "loadDependencies\x0a\x09\x22Returns list of packages that need to be loaded\x0a\x09before loading this package.\x22\x0a\x09\x0a\x09| classes packages |\x0a\x09classes := self loadDependencyClasses.\x0a\x09^(classes collect: [ :each | each package ]) asSet\x0a\x09\x09remove: self ifAbsent: [];\x0a\x09\x09yourself",
+source: "loadDependencies\x0a\x09\x22Returns list of packages that need to be loaded\x0a\x09before loading this package.\x22\x0a\x09\x0a\x09| classes packages |\x0a\x09classes := self loadDependencyClasses.\x0a\x09^ (classes collect: [ :each | each package ]) asSet\x0a\x09\x09remove: self ifAbsent: [];\x0a\x09\x09yourself",
 messageSends: ["loadDependencyClasses", "remove:ifAbsent:", "asSet", "collect:", "package", "yourself"],
 referencedClasses: []
 }),
@@ -1418,7 +1418,7 @@ $1=$5;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"loadDependencyClasses",{starCategoryName:starCategoryName},smalltalk.Package)})},
 args: [],
-source: "loadDependencyClasses\x0a\x09\x22Returns classes needed at the time of loading a package.\x0a\x09These are all that are used to subclass\x0a\x09and to define an extension method\x22\x0a\x09\x0a\x09| starCategoryName |\x0a\x09starCategoryName := '*', self name.\x0a\x09^(self classes collect: [ :each | each superclass ]) asSet\x0a\x09\x09remove: nil ifAbsent: [];\x0a\x09\x09addAll: (Smalltalk current classes select: [ :each | each protocols includes: starCategoryName ]);\x0a\x09\x09yourself",
+source: "loadDependencyClasses\x0a\x09\x22Returns classes needed at the time of loading a package.\x0a\x09These are all that are used to subclass\x0a\x09and to define an extension method\x22\x0a\x09\x0a\x09| starCategoryName |\x0a\x09starCategoryName := '*', self name.\x0a\x09^ (self classes collect: [ :each | each superclass ]) asSet\x0a\x09\x09remove: nil ifAbsent: [];\x0a\x09\x09addAll: (Smalltalk current classes select: [ :each | each protocols includes: starCategoryName ]);\x0a\x09\x09yourself",
 messageSends: [",", "name", "remove:ifAbsent:", "asSet", "collect:", "classes", "superclass", "addAll:", "select:", "current", "includes:", "protocols", "yourself"],
 referencedClasses: ["Smalltalk"]
 }),
@@ -1697,7 +1697,7 @@ $4=expandedClasses;
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"sortedClasses:",{classes:classes,children:children,others:others,nodes:nodes,expandedClasses:expandedClasses},smalltalk.Package.klass)})},
 args: ["classes"],
-source: "sortedClasses: classes\x0a\x09\x22Answer classes, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)\x22\x0a\x0a\x09| children others nodes expandedClasses |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [:each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [children add: each]\x0a\x09\x09\x09ifTrue: [others add: each]].\x0a\x09nodes := children collect: [:each |\x0a\x09\x09ClassSorterNode on: each classes: others level: 0].\x0a\x09nodes := nodes sorted: [:a :b | a theClass name <= b theClass name ].\x0a\x09expandedClasses := Array new.\x0a\x09nodes do: [:aNode |\x0a\x09\x09aNode traverseClassesWith: expandedClasses].\x0a\x09^expandedClasses",
+source: "sortedClasses: classes\x0a\x09\x22Answer classes, sorted by superclass/subclasses and by class name for common subclasses (Issue #143)\x22\x0a\x0a\x09| children others nodes expandedClasses |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [ :each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [ children add: each ]\x0a\x09\x09\x09ifTrue: [ others add: each ]].\x0a\x09nodes := children collect: [ :each |\x0a\x09\x09ClassSorterNode on: each classes: others level: 0 ].\x0a\x09nodes := nodes sorted: [ :a :b | a theClass name <= b theClass name ].\x0a\x09expandedClasses := Array new.\x0a\x09nodes do: [ :aNode |\x0a\x09\x09aNode traverseClassesWith: expandedClasses ].\x0a\x09^ expandedClasses",
 messageSends: ["do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:classes:level:", "sorted:", "<=", "name", "theClass", "new", "traverseClassesWith:"],
 referencedClasses: ["ClassSorterNode", "Array"]
 }),
@@ -1725,7 +1725,7 @@ $1=_st(self["@worker"])._ajax_(anObject);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},smalltalk.PlatformInterface.klass)})},
 args: ["anObject"],
-source: "ajax: anObject\x0a\x09^worker\x0a\x09\x09ifNotNil: [ worker ajax: anObject ]\x0a\x09\x09ifNil: [ self error: 'ajax: not available' ]",
+source: "ajax: anObject\x0a\x09^ worker\x0a\x09\x09ifNotNil: [ worker ajax: anObject ]\x0a\x09\x09ifNil: [ self error: 'ajax: not available' ]",
 messageSends: ["ifNotNil:ifNil:", "ajax:", "error:"],
 referencedClasses: []
 }),
@@ -1748,7 +1748,7 @@ $1=_st(self["@worker"])._alert_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},smalltalk.PlatformInterface.klass)})},
 args: ["aString"],
-source: "alert: aString\x0a\x09^worker\x0a\x09\x09ifNotNil: [ worker alert: aString ]\x0a\x09\x09ifNil: [ self error: 'alert: not available' ]",
+source: "alert: aString\x0a\x09^ worker\x0a\x09\x09ifNotNil: [ worker alert: aString ]\x0a\x09\x09ifNil: [ self error: 'alert: not available' ]",
 messageSends: ["ifNotNil:ifNil:", "alert:", "error:"],
 referencedClasses: []
 }),
@@ -1771,7 +1771,7 @@ $1=_st(self["@worker"])._confirm_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},smalltalk.PlatformInterface.klass)})},
 args: ["aString"],
-source: "confirm: aString\x0a\x09^worker\x0a\x09\x09ifNotNil: [ worker confirm: aString ]\x0a\x09\x09ifNil: [ self error: 'confirm: not available' ]",
+source: "confirm: aString\x0a\x09^ worker\x0a\x09\x09ifNotNil: [ worker confirm: aString ]\x0a\x09\x09ifNil: [ self error: 'confirm: not available' ]",
 messageSends: ["ifNotNil:ifNil:", "confirm:", "error:"],
 referencedClasses: []
 }),
@@ -1842,7 +1842,7 @@ return self;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{candidate:candidate},smalltalk.PlatformInterface.klass)})},
 args: [],
-source: "initialize\x0a\x09| candidate |\x0a\x09\x0a\x09super initialize.\x0a\x09\x0a\x09BrowserInterface ifNotNil: [\x0a\x09\x09candidate := BrowserInterface new.\x0a\x09\x09candidate isAvailable ifTrue: [ self setWorker: candidate. ^self ]\x0a\x09]",
+source: "initialize\x0a\x09| candidate |\x0a\x09\x0a\x09super initialize.\x0a\x09\x0a\x09BrowserInterface ifNotNil: [\x0a\x09\x09candidate := BrowserInterface new.\x0a\x09\x09candidate isAvailable ifTrue: [ self setWorker: candidate. ^ self ]\x0a\x09]",
 messageSends: ["initialize", "ifNotNil:", "new", "ifTrue:", "isAvailable", "setWorker:"],
 referencedClasses: ["BrowserInterface"]
 }),
@@ -1865,7 +1865,7 @@ $1=_st(self["@worker"])._prompt_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},smalltalk.PlatformInterface.klass)})},
 args: ["aString"],
-source: "prompt: aString\x0a\x09^worker\x0a\x09\x09ifNotNil: [ worker prompt: aString ]\x0a\x09\x09ifNil: [ self error: 'prompt: not available' ]",
+source: "prompt: aString\x0a\x09^ worker\x0a\x09\x09ifNotNil: [ worker prompt: aString ]\x0a\x09\x09ifNil: [ self error: 'prompt: not available' ]",
 messageSends: ["ifNotNil:ifNil:", "prompt:", "error:"],
 referencedClasses: []
 }),
@@ -1926,7 +1926,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.ProgressHandler.klass)})},
 args: [],
-source: "current\x0a\x09^current ifNil: [ current := self new ]",
+source: "current\x0a\x09^ current ifNil: [ current := self new ]",
 messageSends: ["ifNil:", "new"],
 referencedClasses: []
 }),
@@ -2080,7 +2080,7 @@ return self._at_(aKey);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"at:ifAbsent:",{aKey:aKey,aBlock:aBlock},smalltalk.Smalltalk)})},
 args: ["aKey", "aBlock"],
-source: "at: aKey ifAbsent: aBlock\x0a\x09^ (self includesKey: aKey)\x0a\x09\x09ifTrue: [self at: aKey]\x0a\x09\x09ifFalse: aBlock",
+source: "at: aKey ifAbsent: aBlock\x0a\x09^ (self includesKey: aKey)\x0a\x09\x09ifTrue: [ self at: aKey ]\x0a\x09\x09ifFalse: aBlock",
 messageSends: ["ifTrue:ifFalse:", "includesKey:", "at:"],
 referencedClasses: []
 }),
@@ -2277,10 +2277,10 @@ category: 'private',
 fn: function (packageName){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-delete self.packages[packageName];
+delete self.packages[ packageName];
 return self}, function($ctx1) {$ctx1.fill(self,"deletePackage:",{packageName:packageName},smalltalk.Smalltalk)})},
 args: ["packageName"],
-source: "deletePackage: packageName\x0a\x09\x22Deletes a package by deleting its binding, but does not check if it contains classes etc.\x0a\x09To remove a package, use #removePackage instead.\x22\x0a\x0a\x09<delete self.packages[packageName]>",
+source: "deletePackage: packageName\x0a\x09\x22Deletes a package by deleting its binding, but does not check if it contains classes etc.\x0a\x09To remove a package, use #removePackage instead.\x22\x0a\x0a\x09<delete self.packages[ packageName]>",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2341,10 +2341,10 @@ category: 'packages',
 fn: function (packageName){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-return self.packages[packageName];
+return self.packages[ packageName];
 return self}, function($ctx1) {$ctx1.fill(self,"packageAt:",{packageName:packageName},smalltalk.Smalltalk)})},
 args: ["packageName"],
-source: "packageAt: packageName\x0a\x09<return self.packages[packageName]>",
+source: "packageAt: packageName\x0a\x09<return self.packages[ packageName]>",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2363,7 +2363,7 @@ $1=_st($2)._ifNil_(aBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"packageAt:ifAbsent:",{packageName:packageName,aBlock:aBlock},smalltalk.Smalltalk)})},
 args: ["packageName", "aBlock"],
-source: "packageAt: packageName ifAbsent: aBlock\x0a\x09^(self packageAt: packageName) ifNil: aBlock",
+source: "packageAt: packageName ifAbsent: aBlock\x0a\x09^ (self packageAt: packageName) ifNil: aBlock",
 messageSends: ["ifNil:", "packageAt:"],
 referencedClasses: []
 }),
@@ -2415,7 +2415,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"parse:",{aString:aString,result:result},smalltalk.Smalltalk)})},
 args: ["aString"],
-source: "parse: aString\x0a\x09| result |\x0a\x09\x0a\x09self \x0a\x09\x09try: [result := self basicParse: aString] \x0a\x09\x09catch: [:ex | (self parseError: ex parsing: aString) signal].\x0a\x09\x09\x0a\x09^ result\x0a\x09\x09source: aString;\x0a\x09\x09yourself",
+source: "parse: aString\x0a\x09| result |\x0a\x09\x0a\x09self \x0a\x09\x09try: [ result := self basicParse: aString ] \x0a\x09\x09catch: [ :ex | (self parseError: ex parsing: aString) signal ].\x0a\x09\x09\x0a\x09^ result\x0a\x09\x09source: aString;\x0a\x09\x09yourself",
 messageSends: ["try:catch:", "basicParse:", "signal", "parseError:parsing:", "source:", "yourself"],
 referencedClasses: []
 }),
@@ -2509,7 +2509,7 @@ $3=_st($2)._yourself();
 _st(_st($SystemAnnouncer())._current())._announce_($3);
 return self}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},smalltalk.Smalltalk)})},
 args: ["aClass"],
-source: "removeClass: aClass\x0a\x09aClass isMetaclass ifTrue: [self error: aClass asString, ' is a Metaclass and cannot be removed!'].\x0a\x09\x0a\x09self deleteClass: aClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassRemoved new\x0a\x09\x09\x09theClass: aClass;\x0a\x09\x09\x09yourself)",
+source: "removeClass: aClass\x0a\x09aClass isMetaclass ifTrue: [ self error: aClass asString, ' is a Metaclass and cannot be removed!' ].\x0a\x09\x0a\x09self deleteClass: aClass.\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (ClassRemoved new\x0a\x09\x09\x09theClass: aClass;\x0a\x09\x09\x09yourself)",
 messageSends: ["ifTrue:", "isMetaclass", "error:", ",", "asString", "deleteClass:", "announce:", "current", "theClass:", "new", "yourself"],
 referencedClasses: ["SystemAnnouncer", "ClassRemoved"]
 }),
@@ -2534,7 +2534,7 @@ return self._removeClass_(each);
 self._deletePackage_(packageName);
 return self}, function($ctx1) {$ctx1.fill(self,"removePackage:",{packageName:packageName,pkg:pkg},smalltalk.Smalltalk)})},
 args: ["packageName"],
-source: "removePackage: packageName\x0a\x09\x22Removes a package and all its classes.\x22\x0a\x0a\x09| pkg |\x0a\x09pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].\x0a\x09pkg classes do: [:each |\x0a\x09\x09\x09self removeClass: each].\x0a\x09self deletePackage: packageName",
+source: "removePackage: packageName\x0a\x09\x22Removes a package and all its classes.\x22\x0a\x0a\x09| pkg |\x0a\x09pkg := self packageAt: packageName ifAbsent: [ self error: 'Missing package: ', packageName ].\x0a\x09pkg classes do: [ :each |\x0a\x09\x09\x09self removeClass: each ].\x0a\x09self deletePackage: packageName",
 messageSends: ["packageAt:ifAbsent:", "error:", ",", "do:", "classes", "removeClass:", "deletePackage:"],
 referencedClasses: []
 }),
@@ -2567,7 +2567,7 @@ _st(pkg)._name_(newName);
 self._deletePackage_(packageName);
 return self}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{packageName:packageName,newName:newName,pkg:pkg},smalltalk.Smalltalk)})},
 args: ["packageName", "newName"],
-source: "renamePackage: packageName to: newName\x0a\x09\x22Rename a package.\x22\x0a\x0a\x09| pkg |\x0a\x09pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].\x0a\x09(self packageAt: newName) ifNotNil: [self error: 'Already exists a package called: ', newName].\x0a\x09(self at: 'packages') at: newName put: pkg.\x0a\x09pkg name: newName.\x0a\x09self deletePackage: packageName.",
+source: "renamePackage: packageName to: newName\x0a\x09\x22Rename a package.\x22\x0a\x0a\x09| pkg |\x0a\x09pkg := self packageAt: packageName ifAbsent: [ self error: 'Missing package: ', packageName ].\x0a\x09(self packageAt: newName) ifNotNil: [ self error: 'Already exists a package called: ', newName ].\x0a\x09(self at: 'packages') at: newName put: pkg.\x0a\x09pkg name: newName.\x0a\x09self deletePackage: packageName.",
 messageSends: ["packageAt:ifAbsent:", "error:", ",", "ifNotNil:", "packageAt:", "at:put:", "at:", "name:", "deletePackage:"],
 referencedClasses: []
 }),
@@ -2651,7 +2651,7 @@ $1=self._replace_with_("^([a-zA-Z0-9]*).*$","$1");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavaScriptSelector",{},smalltalk.String)})},
 args: [],
-source: "asJavaScriptSelector\x0a\x09\x22Return first keyword of the selector, without trailing colon.\x22\x0a\x09^self replace: '^([a-zA-Z0-9]*).*$' with: '$1'",
+source: "asJavaScriptSelector\x0a\x09\x22Return first keyword of the selector, without trailing colon.\x22\x0a\x09^ self replace: '^([a-zA-Z0-9]*).*$' with: '$1'",
 messageSends: ["replace:with:"],
 referencedClasses: []
 }),

+ 17 - 17
js/Kernel-Methods.js

@@ -239,7 +239,7 @@ return _st(smalltalkError)._resignal();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"on:do:",{anErrorClass:anErrorClass,aBlock:aBlock},smalltalk.BlockClosure)})},
 args: ["anErrorClass", "aBlock"],
-source: "on: anErrorClass do: aBlock\x0a\x09\x22All exceptions thrown in the Smalltalk stack are cought.\x0a\x09Convert all JS exceptions to JavaScriptException instances.\x22\x0a\x09\x0a\x09^self try: self catch: [ :error | | smalltalkError |\x0a\x09\x09smalltalkError := Smalltalk current asSmalltalkException: error.\x0a\x09\x09(smalltalkError isKindOf: anErrorClass)\x0a\x09\x09ifTrue: [ aBlock value: smalltalkError ]\x0a\x09\x09ifFalse: [ smalltalkError resignal ] ]",
+source: "on: anErrorClass do: aBlock\x0a\x09\x22All exceptions thrown in the Smalltalk stack are cought.\x0a\x09Convert all JS exceptions to JavaScriptException instances.\x22\x0a\x09\x0a\x09^ self try: self catch: [ :error | | smalltalkError |\x0a\x09\x09smalltalkError := Smalltalk current asSmalltalkException: error.\x0a\x09\x09(smalltalkError isKindOf: anErrorClass)\x0a\x09\x09ifTrue: [ aBlock value: smalltalkError ]\x0a\x09\x09ifFalse: [ smalltalkError resignal ] ]",
 messageSends: ["try:catch:", "asSmalltalkException:", "current", "ifTrue:ifFalse:", "isKindOf:", "value:", "resignal"],
 referencedClasses: ["Smalltalk"]
 }),
@@ -503,7 +503,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.CompiledMethod)})},
 args: [],
-source: "category\x0a\x09^(self basicAt: 'category') ifNil: [ self defaultCategory ]",
+source: "category\x0a\x09^ (self basicAt: 'category') ifNil: [ self defaultCategory ]",
 messageSends: ["ifNil:", "basicAt:", "defaultCategory"],
 referencedClasses: []
 }),
@@ -586,7 +586,7 @@ $1=self._basicAt_("fn");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"fn",{},smalltalk.CompiledMethod)})},
 args: [],
-source: "fn\x0a\x09^self basicAt: 'fn'",
+source: "fn\x0a\x09^ self basicAt: 'fn'",
 messageSends: ["basicAt:"],
 referencedClasses: []
 }),
@@ -695,7 +695,7 @@ $1=self._basicAt_("messageSends");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageSends",{},smalltalk.CompiledMethod)})},
 args: [],
-source: "messageSends\x0a\x09^self basicAt: 'messageSends'",
+source: "messageSends\x0a\x09^ self basicAt: 'messageSends'",
 messageSends: ["basicAt:"],
 referencedClasses: []
 }),
@@ -713,7 +713,7 @@ $1=self._basicAt_("methodClass");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methodClass",{},smalltalk.CompiledMethod)})},
 args: [],
-source: "methodClass\x0a\x09^self basicAt: 'methodClass'",
+source: "methodClass\x0a\x09^ self basicAt: 'methodClass'",
 messageSends: ["basicAt:"],
 referencedClasses: []
 }),
@@ -765,7 +765,7 @@ $1=self._basicAt_("referencedClasses");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},smalltalk.CompiledMethod)})},
 args: [],
-source: "referencedClasses\x0a\x09^self basicAt: 'referencedClasses'",
+source: "referencedClasses\x0a\x09^ self basicAt: 'referencedClasses'",
 messageSends: ["basicAt:"],
 referencedClasses: []
 }),
@@ -783,7 +783,7 @@ $1=self._basicAt_("selector");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.CompiledMethod)})},
 args: [],
-source: "selector\x0a\x09^self basicAt: 'selector'",
+source: "selector\x0a\x09^ self basicAt: 'selector'",
 messageSends: ["basicAt:"],
 referencedClasses: []
 }),
@@ -840,7 +840,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.CompiledMethod)})},
 args: [],
-source: "source\x0a\x09^(self basicAt: 'source') ifNil: ['']",
+source: "source\x0a\x09^ (self basicAt: 'source') ifNil: [ '' ]",
 messageSends: ["ifNil:", "basicAt:"],
 referencedClasses: []
 }),
@@ -977,7 +977,7 @@ return self._addWorker();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"makeWorker",{sentinel:sentinel},smalltalk.ForkPool)})},
 args: [],
-source: "makeWorker\x0a\x09| sentinel |\x0a\x09sentinel := Object new.\x0a\x09^[ | block |\x0a\x09\x09poolSize := poolSize - 1.\x0a\x09\x09block := queue nextIfAbsent: [ sentinel ].\x0a\x09\x09block == sentinel ifFalse: [\x0a\x09\x09\x09[ block value ] ensure: [ self addWorker ]]]",
+source: "makeWorker\x0a\x09| sentinel |\x0a\x09sentinel := Object new.\x0a\x09^ [ | block |\x0a\x09\x09poolSize := poolSize - 1.\x0a\x09\x09block := queue nextIfAbsent: [ sentinel ].\x0a\x09\x09block == sentinel ifFalse: [\x0a\x09\x09\x09[ block value ] ensure: [ self addWorker ] ]]",
 messageSends: ["new", "-", "nextIfAbsent:", "ifFalse:", "==", "ensure:", "value", "addWorker"],
 referencedClasses: ["Object"]
 }),
@@ -1042,7 +1042,7 @@ $1=$2;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"default",{},smalltalk.ForkPool.klass)})},
 args: [],
-source: "default\x0a\x09^default ifNil: [ default := self new ]",
+source: "default\x0a\x09^ default ifNil: [ default := self new ]",
 messageSends: ["ifNil:", "new"],
 referencedClasses: []
 }),
@@ -1058,7 +1058,7 @@ return smalltalk.withContext(function($ctx1) {
 return (100);
 }, function($ctx1) {$ctx1.fill(self,"defaultMaxPoolSize",{},smalltalk.ForkPool.klass)})},
 args: [],
-source: "defaultMaxPoolSize\x0a\x09^100",
+source: "defaultMaxPoolSize\x0a\x09^ 100",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1095,7 +1095,7 @@ $1=self["@arguments"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"arguments",{},smalltalk.Message)})},
 args: [],
-source: "arguments\x0a\x09^arguments",
+source: "arguments\x0a\x09^ arguments",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1151,7 +1151,7 @@ $1=self["@selector"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.Message)})},
 args: [],
-source: "selector\x0a\x09^selector",
+source: "selector\x0a\x09^ selector",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1208,7 +1208,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selector:arguments:",{aString:aString,anArray:anArray},smalltalk.Message.klass)})},
 args: ["aString", "anArray"],
-source: "selector: aString arguments: anArray\x0a\x09^self new\x0a\x09\x09selector: aString;\x0a\x09\x09arguments: anArray;\x0a\x09\x09yourself",
+source: "selector: aString arguments: anArray\x0a\x09^ self new\x0a\x09\x09selector: aString;\x0a\x09\x09arguments: anArray;\x0a\x09\x09yourself",
 messageSends: ["selector:", "new", "arguments:", "yourself"],
 referencedClasses: []
 }),
@@ -1488,7 +1488,7 @@ $ctx1.sendIdx[","]=3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.MethodContext)})},
 args: [],
-source: "asString\x0a\x09^self isBlockContext\x0a\x09\x09ifTrue: [ 'a block (in ', self methodContext asString, ')' ]\x0a\x09\x09ifFalse: [ self receiver class name, ' >> ', self selector ]",
+source: "asString\x0a\x09^ self isBlockContext\x0a\x09\x09ifTrue: [ 'a block (in ', self methodContext asString, ')' ]\x0a\x09\x09ifFalse: [ self receiver class name, ' >> ', self selector ]",
 messageSends: ["ifTrue:ifFalse:", "isBlockContext", ",", "asString", "methodContext", "name", "class", "receiver", "selector"],
 referencedClasses: []
 }),
@@ -1854,7 +1854,7 @@ $1=_st($PlatformInterface())._existsGlobal_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString},smalltalk.NativeFunction.klass)})},
 args: ["aString"],
-source: "exists: aString\x0a\x09^PlatformInterface existsGlobal: aString",
+source: "exists: aString\x0a\x09^ PlatformInterface existsGlobal: aString",
 messageSends: ["existsGlobal:"],
 referencedClasses: ["PlatformInterface"]
 }),
@@ -1933,7 +1933,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Timeout.klass)})},
 args: ["anObject"],
-source: "on: anObject\x0a\x09^self new rawTimeout: anObject; yourself",
+source: "on: anObject\x0a\x09^ self new rawTimeout: anObject; yourself",
 messageSends: ["rawTimeout:", "new", "yourself"],
 referencedClasses: []
 }),

+ 92 - 92
js/Kernel-Objects.js

@@ -17,7 +17,7 @@ $1=_st($Association())._key_value_(self,anObject);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"->",{anObject:anObject},smalltalk.Object)})},
 args: ["anObject"],
-source: "-> anObject\x0a\x09^Association key: self value: anObject",
+source: "-> anObject\x0a\x09^ Association key: self value: anObject",
 messageSends: ["key:value:"],
 referencedClasses: ["Association"]
 }),
@@ -35,7 +35,7 @@ $1=self.__eq_eq(anObject);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"=",{anObject:anObject},smalltalk.Object)})},
 args: ["anObject"],
-source: "= anObject\x0a\x09^self == anObject",
+source: "= anObject\x0a\x09^ self == anObject",
 messageSends: ["=="],
 referencedClasses: []
 }),
@@ -55,7 +55,7 @@ $1=_st($2).__eq(_st(anObject)._identityHash());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject},smalltalk.Object)})},
 args: ["anObject"],
-source: "== anObject\x0a\x09^self identityHash = anObject identityHash",
+source: "== anObject\x0a\x09^ self identityHash = anObject identityHash",
 messageSends: ["=", "identityHash"],
 referencedClasses: []
 }),
@@ -80,7 +80,7 @@ $1=variables;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{variables:variables},smalltalk.Object)})},
 args: [],
-source: "asJSON\x0a\x09| variables |\x0a\x09variables := HashedCollection new.\x0a\x09self class allInstanceVariableNames do: [:each |\x0a\x09\x09variables at: each put: (self instVarAt: each) asJSON].\x0a\x09^variables",
+source: "asJSON\x0a\x09| variables |\x0a\x09variables := HashedCollection new.\x0a\x09self class allInstanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) asJSON ].\x0a\x09^ variables",
 messageSends: ["new", "do:", "allInstanceVariableNames", "class", "at:put:", "asJSON", "instVarAt:"],
 referencedClasses: ["HashedCollection"]
 }),
@@ -99,7 +99,7 @@ $1=_st($JSON())._stringify_(self._asJSON());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJSONString",{},smalltalk.Object)})},
 args: [],
-source: "asJSONString\x0a\x09^JSON stringify: self asJSON",
+source: "asJSONString\x0a\x09^ JSON stringify: self asJSON",
 messageSends: ["stringify:", "asJSON"],
 referencedClasses: ["JSON"]
 }),
@@ -117,7 +117,7 @@ $1=self._asString();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Object)})},
 args: [],
-source: "asJavascript\x0a\x09^self asString",
+source: "asJavascript\x0a\x09^ self asString",
 messageSends: ["asString"],
 referencedClasses: []
 }),
@@ -135,7 +135,7 @@ $1=self._printString();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asString",{},smalltalk.Object)})},
 args: [],
-source: "asString\x0a\x09^self printString",
+source: "asString\x0a\x09^ self printString",
 messageSends: ["printString"],
 referencedClasses: []
 }),
@@ -201,7 +201,7 @@ $1=self._basicPerform_withArguments_(aString,[]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"basicPerform:",{aString:aString},smalltalk.Object)})},
 args: ["aString"],
-source: "basicPerform: aString\x0a\x09^self basicPerform: aString withArguments: #()",
+source: "basicPerform: aString\x0a\x09^ self basicPerform: aString withArguments: #()",
 messageSends: ["basicPerform:withArguments:"],
 referencedClasses: []
 }),
@@ -251,7 +251,7 @@ $1=_st(self._shallowCopy())._postCopy();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Object)})},
 args: [],
-source: "copy\x0a\x09^self shallowCopy postCopy",
+source: "copy\x0a\x09^ self shallowCopy postCopy",
 messageSends: ["postCopy", "shallowCopy"],
 referencedClasses: []
 }),
@@ -397,7 +397,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.Object)})},
 args: ["aBlock"],
-source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self",
+source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -415,7 +415,7 @@ $1=_st(anotherBlock)._value_(self);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
 args: ["aBlock", "anotherBlock"],
-source: "ifNil: aBlock ifNotNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^anotherBlock value: self",
+source: "ifNil: aBlock ifNotNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ anotherBlock value: self",
 messageSends: ["value:"],
 referencedClasses: []
 }),
@@ -433,7 +433,7 @@ $1=_st(aBlock)._value_(self);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.Object)})},
 args: ["aBlock"],
-source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^aBlock value: self",
+source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ aBlock value: self",
 messageSends: ["value:"],
 referencedClasses: []
 }),
@@ -451,7 +451,7 @@ $1=_st(aBlock)._value_(self);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Object)})},
 args: ["aBlock", "anotherBlock"],
-source: "ifNotNil: aBlock ifNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^aBlock value: self",
+source: "ifNotNil: aBlock ifNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ aBlock value: self",
 messageSends: ["value:"],
 referencedClasses: []
 }),
@@ -510,7 +510,7 @@ _st(anInspector)._setLabel_(self._printString());
 $1=_st(anInspector)._setVariables_(variables);
 return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)})},
 args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [:each |\x0a\x09\x09variables at: each put: (self instVarAt: each)].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
 messageSends: ["new", "at:put:", "do:", "allInstanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
 referencedClasses: ["Dictionary"]
 }),
@@ -590,7 +590,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isClass",{},smalltalk.Object)})},
 args: [],
-source: "isClass\x0a\x09^false",
+source: "isClass\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -645,7 +645,7 @@ $1=_st(self._class())._inheritsFrom_(aClass);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isKindOf:",{aClass:aClass},smalltalk.Object)})},
 args: ["aClass"],
-source: "isKindOf: aClass\x0a\x09^(self isMemberOf: aClass)\x0a\x09\x09ifTrue: [true]\x0a\x09\x09ifFalse: [self class inheritsFrom: aClass]",
+source: "isKindOf: aClass\x0a\x09^ (self isMemberOf: aClass)\x0a\x09\x09ifTrue: [ true ]\x0a\x09\x09ifFalse: [ self class inheritsFrom: aClass ]",
 messageSends: ["ifTrue:ifFalse:", "isMemberOf:", "inheritsFrom:", "class"],
 referencedClasses: []
 }),
@@ -663,7 +663,7 @@ $1=_st(self._class()).__eq(aClass);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isMemberOf:",{aClass:aClass},smalltalk.Object)})},
 args: ["aClass"],
-source: "isMemberOf: aClass\x0a\x09^self class = aClass",
+source: "isMemberOf: aClass\x0a\x09^ self class = aClass",
 messageSends: ["=", "class"],
 referencedClasses: []
 }),
@@ -679,7 +679,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isMetaclass",{},smalltalk.Object)})},
 args: [],
-source: "isMetaclass\x0a\x09^false",
+source: "isMetaclass\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -695,7 +695,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.Object)})},
 args: [],
-source: "isNil\x0a\x09^false",
+source: "isNil\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -711,7 +711,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Object)})},
 args: [],
-source: "isNumber\x0a\x09^false",
+source: "isNumber\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -743,7 +743,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isParseFailure",{},smalltalk.Object)})},
 args: [],
-source: "isParseFailure\x0a\x09^false",
+source: "isParseFailure\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -759,7 +759,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isString",{},smalltalk.Object)})},
 args: [],
-source: "isString\x0a\x09^false",
+source: "isString\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -775,7 +775,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"isSymbol",{},smalltalk.Object)})},
 args: [],
-source: "isSymbol\x0a\x09^false",
+source: "isSymbol\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -793,7 +793,7 @@ $1=_st(self._isNil())._not();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.Object)})},
 args: [],
-source: "notNil\x0a\x09^self isNil not",
+source: "notNil\x0a\x09^ self isNil not",
 messageSends: ["not", "isNil"],
 referencedClasses: []
 }),
@@ -811,7 +811,7 @@ $1=self._perform_withArguments_(aString,[]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"perform:",{aString:aString},smalltalk.Object)})},
 args: ["aString"],
-source: "perform: aString\x0a\x09^self perform: aString withArguments: #()",
+source: "perform: aString\x0a\x09^ self perform: aString withArguments: #()",
 messageSends: ["perform:withArguments:"],
 referencedClasses: []
 }),
@@ -928,7 +928,7 @@ $1=_st(self._class())._canUnderstand_(aSelector);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"respondsTo:",{aSelector:aSelector},smalltalk.Object)})},
 args: ["aSelector"],
-source: "respondsTo: aSelector\x0a\x09^self class canUnderstand: aSelector",
+source: "respondsTo: aSelector\x0a\x09^ self class canUnderstand: aSelector",
 messageSends: ["canUnderstand:", "class"],
 referencedClasses: []
 }),
@@ -1082,7 +1082,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"yourself",{},smalltalk.Object)})},
 args: [],
-source: "yourself\x0a\x09^self",
+source: "yourself\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1101,7 +1101,7 @@ $ctx1.sendIdx["="]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"~=",{anObject:anObject},smalltalk.Object)})},
 args: ["anObject"],
-source: "~= anObject\x0a\x09^(self = anObject) = false",
+source: "~= anObject\x0a\x09^ (self = anObject) = false",
 messageSends: ["="],
 referencedClasses: []
 }),
@@ -1119,7 +1119,7 @@ $1=_st(self.__eq_eq(anObject)).__eq(false);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"~~",{anObject:anObject},smalltalk.Object)})},
 args: ["anObject"],
-source: "~~ anObject\x0a\x09^(self == anObject) = false",
+source: "~~ anObject\x0a\x09^ (self == anObject) = false",
 messageSends: ["=", "=="],
 referencedClasses: []
 }),
@@ -1215,7 +1215,7 @@ $1=self.__eq(aBoolean);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"==",{aBoolean:aBoolean},smalltalk.Boolean)})},
 args: ["aBoolean"],
-source: "== aBoolean\x0a\x09^self = aBoolean",
+source: "== aBoolean\x0a\x09^ self = aBoolean",
 messageSends: ["="],
 referencedClasses: []
 }),
@@ -1237,7 +1237,7 @@ return false;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"and:",{aBlock:aBlock},smalltalk.Boolean)})},
 args: ["aBlock"],
-source: "and: aBlock\x0a\x09^self = true\x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: [false]",
+source: "and: aBlock\x0a\x09^ self = true\x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: [ false ]",
 messageSends: ["ifTrue:ifFalse:", "="],
 referencedClasses: []
 }),
@@ -1275,7 +1275,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Boolean)})},
 args: [],
-source: "asJSON\x0a\x09^self",
+source: "asJSON\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1307,7 +1307,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Boolean)})},
 args: [],
-source: "deepCopy\x0a\x09^self",
+source: "deepCopy\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1327,7 +1327,7 @@ return smalltalk.withContext(function($ctx2) {
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifFalse:",{aBlock:aBlock},smalltalk.Boolean)})},
 args: ["aBlock"],
-source: "ifFalse: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self ifTrue: [] ifFalse: aBlock",
+source: "ifFalse: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self ifTrue: [] ifFalse: aBlock",
 messageSends: ["ifTrue:ifFalse:"],
 referencedClasses: []
 }),
@@ -1345,7 +1345,7 @@ $1=self._ifTrue_ifFalse_(anotherBlock,aBlock);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifFalse:ifTrue:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.Boolean)})},
 args: ["aBlock", "anotherBlock"],
-source: "ifFalse: aBlock ifTrue: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self ifTrue: anotherBlock ifFalse: aBlock",
+source: "ifFalse: aBlock ifTrue: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self ifTrue: anotherBlock ifFalse: aBlock",
 messageSends: ["ifTrue:ifFalse:"],
 referencedClasses: []
 }),
@@ -1365,7 +1365,7 @@ return smalltalk.withContext(function($ctx2) {
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifTrue:",{aBlock:aBlock},smalltalk.Boolean)})},
 args: ["aBlock"],
-source: "ifTrue: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self ifTrue: aBlock ifFalse: []",
+source: "ifTrue: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self ifTrue: aBlock ifFalse: []",
 messageSends: ["ifTrue:ifFalse:"],
 referencedClasses: []
 }),
@@ -1437,7 +1437,7 @@ $1=self.__eq(false);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"not",{},smalltalk.Boolean)})},
 args: [],
-source: "not\x0a\x09^self = false",
+source: "not\x0a\x09^ self = false",
 messageSends: ["="],
 referencedClasses: []
 }),
@@ -1459,7 +1459,7 @@ return true;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"or:",{aBlock:aBlock},smalltalk.Boolean)})},
 args: ["aBlock"],
-source: "or: aBlock\x0a\x09^self = true\x0a\x09\x09ifTrue: [true]\x0a\x09\x09ifFalse: aBlock",
+source: "or: aBlock\x0a\x09^ self = true\x0a\x09\x09ifTrue: [ true ]\x0a\x09\x09ifFalse: aBlock",
 messageSends: ["ifTrue:ifFalse:", "="],
 referencedClasses: []
 }),
@@ -1491,7 +1491,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.Boolean)})},
 args: [],
-source: "shallowCopy\x0a\x09^self",
+source: "shallowCopy\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1663,7 +1663,7 @@ $1=self._time();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asMilliseconds",{},smalltalk.Date)})},
 args: [],
-source: "asMilliseconds\x0a\x09^self time",
+source: "asMilliseconds\x0a\x09^ self time",
 messageSends: ["time"],
 referencedClasses: []
 }),
@@ -1681,7 +1681,7 @@ $1=self._asMilliseconds();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asNumber",{},smalltalk.Date)})},
 args: [],
-source: "asNumber\x0a\x09^self asMilliseconds",
+source: "asNumber\x0a\x09^ self asMilliseconds",
 messageSends: ["asMilliseconds"],
 referencedClasses: []
 }),
@@ -1731,7 +1731,7 @@ $1=self._dayOfWeek();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"day",{},smalltalk.Date)})},
 args: [],
-source: "day\x0a\x09^self dayOfWeek",
+source: "day\x0a\x09^ self dayOfWeek",
 messageSends: ["dayOfWeek"],
 referencedClasses: []
 }),
@@ -2070,7 +2070,7 @@ $1=self._new_(aNumber);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"fromMilliseconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
 args: ["aNumber"],
-source: "fromMilliseconds: aNumber\x0a\x09^self new: aNumber",
+source: "fromMilliseconds: aNumber\x0a\x09^ self new: aNumber",
 messageSends: ["new:"],
 referencedClasses: []
 }),
@@ -2088,7 +2088,7 @@ $1=self._fromMilliseconds_(_st(aNumber).__star((1000)));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"fromSeconds:",{aNumber:aNumber},smalltalk.Date.klass)})},
 args: ["aNumber"],
-source: "fromSeconds: aNumber\x0a\x09^self fromMilliseconds: aNumber * 1000",
+source: "fromSeconds: aNumber\x0a\x09^ self fromMilliseconds: aNumber * 1000",
 messageSends: ["fromMilliseconds:", "*"],
 referencedClasses: []
 }),
@@ -2106,7 +2106,7 @@ $1=self._new_(aString);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},smalltalk.Date.klass)})},
 args: ["aString"],
-source: "fromString: aString\x0a\x09\x22Example: Date fromString('2011/04/15 00:00:00')\x22\x0a\x09^self new: aString",
+source: "fromString: aString\x0a\x09\x22Example: Date fromString('2011/04/15 00:00:00')\x22\x0a\x09^ self new: aString",
 messageSends: ["new:"],
 referencedClasses: []
 }),
@@ -2145,7 +2145,7 @@ $1=_st(_st($Date())._now()).__minus(t);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"millisecondsToRun:",{aBlock:aBlock,t:t},smalltalk.Date.klass)})},
 args: ["aBlock"],
-source: "millisecondsToRun: aBlock\x0a\x09| t |\x0a\x09t := Date now.\x0a\x09aBlock value.\x0a\x09^Date now - t",
+source: "millisecondsToRun: aBlock\x0a\x09| t |\x0a\x09t := Date now.\x0a\x09aBlock value.\x0a\x09^ Date now - t",
 messageSends: ["now", "value", "-"],
 referencedClasses: ["Date"]
 }),
@@ -2179,7 +2179,7 @@ $1=self._today();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"now",{},smalltalk.Date.klass)})},
 args: [],
-source: "now\x0a\x09^self today",
+source: "now\x0a\x09^ self today",
 messageSends: ["today"],
 referencedClasses: []
 }),
@@ -2197,7 +2197,7 @@ $1=self._new();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"today",{},smalltalk.Date.klass)})},
 args: [],
-source: "today\x0a\x09^self new",
+source: "today\x0a\x09^ self new",
 messageSends: ["new"],
 referencedClasses: []
 }),
@@ -2205,7 +2205,7 @@ smalltalk.Date.klass);
 
 
 smalltalk.addClass('Number', smalltalk.Object, [], 'Kernel-Objects');
-smalltalk.Number.comment="I am the Amber representation for all numbers.\x0aI am directly mapped to JavaScript Number.\x0a\x0a## API\x0a\x0aI provide all necessary methods for arithmetic operations, comparison, conversion and so on with numbers.\x0a\x0aMy instances can also be used to evaluate a block a fixed number of times:\x0a\x0a\x095 timesRepeat: [Transcript show: 'This will be printed 5 times'; cr].\x0a\x09\x0a\x091 to: 5 do: [:aNumber| Transcript show: aNumber asString; cr].\x0a\x09\x0a\x091 to: 10 by: 2 do: [:aNumber| Transcript show: aNumber asString; cr].";
+smalltalk.Number.comment="I am the Amber representation for all numbers.\x0aI am directly mapped to JavaScript Number.\x0a\x0a## API\x0a\x0aI provide all necessary methods for arithmetic operations, comparison, conversion and so on with numbers.\x0a\x0aMy instances can also be used to evaluate a block a fixed number of times:\x0a\x0a\x095 timesRepeat: [ Transcript show: 'This will be printed 5 times'; cr ].\x0a\x09\x0a\x091 to: 5 do: [ :aNumber| Transcript show: aNumber asString; cr ].\x0a\x09\x0a\x091 to: 10 by: 2 do: [ :aNumber| Transcript show: aNumber asString; cr ].";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "&",
@@ -2250,7 +2250,7 @@ $1=self._raisedTo_(exponent);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"**",{exponent:exponent},smalltalk.Number)})},
 args: ["exponent"],
-source: "** exponent\x0a\x09^self raisedTo: exponent",
+source: "** exponent\x0a\x09^ self raisedTo: exponent",
 messageSends: ["raisedTo:"],
 referencedClasses: []
 }),
@@ -2316,7 +2316,7 @@ $1=_st(self.__slash(aNumber))._floor();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"//",{aNumber:aNumber},smalltalk.Number)})},
 args: ["aNumber"],
-source: "// aNumber\x0a\x09^(self / aNumber) floor",
+source: "// aNumber\x0a\x09^ (self / aNumber) floor",
 messageSends: ["floor", "/"],
 referencedClasses: []
 }),
@@ -2420,7 +2420,7 @@ $1=_st($Point())._x_y_(self,aNumber);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"@",{aNumber:aNumber},smalltalk.Number)})},
 args: ["aNumber"],
-source: "@ aNumber\x0a\x09^Point x: self y: aNumber",
+source: "@ aNumber\x0a\x09^ Point x: self y: aNumber",
 messageSends: ["x:y:"],
 referencedClasses: ["Point"]
 }),
@@ -2516,7 +2516,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.Number)})},
 args: [],
-source: "asJSON\x0a\x09^self",
+source: "asJSON\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2535,7 +2535,7 @@ $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Number)})},
 args: [],
-source: "asJavascript\x0a\x09^'(', self printString, ')'",
+source: "asJavascript\x0a\x09^ '(', self printString, ')'",
 messageSends: [",", "printString"],
 referencedClasses: []
 }),
@@ -2570,7 +2570,7 @@ $1=_st($Point())._x_y_(self,self);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Number)})},
 args: [],
-source: "asPoint\x0a\x09^Point x: self y: self",
+source: "asPoint\x0a\x09^ Point x: self y: self",
 messageSends: ["x:y:"],
 referencedClasses: ["Point"]
 }),
@@ -2605,7 +2605,7 @@ $1=_st(_st(_st(_st(_st($Random())._new())._next()).__star(self))._truncated())._
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"atRandom",{},smalltalk.Number)})},
 args: [],
-source: "atRandom\x0a\x09^(Random new next * self) truncated + 1",
+source: "atRandom\x0a\x09^ (Random new next * self) truncated + 1",
 messageSends: ["+", "truncated", "*", "next", "new"],
 referencedClasses: ["Random"]
 }),
@@ -2637,7 +2637,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"copy",{},smalltalk.Number)})},
 args: [],
-source: "copy\x0a\x09^self",
+source: "copy\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2671,7 +2671,7 @@ $1=self._copy();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.Number)})},
 args: [],
-source: "deepCopy\x0a\x09^self copy",
+source: "deepCopy\x0a\x09^ self copy",
 messageSends: ["copy"],
 referencedClasses: []
 }),
@@ -2723,7 +2723,7 @@ $1=_st(self._asString()).__comma("n");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"identityHash",{},smalltalk.Number)})},
 args: [],
-source: "identityHash\x0a\x09^self asString, 'n'",
+source: "identityHash\x0a\x09^ self asString, 'n'",
 messageSends: [",", "asString"],
 referencedClasses: []
 }),
@@ -2755,7 +2755,7 @@ return smalltalk.withContext(function($ctx1) {
 return true;
 }, function($ctx1) {$ctx1.fill(self,"isNumber",{},smalltalk.Number)})},
 args: [],
-source: "isNumber\x0a\x09^true",
+source: "isNumber\x0a\x09^ true",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2773,7 +2773,7 @@ $1=self.__eq((0));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isZero",{},smalltalk.Number)})},
 args: [],
-source: "isZero\x0a\x09^self = 0",
+source: "isZero\x0a\x09^ self = 0",
 messageSends: ["="],
 referencedClasses: []
 }),
@@ -2871,7 +2871,7 @@ $1=(0).__minus(self);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"negated",{},smalltalk.Number)})},
 args: [],
-source: "negated\x0a\x09^0 - self",
+source: "negated\x0a\x09^ 0 - self",
 messageSends: ["-"],
 referencedClasses: []
 }),
@@ -3065,7 +3065,7 @@ $1=self.__star(self);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"squared",{},smalltalk.Number)})},
 args: [],
-source: "squared\x0a\x09^self * self",
+source: "squared\x0a\x09^ self * self",
 messageSends: ["*"],
 referencedClasses: []
 }),
@@ -3107,7 +3107,7 @@ return count;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"timesRepeat:",{aBlock:aBlock,count:count},smalltalk.Number)})},
 args: ["aBlock"],
-source: "timesRepeat: aBlock\x0a\x09| count |\x0a\x09count := 1.\x0a\x09[count > self] whileFalse: [\x0a\x09\x09aBlock value.\x0a\x09\x09count := count + 1]",
+source: "timesRepeat: aBlock\x0a\x09| count |\x0a\x09count := 1.\x0a\x09[ count > self ] whileFalse: [\x0a\x09\x09aBlock value.\x0a\x09\x09count := count + 1 ]",
 messageSends: ["whileFalse:", ">", "value", "+"],
 referencedClasses: []
 }),
@@ -3142,7 +3142,7 @@ $1=array;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"to:",{aNumber:aNumber,array:array,first:first,last:last,count:count},smalltalk.Number)})},
 args: ["aNumber"],
-source: "to: aNumber\x0a\x09| array first last count |\x0a\x09first := self truncated.\x0a\x09last := aNumber truncated + 1.\x0a\x09count := 1.\x0a\x09array := Array new.\x0a\x09(last - first) timesRepeat: [\x0a\x09\x09array at: count put: first.\x0a\x09\x09count := count + 1.\x0a\x09\x09first := first + 1].\x0a\x09^array",
+source: "to: aNumber\x0a\x09| array first last count |\x0a\x09first := self truncated.\x0a\x09last := aNumber truncated + 1.\x0a\x09count := 1.\x0a\x09array := Array new.\x0a\x09(last - first) timesRepeat: [\x0a\x09\x09array at: count put: first.\x0a\x09\x09count := count + 1.\x0a\x09\x09first := first + 1 ].\x0a\x09^ array",
 messageSends: ["truncated", "+", "new", "timesRepeat:", "-", "at:put:"],
 referencedClasses: ["Array"]
 }),
@@ -3200,7 +3200,7 @@ $3=array;
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"to:by:",{stop:stop,step:step,array:array,value:value,pos:pos},smalltalk.Number)})},
 args: ["stop", "step"],
-source: "to: stop by: step\x0a\x09| array value pos |\x0a\x09value := self.\x0a\x09array := Array new.\x0a\x09pos := 1.\x0a\x09step = 0 ifTrue: [self error: 'step must be non-zero'].\x0a\x09step < 0\x0a\x09\x09ifTrue: [[ value >= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09array at: pos put: value.\x0a\x09\x09\x09\x09\x09pos := pos + 1.\x0a\x09\x09\x09\x09\x09value := value + step]]\x0a\x09\x09ifFalse: [[ value <= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09array at: pos put: value.\x0a\x09\x09\x09\x09pos := pos + 1.\x0a\x09\x09\x09\x09\x09value := value + step]].\x0a\x09^array",
+source: "to: stop by: step\x0a\x09| array value pos |\x0a\x09value := self.\x0a\x09array := Array new.\x0a\x09pos := 1.\x0a\x09step = 0 ifTrue: [ self error: 'step must be non-zero' ].\x0a\x09step < 0\x0a\x09\x09ifTrue: [ [ value >= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09array at: pos put: value.\x0a\x09\x09\x09\x09\x09pos := pos + 1.\x0a\x09\x09\x09\x09\x09value := value + step ]]\x0a\x09\x09ifFalse: [ [ value <= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09array at: pos put: value.\x0a\x09\x09\x09\x09pos := pos + 1.\x0a\x09\x09\x09\x09\x09value := value + step ]].\x0a\x09^ array",
 messageSends: ["new", "ifTrue:", "=", "error:", "ifTrue:ifFalse:", "<", "whileTrue:", ">=", "at:put:", "+", "<="],
 referencedClasses: ["Array"]
 }),
@@ -3247,7 +3247,7 @@ return value;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"to:by:do:",{stop:stop,step:step,aBlock:aBlock,value:value},smalltalk.Number)})},
 args: ["stop", "step", "aBlock"],
-source: "to: stop by: step do: aBlock\x0a\x09| value |\x0a\x09value := self.\x0a\x09step = 0 ifTrue: [self error: 'step must be non-zero'].\x0a\x09step < 0\x0a\x09\x09ifTrue: [[ value >= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09aBlock value: value.\x0a\x09\x09\x09\x09\x09value := value + step]]\x0a\x09\x09ifFalse: [[ value <= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09aBlock value: value.\x0a\x09\x09\x09\x09\x09value := value + step]]",
+source: "to: stop by: step do: aBlock\x0a\x09| value |\x0a\x09value := self.\x0a\x09step = 0 ifTrue: [ self error: 'step must be non-zero' ].\x0a\x09step < 0\x0a\x09\x09ifTrue: [ [ value >= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09aBlock value: value.\x0a\x09\x09\x09\x09\x09value := value + step ]]\x0a\x09\x09ifFalse: [ [ value <= stop ] whileTrue: [\x0a\x09\x09\x09\x09\x09aBlock value: value.\x0a\x09\x09\x09\x09\x09value := value + step ]]",
 messageSends: ["ifTrue:", "=", "error:", "ifTrue:ifFalse:", "<", "whileTrue:", ">=", "value:", "+", "<="],
 referencedClasses: []
 }),
@@ -3273,7 +3273,7 @@ return nextValue;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"to:do:",{stop:stop,aBlock:aBlock,nextValue:nextValue},smalltalk.Number)})},
 args: ["stop", "aBlock"],
-source: "to: stop do: aBlock\x0a\x09\x22Evaluate aBlock for each number from self to aNumber.\x22\x0a\x09| nextValue |\x0a\x09nextValue := self.\x0a\x09[nextValue <= stop]\x0a\x09\x09whileTrue:\x0a\x09\x09\x09[aBlock value: nextValue.\x0a\x09\x09\x09nextValue := nextValue + 1]",
+source: "to: stop do: aBlock\x0a\x09\x22Evaluate aBlock for each number from self to aNumber.\x22\x0a\x09| nextValue |\x0a\x09nextValue := self.\x0a\x09[ nextValue <= stop ]\x0a\x09\x09whileTrue:\x0a\x09\x09\x09[ aBlock value: nextValue.\x0a\x09\x09\x09nextValue := nextValue + 1 ]",
 messageSends: ["whileTrue:", "<=", "value:", "+"],
 referencedClasses: []
 }),
@@ -3392,7 +3392,7 @@ $1=_st($Point())._x_y_($2,$6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"*",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
-source: "* aPoint\x0a\x09^Point x: self x * aPoint asPoint x y: self y * aPoint asPoint y",
+source: "* aPoint\x0a\x09^ Point x: self x * aPoint asPoint x y: self y * aPoint asPoint y",
 messageSends: ["x:y:", "*", "x", "asPoint", "y"],
 referencedClasses: ["Point"]
 }),
@@ -3421,7 +3421,7 @@ $1=_st($Point())._x_y_($2,$6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"+",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
-source: "+ aPoint\x0a\x09^Point x: self x + aPoint asPoint x y: self y + aPoint asPoint y",
+source: "+ aPoint\x0a\x09^ Point x: self x + aPoint asPoint x y: self y + aPoint asPoint y",
 messageSends: ["x:y:", "+", "x", "asPoint", "y"],
 referencedClasses: ["Point"]
 }),
@@ -3450,7 +3450,7 @@ $1=_st($Point())._x_y_($2,$6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"-",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
-source: "- aPoint\x0a\x09^Point x: self x - aPoint asPoint x y: self y - aPoint asPoint y",
+source: "- aPoint\x0a\x09^ Point x: self x - aPoint asPoint x y: self y - aPoint asPoint y",
 messageSends: ["x:y:", "-", "x", "asPoint", "y"],
 referencedClasses: ["Point"]
 }),
@@ -3479,7 +3479,7 @@ $1=_st($Point())._x_y_($2,$6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"/",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
-source: "/ aPoint\x0a\x09^Point x: self x / aPoint asPoint x y: self y / aPoint asPoint y",
+source: "/ aPoint\x0a\x09^ Point x: self x / aPoint asPoint x y: self y / aPoint asPoint y",
 messageSends: ["x:y:", "/", "x", "asPoint", "y"],
 referencedClasses: ["Point"]
 }),
@@ -3511,7 +3511,7 @@ return _st($4).__and($6);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"=",{aPoint:aPoint},smalltalk.Point)})},
 args: ["aPoint"],
-source: "= aPoint\x0a\x09^aPoint class = self class and: [\x0a\x09\x09(aPoint x = self x) & (aPoint y = self y)]",
+source: "= aPoint\x0a\x09^ aPoint class = self class and: [\x0a\x09\x09(aPoint x = self x) & (aPoint y = self y) ]",
 messageSends: ["and:", "=", "class", "&", "x", "y"],
 referencedClasses: []
 }),
@@ -3527,7 +3527,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"asPoint",{},smalltalk.Point)})},
 args: [],
-source: "asPoint\x0a\x09^self",
+source: "asPoint\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3554,7 +3554,7 @@ _st(aStream)._space();
 _st(self["@y"])._printOn_(aStream);
 return self}, function($ctx1) {$ctx1.fill(self,"printOn:",{aStream:aStream},smalltalk.Point)})},
 args: ["aStream"],
-source: "printOn: aStream\x0a\x09\x22Print receiver in classic x@y notation.\x22\x0a\x0a\x09x printOn: aStream.\x0a\x09\x0a\x09aStream nextPutAll: '@'.\x0a\x09(y notNil and: [y negative]) ifTrue: [\x0a\x09\x09\x09\x22Avoid ambiguous @- construct\x22\x0a\x09\x09\x09aStream space ].\x0a\x09\x0a\x09y printOn: aStream",
+source: "printOn: aStream\x0a\x09\x22Print receiver in classic x@y notation.\x22\x0a\x0a\x09x printOn: aStream.\x0a\x09\x0a\x09aStream nextPutAll: '@'.\x0a\x09(y notNil and: [ y negative ]) ifTrue: [\x0a\x09\x09\x09\x22Avoid ambiguous @- construct\x22\x0a\x09\x09\x09aStream space ].\x0a\x09\x0a\x09y printOn: aStream",
 messageSends: ["printOn:", "nextPutAll:", "ifTrue:", "and:", "notNil", "negative", "space"],
 referencedClasses: []
 }),
@@ -3574,7 +3574,7 @@ $1=_st($2).__at(_st(_st(delta)._y()).__plus(self["@y"]));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"translateBy:",{delta:delta},smalltalk.Point)})},
 args: ["delta"],
-source: "translateBy: delta\x0a\x09\x22Answer a Point translated by delta (an instance of Point).\x22\x0a\x09^(delta x + x) @ (delta y + y)",
+source: "translateBy: delta\x0a\x09\x22Answer a Point translated by delta (an instance of Point).\x22\x0a\x09^ (delta x + x) @ (delta y + y)",
 messageSends: ["@", "+", "x", "y"],
 referencedClasses: []
 }),
@@ -3592,7 +3592,7 @@ $1=self["@x"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"x",{},smalltalk.Point)})},
 args: [],
-source: "x\x0a\x09^x",
+source: "x\x0a\x09^ x",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3626,7 +3626,7 @@ $1=self["@y"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"y",{},smalltalk.Point)})},
 args: [],
-source: "y\x0a\x09^y",
+source: "y\x0a\x09^ y",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3681,7 +3681,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"x:y:",{aNumber:aNumber,anotherNumber:anotherNumber},smalltalk.Point.klass)})},
 args: ["aNumber", "anotherNumber"],
-source: "x: aNumber y: anotherNumber\x0a\x09^self new\x0a\x09\x09x: aNumber;\x0a\x09\x09y: anotherNumber;\x0a\x09\x09yourself",
+source: "x: aNumber y: anotherNumber\x0a\x09^ self new\x0a\x09\x09x: aNumber;\x0a\x09\x09y: anotherNumber;\x0a\x09\x09yourself",
 messageSends: ["x:", "new", "y:", "yourself"],
 referencedClasses: []
 }),
@@ -3721,7 +3721,7 @@ return self._next();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"next:",{anInteger:anInteger},smalltalk.Random)})},
 args: ["anInteger"],
-source: "next: anInteger\x0a\x09^(1 to: anInteger) collect: [:each | self next]",
+source: "next: anInteger\x0a\x09^ (1 to: anInteger) collect: [ :each | self next ]",
 messageSends: ["collect:", "to:", "next"],
 referencedClasses: []
 }),
@@ -3743,7 +3743,7 @@ $1=null;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJSON",{},smalltalk.UndefinedObject)})},
 args: [],
-source: "asJSON\x0a\x09^null",
+source: "asJSON\x0a\x09^ null",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3759,7 +3759,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"deepCopy",{},smalltalk.UndefinedObject)})},
 args: [],
-source: "deepCopy\x0a\x09^self",
+source: "deepCopy\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3779,7 +3779,7 @@ return smalltalk.withContext(function($ctx2) {
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
 args: ["aBlock"],
-source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self ifNil: aBlock ifNotNil: []",
+source: "ifNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self ifNil: aBlock ifNotNil: []",
 messageSends: ["ifNil:ifNotNil:"],
 referencedClasses: []
 }),
@@ -3797,7 +3797,7 @@ $1=_st(aBlock)._value();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifNil:ifNotNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
 args: ["aBlock", "anotherBlock"],
-source: "ifNil: aBlock ifNotNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^aBlock value",
+source: "ifNil: aBlock ifNotNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ aBlock value",
 messageSends: ["value"],
 referencedClasses: []
 }),
@@ -3813,7 +3813,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"ifNotNil:",{aBlock:aBlock},smalltalk.UndefinedObject)})},
 args: ["aBlock"],
-source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^self",
+source: "ifNotNil: aBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3831,7 +3831,7 @@ $1=_st(anotherBlock)._value();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ifNotNil:ifNil:",{aBlock:aBlock,anotherBlock:anotherBlock},smalltalk.UndefinedObject)})},
 args: ["aBlock", "anotherBlock"],
-source: "ifNotNil: aBlock ifNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^anotherBlock value",
+source: "ifNotNil: aBlock ifNil: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09^ anotherBlock value",
 messageSends: ["value"],
 referencedClasses: []
 }),
@@ -3863,7 +3863,7 @@ return smalltalk.withContext(function($ctx1) {
 return true;
 }, function($ctx1) {$ctx1.fill(self,"isNil",{},smalltalk.UndefinedObject)})},
 args: [],
-source: "isNil\x0a\x09^true",
+source: "isNil\x0a\x09^ true",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3879,7 +3879,7 @@ return smalltalk.withContext(function($ctx1) {
 return false;
 }, function($ctx1) {$ctx1.fill(self,"notNil",{},smalltalk.UndefinedObject)})},
 args: [],
-source: "notNil\x0a\x09^false",
+source: "notNil\x0a\x09^ false",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3911,7 +3911,7 @@ return smalltalk.withContext(function($ctx1) {
 return self;
 }, function($ctx1) {$ctx1.fill(self,"shallowCopy",{},smalltalk.UndefinedObject)})},
 args: [],
-source: "shallowCopy\x0a\x09^self",
+source: "shallowCopy\x0a\x09^ self",
 messageSends: [],
 referencedClasses: []
 }),
@@ -3929,7 +3929,7 @@ $1=self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},smalltalk.UndefinedObject)})},
 args: ["aString", "anotherString"],
-source: "subclass: aString instanceVariableNames: anotherString\x0a\x09^self subclass: aString instanceVariableNames: anotherString package: nil",
+source: "subclass: aString instanceVariableNames: anotherString\x0a\x09^ self subclass: aString instanceVariableNames: anotherString package: nil",
 messageSends: ["subclass:instanceVariableNames:package:"],
 referencedClasses: []
 }),
@@ -3948,7 +3948,7 @@ $1=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
 args: ["aString", "aString2", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for compatibility.\x22\x0a\x09self deprecatedAPI.\x0a\x09^self subclass: aString instanceVariableNames: aString2 package: aString3",
+source: "subclass: aString instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for compatibility.\x22\x0a\x09self deprecatedAPI.\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
 messageSends: ["deprecatedAPI", "subclass:instanceVariableNames:package:"],
 referencedClasses: []
 }),
@@ -3967,7 +3967,7 @@ $1=_st(_st($ClassBuilder())._new())._superclass_subclass_instanceVariableNames_p
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},smalltalk.UndefinedObject)})},
 args: ["aString", "aString2", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ClassBuilder new\x0a\x09\x09superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3",
+source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3",
 messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"],
 referencedClasses: ["ClassBuilder"]
 }),

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 30 - 30
js/Kernel-Tests.js


+ 1 - 1
js/Kernel-Transcript.js

@@ -133,7 +133,7 @@ $1=self["@current"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.Transcript.klass)})},
 args: [],
-source: "current\x0a\x09^current",
+source: "current\x0a\x09^ current",
 messageSends: [],
 referencedClasses: []
 }),

+ 5 - 5
js/SUnit-Tests.js

@@ -75,7 +75,7 @@ return _st(self["@empty"])._at_put_((5),"abc");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),$Error());
 return self}, function($ctx1) {$ctx1.fill(self,"testIllegal",{},smalltalk.ExampleSetTest)})},
 args: [],
-source: "testIllegal\x0a\x09self\x0a\x09\x09should: [empty at: 5]\x0a\x09\x09raise: Error.\x0a\x09self\x0a\x09\x09should: [empty at: 5 put: #abc]\x0a\x09\x09raise: Error",
+source: "testIllegal\x0a\x09self\x0a\x09\x09should: [ empty at: 5 ]\x0a\x09\x09raise: Error.\x0a\x09self\x0a\x09\x09should: [ empty at: 5 put: #abc ]\x0a\x09\x09raise: Error",
 messageSends: ["should:raise:", "at:", "at:put:"],
 referencedClasses: ["Error"]
 }),
@@ -242,7 +242,7 @@ _st($1)._valueWithTimeout_((20));
 $ctx1.sendIdx["valueWithTimeout:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutFailing",{},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "fakeMultipleTimeoutFailing\x0a\x09self timeout: 100.\x0a\x09(self async: [\x0a\x09\x09self timeout: 20.\x0a\x09\x09(self async: [ self finished ]) valueWithTimeout: 30\x0a\x09]) valueWithTimeout: 20",
+source: "fakeMultipleTimeoutFailing\x0a\x09self timeout: 100.\x0a\x09(self async: [ \x0a\x09\x09self timeout: 20.\x0a\x09\x09(self async: [ self finished ]) valueWithTimeout: 30\x0a\x09]) valueWithTimeout: 20",
 messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"],
 referencedClasses: []
 }),
@@ -312,7 +312,7 @@ return _st(each)._selector();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selectorSetOf:",{aCollection:aCollection},smalltalk.SUnitAsyncTest)})},
 args: ["aCollection"],
-source: "selectorSetOf: aCollection\x0a\x09^(aCollection collect: [:each | each selector]) asSet",
+source: "selectorSetOf: aCollection\x0a\x09^ (aCollection collect: [ :each | each selector ]) asSet",
 messageSends: ["asSet", "collect:", "selector"],
 referencedClasses: []
 }),
@@ -391,7 +391,7 @@ return _st($4)._ifTrue_(assertBlock);
 _st(runner)._run();
 return self}, function($ctx1) {$ctx1.fill(self,"testAsyncErrorsAndFailures",{suite:suite,runner:runner,result:result,assertBlock:assertBlock},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "testAsyncErrorsAndFailures\x0a\x09| suite runner result assertBlock |\x0a\x09suite := #('fakeError' 'fakeErrorFailingInTearDown' 'fakeFailure' 'testPass') collect: [ :each | self class selector: each ].\x0a\x09runner := TestSuiteRunner on: suite.\x0a\x09self timeout: 200.\x0a\x09result := runner result.\x0a\x09assertBlock := self async: [\x0a\x09\x09self assert: (self selectorSetOf: result errors) equals: #('fakeError') asSet.\x0a\x09\x09self assert: (self selectorSetOf: result failures) equals: #('fakeErrorFailingInTearDown' 'fakeFailure') asSet.\x0a\x09\x09self finished\x0a\x09].\x0a\x09runner announcer on: ResultAnnouncement do: [:ann |\x0a\x09\x09ann result == result ifTrue: [ result runs = result total ifTrue: assertBlock ]].\x0a\x09runner run",
+source: "testAsyncErrorsAndFailures\x0a\x09| suite runner result assertBlock |\x0a\x09suite := #('fakeError' 'fakeErrorFailingInTearDown' 'fakeFailure' 'testPass') collect: [ :each | self class selector: each ].\x0a\x09runner := TestSuiteRunner on: suite.\x0a\x09self timeout: 200.\x0a\x09result := runner result.\x0a\x09assertBlock := self async: [\x0a\x09\x09self assert: (self selectorSetOf: result errors) equals: #('fakeError') asSet.\x0a\x09\x09self assert: (self selectorSetOf: result failures) equals: #('fakeErrorFailingInTearDown' 'fakeFailure') asSet.\x0a\x09\x09self finished\x0a\x09].\x0a\x09runner announcer on: ResultAnnouncement do: [ :ann |\x0a\x09\x09ann result == result ifTrue: [ result runs = result total ifTrue: assertBlock ] ].\x0a\x09runner run",
 messageSends: ["collect:", "selector:", "class", "on:", "timeout:", "result", "async:", "assert:equals:", "selectorSetOf:", "errors", "asSet", "failures", "finished", "on:do:", "announcer", "ifTrue:", "==", "=", "runs", "total", "run"],
 referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
 }),
@@ -544,7 +544,7 @@ return _st($3)._ifTrue_(assertBlock);
 _st(runner)._run();
 return self}, function($ctx1) {$ctx1.fill(self,"testTimeouts",{suite:suite,runner:runner,result:result,assertBlock:assertBlock},smalltalk.SUnitAsyncTest)})},
 args: [],
-source: "testTimeouts\x0a\x09| suite runner result assertBlock |\x0a\x09suite := #('fakeTimeout' 'fakeMultipleTimeoutFailing' 'fakeMultipleTimeoutPassing' 'testPass') collect: [ :each | self class selector: each ].\x0a\x09runner := TestSuiteRunner on: suite.\x0a\x09self timeout: 200.\x0a\x09result := runner result.\x0a\x09assertBlock := self async: [\x0a\x09\x09self assert: (self selectorSetOf: result errors) equals: Set new.\x0a\x09\x09self assert: (self selectorSetOf: result failures) equals: #('fakeMultipleTimeoutFailing' 'fakeTimeout') asSet.\x0a\x09\x09self finished\x0a\x09].\x0a\x09runner announcer on: ResultAnnouncement do: [:ann |\x0a\x09\x09ann result == result ifTrue: [ result runs = result total ifTrue: assertBlock ]].\x0a\x09runner run",
+source: "testTimeouts\x0a\x09| suite runner result assertBlock |\x0a\x09suite := #('fakeTimeout' 'fakeMultipleTimeoutFailing' 'fakeMultipleTimeoutPassing' 'testPass') collect: [ :each | self class selector: each ].\x0a\x09runner := TestSuiteRunner on: suite.\x0a\x09self timeout: 200.\x0a\x09result := runner result.\x0a\x09assertBlock := self async: [\x0a\x09\x09self assert: (self selectorSetOf: result errors) equals: Set new.\x0a\x09\x09self assert: (self selectorSetOf: result failures) equals: #('fakeMultipleTimeoutFailing' 'fakeTimeout') asSet.\x0a\x09\x09self finished\x0a\x09].\x0a\x09runner announcer on: ResultAnnouncement do: [ :ann |\x0a\x09\x09ann result == result ifTrue: [ result runs = result total ifTrue: assertBlock ] ].\x0a\x09runner run",
 messageSends: ["collect:", "selector:", "class", "on:", "timeout:", "result", "async:", "assert:equals:", "selectorSetOf:", "errors", "new", "failures", "asSet", "finished", "on:do:", "announcer", "ifTrue:", "==", "=", "runs", "total", "run"],
 referencedClasses: ["TestSuiteRunner", "Set", "ResultAnnouncement"]
 }),

+ 27 - 27
js/SUnit.js

@@ -16,7 +16,7 @@ $1=self["@result"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.ResultAnnouncement)})},
 args: [],
-source: "result\x0a\x09^result",
+source: "result\x0a\x09^ result",
 messageSends: [],
 referencedClasses: []
 }),
@@ -70,7 +70,7 @@ self._signalFailure_(aString);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"assert:description:",{aBoolean:aBoolean,aString:aString},smalltalk.TestCase)})},
 args: ["aBoolean", "aString"],
-source: "assert: aBoolean description: aString\x0a\x09aBoolean ifFalse: [self signalFailure: aString]",
+source: "assert: aBoolean description: aString\x0a\x09aBoolean ifFalse: [ self signalFailure: aString ]",
 messageSends: ["ifFalse:", "signalFailure:"],
 referencedClasses: []
 }),
@@ -210,7 +210,7 @@ $1=_st(self["@asyncTimeout"])._notNil();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isAsync",{},smalltalk.TestCase)})},
 args: [],
-source: "isAsync\x0a\x09^asyncTimeout notNil",
+source: "isAsync\x0a\x09^ asyncTimeout notNil",
 messageSends: ["notNil"],
 referencedClasses: []
 }),
@@ -262,7 +262,7 @@ $1=self["@testSelector"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.TestCase)})},
 args: [],
-source: "selector\x0a\x09^testSelector",
+source: "selector\x0a\x09^ testSelector",
 messageSends: [],
 referencedClasses: []
 }),
@@ -332,7 +332,7 @@ return true;
 }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})})));
 return self}, function($ctx1) {$ctx1.fill(self,"should:raise:",{aBlock:aBlock,anExceptionClass:anExceptionClass},smalltalk.TestCase)})},
 args: ["aBlock", "anExceptionClass"],
-source: "should: aBlock raise: anExceptionClass\x0a\x09self assert: ([aBlock value. false]\x0a\x09\x09on: anExceptionClass\x0a\x09\x09do: [:ex | true])",
+source: "should: aBlock raise: anExceptionClass\x0a\x09self assert: ([ aBlock value. false ]\x0a\x09\x09on: anExceptionClass\x0a\x09\x09do: [ :ex | true ])",
 messageSends: ["assert:", "on:do:", "value"],
 referencedClasses: []
 }),
@@ -355,7 +355,7 @@ return false;
 }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})})));
 return self}, function($ctx1) {$ctx1.fill(self,"shouldnt:raise:",{aBlock:aBlock,anExceptionClass:anExceptionClass},smalltalk.TestCase)})},
 args: ["aBlock", "anExceptionClass"],
-source: "shouldnt: aBlock raise: anExceptionClass\x0a\x09self assert: ([aBlock value. true]\x0a\x09\x09on: anExceptionClass\x0a\x09\x09do: [:ex | false])",
+source: "shouldnt: aBlock raise: anExceptionClass\x0a\x09self assert: ([ aBlock value. true ]\x0a\x09\x09on: anExceptionClass\x0a\x09\x09do: [ :ex | false ])",
 messageSends: ["assert:", "on:do:", "value"],
 referencedClasses: []
 }),
@@ -442,7 +442,7 @@ $2=selectors;
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"allTestSelectors",{selectors:selectors},smalltalk.TestCase.klass)})},
 args: [],
-source: "allTestSelectors\x0a\x09| selectors |\x0a\x09selectors := self testSelectors.\x0a\x09self shouldInheritSelectors ifTrue: [\x0a\x09\x09selectors addAll: self superclass allTestSelectors].\x0a\x09^selectors",
+source: "allTestSelectors\x0a\x09| selectors |\x0a\x09selectors := self testSelectors.\x0a\x09self shouldInheritSelectors ifTrue: [\x0a\x09\x09selectors addAll: self superclass allTestSelectors ].\x0a\x09^ selectors",
 messageSends: ["testSelectors", "ifTrue:", "shouldInheritSelectors", "addAll:", "allTestSelectors", "superclass"],
 referencedClasses: []
 }),
@@ -463,7 +463,7 @@ return self._selector_(each);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"buildSuite",{},smalltalk.TestCase.klass)})},
 args: [],
-source: "buildSuite\x0a\x09^self allTestSelectors collect: [:each | self selector: each]",
+source: "buildSuite\x0a\x09^ self allTestSelectors collect: [ :each | self selector: each ]",
 messageSends: ["collect:", "allTestSelectors", "selector:"],
 referencedClasses: []
 }),
@@ -514,7 +514,7 @@ return smalltalk.withContext(function($ctx1) {
 return $TestCase();
 }, function($ctx1) {$ctx1.fill(self,"lookupHierarchyRoot",{},smalltalk.TestCase.klass)})},
 args: [],
-source: "lookupHierarchyRoot\x0a\x09^TestCase",
+source: "lookupHierarchyRoot\x0a\x09^ TestCase",
 messageSends: [],
 referencedClasses: ["TestCase"]
 }),
@@ -535,7 +535,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"selector:",{aSelector:aSelector},smalltalk.TestCase.klass)})},
 args: ["aSelector"],
-source: "selector: aSelector\x0a\x09^self new\x0a\x09\x09setTestSelector: aSelector;\x0a\x09\x09yourself",
+source: "selector: aSelector\x0a\x09^ self new\x0a\x09\x09setTestSelector: aSelector;\x0a\x09\x09yourself",
 messageSends: ["setTestSelector:", "new", "yourself"],
 referencedClasses: []
 }),
@@ -553,7 +553,7 @@ $1=self.__tild_eq(self._lookupHierarchyRoot());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"shouldInheritSelectors",{},smalltalk.TestCase.klass)})},
 args: [],
-source: "shouldInheritSelectors\x0a\x09^self ~= self lookupHierarchyRoot",
+source: "shouldInheritSelectors\x0a\x09^ self ~= self lookupHierarchyRoot",
 messageSends: ["~=", "lookupHierarchyRoot"],
 referencedClasses: []
 }),
@@ -574,7 +574,7 @@ return _st(each)._match_("^test");
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"testSelectors",{},smalltalk.TestCase.klass)})},
 args: [],
-source: "testSelectors\x0a\x09^self methodDictionary keys select: [:each | each match: '^test']",
+source: "testSelectors\x0a\x09^ self methodDictionary keys select: [ :each | each match: '^test' ]",
 messageSends: ["select:", "keys", "methodDictionary", "match:"],
 referencedClasses: []
 }),
@@ -677,7 +677,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"testCase:",{aTestCase:aTestCase},smalltalk.TestContext.klass)})},
 args: ["aTestCase"],
-source: "testCase: aTestCase\x0a\x09^self new\x0a\x09\x09testCase: aTestCase;\x0a\x09\x09yourself",
+source: "testCase: aTestCase\x0a\x09^ self new\x0a\x09\x09testCase: aTestCase;\x0a\x09\x09yourself",
 messageSends: ["testCase:", "new", "yourself"],
 referencedClasses: []
 }),
@@ -793,7 +793,7 @@ $1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"testCase:result:finished:",{aTestCase:aTestCase,aTestResult:aTestResult,aBlock:aBlock},smalltalk.ReportingTestContext.klass)})},
 args: ["aTestCase", "aTestResult", "aBlock"],
-source: "testCase: aTestCase result: aTestResult finished: aBlock\x0a\x09^(super testCase: aTestCase)\x0a\x09\x09result: aTestResult;\x0a\x09\x09finished: aBlock;\x0a\x09\x09yourself",
+source: "testCase: aTestCase result: aTestResult finished: aBlock\x0a\x09^ (super testCase: aTestCase)\x0a\x09\x09result: aTestResult;\x0a\x09\x09finished: aBlock;\x0a\x09\x09yourself",
 messageSends: ["result:", "testCase:", "finished:", "yourself"],
 referencedClasses: []
 }),
@@ -850,7 +850,7 @@ $1=self["@errors"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"errors",{},smalltalk.TestResult)})},
 args: [],
-source: "errors\x0a\x09^errors",
+source: "errors\x0a\x09^ errors",
 messageSends: [],
 referencedClasses: []
 }),
@@ -868,7 +868,7 @@ $1=self["@failures"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"failures",{},smalltalk.TestResult)})},
 args: [],
-source: "failures\x0a\x09^failures",
+source: "failures\x0a\x09^ failures",
 messageSends: [],
 referencedClasses: []
 }),
@@ -931,7 +931,7 @@ $1=_st(aBlock)._value_(_st(self._runs()).__plus((1)));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nextRunDo:",{aBlock:aBlock},smalltalk.TestResult)})},
 args: ["aBlock"],
-source: "nextRunDo: aBlock\x0a\x22Runs aBlock with index of next run\x0aor does nothing if no more runs\x22\x0a^self runs == self total\x0a\x09ifFalse: [ aBlock value: self runs + 1 ]",
+source: "nextRunDo: aBlock\x0a\x09\x22Runs aBlock with index of next run or does nothing if no more runs\x22\x0a\x09^ self runs == self total\x0a\x09\x09ifFalse: [ aBlock value: self runs + 1 ]",
 messageSends: ["ifFalse:", "==", "runs", "total", "value:", "+"],
 referencedClasses: []
 }),
@@ -963,7 +963,7 @@ return self._addError_(aTestCase);
 $ctx1.sendIdx["on:do:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"runCase:",{aTestCase:aTestCase},smalltalk.TestResult)})},
 args: ["aTestCase"],
-source: "runCase: aTestCase\x0a\x09[[ self increaseRuns.\x0a\x09\x09aTestCase runCase]\x0a\x09on: TestFailure do: [:ex | self addFailure: aTestCase]]\x0a\x09on: Error do: [:ex | self addError: aTestCase]",
+source: "runCase: aTestCase\x0a\x09[ [ self increaseRuns.\x0a\x09\x09aTestCase runCase ]\x0a\x09on: TestFailure do: [ :ex | self addFailure: aTestCase ]]\x0a\x09on: Error do: [ :ex | self addError: aTestCase ]",
 messageSends: ["on:do:", "increaseRuns", "runCase", "addFailure:", "addError:"],
 referencedClasses: ["TestFailure", "Error"]
 }),
@@ -981,7 +981,7 @@ $1=self["@runs"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"runs",{},smalltalk.TestResult)})},
 args: [],
-source: "runs\x0a\x09^runs",
+source: "runs\x0a\x09^ runs",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1010,7 +1010,7 @@ $1="error";
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"status",{},smalltalk.TestResult)})},
 args: [],
-source: "status\x0a\x09^self errors isEmpty\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self failures isEmpty\x0a\x09\x09\x09\x09ifTrue: ['success']\x0a\x09\x09\x09\x09ifFalse: ['failure']]\x0a\x09\x09ifFalse: ['error']",
+source: "status\x0a\x09^ self errors isEmpty\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self failures isEmpty\x0a\x09\x09\x09\x09ifTrue: [ 'success' ]\x0a\x09\x09\x09\x09ifFalse: [ 'failure' ]]\x0a\x09\x09ifFalse: [ 'error' ]",
 messageSends: ["ifTrue:ifFalse:", "isEmpty", "errors", "failures"],
 referencedClasses: []
 }),
@@ -1028,7 +1028,7 @@ $1=self["@timestamp"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"timestamp",{},smalltalk.TestResult)})},
 args: [],
-source: "timestamp\x0a\x09^timestamp",
+source: "timestamp\x0a\x09^ timestamp",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1046,7 +1046,7 @@ $1=self["@total"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"total",{},smalltalk.TestResult)})},
 args: [],
-source: "total\x0a\x09^total",
+source: "total\x0a\x09^ total",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1084,7 +1084,7 @@ $1=self["@announcer"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"announcer",{},smalltalk.TestSuiteRunner)})},
 args: [],
-source: "announcer\x0a\x09^announcer",
+source: "announcer\x0a\x09^ announcer",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1106,7 +1106,7 @@ return self._resume();
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"contextOf:",{anInteger:anInteger},smalltalk.TestSuiteRunner)})},
 args: ["anInteger"],
-source: "contextOf: anInteger\x0a\x09^ReportingTestContext testCase: (suite at: anInteger) result: result finished: [ self resume ]",
+source: "contextOf: anInteger\x0a\x09^ ReportingTestContext testCase: (suite at: anInteger) result: result finished: [ self resume ]",
 messageSends: ["testCase:result:finished:", "at:", "resume"],
 referencedClasses: ["ReportingTestContext"]
 }),
@@ -1138,7 +1138,7 @@ return _st(self._contextOf_(_st(runs).__plus((1))))._start();
 }, function($ctx2) {$ctx2.fillBlock({runs:runs},$ctx1,1)})});
 return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TestSuiteRunner)})},
 args: [],
-source: "initialize\x0a\x09super initialize.\x0a\x09announcer := Announcer new.\x0a\x09result := TestResult new.\x0a\x09runNextTest := [ | runs | runs := result runs. runs < result total ifTrue: [ (self contextOf: runs + 1) start ]].",
+source: "initialize\x0a\x09super initialize.\x0a\x09announcer := Announcer new.\x0a\x09result := TestResult new.\x0a\x09runNextTest := [ | runs | runs := result runs. runs < result total ifTrue: [ (self contextOf: runs + 1) start ] ].",
 messageSends: ["initialize", "new", "runs", "ifTrue:", "<", "total", "start", "contextOf:", "+"],
 referencedClasses: ["Announcer", "TestResult"]
 }),
@@ -1156,7 +1156,7 @@ $1=self["@result"];
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.TestSuiteRunner)})},
 args: [],
-source: "result\x0a\x09^result",
+source: "result\x0a\x09^ result",
 messageSends: [],
 referencedClasses: []
 }),
@@ -1242,7 +1242,7 @@ $1=_st(smalltalk.TestSuiteRunner.klass.superclass.fn.prototype._new.apply(_st(se
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"on:",{aCollection:aCollection},smalltalk.TestSuiteRunner.klass)})},
 args: ["aCollection"],
-source: "on: aCollection\x0a\x09^super new suite: aCollection",
+source: "on: aCollection\x0a\x09^ super new suite: aCollection",
 messageSends: ["suite:", "new"],
 referencedClasses: []
 }),

+ 129 - 129
st/Canvas.st

@@ -20,19 +20,19 @@ I am platform interface class that tries to use window and jQuery; that is, one
 !BrowserInterface methodsFor: 'actions'!
 
 ajax: anObject
-	^jQuery ajax: anObject
+	^ jQuery ajax: anObject
 !
 
 alert: aString
-	^window alert: aString
+	^ window alert: aString
 !
 
 confirm: aString
-	^window confirm: aString
+	^ window confirm: aString
 !
 
 prompt: aString
-	^window prompt: aString
+	^ window prompt: aString
 ! !
 
 !BrowserInterface methodsFor: 'testing'!
@@ -66,7 +66,7 @@ The `#with:` method is used to compose HTML, nesting tags. `#with:` can take a `
 !HTMLCanvas methodsFor: 'accessing'!
 
 root
-	^root
+	^ root
 !
 
 root: aTagBrush
@@ -86,7 +86,7 @@ snippet: anElement
 	self with: (TagBrush fromJQuery: clone canvas: self).
 	caret := clone find: '[data-snippet="*"]'.
 	caret toArray isEmpty ifTrue: [ caret := clone ].
-	^TagBrush fromJQuery: (caret removeAttr: 'data-snippet') canvas: self
+	^ TagBrush fromJQuery: (caret removeAttr: 'data-snippet') canvas: self
 ! !
 
 !HTMLCanvas methodsFor: 'adding'!
@@ -103,14 +103,14 @@ entity: aString
 !
 
 with: anObject
-	^self root with: anObject
+	^ self root with: anObject
 ! !
 
 !HTMLCanvas methodsFor: 'initialization'!
 
 initialize
 	super initialize.
-	root ifNil: [root := TagBrush fromString: 'div' canvas: self]
+	root ifNil: [ root := TagBrush fromString: 'div' canvas: self ]
 !
 
 initializeFromJQuery: aJQuery
@@ -120,151 +120,151 @@ initializeFromJQuery: aJQuery
 !HTMLCanvas methodsFor: 'tags'!
 
 a
-	^self tag: 'a'
+	^ self tag: 'a'
 !
 
 abbr
-	^self tag: 'abbr'
+	^ self tag: 'abbr'
 !
 
 address
-	^self tag: 'address'
+	^ self tag: 'address'
 !
 
 area
-	^self tag: 'area'
+	^ self tag: 'area'
 !
 
 article
-	^self tag: 'article'
+	^ self tag: 'article'
 !
 
 aside
-	^self tag: 'aside'
+	^ self tag: 'aside'
 !
 
 audio
-	^self tag: 'audio'
+	^ self tag: 'audio'
 !
 
 base
-	^self tag: 'base'
+	^ self tag: 'base'
 !
 
 blockquote
-	^self tag: 'blockquote'
+	^ self tag: 'blockquote'
 !
 
 body
-	^self tag: 'body'
+	^ self tag: 'body'
 !
 
 br
-	^self tag: 'br'
+	^ self tag: 'br'
 !
 
 button
-	^self tag: 'button'
+	^ self tag: 'button'
 !
 
 canvas
-	^self tag: 'canvas'
+	^ self tag: 'canvas'
 !
 
 caption
-	^self tag: 'caption'
+	^ self tag: 'caption'
 !
 
 cite
-	^self tag: 'cite'
+	^ self tag: 'cite'
 !
 
 code
-	^self tag: 'code'
+	^ self tag: 'code'
 !
 
 col
-	^self tag: 'col'
+	^ self tag: 'col'
 !
 
 colgroup
-	^self tag: 'colgroup'
+	^ self tag: 'colgroup'
 !
 
 command
-	^self tag: 'command'
+	^ self tag: 'command'
 !
 
 datalist
-	^self tag: 'datalist'
+	^ self tag: 'datalist'
 !
 
 dd
-	^self tag: 'dd'
+	^ self tag: 'dd'
 !
 
 del
-	^self tag: 'del'
+	^ self tag: 'del'
 !
 
 details
-	^self tag: 'details'
+	^ self tag: 'details'
 !
 
 div
-	^self tag: 'div'
+	^ self tag: 'div'
 !
 
 div: aBlock
-	^self div with: aBlock
+	^ self div with: aBlock
 !
 
 dl
-	^self tag: 'dl'
+	^ self tag: 'dl'
 !
 
 dt
-	^self tag: 'dt'
+	^ self tag: 'dt'
 !
 
 em
-	^self tag: 'em'
+	^ self tag: 'em'
 !
 
 embed
-	^self tag: 'embed'
+	^ self tag: 'embed'
 !
 
 fieldset
-	^self tag: 'fieldset'
+	^ self tag: 'fieldset'
 !
 
 figcaption
-	^self tag: 'figcaption'
+	^ self tag: 'figcaption'
 !
 
 figure
-	^self tag: 'figure'
+	^ self tag: 'figure'
 !
 
 footer
-	^self tag: 'footer'
+	^ self tag: 'footer'
 !
 
 form
-	^self tag: 'form'
+	^ self tag: 'form'
 !
 
 h1
-	^self tag: 'h1'
+	^ self tag: 'h1'
 !
 
 h1: anObject
-	^self h1 with: anObject
+	^ self h1 with: anObject
 !
 
 h2
-	^self tag: 'h2'
+	^ self tag: 'h2'
 !
 
 h2: anObject
@@ -272,203 +272,203 @@ h2: anObject
 !
 
 h3
-	^self tag: 'h3'
+	^ self tag: 'h3'
 !
 
 h3: anObject
-	^self h3 with: anObject
+	^ self h3 with: anObject
 !
 
 h4
-	^self tag: 'h4'
+	^ self tag: 'h4'
 !
 
 h4: anObject
-	^self h4 with: anObject
+	^ self h4 with: anObject
 !
 
 h5
-	^self tag: 'h5'
+	^ self tag: 'h5'
 !
 
 h5: anObject
-	^self h5 with: anObject
+	^ self h5 with: anObject
 !
 
 h6
-	^self tag: 'h6'
+	^ self tag: 'h6'
 !
 
 h6: anObject
-	^self h6 with: anObject
+	^ self h6 with: anObject
 !
 
 head
-	^self tag: 'head'
+	^ self tag: 'head'
 !
 
 header
-	^self tag: 'header'
+	^ self tag: 'header'
 !
 
 hgroup
-	^self tag: 'hgroup'
+	^ self tag: 'hgroup'
 !
 
 hr
-	^self tag: 'hr'
+	^ self tag: 'hr'
 !
 
 html
-	^self tag: 'html'
+	^ self tag: 'html'
 !
 
 iframe
-	^self tag: 'iframe'
+	^ self tag: 'iframe'
 !
 
 iframe: aString
-	^self iframe src: aString
+	^ self iframe src: aString
 !
 
 img
-	^self tag: 'img'
+	^ self tag: 'img'
 !
 
 img: aString
-	^self img src: aString
+	^ self img src: aString
 !
 
 input
-	^self tag: 'input'
+	^ self tag: 'input'
 !
 
 label
-	^self tag: 'label'
+	^ self tag: 'label'
 !
 
 legend
-	^self tag: 'legend'
+	^ self tag: 'legend'
 !
 
 li
-	^self tag: 'li'
+	^ self tag: 'li'
 !
 
 li: anObject
-	^self li with: anObject
+	^ self li with: anObject
 !
 
 link
-	^self tag: 'link'
+	^ self tag: 'link'
 !
 
 map
-	^self tag: 'map'
+	^ self tag: 'map'
 !
 
 mark
-	^self tag: 'mark'
+	^ self tag: 'mark'
 !
 
 menu
-	^self tag: 'menu'
+	^ self tag: 'menu'
 !
 
 meta
-	^self tag: 'meta'
+	^ self tag: 'meta'
 !
 
 nav
-	^self tag: 'nav'
+	^ self tag: 'nav'
 !
 
 newTag: aString
-	^TagBrush fromString: aString canvas: self
+	^ TagBrush fromString: aString canvas: self
 !
 
 noscript
-	^self tag: 'noscript'
+	^ self tag: 'noscript'
 !
 
 object
-	^self tag: 'object'
+	^ self tag: 'object'
 !
 
 ol
-	^self tag: 'ol'
+	^ self tag: 'ol'
 !
 
 ol: anObject
-	^self ol with: anObject
+	^ self ol with: anObject
 !
 
 optgroup
-	^self tag: 'optgroup'
+	^ self tag: 'optgroup'
 !
 
 option
-	^self tag: 'option'
+	^ self tag: 'option'
 !
 
 output
-	^self tag: 'output'
+	^ self tag: 'output'
 !
 
 p
-	^self tag: 'p'
+	^ self tag: 'p'
 !
 
 p: anObject
-	^self p with: anObject
+	^ self p with: anObject
 !
 
 param
-	^self tag: 'param'
+	^ self tag: 'param'
 !
 
 pre
-	^self tag: 'pre'
+	^ self tag: 'pre'
 !
 
 progress
-	^self tag: 'progress'
+	^ self tag: 'progress'
 !
 
 script
-	^self tag: 'script'
+	^ self tag: 'script'
 !
 
 section
-	^self tag: 'section'
+	^ self tag: 'section'
 !
 
 select
-	^self tag: 'select'
+	^ self tag: 'select'
 !
 
 small
-	^self tag: 'small'
+	^ self tag: 'small'
 !
 
 source
-	^self tag: 'source'
+	^ self tag: 'source'
 !
 
 span
-	^self tag: 'span'
+	^ self tag: 'span'
 !
 
 span: anObject
-	^self span with: anObject
+	^ self span with: anObject
 !
 
 strong
-	^self tag: 'strong'
+	^ self tag: 'strong'
 !
 
 strong: anObject
-	^self strong with: anObject
+	^ self strong with: anObject
 !
 
 style
@@ -480,97 +480,97 @@ style: aString
 !
 
 sub
-	^self tag: 'sub'
+	^ self tag: 'sub'
 !
 
 summary
-	^self tag: 'summary'
+	^ self tag: 'summary'
 !
 
 sup
-	^self tag: 'sup'
+	^ self tag: 'sup'
 !
 
 table
-	^self tag: 'table'
+	^ self tag: 'table'
 !
 
 tag: aString
-	^root addBrush: (self newTag: aString)
+	^ root addBrush: (self newTag: aString)
 !
 
 tbody
-	^self tag: 'tbody'
+	^ self tag: 'tbody'
 !
 
 td
-	^self tag: 'td'
+	^ self tag: 'td'
 !
 
 textarea
-	^self tag: 'textarea'
+	^ self tag: 'textarea'
 !
 
 tfoot
-	^self tag: 'tfoot'
+	^ self tag: 'tfoot'
 !
 
 th
-	^self tag: 'th'
+	^ self tag: 'th'
 !
 
 thead
-	^self tag: 'thead'
+	^ self tag: 'thead'
 !
 
 time
-	^self tag: 'time'
+	^ self tag: 'time'
 !
 
 title
-	^self tag: 'title'
+	^ self tag: 'title'
 !
 
 tr
-	^self tag: 'tr'
+	^ self tag: 'tr'
 !
 
 ul
-	^self tag: 'ul'
+	^ self tag: 'ul'
 !
 
 ul: anObject
-	^self ul with: anObject
+	^ self ul with: anObject
 !
 
 video
-	^self tag: 'video'
+	^ self tag: 'video'
 ! !
 
 !HTMLCanvas class methodsFor: 'instance creation'!
 
 browserVersion
-	^(jQuery at: #browser) version
+	^ (jQuery at: #browser) version
 !
 
 isMSIE
-	^((jQuery at: #browser) at: #msie) notNil
+	^ ((jQuery at: #browser) at: #msie) notNil
 !
 
 isMozilla
-	^((jQuery at: #browser) at: #mozilla) notNil
+	^ ((jQuery at: #browser) at: #mozilla) notNil
 !
 
 isOpera
-	^((jQuery at: #browser) at: #opera) notNil
+	^ ((jQuery at: #browser) at: #opera) notNil
 !
 
 isWebkit
-	^((jQuery at: #browser) at: #webkit) notNil
+	^ ((jQuery at: #browser) at: #webkit) notNil
 !
 
 onJQuery: aJQuery
-	^self basicNew
+	^ self basicNew
 		initializeFromJQuery: aJQuery;
 		initialize;
 		yourself
@@ -624,7 +624,7 @@ snippetAt: aString
 !
 
 snippets
-	^snippets ifNil: [ snippets := #{} ]
+	^ snippets ifNil: [ snippets := #{} ]
 ! !
 
 !HTMLSnippet methodsFor: 'initialization'!
@@ -748,14 +748,14 @@ All tags but `<style>` are instances of me (see the `StyleBrush` class).
 !TagBrush methodsFor: 'accessing'!
 
 element
-	^element
+	^ element
 ! !
 
 !TagBrush methodsFor: 'adding'!
 
 addBrush: aTagBrush
 	self appendChild: aTagBrush element.
-	^aTagBrush
+	^ aTagBrush
 !
 
 append: anObject
@@ -931,7 +931,7 @@ width: aString
 !TagBrush methodsFor: 'converting'!
 
 asJQuery
-	^self element asJQuery
+	^ self element asJQuery
 ! !
 
 !TagBrush methodsFor: 'events'!
@@ -1049,13 +1049,13 @@ createTextNodeFor: aString
 !TagBrush class methodsFor: 'instance creation'!
 
 fromJQuery: aJQuery canvas: aCanvas
-	^self new
+	^ self new
 		initializeFromJQuery: aJQuery canvas: aCanvas;
 		yourself
 !
 
 fromString: aString canvas: aCanvas
-	^self new
+	^ self new
 	initializeFromString: aString canvas: aCanvas;
 	yourself
 ! !
@@ -1099,16 +1099,16 @@ The need for a specific class comes from Internet Explorer compatibility issues.
 
 with: aString
 	HTMLCanvas isMSIE
-		ifTrue: [self element styleSheet cssText: aString ]
-		ifFalse: [super with: aString ].
+		ifTrue: [ self element styleSheet cssText: aString ]
+		ifFalse: [ super with: aString ].
 ! !
 
 !StyleTag class methodsFor: 'instance creation'!
 
 canvas: aCanvas
-	^self new
-	initializeFromString: 'style' canvas: aCanvas;
-	yourself
+	^ self new
+		initializeFromString: 'style' canvas: aCanvas;
+		yourself
 ! !
 
 InterfacingObject subclass: #Widget

+ 29 - 29
st/Compiler-AST.st

@@ -48,7 +48,7 @@ nextNode: aNode
 !
 
 nodes
-	^nodes ifNil: [nodes := Array new]
+	^ nodes ifNil: [ nodes := Array new ] 
 !
 
 parent
@@ -107,11 +107,11 @@ isAssignmentNode
 !
 
 isBlockNode
-	^false
+	^ false
 !
 
 isBlockSequenceNode
-	^false
+	^ false
 !
 
 isCascadeNode
@@ -143,11 +143,11 @@ isReferenced
 !
 
 isReturnNode
-	^false
+	^ false
 !
 
 isSendNode
-	^false
+	^ false
 !
 
 isSequenceNode
@@ -155,7 +155,7 @@ isSequenceNode
 !
 
 isValueNode
-	^false
+	^ false
 !
 
 isVariableNode
@@ -167,7 +167,7 @@ stopOnStepping
 !
 
 subtreeNeedsAliasing
-	^(self shouldBeAliased or: [ self shouldBeInlined ]) or: [
+	^ (self shouldBeAliased or: [ self shouldBeInlined ]) or: [
 		(self nodes detect: [ :each | each subtreeNeedsAliasing ] ifNone: [ false ]) ~= false ]
 ! !
 
@@ -186,7 +186,7 @@ I represent an assignment node.!
 !AssignmentNode methodsFor: 'accessing'!
 
 left
-	^left
+	^ left
 !
 
 left: aNode
@@ -199,7 +199,7 @@ nodes
 !
 
 right
-	^right
+	^ right
 !
 
 right: aNode
@@ -244,7 +244,7 @@ nextNode: aNode
 !
 
 parameters
-	^parameters ifNil: [parameters := Array new]
+	^ parameters ifNil: [ parameters := Array new ] 
 !
 
 parameters: aCollection
@@ -262,7 +262,7 @@ scope: aLexicalScope
 !BlockNode methodsFor: 'testing'!
 
 isBlockNode
-	^true
+	^ true
 !
 
 subtreeNeedsAliasing
@@ -284,7 +284,7 @@ I represent an cascade node.!
 !CascadeNode methodsFor: 'accessing'!
 
 receiver
-	^receiver
+	^ receiver
 !
 
 receiver: aNode
@@ -336,7 +336,7 @@ I represent an JavaScript statement node.!
 !JSStatementNode methodsFor: 'accessing'!
 
 source
-	^source ifNil: ['']
+	^ source ifNil: [ '' ] 
 !
 
 source: aString
@@ -366,7 +366,7 @@ A method node must be the root and only method node of a valid AST.!
 !MethodNode methodsFor: 'accessing'!
 
 arguments
-	^arguments ifNil: [#()]
+	^ arguments ifNil: [ #() ] 
 !
 
 arguments: aCollection
@@ -402,7 +402,7 @@ scope: aMethodScope
 !
 
 selector
-	^selector
+	^ selector
 !
 
 selector: aString
@@ -418,7 +418,7 @@ sendIndexes: aDictionary
 !
 
 source
-	^source
+	^ source
 !
 
 source: aString
@@ -480,7 +480,7 @@ I represent an message send node.!
 !SendNode methodsFor: 'accessing'!
 
 arguments
-	^arguments ifNil: [arguments := #()]
+	^ arguments ifNil: [ arguments := #() ] 
 !
 
 arguments: aCollection
@@ -494,7 +494,7 @@ cascadeNodeWithMessages: aCollection
 		selector: self selector;
 		arguments: self arguments;
 		yourself.
-	^CascadeNode new
+	^ CascadeNode new
 		receiver: self receiver;
 		nodes: (Array with: first), aCollection;
 		yourself
@@ -517,7 +517,7 @@ nodes
 !
 
 receiver
-	^receiver
+	^ receiver
 !
 
 receiver: aNode
@@ -527,7 +527,7 @@ receiver: aNode
 !
 
 selector
-	^selector
+	^ selector
 !
 
 selector: aString
@@ -543,11 +543,11 @@ superSend: aBoolean
 !
 
 valueForReceiver: anObject
-	^SendNode new
+	^ SendNode new
 		position: self position;
 		receiver: (self receiver
-		ifNil: [anObject]
-		ifNotNil: [self receiver valueForReceiver: anObject]);
+		ifNil: [ anObject ] 
+		ifNotNil: [ self receiver valueForReceiver: anObject ]);
 		selector: self selector;
 		arguments: self arguments;
 		yourself
@@ -602,7 +602,7 @@ scope: aLexicalScope
 !
 
 temps
-	^temps ifNil: [#()]
+	^ temps ifNil: [ #() ]
 !
 
 temps: aCollection
@@ -612,7 +612,7 @@ temps: aCollection
 !SequenceNode methodsFor: 'converting'!
 
 asBlockSequenceNode
-	^BlockSequenceNode new
+	^ BlockSequenceNode new
 		position: self position;
 		nodes: self nodes;
 		temps: self temps;
@@ -640,7 +640,7 @@ I represent an special sequence node for block scopes.!
 !BlockSequenceNode methodsFor: 'testing'!
 
 isBlockSequenceNode
-	^true
+	^ true
 ! !
 
 !BlockSequenceNode methodsFor: 'visiting'!
@@ -658,7 +658,7 @@ I represent a value node.!
 !ValueNode methodsFor: 'accessing'!
 
 value
-	^value
+	^ value
 !
 
 value: anObject
@@ -672,7 +672,7 @@ isImmutable
 !
 
 isValueNode
-	^true
+	^ true
 ! !
 
 !ValueNode methodsFor: 'visiting'!
@@ -694,7 +694,7 @@ alias
 !
 
 assigned
-	^assigned ifNil: [false]
+	^ assigned ifNil: [ false ]
 !
 
 assigned: aBoolean

+ 26 - 26
st/Compiler-Core.st

@@ -8,16 +8,16 @@ I am the abstract super class of all code generators and provide their common AP
 !AbstractCodeGenerator methodsFor: 'accessing'!
 
 classNameFor: aClass
-	^aClass isMetaclass
-		ifTrue: [aClass instanceClass name, '.klass']
+	^ aClass isMetaclass
+		ifTrue: [ aClass instanceClass name, '.klass' ]
 		ifFalse: [
 		aClass isNil
-			ifTrue: ['nil']
-			ifFalse: [aClass name]]
+			ifTrue: [ 'nil' ]
+			ifFalse: [ aClass name ]]
 !
 
 currentClass
-	^currentClass
+	^ currentClass
 !
 
 currentClass: aClass
@@ -29,13 +29,13 @@ pseudoVariables
 !
 
 safeVariableNameFor: aString
-	^(Smalltalk current reservedWords includes: aString)
-		ifTrue: [aString, '_']
-		ifFalse: [aString]
+	^ (Smalltalk current reservedWords includes: aString)
+		ifTrue: [ aString, '_' ]
+		ifFalse: [ aString ]
 !
 
 source
-	^source ifNil: ['']
+	^ source ifNil: [ '' ]
 !
 
 source: aString
@@ -94,7 +94,7 @@ The default code generator is an instance of `InlinedCodeGenerator`!
 !Compiler methodsFor: 'accessing'!
 
 codeGeneratorClass
-	^codeGeneratorClass ifNil: [InliningCodeGenerator]
+	^ codeGeneratorClass ifNil: [ InliningCodeGenerator ]
 !
 
 codeGeneratorClass: aClass
@@ -102,7 +102,7 @@ codeGeneratorClass: aClass
 !
 
 currentClass
-	^currentClass
+	^ currentClass
 !
 
 currentClass: aClass
@@ -110,7 +110,7 @@ currentClass: aClass
 !
 
 source
-	^source ifNil: ['']
+	^ source ifNil: [ '' ]
 !
 
 source: aString
@@ -118,7 +118,7 @@ source: aString
 !
 
 unknownVariables
-	^unknownVariables
+	^ unknownVariables
 !
 
 unknownVariables: aCollection
@@ -128,25 +128,25 @@ unknownVariables: aCollection
 !Compiler methodsFor: 'compiling'!
 
 compile: aString
-	^self compileNode: (self parse: aString)
+	^ self compileNode: (self parse: aString)
 !
 
 compile: aString forClass: aClass
 	self currentClass: aClass.
 	self source: aString.
-	^self compile: aString
+	^ self compile: aString
 !
 
 compileExpression: aString
 	self currentClass: DoIt.
-	self source: 'doIt ^[', aString, '] value'.
-	^self compileNode: (self parse: self source)
+	self source: 'doIt ^ [ ', aString, ' ] value'.
+	^ self compileNode: (self parse: self source)
 !
 
 compileExpression: aString on: anObject
 	self currentClass: anObject class.
-	self source: 'xxxDoIt ^[', aString, '] value'.
-	^self compileNode: (self parse: self source)
+	self source: 'xxxDoIt ^ [ ', aString, ' ] value'.
+	^ self compileNode: (self parse: self source)
 !
 
 compileNode: aNode
@@ -157,7 +157,7 @@ compileNode: aNode
 		currentClass: self currentClass.
 	result := generator compileNode: aNode.
 	self unknownVariables: #().
-	^result
+	^ result
 !
 
 eval: aString
@@ -177,7 +177,7 @@ evaluateExpression: aString on: anObject
 	anObject class addCompiledMethod: method.
 	result := anObject xxxDoIt.
 	anObject class removeCompiledMethod: method.
-	^result
+	^ result
 !
 
 install: aString forClass: aBehavior category: anotherString
@@ -188,11 +188,11 @@ install: aString forClass: aBehavior category: anotherString
 !
 
 parse: aString
-	^Smalltalk current parse: aString
+	^ Smalltalk current parse: aString
 !
 
 parseExpression: aString
-	^self parse: 'doIt ^[', aString, '] value'
+	^ self parse: 'doIt ^ [ ', aString, ' ] value'
 !
 
 recompile: aClass
@@ -205,7 +205,7 @@ recompile: aClass
 
 recompileAll
 	Smalltalk current classes 
-		do: [:each | self recompile: each ]
+		do: [ :each | self recompile: each ]
 		displayingProgress: 'Compiling all classes...'
 ! !
 
@@ -216,8 +216,8 @@ recompile: aClass
 !
 
 recompileAll
-	Smalltalk current classes do: [:each |
-		self recompile: each]
+	Smalltalk current classes do: [ :each |
+		self recompile: each ]
 ! !
 
 Object subclass: #DoIt

+ 17 - 17
st/Compiler-IR.st

@@ -87,15 +87,15 @@ aliasTemporally: aCollection
 	
 	aCollection withIndexDo: [ :each :i |
 		each subtreeNeedsAliasing
-			ifTrue: [ threshold := i ]].
+			ifTrue: [ threshold := i ] ].
 
 	result := OrderedCollection new.
 	aCollection withIndexDo: [ :each :i |
 		result add: (i <= threshold
 			ifTrue: [ self alias: each ]
-			ifFalse: [ self visit: each ])].
+			ifFalse: [ self visit: each ]) ].
 
-	^result
+	^ result
 !
 
 visitAssignmentNode: aNode
@@ -133,7 +133,7 @@ visitBlockSequenceNode: aNode
 					self sequence add: (self visitOrAlias: each) ].
 				aNode nodes last isReturnNode
 					ifFalse: [ self sequence add: (IRBlockReturn new add: (self visitOrAlias: aNode nodes last); yourself) ]
-					ifTrue: [ self sequence add: (self visitOrAlias: aNode nodes last) ]]]
+					ifTrue: [ self sequence add: (self visitOrAlias: aNode nodes last) ] ]]
 !
 
 visitCascadeNode: aNode
@@ -157,14 +157,14 @@ visitCascadeNode: aNode
 visitDynamicArrayNode: aNode
 	| array |
 	array := IRDynamicArray new.
-	(self aliasTemporally: aNode nodes) do: [:each | array add: each].
+	(self aliasTemporally: aNode nodes) do: [ :each | array add: each ].
 	^ array
 !
 
 visitDynamicDictionaryNode: aNode
 	| dictionary |
 	dictionary := IRDynamicDictionary new.
-	(self aliasTemporally: aNode nodes) do: [:each | dictionary add: each].
+	(self aliasTemporally: aNode nodes) do: [ :each | dictionary add: each ].
 	^ dictionary
 !
 
@@ -245,7 +245,7 @@ visitSequenceNode: aNode
 			aNode nodes do: [ :each | | instruction |
 				instruction := self visitOrAlias: each.
 				instruction isVariable ifFalse: [
-					self sequence add: instruction ]]]
+					self sequence add: instruction ] ]]
 !
 
 visitValueNode: aNode
@@ -734,7 +734,7 @@ I am the simplest possible instruction. I represent a value.!
 !IRValue methodsFor: 'accessing'!
 
 value
-	^value
+	^ value
 !
 
 value: aString
@@ -956,7 +956,7 @@ visitIRDynamicDictionary: anIRDynamicDictionary
 	self stream nextPutAll: 'smalltalk.HashedCollection._from_(['.
 		anIRDynamicDictionary instructions
 			do: [ :each | self visit: each ]
-			separatedBy: [self stream nextPutAll: ',' ].
+			separatedBy: [ self stream nextPutAll: ',' ].
 	self stream nextPutAll: '])'
 !
 
@@ -976,8 +976,8 @@ visitIRMethod: anIRMethod
 				anIRMethod scope hasNonLocalReturn
 					ifTrue: [
 						self stream nextPutNonLocalReturnHandlingWith: [
-							super visitIRMethod: anIRMethod ]]
-					ifFalse: [ super visitIRMethod: anIRMethod ]]]
+							super visitIRMethod: anIRMethod ] ]
+					ifFalse: [ super visitIRMethod: anIRMethod ] ]]
 			arguments: anIRMethod arguments ]
 !
 
@@ -1006,7 +1006,7 @@ visitIRSend: anIRSend
 visitIRSequence: anIRSequence
 	self stream nextPutSequenceWith: [
 		anIRSequence instructions do: [ :each |
-			self stream nextPutStatementWith: (self visit: each) ]]
+			self stream nextPutStatementWith: (self visit: each) ] ]
 !
 
 visitIRTempDeclaration: anIRTempDeclaration
@@ -1111,7 +1111,7 @@ nextPutBlockContextFor: anIRClosure during: aBlock
 			self
 				nextPutAll: each asVariableName;
 				nextPutAll: ':';
-				nextPutAll: each asVariableName]
+				nextPutAll: each asVariableName ]
 		separatedBy: [ self nextPutAll: ',' ].
 	
 	self
@@ -1160,7 +1160,7 @@ nextPutContextFor: aMethod during: aBlock
 			self
 				nextPutAll: each asVariableName;
 				nextPutAll: ':';
-				nextPutAll: each asVariableName]
+				nextPutAll: each asVariableName ]
 		separatedBy: [ self nextPutAll: ',' ].
 	
 	self
@@ -1210,8 +1210,8 @@ nextPutMethodDeclaration: aMethod with: aBlock
 		nextPutAll: 'args: ', (aMethod arguments collect: [ :each | each value ]) asArray asJavascript, ','; lf;
 		nextPutAll: 'referencedClasses: ['.
 	aMethod classReferences
-		do: [:each | stream nextPutAll: each asJavascript]
-		separatedBy: [stream nextPutAll: ','].
+		do: [ :each | stream nextPutAll: each asJavascript ]
+		separatedBy: [ stream nextPutAll: ',' ].
 	stream
 		nextPutAll: ']';
 		nextPutAll: '})'
@@ -1266,7 +1266,7 @@ nextPutStatementWith: aBlock
 !
 
 nextPutVars: aCollection
-	aCollection ifEmpty: [ ^self ].
+	aCollection ifEmpty: [ ^ self ].
 	
 	stream nextPutAll: 'var '.
 	aCollection

+ 2 - 2
st/Compiler-Interpreter.st

@@ -143,7 +143,7 @@ localAt: aString ifAbsent: aBlock
 	^ self locals at: aString ifAbsent: [ 
 		self outerContext 
 			ifNotNil: [ :context | context localAt: aString ifAbsent: aBlock ]
-			ifNil: [aBlock value] ]
+			ifNil: [ aBlock value ] ]
 !
 
 localAt: aString put: anObject
@@ -713,7 +713,7 @@ visitVariableNode: aNode
 					ifTrue: [
 						Smalltalk current 
 							at: aNode value 
-							ifAbsent: [ PlatformInterface globals at: aNode value ]]]])
+							ifAbsent: [ PlatformInterface globals at: aNode value ] ] ] ])
 ! !
 
 Error subclass: #ASTInterpreterError

+ 1 - 1
st/Compiler-Semantic.st

@@ -543,7 +543,7 @@ visitMethodNode: aNode
 	aNode scope: currentScope.
 	currentScope node: aNode.
 
-	self theClass allInstanceVariableNames do: [:each |
+	self theClass allInstanceVariableNames do: [ :each |
 		currentScope addIVar: each ].
 	aNode arguments do: [ :each |
 		self validateVariableScope: each.

+ 4 - 4
st/Examples.st

@@ -13,12 +13,12 @@ Then take a look in the HTML document above the IDE.
 
 decrease
 	count := count - 1.
-	header contents: [:html | html with: count asString]
+	header contents: [ :html | html with: count asString ]
 !
 
 increase
 	count := count + 1.
-	header contents: [:html | html with: count asString]
+	header contents: [ :html | html with: count asString ]
 ! !
 
 !Counter methodsFor: 'initialization'!
@@ -36,10 +36,10 @@ renderOn: html
 		yourself.
 	html button
 		with: '++';
-		onClick: [self increase].
+		onClick: [ self increase ].
 	html button
 		with: '--';
-		onClick: [self decrease]
+		onClick: [ self decrease ]
 ! !
 
 !Counter class methodsFor: 'example'!

+ 3 - 3
st/Helios-Browser.st

@@ -238,7 +238,7 @@ showInstance: aBoolean
 
     	self selectedClass ifNotNil: [
     		self selectedClass: (aBoolean
-    			ifTrue: [self selectedClass theNonMetaClass ]
+    			ifTrue: [ self selectedClass theNonMetaClass ]
 	    	  	ifFalse: [ self selectedClass theMetaClass ]) ].
     
 		self announcer announce: HLShowInstanceToggled new ]
@@ -490,7 +490,7 @@ setItemsForPackage: aPackage
     	ifNil: [ #() ]
   		ifNotNil: [ ((aPackage classes 
         	collect: [ :each | each theNonMetaClass ]) asSet asArray) 
-            	sort: [:a :b | a name < b name ] ]).
+            	sort: [ :a :b | a name < b name ] ]).
 !
 
 setItemsForSelectedPackage
@@ -666,7 +666,7 @@ renderItem: aClass on: html
 renderItemLabel: aClass level: anInteger on: html
 	html span asJQuery html: (String streamContents: [ :str |
 		anInteger timesRepeat: [
-			str nextPutAll: '&nbsp;&nbsp;&nbsp;&nbsp;'].
+			str nextPutAll: '&nbsp;&nbsp;&nbsp;&nbsp;' ].
 			str nextPutAll: aClass name ])
 !
 

+ 6 - 6
st/Helios-Core.st

@@ -346,7 +346,7 @@ withCompileErrorHandling: aBlock
 				self environment 
 					evaluate: aBlock
 					on: ParseError
-					do: [:ex | self handleParseError: ex ] ]
+					do: [ :ex | self handleParseError: ex ] ]
 			on: UnknownVariableError
 			do: [ :ex | self handleUnkownVariableError: ex ] ]
 		on: CompilerError
@@ -392,7 +392,7 @@ isToolModel
 
 shouldCompileClassDefinition: aString
 	^ self selectedClass isNil or: [
-		aString match: '^[A-Z]' ]
+		aString match: '^ [A-Z]' ]
 ! !
 
 !HLToolModel class methodsFor: 'actions'!
@@ -745,8 +745,8 @@ cssClassForItem: anObject
 !
 
 findListItemFor: anObject
-	^(((wrapper asJQuery find: 'li') 
-		filter: [:thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject] currySelf) eq: 0)
+	^ (((wrapper asJQuery find: 'li') 
+		filter: [ :thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject ] currySelf) eq: 0)
 !
 
 items
@@ -790,7 +790,7 @@ activateItem: anObject
 activateListItem: aListItem
 	| item |
 	
-	(aListItem get: 0) ifNil: [ ^self ].
+	(aListItem get: 0) ifNil: [ ^ self ].
 	aListItem parent children removeClass: 'active'.
 	aListItem addClass: 'active'.
     
@@ -818,7 +818,7 @@ ensureVisible: aListItem
 	"Move the scrollbar to show the active element"
 	
 	| parent position |
-	(aListItem get: 0) ifNil: [ ^self ].
+	(aListItem get: 0) ifNil: [ ^ self ].
 	position := self positionOf: aListItem.
 	parent := aListItem parent.
 	

+ 3 - 3
st/Helios-Inspector.st

@@ -26,8 +26,8 @@ selectionDisplayString
 	|selection|
 	selection := model selection.
     ^ (model variables keys includes: selection)
-    	ifTrue:[(model instVarObjectAt: selection) printString]
-      	ifFalse:['']
+    	ifTrue:[ (model instVarObjectAt: selection) printString ]
+      	ifFalse:[ '' ]
 ! !
 
 Object subclass: #HLInspectorModel
@@ -37,7 +37,7 @@ Object subclass: #HLInspectorModel
 !HLInspectorModel methodsFor: 'accessing'!
 
 announcer
-	^ announcer ifNil: [announcer := Announcer new ]
+	^ announcer ifNil: [ announcer := Announcer new ]
 !
 
 code

+ 1 - 1
st/Helios-KeyBindings.st

@@ -294,7 +294,7 @@ errorStatus
 evaluate: aString	
 	[ self callback value: aString ]
 		on: Error
-		do: [:ex |
+		do: [ :ex |
 			self input asJQuery 
 				one: 'keydown' 
 				do: [ self clearStatus ].

+ 2 - 2
st/Helios-References.st

@@ -354,7 +354,7 @@ updateCaches
 updateClassesAndMetaclassesCache
 	classesAndMetaclassesCache := OrderedCollection new.
 	
-	self environment classes do: [:each |
+	self environment classes do: [ :each |
 		classesAndMetaclassesCache
 				add: each; 
 				add: each class ]
@@ -364,7 +364,7 @@ updateMethodsCache
 	methodsCache := OrderedCollection new.
 	
 	self classesAndMetaclasses
-		do: [:each | methodsCache addAll: each methods ]
+		do: [ :each | methodsCache addAll: each methods ]
 ! !
 
 !HLReferencesModel methodsFor: 'testing'!

+ 11 - 11
st/Helios-Workspace.st

@@ -189,9 +189,9 @@ print: aString
 printIt
 	| result |
 
-	result:=  self doIt.       
+	result := self doIt.       
 	self model announcer announce: (HLPrintItRequested on: model).
-    self print: result printString.
+	self print: result printString.
 	
 	self focus.
 !
@@ -234,7 +234,7 @@ onChange
 
 onDoIt
 	
-    self doIt
+	self doIt
 !
 
 onInspectIt
@@ -420,8 +420,8 @@ setupCodeMirror
 	< 
 		CodeMirror.keyMap.default.fallthrough = ["basic"];
 		CodeMirror.commands.autocomplete = function(cm) {
-        	CodeMirror.showHint(cm, self._hintFor_options_);
-      	}
+			CodeMirror.showHint(cm, self._hintFor_options_);
+		}
 	>
 !
 
@@ -622,7 +622,7 @@ onClassSelected: anAnnouncement
 	class:= anAnnouncement item.
 	
 	class ifNil: [ ^ self contents: '' ].
-    self contents: class definition
+	self contents: class definition
 !
 
 onCompileError: anAnnouncement
@@ -640,7 +640,7 @@ onMethodModified: anAnnouncement
 	
 	self browserModel selectedClass = method methodClass ifFalse: [ ^ self ].
 	self browserModel selectedMethod ifNil: [ ^ self ].
-    self browserModel selectedMethod selector = method selector ifFalse: [ ^ self ].
+	self browserModel selectedMethod selector = method selector ifFalse: [ ^ self ].
 
 	self refresh
 !
@@ -651,7 +651,7 @@ onMethodSelected: anAnnouncement
 	method := anAnnouncement item.
 	
 	method ifNil: [ ^ self contents: '' ].
-    self contents: method source
+	self contents: method source
 !
 
 onPackageSelected: anAnnouncement
@@ -660,7 +660,7 @@ onPackageSelected: anAnnouncement
 	package := anAnnouncement item.
 	
 	package ifNil: [ ^ self contents: '' ].
-    self contents: package definition
+	self contents: package definition
 !
 
 onParseError: anAnnouncement
@@ -685,7 +685,7 @@ onParseError: anAnnouncement
 
 onProtocolSelected: anAnnouncement
 	self browserModel selectedClass ifNil: [ ^ self contents: '' ].
-    self contents: self browserModel selectedClass definition
+	self contents: self browserModel selectedClass definition
 !
 
 onSaveIt
@@ -695,7 +695,7 @@ onSaveIt
 onShowInstanceToggled
 	self browserModel selectedClass ifNil: [ ^ self contents: '' ].
     
-    self contents: self browserModel selectedClass definition
+	self contents: self browserModel selectedClass definition
 !
 
 onSourceCodeFocusRequested

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 214 - 214
st/IDE.st


+ 40 - 40
st/Importer-Exporter.st

@@ -37,7 +37,7 @@ extensionProtocolsOfPackage: aPackage
 			(behavior protocols includes: extensionName) ifTrue: [
 				result add: (ExportMethodProtocol name: extensionName theClass: behavior) ] ] ].
 
-	^result
+	^ result
 ! !
 
 !AbstractExporter methodsFor: 'convenience'!
@@ -45,11 +45,11 @@ extensionProtocolsOfPackage: aPackage
 chunkEscape: aString
 	"Replace all occurrences of !! with !!!! and trim at both ends."
 
-	^(aString replace: '!!' with: '!!!!') trimBoth
+	^ (aString replace: '!!' with: '!!!!') trimBoth
 !
 
 classNameFor: aClass
-	^aClass isMetaclass
+	^ aClass isMetaclass
 		ifTrue: [ aClass instanceClass name, ' class' ]
 		ifFalse: [
 			aClass isNil
@@ -84,9 +84,9 @@ extensionCategoriesOfPackage: aPackage
 			map := Dictionary new.
 			aClass protocolsDo: [ :category :methods |
 				category = ('*', name) ifTrue: [ map at: category put: methods ] ].
-			result addAll: ((map keys sorted: [:a :b | a <= b ]) collect: [ :category |
+			result addAll: ((map keys sorted: [ :a :b | a <= b ]) collect: [ :category |
 				MethodCategory name: category theClass: aClass methods: (map at: category) ]) ] ].
-	^result
+	^ result
 !
 
 ownCategoriesOfClass: aClass
@@ -98,14 +98,14 @@ ownCategoriesOfClass: aClass
 	map := Dictionary new.
 	aClass protocolsDo: [ :each :methods |
 		(each match: '^\*') ifFalse: [ map at: each put: methods ] ].
-	^(map keys sorted: [:a :b | a <= b ]) collect: [ :each |
+	^ (map keys sorted: [ :a :b | a <= b ]) collect: [ :each |
 		MethodCategory name: each theClass: aClass methods: (map at: each) ]
 !
 
 ownCategoriesOfMetaClass: aClass
 	"Issue #143: sort protocol alphabetically"
 
-	^self ownCategoriesOfClass: aClass class
+	^ self ownCategoriesOfClass: aClass class
 !
 
 ownMethodProtocolsOfClass: aClass
@@ -135,15 +135,15 @@ exportDefinitionOf: aClass on: aStream
 		nextPutAll: ' subclass: #', (self classNameFor: aClass); lf;
 		tab; nextPutAll: 'instanceVariableNames: '''.
 	aClass instanceVariableNames
-		do: [:each | aStream nextPutAll: each]
-		separatedBy: [aStream nextPutAll: ' '].
+		do: [ :each | aStream nextPutAll: each ]
+		separatedBy: [ aStream nextPutAll: ' ' ].
 	aStream
 		nextPutAll: ''''; lf;
 		tab; nextPutAll: 'package: ''', aClass category, '''!!'; lf.
 	aClass comment notEmpty ifTrue: [
 		aStream
 		nextPutAll: '!!', (self classNameFor: aClass), ' commentStamp!!';lf;
-		nextPutAll: (self chunkEscape: aClass comment), '!!';lf].
+		nextPutAll: (self chunkEscape: aClass comment), '!!';lf ].
 	aStream lf
 !
 
@@ -154,10 +154,10 @@ exportMetaDefinitionOf: aClass on: aStream
 			nextPutAll: (self classNameFor: aClass class);
 			nextPutAll: ' instanceVariableNames: '''.
 		aClass class instanceVariableNames
-			do: [:each | aStream nextPutAll: each]
-			separatedBy: [aStream nextPutAll: ' '].
+			do: [ :each | aStream nextPutAll: each ]
+			separatedBy: [ aStream nextPutAll: ' ' ].
 		aStream
-			nextPutAll: '''!!'; lf; lf]
+			nextPutAll: '''!!'; lf; lf ]
 !
 
 exportMethod: aMethod on: aStream
@@ -233,20 +233,20 @@ I am typically used to save code outside of the Amber runtime (committing to dis
 ownMethodsOfClass: aClass
 	"Issue #143: sort methods alphabetically"
 
-	^((aClass methodDictionary values) sorted: [:a :b | a selector <= b selector])
-		reject: [:each | (each category match: '^\*')]
+	^ ((aClass methodDictionary values) sorted: [ :a :b | a selector <= b selector ])
+		reject: [ :each | (each category match: '^\*') ]
 !
 
 ownMethodsOfMetaClass: aClass
 	"Issue #143: sort methods alphabetically"
 
-	^self ownMethodsOfClass: aClass class
+	^ self ownMethodsOfClass: aClass class
 ! !
 
 !Exporter methodsFor: 'convenience'!
 
 classNameFor: aClass
-	^aClass isMetaclass
+	^ aClass isMetaclass
 		ifTrue: [ aClass instanceClass name, '.klass' ]
 		ifFalse: [
 			aClass isNil
@@ -264,8 +264,8 @@ exportDefinitionOf: aClass on: aStream
 		nextPutAll: 'smalltalk.', (self classNameFor: aClass superclass);
 		nextPutAll: ', ['.
 	aClass instanceVariableNames
-		do: [:each | aStream nextPutAll: '''', each, '''']
-		separatedBy: [aStream nextPutAll: ', '].
+		do: [ :each | aStream nextPutAll: '''', each, '''' ]
+		separatedBy: [ aStream nextPutAll: ', ' ].
 	aStream
 		nextPutAll: '], ''';
 		nextPutAll: aClass category, '''';
@@ -277,7 +277,7 @@ exportDefinitionOf: aClass on: aStream
 		nextPutAll: (self classNameFor: aClass);
 		nextPutAll: '.comment=';
 		nextPutAll: aClass comment asJavascript;
-		nextPutAll: ';'].
+		nextPutAll: ';' ].
 	aStream lf
 !
 
@@ -288,9 +288,9 @@ exportMetaDefinitionOf: aClass on: aStream
 		nextPutAll: 'smalltalk.', (self classNameFor: aClass class);
 		nextPutAll: '.iVarNames = ['.
 		aClass class instanceVariableNames
-		do: [:each | aStream nextPutAll: '''', each, '''']
-		separatedBy: [aStream nextPutAll: ','].
-		aStream nextPutAll: '];', String lf]
+		do: [ :each | aStream nextPutAll: '''', each, '''' ]
+		separatedBy: [ aStream nextPutAll: ',' ].
+		aStream nextPutAll: '];', String lf ]
 !
 
 exportMethod: aMethod on: aStream
@@ -436,20 +436,20 @@ nextChunk
 
 	| char result chunk |
 	result := '' writeStream.
-		[char := stream next.
-		char notNil] whileTrue: [
+		[ char := stream next.
+		char notNil ] whileTrue: [
 				char = '!!' ifTrue: [
 						stream peek = '!!'
-								ifTrue: [stream next "skipping the escape double"]
-								ifFalse: [^result contents trimBoth "chunk end marker found"]].
-				result nextPut: char].
-	^nil "a chunk needs to end with !!"
+								ifTrue: [ stream next "skipping the escape double" ]
+								ifFalse: [ ^ result contents trimBoth "chunk end marker found" ]].
+				result nextPut: char ].
+	^ nil "a chunk needs to end with !!"
 ! !
 
 !ChunkParser class methodsFor: 'instance creation'!
 
 on: aStream
-	^self new stream: aStream
+	^ self new stream: aStream
 ! !
 
 Object subclass: #ExportMethodProtocol
@@ -469,7 +469,7 @@ methods
 !
 
 name
-	^name
+	^ name
 !
 
 name: aString
@@ -477,7 +477,7 @@ name: aString
 !
 
 theClass
-	^theClass
+	^ theClass
 !
 
 theClass: aClass
@@ -487,7 +487,7 @@ theClass: aClass
 !ExportMethodProtocol class methodsFor: 'instance creation'!
 
 name: aString theClass: aClass
-	^self new
+	^ self new
 		name: aString;
 		theClass: aClass;
 		yourself
@@ -509,16 +509,16 @@ import: aStream
 	| chunk result parser lastEmpty |
 	parser := ChunkParser on: aStream.
 	lastEmpty := false.
-	[chunk := parser nextChunk.
-	chunk isNil] whileFalse: [
+	[ chunk := parser nextChunk.
+	chunk isNil ] whileFalse: [
 		chunk isEmpty
-			ifTrue: [lastEmpty := true]
+			ifTrue: [ lastEmpty := true ]
 			ifFalse: [
 				result := Compiler new evaluateExpression: chunk.
 				lastEmpty
 						ifTrue: [
 									lastEmpty := false.
-									result scanFrom: parser]]]
+									result scanFrom: parser ]] ]
 ! !
 
 InterfacingObject subclass: #PackageHandler
@@ -599,7 +599,7 @@ ajaxPutAt: aURL data: aString
 			'type' -> 'PUT'.
 			'data' -> aString.
 			'contentType' -> 'text/plain;charset=UTF-8'.
-			'error' -> [ :xhr | self alert: 'Commiting ' , aURL , ' failed with reason: "' , (xhr responseText) , '"'] }
+			'error' -> [ :xhr | self alert: 'Commiting ' , aURL , ' failed with reason: "' , (xhr responseText) , '"' ] }
 ! !
 
 PackageHandler subclass: #AmdPackageHandler
@@ -613,12 +613,12 @@ I should not be used directly. Instead, use the corresponding `Package` methods.
 !AmdPackageHandler methodsFor: 'accessing'!
 
 commitPathJsFor: aPackage
-	^self toUrl: (self namespaceFor: aPackage)
+	^ self toUrl: (self namespaceFor: aPackage)
 !
 
 commitPathStFor: aPackage
 	"if _source is not mapped, .st commit will likely fail"
-	^self toUrl: (self namespaceFor: aPackage), '/_source'.
+	^ self toUrl: (self namespaceFor: aPackage), '/_source'.
 !
 
 exporterClass

+ 1 - 1
st/Kernel-Announcements.st

@@ -46,7 +46,7 @@ valuable: aValuable
 
 deliver: anAnnouncement
 	(self handlesAnnouncement: anAnnouncement)
-		ifTrue: [self valuable value: anAnnouncement]
+		ifTrue: [ self valuable value: anAnnouncement ]
 !
 
 handlesAnnouncement: anAnnouncement

+ 45 - 45
st/Kernel-Classes.st

@@ -22,8 +22,8 @@ allInstanceVariableNames
 	| result |
 	result := self instanceVariableNames copy.
 	self superclass ifNotNil: [
-		result addAll: self superclass allInstanceVariableNames].
-	^result
+		result addAll: self superclass allInstanceVariableNames ].
+	^ result
 !
 
 allSelectors
@@ -56,7 +56,7 @@ allSuperclasses
 !
 
 comment
-	^(self basicAt: 'comment') ifNil: ['']
+	^ (self basicAt: 'comment') ifNil: [ '' ]
 !
 
 comment: aString
@@ -68,13 +68,13 @@ comment: aString
 !
 
 commentStamp
-	^ClassCommentReader new
+	^ ClassCommentReader new
 	class: self;
 	yourself
 !
 
 commentStamp: aStamp prior: prior
-		^self commentStamp
+		^ self commentStamp
 !
 
 definition
@@ -134,14 +134,14 @@ methods
 !
 
 methodsFor: aString
-	^ClassCategoryReader new
+	^ ClassCategoryReader new
 		class: self category: aString;
 		yourself
 !
 
 methodsFor: aString stamp: aStamp
 	"Added for compatibility, right now ignores stamp."
-	^self methodsFor: aString
+	^ self methodsFor: aString
 !
 
 methodsInProtocol: aString
@@ -201,7 +201,7 @@ theNonMetaClass
 !
 
 withAllSubclasses
-	^(Array with: self) addAll: self allSubclasses; yourself
+	^ (Array with: self) addAll: self allSubclasses; yourself
 ! !
 
 !Behavior methodsFor: 'compiling'!
@@ -277,11 +277,11 @@ protocolsDo: aBlock
 
 	| methodsByCategory |
 	methodsByCategory := HashedCollection new.
-	self methodDictionary values do: [:m |
-		(methodsByCategory at: m category ifAbsentPut: [Array new])
-			add: m].
-	self protocols do: [:category |
-		aBlock value: category value: (methodsByCategory at: category)]
+	self methodDictionary values do: [ :m |
+		(methodsByCategory at: m category ifAbsentPut: [ Array new ])
+			add: m ].
+	self protocols do: [ :category |
+		aBlock value: category value: (methodsByCategory at: category) ]
 ! !
 
 !Behavior methodsFor: 'instance creation'!
@@ -291,7 +291,7 @@ basicNew
 !
 
 new
-	^self basicNew initialize
+	^ self basicNew initialize
 ! !
 
 !Behavior methodsFor: 'private'!
@@ -307,8 +307,8 @@ basicRemoveCompiledMethod: aMethod
 !Behavior methodsFor: 'testing'!
 
 canUnderstand: aSelector
-	^(self methodDictionary keys includes: aSelector asString) or: [
-		self superclass notNil and: [self superclass canUnderstand: aSelector]]
+	^ (self methodDictionary keys includes: aSelector asString) or: [
+		self superclass notNil and: [ self superclass canUnderstand: aSelector ]]
 !
 
 includesBehavior: aClass
@@ -343,7 +343,7 @@ Class creation is done throught a `ClassBuilder` instance.!
 !Class methodsFor: 'accessing'!
 
 category
-	^self package ifNil: ['Unclassified'] ifNotNil: [self package name]
+	^ self package ifNil: [ 'Unclassified' ] ifNotNil: [ self package name ]
 !
 
 definition
@@ -397,22 +397,22 @@ subclasses
 
 subclass: aString instanceVariableNames: anotherString
 	"Kept for compatibility."
-	^self subclass: aString instanceVariableNames: anotherString package: nil
+	^ self subclass: aString instanceVariableNames: anotherString package: nil
 !
 
 subclass: aString instanceVariableNames: aString2 category: aString3
 	"Kept for compatibility."
 	self deprecatedAPI.
-	^self subclass: aString instanceVariableNames: aString2 package: aString3
+	^ self subclass: aString instanceVariableNames: aString2 package: aString3
 !
 
 subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3
 	"Just ignore class variables and pools. Added for compatibility."
-	^self subclass: aString instanceVariableNames: aString2 package: aString3
+	^ self subclass: aString instanceVariableNames: aString2 package: aString3
 !
 
 subclass: aString instanceVariableNames: aString2 package: aString3
-	^ClassBuilder new
+	^ ClassBuilder new
 		superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3
 ! !
 
@@ -431,7 +431,7 @@ printOn: aStream
 !Class methodsFor: 'testing'!
 
 isClass
-	^true
+	^ true
 ! !
 
 Behavior subclass: #Metaclass
@@ -495,7 +495,7 @@ printOn: aStream
 !Metaclass methodsFor: 'testing'!
 
 isMetaclass
-	^true
+	^ true
 ! !
 
 Object subclass: #ClassBuilder
@@ -509,7 +509,7 @@ Rather than using me directly to compile a class, use `Class >> subclass:instanc
 !ClassBuilder methodsFor: 'accessing'!
 
 instanceVariableNamesFor: aString
-	^(aString tokenize: ' ') reject: [ :each | each isEmpty ]
+	^ (aString tokenize: ' ') reject: [ :each | each isEmpty ]
 ! !
 
 !ClassBuilder methodsFor: 'class definition'!
@@ -547,7 +547,7 @@ class: aClass instanceVariableNames: ivarNames
 !
 
 superclass: aClass subclass: className
-	^self superclass: aClass subclass: className instanceVariableNames: '' package: nil
+	^ self superclass: aClass subclass: className instanceVariableNames: '' package: nil
 !
 
 superclass: aClass subclass: className instanceVariableNames: ivarNames package: packageName
@@ -555,7 +555,7 @@ superclass: aClass subclass: className instanceVariableNames: ivarNames package:
 	
 	newClass := self addSubclassOf: aClass
 		named: className instanceVariableNames: (self instanceVariableNamesFor: ivarNames)
-		package: (packageName ifNil: ['unclassified']).
+		package: (packageName ifNil: [ 'unclassified' ]).
 	self setupClass: newClass.
 	
 	SystemAnnouncer current
@@ -563,7 +563,7 @@ superclass: aClass subclass: className instanceVariableNames: ivarNames package:
 			theClass: newClass;
 			yourself).
 	
-	^newClass
+	^ newClass
 ! !
 
 !ClassBuilder methodsFor: 'class migration'!
@@ -613,7 +613,7 @@ migrateClassNamed: className superclass: aClass instanceVariableNames: aCollecti
 		oldClass: oldClass;
 		yourself).
 	
-	^newClass
+	^ newClass
 !
 
 renameClass: aClass to: className
@@ -646,7 +646,7 @@ copyClass: aClass named: className
 			theClass: newClass;
 			yourself).
 	
-	^newClass
+	^ newClass
 !
 
 copyClass: aClass to: anotherClass
@@ -670,7 +670,7 @@ installMethod: aCompiledMethod forClass: aBehavior category: aString
 	aCompiledMethod category: aString.
 	aBehavior addCompiledMethod: aCompiledMethod.
 	self setupClass: aBehavior.
-	^aCompiledMethod
+	^ aCompiledMethod
 ! !
 
 !ClassBuilder methodsFor: 'private'!
@@ -688,7 +688,7 @@ basicClass: aClass instanceVariableNames: aString
 
 basicClass: aClass instanceVariables: aCollection
 
-	aClass isMetaclass ifFalse: [self error: aClass name, ' is not a metaclass'].
+	aClass isMetaclass ifFalse: [ self error: aClass name, ' is not a metaclass' ].
 	aClass basicAt: 'iVarNames' put: aCollection
 !
 
@@ -746,9 +746,9 @@ class: aClass category: aString
 
 scanFrom: aChunkParser
 	| chunk |
-	[chunk := aChunkParser nextChunk.
-	chunk isEmpty] whileFalse: [
-		self compileMethod: chunk].
+	[ chunk := aChunkParser nextChunk.
+	chunk isEmpty ] whileFalse: [
+		self compileMethod: chunk ].
 	ClassBuilder new setupClass: class
 ! !
 
@@ -784,7 +784,7 @@ scanFrom: aChunkParser
 	| chunk |
 	chunk := aChunkParser nextChunk.
 	chunk isEmpty ifFalse: [
-		self setComment: chunk].
+		self setComment: chunk ].
 ! !
 
 !ClassCommentReader methodsFor: 'initialization'!
@@ -813,16 +813,16 @@ getNodesFrom: aCollection
 	| children others |
 	children := #().
 	others := #().
-	aCollection do: [:each |
+	aCollection do: [ :each |
 		(each superclass = self theClass)
-			ifTrue: [children add: each]
-			ifFalse: [others add: each]].
-	nodes:= children collect: [:each |
-		ClassSorterNode on: each classes: others level: self level + 1]
+			ifTrue: [ children add: each ]
+			ifFalse: [ others add: each ]].
+	nodes:= children collect: [ :each |
+		ClassSorterNode on: each classes: others level: self level + 1 ]
 !
 
 level
-	^level
+	^ level
 !
 
 level: anInteger
@@ -830,11 +830,11 @@ level: anInteger
 !
 
 nodes
-	^nodes
+	^ nodes
 !
 
 theClass
-	^theClass
+	^ theClass
 !
 
 theClass: aClass
@@ -847,14 +847,14 @@ traverseClassesWith: aCollection
 	"sort classes alphabetically Issue #143"
 
 	aCollection add: self theClass.
-	(self nodes sorted: [:a :b | a theClass name <= b theClass name ]) do: [:aNode |
+	(self nodes sorted: [ :a :b | a theClass name <= b theClass name ]) do: [ :aNode |
 		aNode traverseClassesWith: aCollection ].
 ! !
 
 !ClassSorterNode class methodsFor: 'instance creation'!
 
 on: aClass classes: aCollection level: anInteger
-	^self new
+	^ self new
 		theClass: aClass;
 		level: anInteger;
 		getNodesFrom: aCollection;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 172 - 172
st/Kernel-Collections.st


+ 10 - 10
st/Kernel-Exceptions.st

@@ -21,7 +21,7 @@ jsStack
 !
 
 messageText
-	^messageText
+	^ messageText
 !
 
 messageText: aString
@@ -66,11 +66,11 @@ heliosClass
 !Error class methodsFor: 'instance creation'!
 
 signal
-	^self new signal
+	^ self new signal
 !
 
 signal: aString
-		^self new
+	^ self new
 		signal: aString
 ! !
 
@@ -126,7 +126,7 @@ This exception is provided to support `Object>>doesNotUnderstand:`.!
 !MessageNotUnderstood methodsFor: 'accessing'!
 
 message
-	^message
+	^ message
 !
 
 message: aMessage
@@ -134,11 +134,11 @@ message: aMessage
 !
 
 messageText
-	^self receiver asString, ' does not understand #', self message selector
+	^ self receiver asString, ' does not understand #', self message selector
 !
 
 receiver
-	^receiver
+	^ receiver
 !
 
 receiver: anObject
@@ -177,7 +177,7 @@ The default behavior is to log the error and the context stack to the JavaScript
 !ErrorHandler methodsFor: 'error handling'!
 
 handleError: anError
-	anError context ifNotNil: [self logErrorContext: anError context].
+	anError context ifNotNil: [ self logErrorContext: anError context ].
 	self logError: anError
 ! !
 
@@ -189,7 +189,7 @@ log: aString
 
 logContext: aContext
 	aContext home ifNotNil: [
-		self logContext: aContext home].
+		self logContext: aContext home ].
 	self log: aContext asString
 !
 
@@ -200,7 +200,7 @@ logError: anError
 logErrorContext: aContext
 	aContext ifNotNil: [
 		aContext home ifNotNil: [
-			self logContext: aContext home]]
+			self logContext: aContext home ]]
 ! !
 
 ErrorHandler class instanceVariableNames: 'current'!
@@ -208,7 +208,7 @@ ErrorHandler class instanceVariableNames: 'current'!
 !ErrorHandler class methodsFor: 'accessing'!
 
 current
-	^current ifNil: [current := self new]
+	^ current ifNil: [ current := self new ]
 !
 
 setCurrent: anHandler

+ 36 - 36
st/Kernel-Infrastructure.st

@@ -46,19 +46,19 @@ I am superclass of all object that interface with user or environment. `Widget`
 !InterfacingObject methodsFor: 'actions'!
 
 ajax: anObject
-	^PlatformInterface ajax: anObject
+	^ PlatformInterface ajax: anObject
 !
 
 alert: aString
-	^PlatformInterface alert: aString
+	^ PlatformInterface alert: aString
 !
 
 confirm: aString
-	^PlatformInterface confirm: aString
+	^ PlatformInterface confirm: aString
 !
 
 prompt: aString
-	^PlatformInterface prompt: aString
+	^ PlatformInterface prompt: aString
 ! !
 
 InterfacingObject subclass: #Environment
@@ -313,7 +313,7 @@ at: aString put: anObject
 !
 
 jsObject
-	^jsObject
+	^ jsObject
 !
 
 jsObject: aJSObject
@@ -399,7 +399,7 @@ inspectOn: anInspector
 !JSObjectProxy class methodsFor: 'instance creation'!
 
 on: aJSObject
-	^self new
+	^ self new
 		jsObject: aJSObject;
 		yourself
 ! !
@@ -555,7 +555,7 @@ loadDependencies
 	
 	| classes packages |
 	classes := self loadDependencyClasses.
-	^(classes collect: [ :each | each package ]) asSet
+	^ (classes collect: [ :each | each package ]) asSet
 		remove: self ifAbsent: [];
 		yourself
 !
@@ -567,7 +567,7 @@ loadDependencyClasses
 	
 	| starCategoryName |
 	starCategoryName := '*', self name.
-	^(self classes collect: [ :each | each superclass ]) asSet
+	^ (self classes collect: [ :each | each superclass ]) asSet
 		remove: nil ifAbsent: [];
 		addAll: (Smalltalk current classes select: [ :each | each protocols includes: starCategoryName ]);
 		yourself
@@ -621,17 +621,17 @@ sortedClasses: classes
 	| children others nodes expandedClasses |
 	children := #().
 	others := #().
-	classes do: [:each |
+	classes do: [ :each |
 		(classes includes: each superclass)
-			ifFalse: [children add: each]
-			ifTrue: [others add: each]].
-	nodes := children collect: [:each |
-		ClassSorterNode on: each classes: others level: 0].
-	nodes := nodes sorted: [:a :b | a theClass name <= b theClass name ].
+			ifFalse: [ children add: each ]
+			ifTrue: [ others add: each ]].
+	nodes := children collect: [ :each |
+		ClassSorterNode on: each classes: others level: 0 ].
+	nodes := nodes sorted: [ :a :b | a theClass name <= b theClass name ].
 	expandedClasses := Array new.
-	nodes do: [:aNode |
-		aNode traverseClassesWith: expandedClasses].
-	^expandedClasses
+	nodes do: [ :aNode |
+		aNode traverseClassesWith: expandedClasses ].
+	^ expandedClasses
 ! !
 
 Object subclass: #PlatformInterface
@@ -666,19 +666,19 @@ setWorker: anObject
 !PlatformInterface class methodsFor: 'actions'!
 
 ajax: anObject
-	^worker
+	^ worker
 		ifNotNil: [ worker ajax: anObject ]
 		ifNil: [ self error: 'ajax: not available' ]
 !
 
 alert: aString
-	^worker
+	^ worker
 		ifNotNil: [ worker alert: aString ]
 		ifNil: [ self error: 'alert: not available' ]
 !
 
 confirm: aString
-	^worker
+	^ worker
 		ifNotNil: [ worker confirm: aString ]
 		ifNil: [ self error: 'confirm: not available' ]
 !
@@ -691,7 +691,7 @@ existsGlobal: aString
 !
 
 prompt: aString
-	^worker
+	^ worker
 		ifNotNil: [ worker prompt: aString ]
 		ifNil: [ self error: 'prompt: not available' ]
 ! !
@@ -705,7 +705,7 @@ initialize
 	
 	BrowserInterface ifNotNil: [
 		candidate := BrowserInterface new.
-		candidate isAvailable ifTrue: [ self setWorker: candidate. ^self ]
+		candidate isAvailable ifTrue: [ self setWorker: candidate. ^ self ]
 	]
 ! !
 
@@ -731,7 +731,7 @@ ProgressHandler class instanceVariableNames: 'current'!
 !ProgressHandler class methodsFor: 'accessing'!
 
 current
-	^current ifNil: [ current := self new ]
+	^ current ifNil: [ current := self new ]
 !
 
 setCurrent: anHandler
@@ -787,7 +787,7 @@ at: aString
 
 at: aKey ifAbsent: aBlock
 	^ (self includesKey: aKey)
-		ifTrue: [self at: aKey]
+		ifTrue: [ self at: aKey ]
 		ifFalse: aBlock
 !
 
@@ -803,8 +803,8 @@ parse: aString
 	| result |
 	
 	self 
-		try: [result := self basicParse: aString] 
-		catch: [:ex | (self parseError: ex parsing: aString) signal].
+		try: [ result := self basicParse: aString ] 
+		catch: [ :ex | (self parseError: ex parsing: aString) signal ].
 		
 	^ result
 		source: aString;
@@ -851,7 +851,7 @@ classes
 !
 
 removeClass: aClass
-	aClass isMetaclass ifTrue: [self error: aClass asString, ' is a Metaclass and cannot be removed!!'].
+	aClass isMetaclass ifTrue: [ self error: aClass asString, ' is a Metaclass and cannot be removed!!' ].
 	
 	self deleteClass: aClass.
 	
@@ -907,11 +907,11 @@ createPackage: packageName
 !
 
 packageAt: packageName
-	<return self.packages[packageName]>
+	<return self.packages[ packageName]>
 !
 
 packageAt: packageName ifAbsent: aBlock
-	^(self packageAt: packageName) ifNil: aBlock
+	^ (self packageAt: packageName) ifNil: aBlock
 !
 
 packages
@@ -930,9 +930,9 @@ removePackage: packageName
 	"Removes a package and all its classes."
 
 	| pkg |
-	pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].
-	pkg classes do: [:each |
-			self removeClass: each].
+	pkg := self packageAt: packageName ifAbsent: [ self error: 'Missing package: ', packageName ].
+	pkg classes do: [ :each |
+			self removeClass: each ].
 	self deletePackage: packageName
 !
 
@@ -940,8 +940,8 @@ renamePackage: packageName to: newName
 	"Rename a package."
 
 	| pkg |
-	pkg := self packageAt: packageName ifAbsent: [self error: 'Missing package: ', packageName].
-	(self packageAt: newName) ifNotNil: [self error: 'Already exists a package called: ', newName].
+	pkg := self packageAt: packageName ifAbsent: [ self error: 'Missing package: ', packageName ].
+	(self packageAt: newName) ifNotNil: [ self error: 'Already exists a package called: ', newName ].
 	(self at: 'packages') at: newName put: pkg.
 	pkg name: newName.
 	self deletePackage: packageName.
@@ -976,7 +976,7 @@ deletePackage: packageName
 	"Deletes a package by deleting its binding, but does not check if it contains classes etc.
 	To remove a package, use #removePackage instead."
 
-	<delete self.packages[packageName]>
+	<delete self.packages[ packageName]>
 ! !
 
 !Smalltalk methodsFor: 'testing'!
@@ -1005,6 +1005,6 @@ do: aBlock displayingProgress: aString
 
 asJavaScriptSelector
 	"Return first keyword of the selector, without trailing colon."
-	^self replace: '^([a-zA-Z0-9]*).*$' with: '$1'
+	^ self replace: '^([a-zA-Z0-9]*).*$' with: '$1'
 ! !
 

+ 18 - 18
st/Kernel-Methods.st

@@ -85,7 +85,7 @@ on: anErrorClass do: aBlock
 	"All exceptions thrown in the Smalltalk stack are cought.
 	Convert all JS exceptions to JavaScriptException instances."
 	
-	^self try: self catch: [ :error | | smalltalkError |
+	^ self try: self catch: [ :error | | smalltalkError |
 		smalltalkError := Smalltalk current asSmalltalkException: error.
 		(smalltalkError isKindOf: anErrorClass)
 		ifTrue: [ aBlock value: smalltalkError ]
@@ -219,7 +219,7 @@ arguments
 !
 
 category
-	^(self basicAt: 'category') ifNil: [ self defaultCategory ]
+	^ (self basicAt: 'category') ifNil: [ self defaultCategory ]
 !
 
 category: aString
@@ -241,7 +241,7 @@ category: aString
 !
 
 fn
-	^self basicAt: 'fn'
+	^ self basicAt: 'fn'
 !
 
 fn: aBlock
@@ -249,11 +249,11 @@ fn: aBlock
 !
 
 messageSends
-	^self basicAt: 'messageSends'
+	^ self basicAt: 'messageSends'
 !
 
 methodClass
-	^self basicAt: 'methodClass'
+	^ self basicAt: 'methodClass'
 !
 
 protocol
@@ -265,11 +265,11 @@ protocol: aString
 !
 
 referencedClasses
-	^self basicAt: 'referencedClasses'
+	^ self basicAt: 'referencedClasses'
 !
 
 selector
-	^self basicAt: 'selector'
+	^ self basicAt: 'selector'
 !
 
 selector: aString
@@ -277,7 +277,7 @@ selector: aString
 !
 
 source
-	^(self basicAt: 'source') ifNil: ['']
+	^ (self basicAt: 'source') ifNil: [ '' ]
 !
 
 source: aString
@@ -371,11 +371,11 @@ initialize
 makeWorker
 	| sentinel |
 	sentinel := Object new.
-	^[ | block |
+	^ [ | block |
 		poolSize := poolSize - 1.
 		block := queue nextIfAbsent: [ sentinel ].
 		block == sentinel ifFalse: [
-			[ block value ] ensure: [ self addWorker ]]]
+			[ block value ] ensure: [ self addWorker ] ]]
 ! !
 
 !ForkPool methodsFor: 'private'!
@@ -390,11 +390,11 @@ ForkPool class instanceVariableNames: 'default'!
 !ForkPool class methodsFor: 'accessing'!
 
 default
-	^default ifNil: [ default := self new ]
+	^ default ifNil: [ default := self new ]
 !
 
 defaultMaxPoolSize
-	^100
+	^ 100
 !
 
 resetDefault
@@ -418,7 +418,7 @@ Besides accessing methods, `#sendTo:` provides a convenient way to send a messag
 !Message methodsFor: 'accessing'!
 
 arguments
-	^arguments
+	^ arguments
 !
 
 arguments: anArray
@@ -426,7 +426,7 @@ arguments: anArray
 !
 
 selector
-	^selector
+	^ selector
 !
 
 selector: aString
@@ -452,7 +452,7 @@ printOn: aStream
 !Message class methodsFor: 'instance creation'!
 
 selector: aString arguments: anArray
-	^self new
+	^ self new
 		selector: aString;
 		arguments: anArray;
 		yourself
@@ -615,7 +615,7 @@ temps
 !MethodContext methodsFor: 'converting'!
 
 asString
-	^self isBlockContext
+	^ self isBlockContext
 		ifTrue: [ 'a block (in ', self methodContext asString, ')' ]
 		ifFalse: [ self receiver class name, ' >> ', self selector ]
 ! !
@@ -690,7 +690,7 @@ constructor: aString value:anObject value: anObject2 value:anObject3
 !NativeFunction class methodsFor: 'testing'!
 
 exists: aString
-	^PlatformInterface existsGlobal: aString
+	^ PlatformInterface existsGlobal: aString
 ! !
 
 Object subclass: #Timeout
@@ -728,6 +728,6 @@ clearTimeout
 !Timeout class methodsFor: 'instance creation'!
 
 on: anObject
-	^self new rawTimeout: anObject; yourself
+	^ self new rawTimeout: anObject; yourself
 ! !
 

+ 115 - 115
st/Kernel-Objects.st

@@ -84,51 +84,51 @@ value
 !
 
 yourself
-	^self
+	^ self
 ! !
 
 !Object methodsFor: 'comparing'!
 
 = anObject
-	^self == anObject
+	^ self == anObject
 !
 
 == anObject
-	^self identityHash = anObject identityHash
+	^ self identityHash = anObject identityHash
 !
 
 ~= anObject
-	^(self = anObject) = false
+	^ (self = anObject) = false
 !
 
 ~~ anObject
-	^(self == anObject) = false
+	^ (self == anObject) = false
 ! !
 
 !Object methodsFor: 'converting'!
 
 -> anObject
-	^Association key: self value: anObject
+	^ Association key: self value: anObject
 !
 
 asJSON
 	| variables |
 	variables := HashedCollection new.
-	self class allInstanceVariableNames do: [:each |
-		variables at: each put: (self instVarAt: each) asJSON].
-	^variables
+	self class allInstanceVariableNames do: [ :each |
+		variables at: each put: (self instVarAt: each) asJSON ].
+	^ variables
 !
 
 asJSONString
-	^JSON stringify: self asJSON
+	^ JSON stringify: self asJSON
 !
 
 asJavascript
-	^self asString
+	^ self asString
 !
 
 asString
-	^self printString
+	^ self printString
 !
 
 test
@@ -140,7 +140,7 @@ test
 !Object methodsFor: 'copying'!
 
 copy
-	^self shallowCopy postCopy
+	^ self shallowCopy postCopy
 !
 
 deepCopy
@@ -225,8 +225,8 @@ inspectOn: anInspector
 	| variables |
 	variables := Dictionary new.
 	variables at: '#self' put: self.
-	self class allInstanceVariableNames do: [:each |
-		variables at: each put: (self instVarAt: each)].
+	self class allInstanceVariableNames do: [ :each |
+		variables at: each put: (self instVarAt: each) ].
 	anInspector
 		setLabel: self printString;
 		setVariables: variables
@@ -235,7 +235,7 @@ inspectOn: anInspector
 !Object methodsFor: 'message handling'!
 
 basicPerform: aString
-	^self basicPerform: aString withArguments: #()
+	^ self basicPerform: aString withArguments: #()
 !
 
 basicPerform: aString withArguments: aCollection
@@ -243,7 +243,7 @@ basicPerform: aString withArguments: aCollection
 !
 
 perform: aString
-	^self perform: aString withArguments: #()
+	^ self perform: aString withArguments: #()
 !
 
 perform: aString withArguments: aCollection
@@ -277,22 +277,22 @@ putOn: aStream
 
 ifNil: aBlock
 	"inlined in the Compiler"
-	^self
+	^ self
 !
 
 ifNil: aBlock ifNotNil: anotherBlock
 	"inlined in the Compiler"
-	^anotherBlock value: self
+	^ anotherBlock value: self
 !
 
 ifNotNil: aBlock
 	"inlined in the Compiler"
-	^aBlock value: self
+	^ aBlock value: self
 !
 
 ifNotNil: aBlock ifNil: anotherBlock
 	"inlined in the Compiler"
-	^aBlock value: self
+	^ aBlock value: self
 !
 
 isBehavior
@@ -304,7 +304,7 @@ isBoolean
 !
 
 isClass
-	^false
+	^ false
 !
 
 isCompiledMethod
@@ -316,25 +316,25 @@ isImmutable
 !
 
 isKindOf: aClass
-	^(self isMemberOf: aClass)
-		ifTrue: [true]
-		ifFalse: [self class inheritsFrom: aClass]
+	^ (self isMemberOf: aClass)
+		ifTrue: [ true ]
+		ifFalse: [ self class inheritsFrom: aClass ]
 !
 
 isMemberOf: aClass
-	^self class = aClass
+	^ self class = aClass
 !
 
 isMetaclass
-	^false
+	^ false
 !
 
 isNil
-	^false
+	^ false
 !
 
 isNumber
-	^false
+	^ false
 !
 
 isPackage
@@ -342,23 +342,23 @@ isPackage
 !
 
 isParseFailure
-	^false
+	^ false
 !
 
 isString
-	^false
+	^ false
 !
 
 isSymbol
-	^false
+	^ false
 !
 
 notNil
-	^self isNil not
+	^ self isNil not
 !
 
 respondsTo: aSelector
-	^self class canUnderstand: aSelector
+	^ self class canUnderstand: aSelector
 ! !
 
 !Object class methodsFor: 'helios'!
@@ -402,7 +402,7 @@ I am directly mapped to JavaScript Boolean. The `true` and `false` objects are t
 !
 
 == aBoolean
-	^self = aBoolean
+	^ self = aBoolean
 ! !
 
 !Boolean methodsFor: 'controlling'!
@@ -418,24 +418,24 @@ I am directly mapped to JavaScript Boolean. The `true` and `false` objects are t
 !
 
 and: aBlock
-	^self = true
+	^ self = true
 		ifTrue: aBlock
-		ifFalse: [false]
+		ifFalse: [ false ]
 !
 
 ifFalse: aBlock
 	"inlined in the Compiler"
-	^self ifTrue: [] ifFalse: aBlock
+	^ self ifTrue: [] ifFalse: aBlock
 !
 
 ifFalse: aBlock ifTrue: anotherBlock
 	"inlined in the Compiler"
-	^self ifTrue: anotherBlock ifFalse: aBlock
+	^ self ifTrue: anotherBlock ifFalse: aBlock
 !
 
 ifTrue: aBlock
 	"inlined in the Compiler"
-	^self ifTrue: aBlock ifFalse: []
+	^ self ifTrue: aBlock ifFalse: []
 !
 
 ifTrue: aBlock ifFalse: anotherBlock
@@ -450,12 +450,12 @@ ifTrue: aBlock ifFalse: anotherBlock
 !
 
 not
-	^self = false
+	^ self = false
 !
 
 or: aBlock
-	^self = true
-		ifTrue: [true]
+	^ self = true
+		ifTrue: [ true ]
 		ifFalse: aBlock
 !
 
@@ -476,7 +476,7 @@ asBit
 !
 
 asJSON
-	^self
+	^ self
 !
 
 asString
@@ -486,11 +486,11 @@ asString
 !Boolean methodsFor: 'copying'!
 
 deepCopy
-	^self
+	^ self
 !
 
 shallowCopy
-	^self
+	^ self
 ! !
 
 !Boolean methodsFor: 'printing'!
@@ -529,7 +529,7 @@ The `converting` protocol provides convenience methods for various convertions (
 !Date methodsFor: 'accessing'!
 
 day
-	^self dayOfWeek
+	^ self dayOfWeek
 !
 
 day: aNumber
@@ -647,11 +647,11 @@ asLocaleString
 !
 
 asMilliseconds
-	^self time
+	^ self time
 !
 
 asNumber
-	^self asMilliseconds
+	^ self asMilliseconds
 !
 
 asString
@@ -677,23 +677,23 @@ heliosClass
 !Date class methodsFor: 'instance creation'!
 
 fromMilliseconds: aNumber
-	^self new: aNumber
+	^ self new: aNumber
 !
 
 fromSeconds: aNumber
-	^self fromMilliseconds: aNumber * 1000
+	^ self fromMilliseconds: aNumber * 1000
 !
 
 fromString: aString
 	"Example: Date fromString('2011/04/15 00:00:00')"
-	^self new: aString
+	^ self new: aString
 !
 
 millisecondsToRun: aBlock
 	| t |
 	t := Date now.
 	aBlock value.
-	^Date now - t
+	^ Date now - t
 !
 
 new: anObject
@@ -701,11 +701,11 @@ new: anObject
 !
 
 now
-	^self today
+	^ self today
 !
 
 today
-	^self new
+	^ self new
 ! !
 
 Object subclass: #Number
@@ -721,16 +721,16 @@ I provide all necessary methods for arithmetic operations, comparison, conversio
 
 My instances can also be used to evaluate a block a fixed number of times:
 
-	5 timesRepeat: [Transcript show: 'This will be printed 5 times'; cr].
+	5 timesRepeat: [ Transcript show: 'This will be printed 5 times'; cr ].
 	
-	1 to: 5 do: [:aNumber| Transcript show: aNumber asString; cr].
+	1 to: 5 do: [ :aNumber| Transcript show: aNumber asString; cr ].
 	
-	1 to: 10 by: 2 do: [:aNumber| Transcript show: aNumber asString; cr].!
+	1 to: 10 by: 2 do: [ :aNumber| Transcript show: aNumber asString; cr ].!
 
 !Number methodsFor: 'accessing'!
 
 identityHash
-	^self asString, 'n'
+	^ self asString, 'n'
 ! !
 
 !Number methodsFor: 'arithmetic'!
@@ -756,7 +756,7 @@ identityHash
 !
 
 // aNumber
-	^(self / aNumber) floor
+	^ (self / aNumber) floor
 !
 
 \\ aNumber
@@ -776,7 +776,7 @@ min: aNumber
 !
 
 negated
-	^0 - self
+	^ 0 - self
 ! !
 
 !Number methodsFor: 'comparing'!
@@ -817,15 +817,15 @@ negated
 !
 
 @ aNumber
-	^Point x: self y: aNumber
+	^ Point x: self y: aNumber
 !
 
 asJSON
-	^self
+	^ self
 !
 
 asJavascript
-	^'(', self printString, ')'
+	^ '(', self printString, ')'
 !
 
 asNumber
@@ -833,7 +833,7 @@ asNumber
 !
 
 asPoint
-	^Point x: self y: self
+	^ Point x: self y: self
 !
 
 asString
@@ -841,7 +841,7 @@ asString
 !
 
 atRandom
-	^(Random new next * self) truncated + 1
+	^ (Random new next * self) truncated + 1
 !
 
 ceiling
@@ -865,8 +865,8 @@ to: aNumber
 	(last - first) timesRepeat: [
 		array at: count put: first.
 		count := count + 1.
-		first := first + 1].
-	^array
+		first := first + 1 ].
+	^ array
 !
 
 to: stop by: step
@@ -874,17 +874,17 @@ to: stop by: step
 	value := self.
 	array := Array new.
 	pos := 1.
-	step = 0 ifTrue: [self error: 'step must be non-zero'].
+	step = 0 ifTrue: [ self error: 'step must be non-zero' ].
 	step < 0
-		ifTrue: [[ value >= stop ] whileTrue: [
+		ifTrue: [ [ value >= stop ] whileTrue: [
 					array at: pos put: value.
 					pos := pos + 1.
-					value := value + step]]
-		ifFalse: [[ value <= stop ] whileTrue: [
+					value := value + step ]]
+		ifFalse: [ [ value <= stop ] whileTrue: [
 					array at: pos put: value.
 				pos := pos + 1.
-					value := value + step]].
-	^array
+					value := value + step ]].
+	^ array
 !
 
 truncated
@@ -904,11 +904,11 @@ truncated
 !Number methodsFor: 'copying'!
 
 copy
-	^self
+	^ self
 !
 
 deepCopy
-	^self copy
+	^ self copy
 ! !
 
 !Number methodsFor: 'enumerating'!
@@ -916,38 +916,38 @@ deepCopy
 timesRepeat: aBlock
 	| count |
 	count := 1.
-	[count > self] whileFalse: [
+	[ count > self ] whileFalse: [
 		aBlock value.
-		count := count + 1]
+		count := count + 1 ]
 !
 
 to: stop by: step do: aBlock
 	| value |
 	value := self.
-	step = 0 ifTrue: [self error: 'step must be non-zero'].
+	step = 0 ifTrue: [ self error: 'step must be non-zero' ].
 	step < 0
-		ifTrue: [[ value >= stop ] whileTrue: [
+		ifTrue: [ [ value >= stop ] whileTrue: [
 					aBlock value: value.
-					value := value + step]]
-		ifFalse: [[ value <= stop ] whileTrue: [
+					value := value + step ]]
+		ifFalse: [ [ value <= stop ] whileTrue: [
 					aBlock value: value.
-					value := value + step]]
+					value := value + step ]]
 !
 
 to: stop do: aBlock
 	"Evaluate aBlock for each number from self to aNumber."
 	| nextValue |
 	nextValue := self.
-	[nextValue <= stop]
+	[ nextValue <= stop ]
 		whileTrue:
-			[aBlock value: nextValue.
-			nextValue := nextValue + 1]
+			[ aBlock value: nextValue.
+			nextValue := nextValue + 1 ]
 ! !
 
 !Number methodsFor: 'mathematical functions'!
 
 ** exponent
-	^self raisedTo: exponent
+	^ self raisedTo: exponent
 !
 
 arcCos
@@ -999,7 +999,7 @@ sqrt
 !
 
 squared
-	^self * self
+	^ self * self
 !
 
 tan
@@ -1027,11 +1027,11 @@ isImmutable
 !
 
 isNumber
-	^true
+	^ true
 !
 
 isZero
-	^self = 0
+	^ self = 0
 !
 
 negative
@@ -1093,7 +1093,7 @@ Points can then be arithmetically manipulated:
 !Point methodsFor: 'accessing'!
 
 x
-	^x
+	^ x
 !
 
 x: aNumber
@@ -1101,7 +1101,7 @@ x: aNumber
 !
 
 y
-	^y
+	^ y
 !
 
 y: aNumber
@@ -1111,30 +1111,30 @@ y: aNumber
 !Point methodsFor: 'arithmetic'!
 
 * aPoint
-	^Point x: self x * aPoint asPoint x y: self y * aPoint asPoint y
+	^ Point x: self x * aPoint asPoint x y: self y * aPoint asPoint y
 !
 
 + aPoint
-	^Point x: self x + aPoint asPoint x y: self y + aPoint asPoint y
+	^ Point x: self x + aPoint asPoint x y: self y + aPoint asPoint y
 !
 
 - aPoint
-	^Point x: self x - aPoint asPoint x y: self y - aPoint asPoint y
+	^ Point x: self x - aPoint asPoint x y: self y - aPoint asPoint y
 !
 
 / aPoint
-	^Point x: self x / aPoint asPoint x y: self y / aPoint asPoint y
+	^ Point x: self x / aPoint asPoint x y: self y / aPoint asPoint y
 !
 
 = aPoint
-	^aPoint class = self class and: [
-		(aPoint x = self x) & (aPoint y = self y)]
+	^ aPoint class = self class and: [
+		(aPoint x = self x) & (aPoint y = self y) ]
 ! !
 
 !Point methodsFor: 'converting'!
 
 asPoint
-	^self
+	^ self
 ! !
 
 !Point methodsFor: 'printing'!
@@ -1145,7 +1145,7 @@ printOn: aStream
 	x printOn: aStream.
 	
 	aStream nextPutAll: '@'.
-	(y notNil and: [y negative]) ifTrue: [
+	(y notNil and: [ y negative ]) ifTrue: [
 			"Avoid ambiguous @- construct"
 			aStream space ].
 	
@@ -1156,7 +1156,7 @@ printOn: aStream
 
 translateBy: delta
 	"Answer a Point translated by delta (an instance of Point)."
-	^(delta x + x) @ (delta y + y)
+	^ (delta x + x) @ (delta y + y)
 ! !
 
 !Point class methodsFor: 'helios'!
@@ -1168,7 +1168,7 @@ heliosClass
 !Point class methodsFor: 'instance creation'!
 
 x: aNumber y: anotherNumber
-	^self new
+	^ self new
 		x: aNumber;
 		y: anotherNumber;
 		yourself
@@ -1215,7 +1215,7 @@ next
 !
 
 next: anInteger
-	^(1 to: anInteger) collect: [:each | self next]
+	^ (1 to: anInteger) collect: [ :each | self next ]
 ! !
 
 Object subclass: #UndefinedObject
@@ -1231,34 +1231,34 @@ __note:__ When sending messages to the `undefined` JavaScript object, it will be
 !UndefinedObject methodsFor: 'class creation'!
 
 subclass: aString instanceVariableNames: anotherString
-	^self subclass: aString instanceVariableNames: anotherString package: nil
+	^ self subclass: aString instanceVariableNames: anotherString package: nil
 !
 
 subclass: aString instanceVariableNames: aString2 category: aString3
 	"Kept for compatibility."
 	self deprecatedAPI.
-	^self subclass: aString instanceVariableNames: aString2 package: aString3
+	^ self subclass: aString instanceVariableNames: aString2 package: aString3
 !
 
 subclass: aString instanceVariableNames: aString2 package: aString3
-	^ClassBuilder new
+	^ ClassBuilder new
 		superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3
 ! !
 
 !UndefinedObject methodsFor: 'converting'!
 
 asJSON
-	^null
+	^ null
 ! !
 
 !UndefinedObject methodsFor: 'copying'!
 
 deepCopy
-	^self
+	^ self
 !
 
 shallowCopy
-	^self
+	^ self
 ! !
 
 !UndefinedObject methodsFor: 'printing'!
@@ -1271,22 +1271,22 @@ printOn: aStream
 
 ifNil: aBlock
 	"inlined in the Compiler"
-	^self ifNil: aBlock ifNotNil: []
+	^ self ifNil: aBlock ifNotNil: []
 !
 
 ifNil: aBlock ifNotNil: anotherBlock
 	"inlined in the Compiler"
-	^aBlock value
+	^ aBlock value
 !
 
 ifNotNil: aBlock
 	"inlined in the Compiler"
-	^self
+	^ self
 !
 
 ifNotNil: aBlock ifNil: anotherBlock
 	"inlined in the Compiler"
-	^anotherBlock value
+	^ anotherBlock value
 !
 
 isImmutable
@@ -1294,11 +1294,11 @@ isImmutable
 !
 
 isNil
-	^true
+	^ true
 !
 
 notNil
-	^false
+	^ false
 ! !
 
 !UndefinedObject class methodsFor: 'instance creation'!

+ 125 - 125
st/Kernel-Tests.st

@@ -29,15 +29,15 @@ TestCase subclass: #BlockClosureTest
 !BlockClosureTest methodsFor: 'tests'!
 
 testCanClearInterval
-	self shouldnt: [([Error new signal] valueWithInterval: 0) clearInterval] raise: Error
+	self shouldnt: [ ([ Error new signal ] valueWithInterval: 0) clearInterval ] raise: Error
 !
 
 testCanClearTimeout
-	self shouldnt: [([Error new signal] valueWithTimeout: 0) clearTimeout] raise: Error
+	self shouldnt: [ ([ Error new signal ] valueWithTimeout: 0) clearTimeout ] raise: Error
 !
 
 testCompiledSource
-	self assert: ([1+1] compiledSource includesSubString: 'function')
+	self assert: ([ 1+1 ] compiledSource includesSubString: 'function')
 !
 
 testCurrySelf
@@ -50,11 +50,11 @@ testCurrySelf
 !
 
 testEnsure
-	self assert: ([3] ensure: [4]) equals: 3
+	self assert: ([ 3 ] ensure: [ 4 ]) equals: 3
 !
 
 testEnsureRaises
-	self should: [[Error new signal] ensure: [true]] raise: Error
+	self should: [ [Error new signal ] ensure: [ true ]] raise: Error
 !
 
 testExceptionSemantics
@@ -79,7 +79,7 @@ testNewWithValues
 	theTestConstructor.prototype = new theTestPrototype;
 
 	var theWrappedConstructor = _st(theTestConstructor);
-	var theResult = theWrappedConstructor._newWithValues_([1, 2, 3]);
+	var theResult = theWrappedConstructor._newWithValues_([1, 2, 3 ]);
 	self._assert_equals_(Object.getPrototypeOf(theResult).name, 'theTestPrototype');
 
 	"newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made."
@@ -90,48 +90,48 @@ testNewWithValues
 
 testNumArgs
 	self assert: [] numArgs equals: 0.
-	self assert: [:a :b | ] numArgs equals: 2
+	self assert: [ :a :b | ] numArgs equals: 2
 !
 
 testOnDo
-	self assert: ([Error new signal] on: Error do: [:ex | true])
+	self assert: ([ Error new signal ] on: Error do: [ :ex | true ])
 !
 
 testValue
-	self assert: ([1+1] value) equals: 2.
-	self assert: ([:x | x +1] value: 2) equals: 3.
-	self assert: ([:x :y | x*y] value: 2 value: 4) equals: 8.
+	self assert: ([ 1+1 ] value) equals: 2.
+	self assert: ([ :x | x +1 ] value: 2) equals: 3.
+	self assert: ([ :x :y | x*y ] value: 2 value: 4) equals: 8.
 
 	"Arguments are optional in Amber. This isn't ANSI compliant."
 
-	self assert: ([:a :b :c | 1] value) equals: 1
+	self assert: ([ :a :b :c | 1 ] value) equals: 1
 !
 
 testValueWithPossibleArguments
-	self assert: ([1] valueWithPossibleArguments: #(3 4)) equals: 1.
-	self assert: ([:a | a + 4] valueWithPossibleArguments: #(3 4)) equals: 7.
-	self assert: ([:a :b | a + b] valueWithPossibleArguments: #(3 4 5)) equals: 7.
+	self assert: ([ 1 ] valueWithPossibleArguments: #(3 4)) equals: 1.
+	self assert: ([ :a | a + 4 ] valueWithPossibleArguments: #(3 4)) equals: 7.
+	self assert: ([ :a :b | a + b ] valueWithPossibleArguments: #(3 4 5)) equals: 7.
 !
 
 testWhileFalse
 	| i |
 	i := 0.
-	[i > 5] whileFalse: [i := i + 1].
+	[ i > 5 ] whileFalse: [ i := i + 1 ].
 	self assert: i equals: 6.
 
 	i := 0.
-	[i := i + 1. i > 5] whileFalse.
+	[ i := i + 1. i > 5 ] whileFalse.
 	self assert: i equals: 6
 !
 
 testWhileTrue
 	| i |
 	i := 0.
-	[i < 5] whileTrue: [i := i + 1].
+	[ i < 5 ] whileTrue: [ i := i + 1 ].
 	self assert: i equals: 5.
 
 	i := 0.
-	[i := i + 1. i < 5] whileTrue.
+	[ i := i + 1. i < 5 ] whileTrue.
 	self assert: i equals: 5
 ! !
 
@@ -179,32 +179,32 @@ testIdentity
 
 testIfTrueIfFalse
 
-	self assert: (true ifTrue: ['alternative block']) equals: 'alternative block'.
-	self assert: (true ifFalse: ['alternative block']) equals: nil.
+	self assert: (true ifTrue: [ 'alternative block' ]) equals: 'alternative block'.
+	self assert: (true ifFalse: [ 'alternative block' ]) equals: nil.
 
-	self assert: (false ifTrue: ['alternative block']) equals: nil.
-	self assert: (false ifFalse: ['alternative block']) equals: 'alternative block'.
+	self assert: (false ifTrue: [ 'alternative block' ]) equals: nil.
+	self assert: (false ifFalse: [ 'alternative block' ]) equals: 'alternative block'.
 
-	self assert: (false ifTrue: ['alternative block'] ifFalse: ['alternative block2']) equals: 'alternative block2'.
-	self assert: (false ifFalse: ['alternative block'] ifTrue: ['alternative block2']) equals: 'alternative block'.
+	self assert: (false ifTrue: [ 'alternative block' ] ifFalse: [ 'alternative block2' ]) equals: 'alternative block2'.
+	self assert: (false ifFalse: [ 'alternative block' ] ifTrue: [ 'alternative block2' ]) equals: 'alternative block'.
 
-	self assert: (true ifTrue: ['alternative block'] ifFalse: ['alternative block2']) equals: 'alternative block'.
-	self assert: (true ifFalse: ['alternative block'] ifTrue: ['alternative block2']) equals: 'alternative block2'.
+	self assert: (true ifTrue: [ 'alternative block' ] ifFalse: [ 'alternative block2' ]) equals: 'alternative block'.
+	self assert: (true ifFalse: [ 'alternative block' ] ifTrue: [ 'alternative block2' ]) equals: 'alternative block2'.
 !
 
 testIfTrueIfFalseWithBoxing
 
-	self assert: (true yourself ifTrue: ['alternative block']) equals: 'alternative block'.
-	self assert: (true yourself ifFalse: ['alternative block']) equals: nil.
+	self assert: (true yourself ifTrue: [ 'alternative block' ]) equals: 'alternative block'.
+	self assert: (true yourself ifFalse: [ 'alternative block' ]) equals: nil.
 
-	self assert: (false yourself ifTrue: ['alternative block']) equals: nil.
-	self assert: (false yourself ifFalse: ['alternative block']) equals: 'alternative block'.
+	self assert: (false yourself ifTrue: [ 'alternative block' ]) equals: nil.
+	self assert: (false yourself ifFalse: [ 'alternative block' ]) equals: 'alternative block'.
 
-	self assert: (false yourself ifTrue: ['alternative block'] ifFalse: ['alternative block2']) equals: 'alternative block2'.
-	self assert: (false yourself ifFalse: ['alternative block'] ifTrue: ['alternative block2']) equals: 'alternative block'.
+	self assert: (false yourself ifTrue: [ 'alternative block' ] ifFalse: [ 'alternative block2' ]) equals: 'alternative block2'.
+	self assert: (false yourself ifFalse: [ 'alternative block' ] ifTrue: [ 'alternative block2' ]) equals: 'alternative block'.
 
-	self assert: (true yourself ifTrue: ['alternative block'] ifFalse: ['alternative block2']) equals: 'alternative block'.
-	self assert: (true yourself ifFalse: ['alternative block'] ifTrue: ['alternative block2']) equals: 'alternative block2'.
+	self assert: (true yourself ifTrue: [ 'alternative block' ] ifFalse: [ 'alternative block2' ]) equals: 'alternative block'.
+	self assert: (true yourself ifFalse: [ 'alternative block' ] ifTrue: [ 'alternative block2' ]) equals: 'alternative block2'.
 !
 
 testLogic
@@ -229,7 +229,7 @@ testLogic
 testLogicKeywords
 	"Trivial logic table"
 	self
-		assert: (true and: [ true]);
+		assert: (true and: [ true ]);
 		deny: (true and: [ false ]);
 		deny: (false and: [ true ]);
 		deny: (false and: [ false ]).
@@ -265,7 +265,7 @@ setUp
 !
 
 tearDown
-	theClass ifNotNil: [Smalltalk current removeClass: theClass. theClass := nil]
+	theClass ifNotNil: [ Smalltalk current removeClass: theClass. theClass := nil ]
 ! !
 
 !ClassBuilderTest methodsFor: 'tests'!
@@ -592,8 +592,8 @@ testAccessing
 
 	d at: 'hello' put: 'world'.
 	self assert: (d at: 'hello') equals: 'world'.
-	self assert: (d at: 'hello' ifAbsent: [nil]) equals: 'world'.
-	self deny: (d at: 'foo' ifAbsent: [nil]) = 'world'.
+	self assert: (d at: 'hello' ifAbsent: [ nil ]) equals: 'world'.
+	self deny: (d at: 'foo' ifAbsent: [ nil ]) = 'world'.
 
 	self assert: (d includesKey: 'hello').
 	self deny: (d includesKey: 'foo').
@@ -737,10 +737,10 @@ testRemoveKeyIfAbsent
 	self assert: (d removeKey: key) equals: 3.
 
 	key := 3.
-	self assert: (d removeKey: key ifAbsent: [42]) equals: 4.
+	self assert: (d removeKey: key ifAbsent: [ 42 ]) equals: 4.
 
 	key := 'why'.
-	self assert: (d removeKey: key ifAbsent: [42] ) equals: 42.
+	self assert: (d removeKey: key ifAbsent: [ 42 ] ) equals: 42.
 !
 
 testSize
@@ -822,10 +822,10 @@ testAtIfAbsent
 	array := #('hello' 'world').
 	self assert: (array at: 1) equals: 'hello'.
 	self assert: (array at: 2) equals: 'world'.
-	self assert: (array at: 2 ifAbsent: ['not found']) equals: 'world'.
-	self assert: (array at: 0 ifAbsent: ['not found']) equals: 'not found'.
-	self assert: (array at: -10 ifAbsent: ['not found']) equals: 'not found'.
-	self assert: (array at: 3 ifAbsent: ['not found']) equals: 'not found'.
+	self assert: (array at: 2 ifAbsent: [ 'not found' ]) equals: 'world'.
+	self assert: (array at: 0 ifAbsent: [ 'not found' ]) equals: 'not found'.
+	self assert: (array at: -10 ifAbsent: [ 'not found' ]) equals: 'not found'.
+	self assert: (array at: 3 ifAbsent: [ 'not found' ]) equals: 'not found'.
 !
 
 testFirstN
@@ -833,7 +833,7 @@ testFirstN
 !
 
 testIfEmpty
-	self assert: ( '' ifEmpty: ['zork'] ) equals: 'zork'
+	self assert: ( '' ifEmpty: [ 'zork' ] ) equals: 'zork'
 !
 
 testPrintString
@@ -909,7 +909,7 @@ SequenceableCollectionTest subclass: #StringTest
 !StringTest methodsFor: 'accessing'!
 
 collection
-	^'hello'
+	^ 'hello'
 !
 
 collectionWithDuplicates
@@ -919,8 +919,8 @@ collectionWithDuplicates
 !StringTest methodsFor: 'tests'!
 
 testAddRemove
-	self should: ['hello' add: 'a'] raise: Error.
-	self should: ['hello' remove: 'h'] raise: Error
+	self should: [ 'hello' add: 'a' ] raise: Error.
+	self should: [ 'hello' remove: 'h' ] raise: Error
 !
 
 testAsArray
@@ -952,12 +952,12 @@ testAsciiValue
 testAt
 	self assert: ('hello' at: 1) equals: 'h'.
 	self assert: ('hello' at: 5) equals: 'o'.
-	self assert: ('hello' at: 6 ifAbsent: [nil]) equals: nil
+	self assert: ('hello' at: 6 ifAbsent: [ nil ]) equals: nil
 !
 
 testAtPut
 	"String instances are read-only"
-	self should: ['hello' at: 1 put: 'a'] raise: Error
+	self should: [ 'hello' at: 1 put: 'a' ] raise: Error
 !
 
 testCapitalized
@@ -1131,10 +1131,10 @@ jsObject
 testAtIfAbsent
 	| testObject |
 	testObject := self jsObject.
-	self assert: (testObject at: 'abc' ifAbsent: ['Property does not exist']) equals: 'Property does not exist'.
-	self assert: (testObject at: 'e' ifAbsent: ['Property does not exist']) equals: nil.
-	self assert: (testObject at: 'a' ifAbsent: ['Property does not exist']) equals: 1.
-	self assert: (testObject at: 'f' ifAbsent: ['Property does not exist']) equals: nil.
+	self assert: (testObject at: 'abc' ifAbsent: [ 'Property does not exist' ]) equals: 'Property does not exist'.
+	self assert: (testObject at: 'e' ifAbsent: [ 'Property does not exist' ]) equals: nil.
+	self assert: (testObject at: 'a' ifAbsent: [ 'Property does not exist' ]) equals: 1.
+	self assert: (testObject at: 'f' ifAbsent: [ 'Property does not exist' ]) equals: nil.
 !
 
 testAtIfPresent
@@ -1143,22 +1143,22 @@ testAtIfPresent
 	testObject := self jsObject.
 	
 	self assert: (testObject at: 'abc' ifPresent: [ :x | 'hello ',x asString ]) equals: nil.
-	self assert: (testObject at: 'e' ifPresent: [:x | 'hello ',x asString ]) equals: 'hello nil'.
-	self assert: (testObject at: 'a' ifPresent: [:x | 'hello ',x asString ]) equals: 'hello 1'.
-	self assert: (testObject at: 'f' ifPresent: [:x | 'hello ',x asString ]) equals: 'hello nil'.
+	self assert: (testObject at: 'e' ifPresent: [ :x | 'hello ',x asString ]) equals: 'hello nil'.
+	self assert: (testObject at: 'a' ifPresent: [ :x | 'hello ',x asString ]) equals: 'hello 1'.
+	self assert: (testObject at: 'f' ifPresent: [ :x | 'hello ',x asString ]) equals: 'hello nil'.
 !
 
 testAtIfPresentIfAbsent
 	| testObject |
 	testObject := self jsObject.
-	self assert: (testObject at: 'abc' ifPresent: [:x|'hello ',x asString] ifAbsent: ['not present']) equals: 'not present'.
-	self assert: (testObject at: 'e' ifPresent: [:x|'hello ',x asString] ifAbsent: ['not present']) equals: 'hello nil'.
-	self assert: (testObject at: 'a' ifPresent: [:x|'hello ',x asString] ifAbsent: ['not present']) equals: 'hello 1'.
-	self assert: (testObject at: 'f' ifPresent: [:x|'hello ',x asString] ifAbsent: ['not present']) equals: 'hello nil'.
+	self assert: (testObject at: 'abc' ifPresent: [ :x|'hello ',x asString ] ifAbsent: [ 'not present' ]) equals: 'not present'.
+	self assert: (testObject at: 'e' ifPresent: [ :x|'hello ',x asString ] ifAbsent: [ 'not present' ]) equals: 'hello nil'.
+	self assert: (testObject at: 'a' ifPresent: [ :x|'hello ',x asString ] ifAbsent: [ 'not present' ]) equals: 'hello 1'.
+	self assert: (testObject at: 'f' ifPresent: [ :x|'hello ',x asString ] ifAbsent: [ 'not present' ]) equals: 'hello nil'.
 !
 
 testDNU
-	self should: [self jsObject foo] raise: MessageNotUnderstood
+	self should: [ self jsObject foo ] raise: MessageNotUnderstood
 !
 
 testMessageSend
@@ -1305,9 +1305,9 @@ setUp
 !
 
 tearDown
-	[ self deinstallTop ] on: Error do: [].
-	[ self deinstallMiddle ] on: Error do: [].
-	[ self deinstallBottom ] on: Error do: []
+	[ self deinstallTop ] on: Error do: [ ].
+	[ self deinstallMiddle ] on: Error do: [ ].
+	[ self deinstallBottom ] on: Error do: [ ]
 ! !
 
 !MethodInheritanceTest methodsFor: 'testing'!
@@ -1508,47 +1508,47 @@ testIdentity
 
 testInvalidHexNumbers
 
-	self should: [16rG] raise: MessageNotUnderstood.
-	self should: [16rg] raise: MessageNotUnderstood.
-	self should: [16rH] raise: MessageNotUnderstood.
-	self should: [16rh] raise: MessageNotUnderstood.
-	self should: [16rI] raise: MessageNotUnderstood.
-	self should: [16ri] raise: MessageNotUnderstood.
-	self should: [16rJ] raise: MessageNotUnderstood.
-	self should: [16rj] raise: MessageNotUnderstood.
-	self should: [16rK] raise: MessageNotUnderstood.
-	self should: [16rk] raise: MessageNotUnderstood.
-	self should: [16rL] raise: MessageNotUnderstood.
-	self should: [16rl] raise: MessageNotUnderstood.
-	self should: [16rM] raise: MessageNotUnderstood.
-	self should: [16rm] raise: MessageNotUnderstood.
-	self should: [16rN] raise: MessageNotUnderstood.
-	self should: [16rn] raise: MessageNotUnderstood.
-	self should: [16rO] raise: MessageNotUnderstood.
-	self should: [16ro] raise: MessageNotUnderstood.
-	self should: [16rP] raise: MessageNotUnderstood.
-	self should: [16rp] raise: MessageNotUnderstood.
-	self should: [16rQ] raise: MessageNotUnderstood.
-	self should: [16rq] raise: MessageNotUnderstood.
-	self should: [16rR] raise: MessageNotUnderstood.
-	self should: [16rr] raise: MessageNotUnderstood.
-	self should: [16rS] raise: MessageNotUnderstood.
-	self should: [16rs] raise: MessageNotUnderstood.
-	self should: [16rT] raise: MessageNotUnderstood.
-	self should: [16rt] raise: MessageNotUnderstood.
-	self should: [16rU] raise: MessageNotUnderstood.
-	self should: [16ru] raise: MessageNotUnderstood.
-	self should: [16rV] raise: MessageNotUnderstood.
-	self should: [16rv] raise: MessageNotUnderstood.
-	self should: [16rW] raise: MessageNotUnderstood.
-	self should: [16rw] raise: MessageNotUnderstood.
-	self should: [16rX] raise: MessageNotUnderstood.
-	self should: [16rx] raise: MessageNotUnderstood.
-	self should: [16rY] raise: MessageNotUnderstood.
-	self should: [16ry] raise: MessageNotUnderstood.
-	self should: [16rZ] raise: MessageNotUnderstood.
-	self should: [16rz] raise: MessageNotUnderstood.
-	self should: [16rABcdEfZ] raise: MessageNotUnderstood.
+	self should: [ 16rG ] raise: MessageNotUnderstood.
+	self should: [ 16rg ] raise: MessageNotUnderstood.
+	self should: [ 16rH ] raise: MessageNotUnderstood.
+	self should: [ 16rh ] raise: MessageNotUnderstood.
+	self should: [ 16rI ] raise: MessageNotUnderstood.
+	self should: [ 16ri ] raise: MessageNotUnderstood.
+	self should: [ 16rJ ] raise: MessageNotUnderstood.
+	self should: [ 16rj ] raise: MessageNotUnderstood.
+	self should: [ 16rK ] raise: MessageNotUnderstood.
+	self should: [ 16rk ] raise: MessageNotUnderstood.
+	self should: [ 16rL ] raise: MessageNotUnderstood.
+	self should: [ 16rl ] raise: MessageNotUnderstood.
+	self should: [ 16rM ] raise: MessageNotUnderstood.
+	self should: [ 16rm ] raise: MessageNotUnderstood.
+	self should: [ 16rN ] raise: MessageNotUnderstood.
+	self should: [ 16rn ] raise: MessageNotUnderstood.
+	self should: [ 16rO ] raise: MessageNotUnderstood.
+	self should: [ 16ro ] raise: MessageNotUnderstood.
+	self should: [ 16rP ] raise: MessageNotUnderstood.
+	self should: [ 16rp ] raise: MessageNotUnderstood.
+	self should: [ 16rQ ] raise: MessageNotUnderstood.
+	self should: [ 16rq ] raise: MessageNotUnderstood.
+	self should: [ 16rR ] raise: MessageNotUnderstood.
+	self should: [ 16rr ] raise: MessageNotUnderstood.
+	self should: [ 16rS ] raise: MessageNotUnderstood.
+	self should: [ 16rs ] raise: MessageNotUnderstood.
+	self should: [ 16rT ] raise: MessageNotUnderstood.
+	self should: [ 16rt ] raise: MessageNotUnderstood.
+	self should: [ 16rU ] raise: MessageNotUnderstood.
+	self should: [ 16ru ] raise: MessageNotUnderstood.
+	self should: [ 16rV ] raise: MessageNotUnderstood.
+	self should: [ 16rv ] raise: MessageNotUnderstood.
+	self should: [ 16rW ] raise: MessageNotUnderstood.
+	self should: [ 16rw ] raise: MessageNotUnderstood.
+	self should: [ 16rX ] raise: MessageNotUnderstood.
+	self should: [ 16rx ] raise: MessageNotUnderstood.
+	self should: [ 16rY ] raise: MessageNotUnderstood.
+	self should: [ 16ry ] raise: MessageNotUnderstood.
+	self should: [ 16rZ ] raise: MessageNotUnderstood.
+	self should: [ 16rz ] raise: MessageNotUnderstood.
+	self should: [ 16rABcdEfZ ] raise: MessageNotUnderstood.
 !
 
 testLog
@@ -1621,10 +1621,10 @@ testTimesRepeat
 	| i |
 
 	i := 0.
-	0 timesRepeat: [i := i + 1].
+	0 timesRepeat: [ i := i + 1 ].
 	self assert: i equals: 0.
 
-	5 timesRepeat: [i := i + 1].
+	5 timesRepeat: [ i := i + 1 ].
 	self assert: i equals: 5
 !
 
@@ -1635,7 +1635,7 @@ testTo
 testToBy
 	self assert: (0 to: 6 by: 2) equals: #(0 2 4 6).
 
-	self should: [1 to: 4 by: 0] raise: Error
+	self should: [ 1 to: 4 by: 0 ] raise: Error
 !
 
 testTrigonometry
@@ -1663,7 +1663,7 @@ ObjectMock is there only to perform tests on classes.!
 !ObjectMock methodsFor: 'not yet classified'!
 
 foo
-	^foo
+	^ foo
 !
 
 foo: anObject
@@ -1691,15 +1691,15 @@ testBasicAccess
 testBasicPerform
 	| o |
 	o := Object new.
-	o basicAt: 'func' put: ['hello'].
-	o basicAt: 'func2' put: [:a | a + 1].
+	o basicAt: 'func' put: [ 'hello' ].
+	o basicAt: 'func2' put: [ :a | a + 1 ].
 
 	self assert: (o basicPerform: 'func') equals: 'hello'.
 	self assert: (o basicPerform: 'func2' withArguments: #(3)) equals: 4
 !
 
 testDNU
-	self should: [Object new foo] raise: MessageNotUnderstood
+	self should: [ Object new foo ] raise: MessageNotUnderstood
 !
 
 testEquality
@@ -1712,7 +1712,7 @@ testEquality
 !
 
 testHalt
-	self should: [Object new halt] raise: Error
+	self should: [ Object new halt ] raise: Error
 !
 
 testIdentity
@@ -1726,11 +1726,11 @@ testIdentity
 
 testIfNil
 	self deny: Object new isNil.
-	self deny: (Object new ifNil: [true]) = true.
-	self assert: (Object new ifNotNil: [true]) equals: true.
+	self deny: (Object new ifNil: [ true ]) = true.
+	self assert: (Object new ifNotNil: [ true ]) equals: true.
 
-	self assert: (Object new ifNil: [false] ifNotNil: [true]) equals: true.
-	self assert: (Object new ifNotNil: [true] ifNil: [false]) equals: true
+	self assert: (Object new ifNil: [ false ] ifNotNil: [ true ]) equals: true.
+	self assert: (Object new ifNotNil: [ true ] ifNil: [ false ]) equals: true
 !
 
 testInstVars
@@ -1869,7 +1869,7 @@ textNext
 			self assert: (next >= 0).
 			self assert: (next < 1).
 			self deny: current = next.
-			next = current]
+			next = current ]
 ! !
 
 TestCase subclass: #SetTest
@@ -1895,7 +1895,7 @@ testAddRemove
 !
 
 testAt
-	self should: [Set new at: 1 put: 2] raise: Error
+	self should: [ Set new at: 1 put: 2 ] raise: Error
 !
 
 testCollect
@@ -2126,10 +2126,10 @@ testDeepCopy
 !
 
 testIfNil
-	self assert: (nil ifNil: [true]) equals: true.
-	self deny: (nil ifNotNil: [true]) = true.
-	self assert: (nil ifNil: [true] ifNotNil: [false]) equals: true.
-	self deny: (nil ifNotNil: [true] ifNil: [false]) = true
+	self assert: (nil ifNil: [ true ]) equals: true.
+	self deny: (nil ifNotNil: [ true ]) = true.
+	self assert: (nil ifNil: [ true ] ifNotNil: [ false ]) equals: true.
+	self deny: (nil ifNotNil: [ true ] ifNil: [ false ]) = true
 !
 
 testIsNil

+ 1 - 1
st/Kernel-Transcript.st

@@ -53,7 +53,7 @@ Transcript class instanceVariableNames: 'current'!
 !Transcript class methodsFor: 'instance creation'!
 
 current
-	^current
+	^ current
 !
 
 new

+ 8 - 8
st/SUnit-Tests.st

@@ -28,10 +28,10 @@ testGrow
 
 testIllegal
 	self
-		should: [empty at: 5]
+		should: [ empty at: 5 ]
 		raise: Error.
 	self
-		should: [empty at: 5 put: #abc]
+		should: [ empty at: 5 put: #abc ]
 		raise: Error
 !
 
@@ -79,7 +79,7 @@ fakeFailure
 
 fakeMultipleTimeoutFailing
 	self timeout: 100.
-	(self async: [
+	(self async: [ 
 		self timeout: 20.
 		(self async: [ self finished ]) valueWithTimeout: 30
 	]) valueWithTimeout: 20
@@ -101,7 +101,7 @@ fakeTimeout
 !SUnitAsyncTest methodsFor: 'private'!
 
 selectorSetOf: aCollection
-	^(aCollection collect: [:each | each selector]) asSet
+	^ (aCollection collect: [ :each | each selector ]) asSet
 ! !
 
 !SUnitAsyncTest methodsFor: 'running'!
@@ -127,8 +127,8 @@ testAsyncErrorsAndFailures
 		self assert: (self selectorSetOf: result failures) equals: #('fakeErrorFailingInTearDown' 'fakeFailure') asSet.
 		self finished
 	].
-	runner announcer on: ResultAnnouncement do: [:ann |
-		ann result == result ifTrue: [ result runs = result total ifTrue: assertBlock ]].
+	runner announcer on: ResultAnnouncement do: [ :ann |
+		ann result == result ifTrue: [ result runs = result total ifTrue: assertBlock ] ].
 	runner run
 !
 
@@ -170,8 +170,8 @@ testTimeouts
 		self assert: (self selectorSetOf: result failures) equals: #('fakeMultipleTimeoutFailing' 'fakeTimeout') asSet.
 		self finished
 	].
-	runner announcer on: ResultAnnouncement do: [:ann |
-		ann result == result ifTrue: [ result runs = result total ifTrue: assertBlock ]].
+	runner announcer on: ResultAnnouncement do: [ :ann |
+		ann result == result ifTrue: [ result runs = result total ifTrue: assertBlock ] ].
 	runner run
 !
 

+ 38 - 39
st/SUnit.st

@@ -10,7 +10,7 @@ My instances hold the result (instance of `TestResult`) of the test run.!
 !ResultAnnouncement methodsFor: 'accessing'!
 
 result
-	^result
+	^ result
 !
 
 result: aTestResult
@@ -40,7 +40,7 @@ context: aRunningTestContext
 !
 
 selector
-	^testSelector
+	^ testSelector
 !
 
 setTestSelector: aSelector
@@ -115,7 +115,7 @@ assert: aBoolean
 !
 
 assert: aBoolean description: aString
-	aBoolean ifFalse: [self signalFailure: aString]
+	aBoolean ifFalse: [ self signalFailure: aString ]
 !
 
 assert: actual equals: expected
@@ -127,7 +127,7 @@ deny: aBoolean
 !
 
 isAsync
-	^asyncTimeout notNil
+	^ asyncTimeout notNil
 !
 
 should: aBlock
@@ -135,15 +135,15 @@ should: aBlock
 !
 
 should: aBlock raise: anExceptionClass
-	self assert: ([aBlock value. false]
+	self assert: ([ aBlock value. false ]
 		on: anExceptionClass
-		do: [:ex | true])
+		do: [ :ex | true ])
 !
 
 shouldnt: aBlock raise: anExceptionClass
-	self assert: ([aBlock value. true]
+	self assert: ([ aBlock value. true ]
 		on: anExceptionClass
-		do: [:ex | false])
+		do: [ :ex | false ])
 ! !
 
 !TestCase class methodsFor: 'accessing'!
@@ -152,26 +152,26 @@ allTestSelectors
 	| selectors |
 	selectors := self testSelectors.
 	self shouldInheritSelectors ifTrue: [
-		selectors addAll: self superclass allTestSelectors].
-	^selectors
+		selectors addAll: self superclass allTestSelectors ].
+	^ selectors
 !
 
 buildSuite
-	^self allTestSelectors collect: [:each | self selector: each]
+	^ self allTestSelectors collect: [ :each | self selector: each ]
 !
 
 lookupHierarchyRoot
-	^TestCase
+	^ TestCase
 !
 
 selector: aSelector
-	^self new
+	^ self new
 		setTestSelector: aSelector;
 		yourself
 !
 
 testSelectors
-	^self methodDictionary keys select: [:each | each match: '^test']
+	^ self methodDictionary keys select: [ :each | each match: '^test' ]
 ! !
 
 !TestCase class methodsFor: 'helios'!
@@ -187,7 +187,7 @@ isAbstract
 !
 
 shouldInheritSelectors
-	^self ~= self lookupHierarchyRoot
+	^ self ~= self lookupHierarchyRoot
 ! !
 
 Object subclass: #TestContext
@@ -233,7 +233,7 @@ start
 !TestContext class methodsFor: 'instance creation'!
 
 testCase: aTestCase
-	^self new
+	^ self new
 		testCase: aTestCase;
 		yourself
 ! !
@@ -282,7 +282,7 @@ execute: aBlock
 !ReportingTestContext class methodsFor: 'instance creation'!
 
 testCase: aTestCase result: aTestResult finished: aBlock
-	^(super testCase: aTestCase)
+	^ (super testCase: aTestCase)
 		result: aTestResult;
 		finished: aBlock;
 		yourself
@@ -319,11 +319,11 @@ addFailure: aFailure
 !
 
 errors
-	^errors
+	^ errors
 !
 
 failures
-	^failures
+	^ failures
 !
 
 increaseRuns
@@ -331,24 +331,24 @@ increaseRuns
 !
 
 runs
-	^runs
+	^ runs
 !
 
 status
-	^self errors isEmpty
+	^ self errors isEmpty
 		ifTrue: [
 			self failures isEmpty
-				ifTrue: ['success']
-				ifFalse: ['failure']]
-		ifFalse: ['error']
+				ifTrue: [ 'success' ]
+				ifFalse: [ 'failure' ]]
+		ifFalse: [ 'error' ]
 !
 
 timestamp
-	^timestamp
+	^ timestamp
 !
 
 total
-	^total
+	^ total
 !
 
 total: aNumber
@@ -369,17 +369,16 @@ initialize
 !TestResult methodsFor: 'running'!
 
 nextRunDo: aBlock
-"Runs aBlock with index of next run
-or does nothing if no more runs"
-^self runs == self total
-	ifFalse: [ aBlock value: self runs + 1 ]
+	"Runs aBlock with index of next run or does nothing if no more runs"
+	^ self runs == self total
+		ifFalse: [ aBlock value: self runs + 1 ]
 !
 
 runCase: aTestCase
-	[[ self increaseRuns.
-		aTestCase runCase]
-	on: TestFailure do: [:ex | self addFailure: aTestCase]]
-	on: Error do: [:ex | self addError: aTestCase]
+	[ [ self increaseRuns.
+		aTestCase runCase ]
+	on: TestFailure do: [ :ex | self addFailure: aTestCase ]]
+	on: Error do: [ :ex | self addError: aTestCase ]
 ! !
 
 Object subclass: #TestSuiteRunner
@@ -396,11 +395,11 @@ To run the test suite, use `#run`.!
 !TestSuiteRunner methodsFor: 'accessing'!
 
 announcer
-	^announcer
+	^ announcer
 !
 
 result
-	^result
+	^ result
 !
 
 suite: aCollection
@@ -425,13 +424,13 @@ initialize
 	super initialize.
 	announcer := Announcer new.
 	result := TestResult new.
-	runNextTest := [ | runs | runs := result runs. runs < result total ifTrue: [ (self contextOf: runs + 1) start ]].
+	runNextTest := [ | runs | runs := result runs. runs < result total ifTrue: [ (self contextOf: runs + 1) start ] ].
 ! !
 
 !TestSuiteRunner methodsFor: 'private'!
 
 contextOf: anInteger
-	^ReportingTestContext testCase: (suite at: anInteger) result: result finished: [ self resume ]
+	^ ReportingTestContext testCase: (suite at: anInteger) result: result finished: [ self resume ]
 ! !
 
 !TestSuiteRunner class methodsFor: 'instance creation'!
@@ -441,6 +440,6 @@ new
 !
 
 on: aCollection
-	^super new suite: aCollection
+	^ super new suite: aCollection
 ! !
 

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác