Browse Source

Merge branch 'master' of github.com:amber-smalltalk/amber

Srikumar K. S 11 years ago
parent
commit
8bbe61520e
83 changed files with 3406 additions and 4043 deletions
  1. 1 2
      API-CHANGES.txt
  2. 7 5
      CHANGELOG
  3. 1 1
      Gruntfile.js
  4. 1 1
      bin/amber
  5. 1 1
      bin/amber.bat
  6. 2 188
      bin/amberc
  7. 1 1
      bin/amberc.bat
  8. 1 1
      bower.json
  9. 0 0
      cli/support/amber-cli.js
  10. 188 0
      cli/support/amberc-cli.js
  11. 0 0
      cli/support/amberc.js
  12. 18 11
      cli/support/release-worker.sh
  13. 9 0
      cli/support/release.sh
  14. 1 1
      cli/support/setversion.sh
  15. 1 1
      grunt/tasks/grunt-amberc.js
  16. 6 14
      js/Benchfib.js
  17. 112 113
      js/Canvas.js
  18. 83 95
      js/Compiler-AST.js
  19. 32 36
      js/Compiler-Core.js
  20. 4 6
      js/Compiler-Exceptions.js
  21. 109 162
      js/Compiler-IR.js
  22. 97 145
      js/Compiler-Inlining.js
  23. 70 83
      js/Compiler-Interpreter.js
  24. 43 69
      js/Compiler-Semantic.js
  25. 54 71
      js/Compiler-Tests.js
  26. 3 3
      js/Examples.js
  27. 90 123
      js/Helios-Browser.js
  28. 4 9
      js/Helios-Commands-Browser.js
  29. 4 6
      js/Helios-Commands-Core.js
  30. 4 7
      js/Helios-Commands-Tools.js
  31. 179 311
      js/Helios-Core.js
  32. 66 28
      js/Helios-Debugger.js
  33. 10 12
      js/Helios-Inspector.js
  34. 28 43
      js/Helios-KeyBindings.js
  35. 16 30
      js/Helios-Layout.js
  36. 9 13
      js/Helios-References.js
  37. 2 3
      js/Helios-Workspace-Tests.js
  38. 71 113
      js/Helios-Workspace.js
  39. 139 178
      js/IDE.js
  40. 88 122
      js/Importer-Exporter.js
  41. 3 6
      js/Kernel-Announcements.js
  42. 103 135
      js/Kernel-Classes.js
  43. 130 146
      js/Kernel-Collections.js
  44. 18 22
      js/Kernel-Exceptions.js
  45. 66 88
      js/Kernel-Infrastructure.js
  46. 26 35
      js/Kernel-Methods.js
  47. 122 142
      js/Kernel-Objects.js
  48. 150 217
      js/Kernel-Tests.js
  49. 1 1
      js/Kernel-Transcript.js
  50. 34 46
      js/SUnit-Tests.js
  51. 31 34
      js/SUnit.js
  52. 8 15
      js/Spaces.js
  53. 3 3
      package.json
  54. 129 154
      st/Canvas.st
  55. 41 36
      st/Compiler-AST.st
  56. 26 26
      st/Compiler-Core.st
  57. 17 17
      st/Compiler-IR.st
  58. 10 6
      st/Compiler-Interpreter.st
  59. 1 1
      st/Compiler-Semantic.st
  60. 15 0
      st/Compiler-Tests.st
  61. 4 4
      st/Examples.st
  62. 4 5
      st/Helios-Browser.st
  63. 16 37
      st/Helios-Core.st
  64. 16 1
      st/Helios-Debugger.st
  65. 5 5
      st/Helios-Inspector.st
  66. 1 1
      st/Helios-KeyBindings.st
  67. 2 2
      st/Helios-References.st
  68. 11 11
      st/Helios-Workspace.st
  69. 214 214
      st/IDE.st
  70. 40 40
      st/Importer-Exporter.st
  71. 1 1
      st/Kernel-Announcements.st
  72. 45 45
      st/Kernel-Classes.st
  73. 172 172
      st/Kernel-Collections.st
  74. 10 10
      st/Kernel-Exceptions.st
  75. 37 37
      st/Kernel-Infrastructure.st
  76. 18 18
      st/Kernel-Methods.st
  77. 115 115
      st/Kernel-Objects.st
  78. 125 125
      st/Kernel-Tests.st
  79. 1 1
      st/Kernel-Transcript.st
  80. 8 8
      st/SUnit-Tests.st
  81. 38 39
      st/SUnit.st
  82. 29 13
      support/amber.js
  83. 5 1
      support/boot.js

+ 1 - 2
API-CHANGES.txt

@@ -22,9 +22,8 @@
   + >>shouldBeAliased
 + CompiledMethod>>sendTo:arguments:
 + Array
-  + >>adFirst:
+  + >>addFirst:
   + >>removeLast
-+ ValueNode>>xxxDoIt
 + Number
   + >>ceiling
   + >>floor

+ 7 - 5
CHANGELOG

@@ -5,7 +5,7 @@ After 3 months of work we are pleased to announce the 0.12.0 release of Amber.
 
 Besides the usual bug fixes a lot of new features have emerged.
 
-The biggest change is the switch to using RequireJS to specifying Amber package dependencies
+The biggest change is the switch to RequireJS to specify Amber package dependencies
 and for loading the packages as AMD modules.
 Amber is now additionally available as Bower [2] component.
 Bower is also used to manage required JavaScript libraries which don't have to be kept
@@ -25,7 +25,7 @@ On the Smalltalk side support has been added for writing exponential numbers of
 Helios (the new IDE) is progressing nicely and has seen a lot of improvements.
 One of the great parts is the new stepping debugger which is also making progress.
 To try Helios, open the helios.html page or
-evaluate in any other amber page `amber.loadHelios()`.
+evaluate in any other amber page `require('amber/helpers').popupHelios()`.
 
 The last enhancements target the commandline compiler which can be used as
 `amberc` (an executable script) or as a Grunt task.
@@ -44,11 +44,13 @@ as the `verbose` option which can be specified in the Gruntfile.
 
 Some numbers about this release (starting from 0.11.0):
 
-*  commits
-* 9 committers
+* 660 commits
+* 10 committers
 * 66 unit tests added
+* 152 issues were closed
 * 379 unit tests in total
 
+
 Commits: https://github.com/amber-smalltalk/amber/compare/0.11.0...0.12.0
 Issues: https://github.com/amber-smalltalk/amber/issues?direction=desc&milestone=8&page=1&sort=updated&state=closed
 
@@ -87,7 +89,7 @@ In windows, use `\` as path separator, the rest is identical.
 The `-l SUnit,Canvas` is just a general guess, if your code depends on more (or less) non-kernel packages from amber, list them here accordingly.
 
 This migrate scenario only covers simple deployments with your project's code and amber.
-If your project is more compilicated, using libraries and packages from multiple sources,
+If your project is more complicated, using libraries and packages from multiple sources,
 it is hard to give general advices to migrate - you must do it library by library,
 giving each location its own namespace, and `-L` option of `amberc`
 comes handy when integrating; ask on the mailing list if problems arise.

+ 1 - 1
Gruntfile.js

@@ -85,7 +85,7 @@ module.exports = function(grunt) {
             'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser'
         ],
         main_class: 'AmberCli',
-        output_name: '../../bin/amber-cli',
+        output_name: '../support/amber-cli',
         amd_namespace: 'amber_cli'
       }
     },

+ 1 - 1
bin/amber

@@ -1,2 +1,2 @@
 #!/bin/bash
-node `dirname $0`/amber-cli.js $@
+node `dirname $0`/../cli/support/amber-cli.js $@

+ 1 - 1
bin/amber.bat

@@ -1 +1 @@
-@node "%~dp0\amber-cli.js" %*
+@node "%~dp0\..\cli\support\amber-cli.js" %*

+ 2 - 188
bin/amberc

@@ -1,188 +1,2 @@
-#!/usr/bin/env node
-
-var path = require('path');
-var amberc = require('./amberc.js');
-
-// get parameters passed to the command line script
-// discard the first two parameters which are the node binary and the script name
-var parameters = process.argv.slice(2);
-
-// check if at least one parameter was passed to the script
-if (1 > parameters.length) {
-	print_usage();
-	process.exit();
-}
-
-
-// Get Amber root directory from the location of this script so that
-// we can find the st and js directories etc.
-var amber_dir = path.normalize(path.join(path.dirname(process.argv[1]), '..'));
-
-var compiler = new amberc.Compiler(amber_dir);
-
-var configuration = handle_options(parameters);
-
-compiler.main(configuration);
-
-
-/**
- * Process given program options and update defaults values.
- * Followed by check_for_closure_compiler() and then collect_files().
- */
-function handle_options(optionsArray) {
-	var programName = [];
-	var currentItem = optionsArray.shift();
-	var defaults = amberc.createDefaults();
-
-	while(undefined !== currentItem) {
-		switch(currentItem) {
-			case '-l':
-				defaults.load.push.apply(defaults.load, optionsArray.shift().split(','));
-				break;
-			case '-L':
-				defaults.jsLibraryDirs.push.apply(defaults.jsLibraryDirs, optionsArray.shift().split(','));
-				break;
-			case '-g':
-				defaults.jsGlobals.push.apply(defaults.jsGlobals, optionsArray.shift().split(','));
-				break;
-			case '-m':
-				defaults.main = optionsArray.shift();
-				break;
-			case '-M':
-				defaults.mainfile = optionsArray.shift();
-				break;
-			case '-n':
-				defaults.amd_namespace = optionsArray.shift();
-				break;
-			case '-D':
-				defaults.output_dir = optionsArray.shift();
-				break;
-			case '-s':
-				defaults.suffix = optionsArray.shift();
-				defaults.suffix_used = defaults.suffix;
-				break;
-			case '-S':
-				defaults.loadsuffix = optionsArray.shift();
-				defaults.suffix_used = defaults.suffix;
-				break;
-			case '-v':
-				defaults.verbose = true;
-				break;
-			case '-h':
-			case '--help':
-			case '?':
-				print_usage();
-				break;
-			default:
-				var fileSuffix = path.extname(currentItem);
-				switch (fileSuffix) {
-					case '.st':
-						defaults.stFiles.push(currentItem);
-						break;
-					case '.js':
-						defaults.jsFiles.push(currentItem);
-						break;
-					default:
-						// Will end up being the last non js/st argument
-						programName.push(currentItem);
-						break;
-				};
-		};
-		currentItem = optionsArray.shift();
-	}
-
-	if(1 < programName.length) {
-		throw new Error('More than one name for ProgramName given: ' + programName);
-	} else {
-		defaults.program = programName[0];
-	}
-	return defaults;
-};
-
-
-// print available flags
-function print_usage() {
-	var usage = [
-		'Usage: amberc [-l lib1,lib2...] [-g jsGlobal1,jsGlobla2] [-m main_class] [-M main_file]',
-		'          [-n namespace] [-D output_dir] [-v] [-s suffix] [-S suffix] [file1 [file2 ...]] [Program]',
-		'',
-		'   amberc compiles Amber files - either separately or into a complete runnable',
-		'   program. If no .st files are listed only a linking stage is performed.',
-		'   Files listed will be handled using the following rules:',
-		'',
-		'   *.js',
-		'     Files are linked (concatenated) in listed order.',
-		'     If not found we look in $AMBER/js/',
-		'',
-		'   *.st',
-		'     Files are compiled into .js files before concatenation.',
-		'     If not found we look in $AMBER/st/.',
-		'',
-		'     NOTE: Each .st file is currently considered to be a fileout of a single class',
-		'     category of the same name as the file!',
-		'',
-		'   If no <Program> is specified each given .st file will be compiled into',
-		'   a matching .js file. Otherwise a <Program>.js file is linked together based on',
-		'   the given options:',
-		'',
-		'  -l library1,library2',
-		'     Add listed JavaScript libraries in listed order.',
-		'     Libraries are not separated by spaces or end with .js.',
-		'',
-		'  -L directory1,directory2',
-		'     Add listed directories to the library search path.',
-		'     The order of processing is:',
-		'     1. current directory',
-		'     2. directories specified by -L',
-		'     3. $AMBER',
-		'',
-		'  -g jsGlobal1,jsGlobal2',
-		'     Comma separated list of JS global variable names.',
-		'     The names are added to a list containing "window", "document" and others.',
-		'',
-		'  -m main_class',
-		'     Add a call to the class method main_class>>main at the end of <Program>.',
-		'',
-		'  -M main_file',
-		'     Add <main_file> at the end of <Program.js> acting as #main.',
-		'',
-		'  -n amd_namespace',
-		'     Export packages with <amd_namespace> as the require.js namespace.',
-		'     Default value is "amber_core".',
-		'',
-		'  -v',
-		'     Produce a more verbose output.',
-		'',
-		'  -D',
-		'     Specifies the output directory for all generated .js files.',
-		'     The hierarchy of the input files is not maintaned.',
-		'     If this option is omitted all generated .js files are placed next to their input files',
-		'',
-		'  -s suffix',
-		'     Add <suffix> to compiled .js files. File.st is then compiled into',
-		'     File.<suffix>.js.',
-		'',
-		'  -S suffix',
-		'     Use <suffix> for all libraries accessed using -l. This makes it possible',
-		'     to have multiple flavors of Amber and libraries in the same place.',
-		'',
-		'',
-		'     Example invocations:',
-		'',
-		'     Just compile Kernel-Objects.st to Kernel-Objects.js:',
-		'',
-		'        amberc Kernel-Objects.st',
-		'',
-		'     Compile Hello.st to Hello.js and create complete program called Program.js.',
-		'     Additionally add a call to the class method Hello>>main:',
-		'',
-		'        amberc -m Hello Hello.st Program',
-		'',
-		'     Compile Cat1.st and Cat2.st files into corresponding .js files.',
-		'     Link them with myboot.js and myKernel.js',
-		'     and merge everything into a complete program named Program.js:',
-		'',
-		'        amberc -M main.js myboot.js myKernel.js Cat1.st Cat2.st Program',
-	];
-	usage.forEach(function (line) { console.log(line); });
-};
+#!/bin/bash
+node `dirname $0`/../cli/support/amberc-cli.js $@

+ 1 - 1
bin/amberc.bat

@@ -1 +1 @@
-@node "%~dp0\amberc" %*
+@node "%~dp0\..\cli\support\amberc-cli.js" %*

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "amber",
-  "version": "0.12.0-pre",
+  "version": "0.13.0-pre",
   "main": "support/amber.js",
   "ignore": [
     "**/.*",

+ 0 - 0
bin/amber-cli.js → cli/support/amber-cli.js


+ 188 - 0
cli/support/amberc-cli.js

@@ -0,0 +1,188 @@
+#!/usr/bin/env node
+
+var path = require('path');
+var amberc = require('./amberc.js');
+
+// get parameters passed to the command line script
+// discard the first two parameters which are the node binary and the script name
+var parameters = process.argv.slice(2);
+
+// check if at least one parameter was passed to the script
+if (1 > parameters.length) {
+	print_usage();
+	process.exit();
+}
+
+
+// Get Amber root directory from the location of this script so that
+// we can find the st and js directories etc.
+var amber_dir = path.normalize(path.join(path.dirname(process.argv[1]), '..', '..'));
+
+var compiler = new amberc.Compiler(amber_dir);
+
+var configuration = handle_options(parameters);
+
+compiler.main(configuration);
+
+
+/**
+ * Process given program options and update defaults values.
+ * Followed by check_for_closure_compiler() and then collect_files().
+ */
+function handle_options(optionsArray) {
+	var programName = [];
+	var currentItem = optionsArray.shift();
+	var defaults = amberc.createDefaults();
+
+	while(undefined !== currentItem) {
+		switch(currentItem) {
+			case '-l':
+				defaults.load.push.apply(defaults.load, optionsArray.shift().split(','));
+				break;
+			case '-L':
+				defaults.jsLibraryDirs.push.apply(defaults.jsLibraryDirs, optionsArray.shift().split(','));
+				break;
+			case '-g':
+				defaults.jsGlobals.push.apply(defaults.jsGlobals, optionsArray.shift().split(','));
+				break;
+			case '-m':
+				defaults.main = optionsArray.shift();
+				break;
+			case '-M':
+				defaults.mainfile = optionsArray.shift();
+				break;
+			case '-n':
+				defaults.amd_namespace = optionsArray.shift();
+				break;
+			case '-D':
+				defaults.output_dir = optionsArray.shift();
+				break;
+			case '-s':
+				defaults.suffix = optionsArray.shift();
+				defaults.suffix_used = defaults.suffix;
+				break;
+			case '-S':
+				defaults.loadsuffix = optionsArray.shift();
+				defaults.suffix_used = defaults.suffix;
+				break;
+			case '-v':
+				defaults.verbose = true;
+				break;
+			case '-h':
+			case '--help':
+			case '?':
+				print_usage();
+				break;
+			default:
+				var fileSuffix = path.extname(currentItem);
+				switch (fileSuffix) {
+					case '.st':
+						defaults.stFiles.push(currentItem);
+						break;
+					case '.js':
+						defaults.jsFiles.push(currentItem);
+						break;
+					default:
+						// Will end up being the last non js/st argument
+						programName.push(currentItem);
+						break;
+				};
+		};
+		currentItem = optionsArray.shift();
+	}
+
+	if(1 < programName.length) {
+		throw new Error('More than one name for ProgramName given: ' + programName);
+	} else {
+		defaults.program = programName[0];
+	}
+	return defaults;
+};
+
+
+// print available flags
+function print_usage() {
+	var usage = [
+		'Usage: amberc [-l lib1,lib2...] [-g jsGlobal1,jsGlobla2] [-m main_class] [-M main_file]',
+		'          [-n namespace] [-D output_dir] [-v] [-s suffix] [-S suffix] [file1 [file2 ...]] [Program]',
+		'',
+		'   amberc compiles Amber files - either separately or into a complete runnable',
+		'   program. If no .st files are listed only a linking stage is performed.',
+		'   Files listed will be handled using the following rules:',
+		'',
+		'   *.js',
+		'     Files are linked (concatenated) in listed order.',
+		'     If not found we look in $AMBER/js/',
+		'',
+		'   *.st',
+		'     Files are compiled into .js files before concatenation.',
+		'     If not found we look in $AMBER/st/.',
+		'',
+		'     NOTE: Each .st file is currently considered to be a fileout of a single class',
+		'     category of the same name as the file!',
+		'',
+		'   If no <Program> is specified each given .st file will be compiled into',
+		'   a matching .js file. Otherwise a <Program>.js file is linked together based on',
+		'   the given options:',
+		'',
+		'  -l library1,library2',
+		'     Add listed JavaScript libraries in listed order.',
+		'     Libraries are not separated by spaces or end with .js.',
+		'',
+		'  -L directory1,directory2',
+		'     Add listed directories to the library search path.',
+		'     The order of processing is:',
+		'     1. current directory',
+		'     2. directories specified by -L',
+		'     3. $AMBER',
+		'',
+		'  -g jsGlobal1,jsGlobal2',
+		'     Comma separated list of JS global variable names.',
+		'     The names are added to a list containing "window", "document" and others.',
+		'',
+		'  -m main_class',
+		'     Add a call to the class method main_class>>main at the end of <Program>.',
+		'',
+		'  -M main_file',
+		'     Add <main_file> at the end of <Program.js> acting as #main.',
+		'',
+		'  -n amd_namespace',
+		'     Export packages with <amd_namespace> as the require.js namespace.',
+		'     Default value is "amber_core".',
+		'',
+		'  -v',
+		'     Produce a more verbose output.',
+		'',
+		'  -D',
+		'     Specifies the output directory for all generated .js files.',
+		'     The hierarchy of the input files is not maintaned.',
+		'     If this option is omitted all generated .js files are placed next to their input files',
+		'',
+		'  -s suffix',
+		'     Add <suffix> to compiled .js files. File.st is then compiled into',
+		'     File.<suffix>.js.',
+		'',
+		'  -S suffix',
+		'     Use <suffix> for all libraries accessed using -l. This makes it possible',
+		'     to have multiple flavors of Amber and libraries in the same place.',
+		'',
+		'',
+		'     Example invocations:',
+		'',
+		'     Just compile Kernel-Objects.st to Kernel-Objects.js:',
+		'',
+		'        amberc Kernel-Objects.st',
+		'',
+		'     Compile Hello.st to Hello.js and create complete program called Program.js.',
+		'     Additionally add a call to the class method Hello>>main:',
+		'',
+		'        amberc -m Hello Hello.st Program',
+		'',
+		'     Compile Cat1.st and Cat2.st files into corresponding .js files.',
+		'     Link them with myboot.js and myKernel.js',
+		'     and merge everything into a complete program named Program.js:',
+		'',
+		'        amberc -M main.js myboot.js myKernel.js Cat1.st Cat2.st Program',
+	];
+	usage.forEach(function (line) { console.log(line); });
+};

+ 0 - 0
bin/amberc.js → cli/support/amberc.js


+ 18 - 11
bin/release.sh → cli/support/release-worker.sh

@@ -1,27 +1,34 @@
 #!/bin/sh
-cd `dirname "$0"`/..
-echo rm -rf *
-echo git checkout master
+
+# ATTENTION: Be logged into npm before running this script,
+# as a user with write access to amber npm package.
+
+git reset --hard
+git checkout master
+git clean -d -x -f
+npm install
 echo -n "Which version are you going to publish [0 to skip]? "
 VER=`head -n 1`
 if [ "$VER" = "0" ]; then :; else
 	echo "Publishing version $VER"
-	bin/setversion.sh "$VER"
+	cli/support/setversion.sh "$VER"
 	cp package.json package.json.bak
 	sed -e 's@/amber.git.*"@/amber.git#'"$VER"'"@' package.json.bak >package.json
 	rm package.json.bak
-	echo git commit -a -m "Release version $VER"
-	echo git tag -a "$VER"
-	echo bower upload
-	echo npm upload
+	git add package.json
+	git commit -a -m "Release version $VER"
+	git tag -a "$VER" -m "Release version $VER"
+# bower does not publish explicitly but implictly via semver tag
+	echo npm publish
 fi
 echo -n "Which version are you going to work on? "
 VERF=`head -n 1`
 VER="${VERF}-pre"
 echo "Setting version $VER"
-bin/setversion.sh "$VER"
+cli/support/setversion.sh "$VER"
 cp package.json package.json.bak
 sed -e 's@/amber.git.*"@/amber.git"@' package.json.bak >package.json
 rm package.json.bak
-echo git commit -a -m "Working on $VERF"
-echo git push --tags
+git add package.json
+git commit -a -m "Working on $VERF"
+git push --tags

+ 9 - 0
cli/support/release.sh

@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# ATTENTION: Be logged into npm before running this script,
+# as a user with write access to amber npm package.
+
+cd `dirname "$0"`
+cp release-worker.sh /tmp
+cd ../..
+exec sh /tmp/release-worker.sh

+ 1 - 1
bin/setversion.sh → cli/support/setversion.sh

@@ -1,7 +1,7 @@
 #!/bin/sh
 
 VERSION=$1
-cd `dirname "$0"`/../
+cd `dirname "$0"`/../..
 AMBER_BASE=`pwd`
 
 cd $AMBER_BASE/st

+ 1 - 1
grunt/tasks/grunt-amberc.js

@@ -2,7 +2,7 @@ module.exports = function(grunt) {
 
   var path = require('path');
   var fs = require('fs');
-  var amberc = require('../../bin/amberc.js');
+  var amberc = require('../../cli/support/amberc.js');
 
   /**
      A full example entry for a Gruntfile.js is available below.

+ 6 - 14
js/Benchfib.js

@@ -29,7 +29,7 @@ category: '*Benchfib',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$5,$4,$7,$6,$3,$1;
+var $2,$5,$4,$3,$1;
 $2=self.__lt((2));
 if(smalltalk.assert($2)){
 $1=(1);
@@ -38,9 +38,7 @@ $5=self.__minus((1));
 $ctx1.sendIdx["-"]=1;
 $4=_st($5)._benchFib();
 $ctx1.sendIdx["benchFib"]=1;
-$7=self.__minus((2));
-$6=_st($7)._benchFib();
-$3=_st($4).__plus($6);
+$3=_st($4).__plus(_st(self.__minus((2)))._benchFib());
 $1=_st($3).__plus((1));
 $ctx1.sendIdx["+"]=1;
 };
@@ -175,7 +173,7 @@ var self=this;
 var t1,t2,r,n1,n2;
 function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
 return smalltalk.withContext(function($ctx1) { 
-var $7,$6,$5,$4,$3,$10,$9,$8,$2,$1;
+var $7,$6,$5,$4,$3,$2,$1;
 n1=(1);
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -218,10 +216,7 @@ $ctx1.sendIdx["/"]=1;
 $4=_st($5)._printString();
 $ctx1.sendIdx["printString"]=1;
 $3=_st($4).__comma(" bytecodes/sec; ");
-$10=_st(r).__star((1000));
-$9=_st($10).__slash(t2);
-$8=_st($9)._printString();
-$2=_st($3).__comma($8);
+$2=_st($3).__comma(_st(_st(_st(r).__star((1000))).__slash(t2))._printString());
 $ctx1.sendIdx[","]=2;
 $1=_st($2).__comma(" sends/sec");
 $ctx1.sendIdx[","]=1;
@@ -243,7 +238,7 @@ var self=this;
 var t1,t2,r,n1,n2;
 function $Date(){return smalltalk.Date||(typeof Date=="undefined"?nil:Date)}
 return smalltalk.withContext(function($ctx1) { 
-var $7,$6,$5,$4,$3,$10,$9,$8,$2,$1;
+var $7,$6,$5,$4,$3,$2,$1;
 n1=(1);
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -286,10 +281,7 @@ $ctx1.sendIdx["/"]=1;
 $4=_st($5)._printString();
 $ctx1.sendIdx["printString"]=1;
 $3=_st($4).__comma(" bytecodes/sec; ");
-$10=_st(r).__star((1000));
-$9=_st($10).__slash(t2);
-$8=_st($9)._printString();
-$2=_st($3).__comma($8);
+$2=_st($3).__comma(_st(_st(_st(r).__star((1000))).__slash(t2))._printString());
 $ctx1.sendIdx[","]=2;
 $1=_st($2).__comma(" sends/sec");
 $ctx1.sendIdx[","]=1;

File diff suppressed because it is too large
+ 112 - 113
js/Canvas.js


+ 83 - 95
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: []
 }),
@@ -176,14 +176,13 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$5,$2,$1;
+var $4,$3,$2,$1;
 $4=self._parent();
 $ctx1.sendIdx["parent"]=1;
 $3=_st($4)._isSequenceNode();
 $2=_st($3)._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._parent();
-return _st($5)._isAssignmentNode();
+return _st(self._parent())._isAssignmentNode();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $1=_st($2)._not();
 return $1;
@@ -205,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: []
 }),
@@ -221,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: []
 }),
@@ -253,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: []
 }),
@@ -307,16 +306,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._nodes();
 $ctx1.sendIdx["nodes"]=1;
 $2=_st($3)._isEmpty();
 if(smalltalk.assert($2)){
 $1=self;
 } else {
-$5=self._nodes();
-$4=_st($5)._first();
-$1=_st($4)._nextChild();
+$1=_st(_st(self._nodes())._first())._nextChild();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"nextChild",{},smalltalk.Node)})},
@@ -360,20 +357,17 @@ fn: function (aNode){
 var self=this;
 var next;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2,$5;
+var $1,$2;
 var $early={};
 try {
 $1=self._nodes();
 $ctx1.sendIdx["nodes"]=1;
-$4=self._nodes();
-$3=_st($4)._indexOf_(aNode);
-$2=_st($3).__plus((1));
-next=_st($1)._at_ifAbsent_($2,(function(){
+next=_st($1)._at_ifAbsent_(_st(_st(self._nodes())._indexOf_(aNode)).__plus((1)),(function(){
 return smalltalk.withContext(function($ctx2) {
 throw $early=[self];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$5=_st(next)._nextChild();
-return $5;
+$2=_st(next)._nextChild();
+return $2;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"nextNode:",{aNode:aNode,next:next},smalltalk.Node)})},
@@ -403,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"]
 }),
@@ -630,12 +624,11 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(self._shouldBeAliased())._or_((function(){
+var $1;
+$1=_st(_st(self._shouldBeAliased())._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._shouldBeInlined();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$1=_st($2)._or_((function(){
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})})))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(self._nodes())._detect_ifNone_((function(each){
 return smalltalk.withContext(function($ctx3) {
@@ -649,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: []
 }),
@@ -705,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: []
 }),
@@ -759,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: []
 }),
@@ -782,6 +775,27 @@ referencedClasses: []
 }),
 smalltalk.AssignmentNode);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "shouldBeAliased",
+category: 'testing',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+var $1;
+$1=_st(smalltalk.AssignmentNode.superclass.fn.prototype._shouldBeAliased.apply(_st(self), []))._or_((function(){
+return smalltalk.withContext(function($ctx2) {
+return self._isReferenced();
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
+return $1;
+}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},smalltalk.AssignmentNode)})},
+args: [],
+source: "shouldBeAliased\x0a\x09^ super shouldBeAliased or: [ self isReferenced ]",
+messageSends: ["or:", "shouldBeAliased", "isReferenced"],
+referencedClasses: []
+}),
+smalltalk.AssignmentNode);
+
 
 
 smalltalk.addClass('BlockNode', smalltalk.Node, ['parameters', 'scope'], 'Compiler-AST');
@@ -814,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: []
 }),
@@ -871,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"]
 }),
@@ -998,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: []
 }),
@@ -1119,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: []
 }),
@@ -1180,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: []
 }),
@@ -1243,19 +1257,14 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$9,$8,$7,$6,$5,$1;
+var $4,$3,$2,$1;
 $4=self._source();
 $ctx1.sendIdx["source"]=1;
 $3=_st($4)._lines();
 $ctx1.sendIdx["lines"]=1;
 $2=_st($3)._size();
 $ctx1.sendIdx["size"]=1;
-$9=self._source();
-$8=_st($9)._lines();
-$7=_st($8)._last();
-$6=_st($7)._size();
-$5=_st($6).__plus((1));
-$1=_st($2).__at($5);
+$1=_st($2).__at(_st(_st(_st(_st(self._source())._lines())._last())._size()).__plus((1)));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"extent",{},smalltalk.MethodNode)})},
 args: [],
@@ -1345,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: []
 }),
@@ -1413,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: []
 }),
@@ -1599,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: []
 }),
@@ -1652,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"]
 }),
@@ -1734,7 +1743,7 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$6,$5,$7,$8,$9,$4;
+var $1,$3,$2,$5,$6,$4;
 $1=self._receiver();
 $ctx1.sendIdx["receiver"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -1745,13 +1754,10 @@ return $2;
 } else {
 $1;
 };
-$6=self._receiver();
-$5=_st($Array())._with_($6);
-$7=$5;
-$8=self._arguments();
-_st($7)._addAll_($8);
-$9=_st($5)._yourself();
-$4=$9;
+$5=_st($Array())._with_(self._receiver());
+_st($5)._addAll_(self._arguments());
+$6=_st($5)._yourself();
+$4=$6;
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.SendNode)})},
 args: [],
@@ -1773,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: []
 }),
@@ -1812,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: []
 }),
@@ -1840,20 +1846,26 @@ selector: "shouldBeAliased",
 category: 'testing',
 fn: function (){
 var self=this;
+var sends;
 return smalltalk.withContext(function($ctx1) { 
 var $1;
+sends=_st(_st(_st(self._method())._sendIndexes())._at_(self._selector()))._size();
 $1=_st(smalltalk.SendNode.superclass.fn.prototype._shouldBeAliased.apply(_st(self), []))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-return _st(_st(_st(_st(_st(self._method())._sendIndexes())._at_(self._selector()))._size()).__gt((1)))._and_((function(){
+return _st(_st(_st(sends).__gt((1)))._and_((function(){
+return smalltalk.withContext(function($ctx3) {
+return _st(self._index()).__lt(sends);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._and_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._isReferenced();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
+$ctx2.sendIdx["and:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{},smalltalk.SendNode)})},
+}, function($ctx1) {$ctx1.fill(self,"shouldBeAliased",{sends:sends},smalltalk.SendNode)})},
 args: [],
-source: "shouldBeAliased\x0a\x09^ super shouldBeAliased or: [\x0a\x09\x09(self method sendIndexes at: self selector) size > 1 and: [\x0a\x09\x09\x09self isReferenced ] ]",
-messageSends: ["or:", "shouldBeAliased", "and:", ">", "size", "at:", "sendIndexes", "method", "selector", "isReferenced"],
+source: "shouldBeAliased\x0a\x09\x22Because we keep track of send indexes, some send nodes need additional care for aliasing. \x0a\x09See IRJSVisitor >> visitIRSend:\x22\x0a\x09\x0a\x09| sends |\x0a\x09\x0a\x09sends := (self method sendIndexes at: self selector) size.\x0a\x09\x0a\x09^ super shouldBeAliased or: [\x0a\x09\x09(sends > 1 and: [ self index < sends ]) and: [ self isReferenced ] ]",
+messageSends: ["size", "at:", "sendIndexes", "method", "selector", "or:", "shouldBeAliased", "and:", ">", "<", "index", "isReferenced"],
 referencedClasses: []
 }),
 smalltalk.SendNode);
@@ -1921,7 +1933,7 @@ fn: function (anObject){
 var self=this;
 function $SendNode(){return smalltalk.SendNode||(typeof SendNode=="undefined"?nil:SendNode)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$6,$4,$7,$1;
+var $2,$3,$5,$4,$6,$1;
 $2=_st($SendNode())._new();
 _st($2)._position_(self._position());
 $3=$2;
@@ -1930,18 +1942,17 @@ $ctx1.sendIdx["receiver"]=1;
 if(($receiver = $5) == nil || $receiver == null){
 $4=anObject;
 } else {
-$6=self._receiver();
-$4=_st($6)._valueForReceiver_(anObject);
+$4=_st(self._receiver())._valueForReceiver_(anObject);
 };
 _st($3)._receiver_($4);
 _st($2)._selector_(self._selector());
 _st($2)._arguments_(self._arguments());
-$7=_st($2)._yourself();
-$1=$7;
+$6=_st($2)._yourself();
+$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"]
 }),
@@ -1987,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"]
 }),
@@ -2060,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: []
 }),
@@ -2114,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: []
 }),
@@ -2170,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: []
 }),
@@ -2188,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: []
 }),
@@ -2210,27 +2221,6 @@ referencedClasses: []
 }),
 smalltalk.ValueNode);
 
-smalltalk.addMethod(
-smalltalk.method({
-selector: "xxxDoIt",
-category: 'xxxDoIt',
-fn: function (){
-var self=this;
-return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st((function(){
-return smalltalk.withContext(function($ctx2) {
-return self._stack();
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._value();
-return $1;
-}, function($ctx1) {$ctx1.fill(self,"xxxDoIt",{},smalltalk.ValueNode)})},
-args: [],
-source: "xxxDoIt ^[self stack] value",
-messageSends: ["value", "stack"],
-referencedClasses: []
-}),
-smalltalk.ValueNode);
-
 
 
 smalltalk.addClass('VariableNode', smalltalk.ValueNode, ['assigned', 'binding'], 'Compiler-AST');
@@ -2288,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: []
 }),
@@ -2438,16 +2428,14 @@ fn: function (){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2;
+var $1,$2;
 $1=self._source();
 $ctx1.sendIdx["source"]=1;
 _st($1)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._error_("Method source is empty");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$3=_st($Smalltalk())._current();
-$4=self._source();
-$2=_st($3)._parse_($4);
+$2=_st(_st($Smalltalk())._current())._parse_(self._source());
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"ast",{},smalltalk.CompiledMethod)})},
 args: [],

+ 32 - 36
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: []
 }),
@@ -348,17 +348,16 @@ fn: function (aString){
 var self=this;
 function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $1,$2;
 self._currentClass_($DoIt());
-$2="doIt ^[".__comma(aString);
-$1=_st($2).__comma("] value");
+$1=_st("doIt ^ [ ".__comma(aString)).__comma(" ] value");
 $ctx1.sendIdx[","]=1;
 self._source_($1);
-$3=self._compileNode_(self._parse_(self._source()));
-return $3;
+$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"]
 }),
@@ -371,17 +370,16 @@ category: 'compiling',
 fn: function (aString,anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $1,$2;
 self._currentClass_(_st(anObject)._class());
-$2="xxxDoIt ^[".__comma(aString);
-$1=_st($2).__comma("] value");
+$1=_st("xxxDoIt ^ [ ".__comma(aString)).__comma(" ] value");
 $ctx1.sendIdx[","]=1;
 self._source_($1);
-$3=self._compileNode_(self._parse_(self._source()));
-return $3;
+$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: []
 }),
@@ -406,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: []
 }),
@@ -424,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: []
 }),
@@ -489,20 +487,19 @@ fn: function (aString,anObject){
 var self=this;
 var result,method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 method=self._eval_(self._compileExpression_on_(aString,anObject));
 _st(method)._category_("xxxDoIt");
 $1=_st(anObject)._class();
 $ctx1.sendIdx["class"]=1;
 _st($1)._addCompiledMethod_(method);
 result=_st(anObject)._xxxDoIt();
-$2=_st(anObject)._class();
-_st($2)._removeCompiledMethod_(method);
-$3=result;
-return $3;
+_st(_st(anObject)._class())._removeCompiledMethod_(method);
+$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: []
 }),
@@ -540,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"]
 }),
@@ -553,15 +550,14 @@ category: 'compiling',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3="doIt ^[".__comma(aString);
-$2=_st($3).__comma("] value");
+var $2,$1;
+$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: []
 }),
@@ -605,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"]
 }),
@@ -628,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: []
 }),
@@ -662,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: []
 }),
@@ -715,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"]
 }),

+ 4 - 6
js/Compiler-Exceptions.js

@@ -83,9 +83,8 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="Variable shadowing error: ".__comma(self._variableName());
-$1=_st($2).__comma(" is already defined");
+var $1;
+$1=_st("Variable shadowing error: ".__comma(self._variableName())).__comma(" is already defined");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.ShadowingVariableError)})},
@@ -141,9 +140,8 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="Unknown Variable error: ".__comma(self._variableName());
-$1=_st($2).__comma(" is not defined");
+var $1;
+$1=_st("Unknown Variable error: ".__comma(self._variableName())).__comma(" is not defined");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},smalltalk.UnknownVariableError)})},

+ 109 - 162
js/Compiler-IR.js

@@ -15,7 +15,7 @@ function $IRVariable(){return smalltalk.IRVariable||(typeof IRVariable=="undefin
 function $AliasVar(){return smalltalk.AliasVar||(typeof AliasVar=="undefined"?nil:AliasVar)}
 function $IRAssignment(){return smalltalk.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$5,$7,$8,$10,$11,$12,$13,$9,$14;
+var $1,$2,$3,$4,$6,$5,$7,$8,$10,$11,$9,$12;
 $1=_st(aNode)._isImmutable();
 if(smalltalk.assert($1)){
 $2=self._visit_(aNode);
@@ -36,17 +36,15 @@ $8=self._sequence();
 $10=_st($IRAssignment())._new();
 _st($10)._add_(variable);
 $ctx1.sendIdx["add:"]=2;
-$11=$10;
-$12=self._visit_(aNode);
-_st($11)._add_($12);
+_st($10)._add_(self._visit_(aNode));
 $ctx1.sendIdx["add:"]=3;
-$13=_st($10)._yourself();
-$9=$13;
+$11=_st($10)._yourself();
+$9=$11;
 _st($8)._add_($9);
 $ctx1.sendIdx["add:"]=1;
 _st(_st(self._method())._internalVariables())._add_(variable);
-$14=variable;
-return $14;
+$12=variable;
+return $12;
 }, function($ctx1) {$ctx1.fill(self,"alias:",{aNode:aNode,variable:variable},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "alias: aNode\x0a\x09| variable |\x0a\x0a\x09aNode isImmutable ifTrue: [ ^ self visit: aNode ].\x0a\x0a\x09variable := IRVariable new\x0a\x09\x09variable: (AliasVar new name: '$', self nextAlias);\x0a\x09\x09yourself.\x0a\x0a\x09self sequence add: (IRAssignment new\x0a\x09\x09add: variable;\x0a\x09\x09add: (self visit: aNode);\x0a\x09\x09yourself).\x0a\x0a\x09self method internalVariables add: variable.\x0a\x0a\x09^ variable",
@@ -91,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"]
 }),
@@ -301,7 +299,7 @@ var closure;
 function $IRClosure(){return smalltalk.IRClosure||(typeof IRClosure=="undefined"?nil:IRClosure)}
 function $IRTempDeclaration(){return smalltalk.IRTempDeclaration||(typeof IRTempDeclaration=="undefined"?nil:IRTempDeclaration)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$5,$7,$9,$10,$11,$12,$8,$13;
+var $1,$2,$3,$4,$6,$5,$7,$8,$9;
 $1=_st($IRClosure())._new();
 $ctx1.sendIdx["new"]=1;
 _st($1)._arguments_(_st(aNode)._parameters());
@@ -318,15 +316,11 @@ $ctx1.sendIdx["scope"]=2;
 $5=_st($6)._temps();
 _st($5)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$7=closure;
-$9=_st($IRTempDeclaration())._new();
-_st($9)._name_(_st(each)._name());
-$10=$9;
-$11=_st(aNode)._scope();
-_st($10)._scope_($11);
-$12=_st($9)._yourself();
-$8=$12;
-return _st($7)._add_($8);
+$7=_st($IRTempDeclaration())._new();
+_st($7)._name_(_st(each)._name());
+_st($7)._scope_(_st(aNode)._scope());
+$8=_st($7)._yourself();
+return _st(closure)._add_($8);
 $ctx2.sendIdx["add:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 $ctx1.sendIdx["do:"]=1;
@@ -334,8 +328,8 @@ _st(_st(aNode)._nodes())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(closure)._add_(self._visit_(each));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$13=closure;
-return $13;
+$9=closure;
+return $9;
 }, function($ctx1) {$ctx1.fill(self,"visitBlockNode:",{aNode:aNode,closure:closure},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "visitBlockNode: aNode\x0a\x09| closure |\x0a\x09closure := IRClosure new\x0a\x09\x09arguments: aNode parameters;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself.\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09closure add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x09aNode nodes do: [ :each | closure add: (self visit: each) ].\x0a\x09^ closure",
@@ -353,7 +347,7 @@ var self=this;
 function $IRBlockSequence(){return smalltalk.IRBlockSequence||(typeof IRBlockSequence=="undefined"?nil:IRBlockSequence)}
 function $IRBlockReturn(){return smalltalk.IRBlockReturn||(typeof IRBlockReturn=="undefined"?nil:IRBlockReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$4,$6,$7,$10,$9,$8,$11,$13,$14,$17,$16,$15,$18,$12,$19,$22,$21,$20,$1;
+var $2,$3,$5,$4,$6,$7,$10,$9,$8,$11,$13,$14,$17,$16,$15,$18,$12,$1;
 $2=_st($IRBlockSequence())._new();
 $ctx1.sendIdx["new"]=1;
 $1=self._withSequence_do_($2,(function(){
@@ -380,11 +374,7 @@ $9=_st($10)._last();
 $ctx3.sendIdx["last"]=1;
 $8=_st($9)._isReturnNode();
 if(smalltalk.assert($8)){
-$19=self._sequence();
-$22=_st(aNode)._nodes();
-$21=_st($22)._last();
-$20=self._visitOrAlias_($21);
-return _st($19)._add_($20);
+return _st(self._sequence())._add_(self._visitOrAlias_(_st(_st(aNode)._nodes())._last()));
 } else {
 $11=self._sequence();
 $ctx3.sendIdx["sequence"]=2;
@@ -408,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"]
 }),
@@ -423,7 +413,7 @@ var self=this;
 var alias,receiver;
 function $VariableNode(){return smalltalk.VariableNode||(typeof VariableNode=="undefined"?nil:VariableNode)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$6,$5,$9,$8,$7;
+var $2,$1,$3,$5,$4,$6;
 $2=_st(aNode)._receiver();
 $ctx1.sendIdx["receiver"]=1;
 $1=_st($2)._isImmutable();
@@ -432,31 +422,28 @@ receiver=_st(aNode)._receiver();
 $ctx1.sendIdx["receiver"]=2;
 receiver;
 } else {
-$3=_st(aNode)._receiver();
-alias=self._alias_($3);
+alias=self._alias_(_st(aNode)._receiver());
 $ctx1.sendIdx["alias:"]=1;
 alias;
 receiver=_st(_st($VariableNode())._new())._binding_(_st(alias)._variable());
 receiver;
 };
-$4=_st(aNode)._nodes();
+$3=_st(aNode)._nodes();
 $ctx1.sendIdx["nodes"]=1;
-_st($4)._do_((function(each){
+_st($3)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._receiver_(receiver);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
 $ctx1.sendIdx["do:"]=1;
-$6=_st(aNode)._nodes();
+$5=_st(aNode)._nodes();
 $ctx1.sendIdx["nodes"]=2;
-$5=_st($6)._allButLast();
-_st($5)._do_((function(each){
+$4=_st($5)._allButLast();
+_st($4)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._sequence())._add_(self._visit_(each));
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
-$9=_st(aNode)._nodes();
-$8=_st($9)._last();
-$7=self._alias_($8);
-return $7;
+$6=self._alias_(_st(_st(aNode)._nodes())._last());
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"visitCascadeNode:",{aNode:aNode,alias:alias,receiver:receiver},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "visitCascadeNode: aNode\x0a\x09| alias receiver |\x0a\x0a\x09aNode receiver isImmutable \x0a\x09\x09ifTrue: [ receiver := aNode receiver ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09alias := self alias: aNode receiver.\x0a\x09\x09\x09receiver := VariableNode new binding: alias variable ].\x0a\x09\x0a\x09aNode nodes do: [ :each |\x0a\x09\x09\x09each receiver: receiver ].\x0a\x0a\x09aNode nodes allButLast do: [ :each |\x0a\x09\x09self sequence add: (self visit: each) ].\x0a\x0a\x09^ self alias: aNode nodes last",
@@ -484,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"]
 }),
@@ -509,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"]
 }),
@@ -548,7 +535,7 @@ function $IRTempDeclaration(){return smalltalk.IRTempDeclaration||(typeof IRTemp
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 function $IRVariable(){return smalltalk.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1,$7,$6,$8,$10,$11,$12,$13,$9,$14,$16,$15,$18,$19,$17,$21,$22,$25,$24,$23,$26,$20,$27;
+var $2,$3,$4,$5,$1,$7,$6,$8,$10,$11,$12,$13,$9,$14,$16,$15,$18,$19,$17,$20,$21,$22;
 $2=_st($IRMethod())._new();
 $ctx1.sendIdx["new"]=1;
 _st($2)._source_(_st(self._source())._crlfSanitized());
@@ -604,19 +591,14 @@ $ctx1.sendIdx["method"]=3;
 $19=_st($IRReturn())._new();
 $ctx1.sendIdx["new"]=3;
 $17=_st($18)._add_($19);
-$21=_st($IRVariable())._new();
-$22=$21;
-$25=_st(aNode)._scope();
-$24=_st($25)._pseudoVars();
-$23=_st($24)._at_("self");
-_st($22)._variable_($23);
-$26=_st($21)._yourself();
-$20=$26;
-_st($17)._add_($20);
+$20=_st($IRVariable())._new();
+_st($20)._variable_(_st(_st(_st(aNode)._scope())._pseudoVars())._at_("self"));
+$21=_st($20)._yourself();
+_st($17)._add_($21);
 $ctx1.sendIdx["add:"]=3;
 };
-$27=self._method();
-return $27;
+$22=self._method();
+return $22;
 }, function($ctx1) {$ctx1.fill(self,"visitMethodNode:",{aNode:aNode},smalltalk.IRASTTranslator)})},
 args: ["aNode"],
 source: "visitMethodNode: aNode\x0a\x0a\x09self method: (IRMethod new\x0a\x09\x09source: self source crlfSanitized;\x0a\x09\x09theClass: self theClass;\x0a\x09\x09arguments: aNode arguments;\x0a\x09\x09selector: aNode selector;\x0a\x09\x09sendIndexes: aNode sendIndexes;\x0a\x09\x09superSends: aNode superSends;\x0a\x09\x09classReferences: aNode classReferences;\x0a\x09\x09scope: aNode scope;\x0a\x09\x09yourself).\x0a\x0a\x09aNode scope temps do: [ :each |\x0a\x09\x09self method add: (IRTempDeclaration new\x0a\x09\x09\x09name: each name;\x0a\x09\x09\x09scope: aNode scope;\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09aNode nodes do: [ :each | self method add: (self visit: each) ].\x0a\x0a\x09aNode scope hasLocalReturn ifFalse: [\x0a\x09\x09(self method add: IRReturn new) add: (IRVariable new\x0a\x09\x09\x09variable: (aNode scope pseudoVars at: 'self');\x0a\x09\x09\x09yourself) ].\x0a\x0a\x09^ self method",
@@ -743,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"]
 }),
@@ -1148,13 +1130,11 @@ category: 'building',
 fn: function (anIRInstruction,anotherIRInstruction){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 _st(anotherIRInstruction)._parent_(self);
 $1=self._instructions();
 $ctx1.sendIdx["instructions"]=1;
-$3=self._instructions();
-$2=_st($3)._indexOf_(anIRInstruction);
-_st($1)._at_put_($2,anotherIRInstruction);
+_st($1)._at_put_(_st(self._instructions())._indexOf_(anIRInstruction),anotherIRInstruction);
 return self}, function($ctx1) {$ctx1.fill(self,"replace:with:",{anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction},smalltalk.IRInstruction)})},
 args: ["anIRInstruction", "anotherIRInstruction"],
 source: "replace: anIRInstruction with: anotherIRInstruction\x0a\x09anotherIRInstruction parent: self.\x0a\x09self instructions\x0a\x09\x09at: (self instructions indexOf: anIRInstruction)\x0a\x09\x09put: anotherIRInstruction",
@@ -2307,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: []
 }),
@@ -2953,16 +2933,14 @@ category: 'visiting',
 fn: function (anIRAssignment){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=_st(anIRAssignment)._instructions();
 $ctx1.sendIdx["instructions"]=1;
 $1=_st($2)._first();
 self._visit_($1);
 $ctx1.sendIdx["visit:"]=1;
 _st(self._stream())._nextPutAssignment();
-$4=_st(anIRAssignment)._instructions();
-$3=_st($4)._last();
-self._visit_($3);
+self._visit_(_st(_st(anIRAssignment)._instructions())._last());
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRAssignment:",{anIRAssignment:anIRAssignment},smalltalk.IRJSTranslator)})},
 args: ["anIRAssignment"],
 source: "visitIRAssignment: anIRAssignment\x0a\x09self visit: anIRAssignment instructions first.\x0a\x09self stream nextPutAssignment.\x0a\x09self visit: anIRAssignment instructions last.",
@@ -2978,7 +2956,7 @@ category: 'visiting',
 fn: function (anIRClosure){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutClosureWith_arguments_((function(){
@@ -2989,8 +2967,7 @@ _st($2)._nextPutVars_(_st(_st(anIRClosure)._tempDeclarations())._collect_((funct
 return smalltalk.withContext(function($ctx3) {
 return _st(_st(each)._name())._asVariableName();
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})})));
-$3=self._stream();
-return _st($3)._nextPutBlockContextFor_during_(anIRClosure,(function(){
+return _st(self._stream())._nextPutBlockContextFor_during_(anIRClosure,(function(){
 return smalltalk.withContext(function($ctx3) {
 return smalltalk.IRJSTranslator.superclass.fn.prototype._visitIRClosure_.apply(_st(self), [anIRClosure]);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
@@ -3010,7 +2987,7 @@ category: 'visiting',
 fn: function (anIRDynamicArray){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutAll_("[");
@@ -3020,8 +2997,7 @@ return smalltalk.withContext(function($ctx2) {
 return self._visit_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$2=self._stream();
-return _st($2)._nextPutAll_(",");
+return _st(self._stream())._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(self["@stream"])._nextPutAll_("]");
@@ -3040,7 +3016,7 @@ category: 'visiting',
 fn: function (anIRDynamicDictionary){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutAll_("smalltalk.HashedCollection._from_([");
@@ -3055,11 +3031,10 @@ $ctx2.sendIdx["stream"]=2;
 return _st($2)._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$3=self._stream();
-_st($3)._nextPutAll_("])");
+_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: []
 }),
@@ -3072,7 +3047,7 @@ category: 'visiting',
 fn: function (anIRMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$8,$7,$9,$12,$11,$10,$13,$14;
+var $1,$2,$3,$4,$5,$6,$8,$7,$9,$10;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutMethodDeclaration_with_(anIRMethod,(function(){
@@ -3106,18 +3081,14 @@ $7=_st($8)._notEmpty();
 if(smalltalk.assert($7)){
 $9=self._stream();
 $ctx4.sendIdx["stream"]=6;
-$12=_st(anIRMethod)._internalVariables();
-$11=_st($12)._asArray();
-$10=_st($11)._collect_((function(each){
+_st($9)._nextPutVars_(_st(_st(_st(anIRMethod)._internalVariables())._asArray())._collect_((function(each){
 return smalltalk.withContext(function($ctx5) {
 return _st(_st(each)._variable())._alias();
-}, function($ctx5) {$ctx5.fillBlock({each:each},$ctx4,7)})}));
-_st($9)._nextPutVars_($10);
+}, function($ctx5) {$ctx5.fillBlock({each:each},$ctx4,7)})})));
 };
-$13=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
-if(smalltalk.assert($13)){
-$14=self._stream();
-return _st($14)._nextPutNonLocalReturnHandlingWith_((function(){
+$10=_st(_st(anIRMethod)._scope())._hasNonLocalReturn();
+if(smalltalk.assert($10)){
+return _st(self._stream())._nextPutNonLocalReturnHandlingWith_((function(){
 return smalltalk.withContext(function($ctx5) {
 return smalltalk.IRJSTranslator.superclass.fn.prototype._visitIRMethod_.apply(_st(self), [anIRMethod]);
 $ctx5.sendIdx["visitIRMethod:"]=1;
@@ -3130,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: []
 }),
@@ -3212,20 +3183,19 @@ category: 'visiting',
 fn: function (anIRSequence){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutSequenceWith_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(anIRSequence)._instructions())._do_((function(each){
 return smalltalk.withContext(function($ctx3) {
-$2=self._stream();
-return _st($2)._nextPutStatementWith_(self._visit_(each));
+return _st(self._stream())._nextPutStatementWith_(self._visit_(each));
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
 }, 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: []
 }),
@@ -3269,7 +3239,7 @@ category: 'visiting',
 fn: function (anIRVariable){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$5,$7,$6;
+var $3,$2,$1,$4;
 $3=_st(anIRVariable)._variable();
 $ctx1.sendIdx["variable"]=1;
 $2=_st($3)._name();
@@ -3280,10 +3250,7 @@ $ctx1.sendIdx["stream"]=1;
 _st($4)._nextPutAll_("smalltalk.getThisContext()");
 $ctx1.sendIdx["nextPutAll:"]=1;
 } else {
-$5=self._stream();
-$7=_st(anIRVariable)._variable();
-$6=_st($7)._alias();
-_st($5)._nextPutAll_($6);
+_st(self._stream())._nextPutAll_(_st(_st(anIRVariable)._variable())._alias());
 };
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRVariable:",{anIRVariable:anIRVariable},smalltalk.IRJSTranslator)})},
 args: ["anIRVariable"],
@@ -3300,13 +3267,12 @@ category: 'visiting',
 fn: function (anIRVerbatim){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutStatementWith_((function(){
 return smalltalk.withContext(function($ctx2) {
-$2=self._stream();
-return _st($2)._nextPutAll_(_st(anIRVerbatim)._source());
+return _st(self._stream())._nextPutAll_(_st(anIRVerbatim)._source());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRVerbatim:",{anIRVerbatim:anIRVerbatim},smalltalk.IRJSTranslator)})},
 args: ["anIRVerbatim"],
@@ -3323,7 +3289,7 @@ category: 'visiting',
 fn: function (anIRInstruction){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2,$3;
 $1=_st(anIRInstruction)._needsBoxingAsReceiver();
 if(! smalltalk.assert($1)){
 $2=self._visit_(anIRInstruction);
@@ -3335,8 +3301,7 @@ $ctx1.sendIdx["stream"]=1;
 _st($3)._nextPutAll_("_st(");
 $ctx1.sendIdx["nextPutAll:"]=1;
 self._visit_(anIRInstruction);
-$4=self._stream();
-_st($4)._nextPutAll_(")");
+_st(self._stream())._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"visitReceiver:",{anIRInstruction:anIRInstruction},smalltalk.IRJSTranslator)})},
 args: ["anIRInstruction"],
 source: "visitReceiver: anIRInstruction\x0a\x09anIRInstruction needsBoxingAsReceiver ifFalse: [ ^ self visit: anIRInstruction ].\x0a\x09\x0a\x09self stream nextPutAll: '_st('.\x0a\x09self visit: anIRInstruction.\x0a\x09self stream nextPutAll: ')'",
@@ -3352,32 +3317,28 @@ category: 'visiting',
 fn: function (anIRSend){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$5,$4,$7,$6,$8,$9;
+var $2,$1,$3,$4,$5;
 $2=_st(anIRSend)._instructions();
 $ctx1.sendIdx["instructions"]=1;
 $1=_st($2)._first();
 self._visitReceiver_($1);
 $3=self._stream();
 $ctx1.sendIdx["stream"]=1;
-$5=".".__comma(_st(_st(anIRSend)._selector())._asSelector());
-$4=_st($5).__comma("(");
+$4=_st(".".__comma(_st(_st(anIRSend)._selector())._asSelector())).__comma("(");
 $ctx1.sendIdx[","]=1;
 _st($3)._nextPutAll_($4);
 $ctx1.sendIdx["nextPutAll:"]=1;
-$7=_st(anIRSend)._instructions();
-$6=_st($7)._allButFirst();
-_st($6)._do_separatedBy_((function(each){
+_st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._visit_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$8=self._stream();
+$5=self._stream();
 $ctx2.sendIdx["stream"]=2;
-return _st($8)._nextPutAll_(",");
+return _st($5)._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$9=self._stream();
-_st($9)._nextPutAll_(")");
+_st(self._stream())._nextPutAll_(")");
 return self}, function($ctx1) {$ctx1.fill(self,"visitSend:",{anIRSend:anIRSend},smalltalk.IRJSTranslator)})},
 args: ["anIRSend"],
 source: "visitSend: anIRSend\x0a\x09self visitReceiver: anIRSend instructions first.\x0a\x09self stream nextPutAll: '.', anIRSend selector asSelector, '('.\x0a\x09anIRSend instructions allButFirst\x0a\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: ')'",
@@ -3393,7 +3354,7 @@ category: 'visiting',
 fn: function (anIRSend){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6,$8,$9;
+var $1,$2,$4,$3,$5,$6;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutAll_(_st(self._currentClass())._asJavascript());
@@ -3413,20 +3374,17 @@ $5=self._stream();
 $ctx1.sendIdx["stream"]=2;
 _st($5)._nextPutAll_("), [");
 $ctx1.sendIdx["nextPutAll:"]=5;
-$7=_st(anIRSend)._instructions();
-$6=_st($7)._allButFirst();
-_st($6)._do_separatedBy_((function(each){
+_st(_st(_st(anIRSend)._instructions())._allButFirst())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._visit_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$8=self._stream();
+$6=self._stream();
 $ctx2.sendIdx["stream"]=3;
-return _st($8)._nextPutAll_(",");
+return _st($6)._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=6;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$9=self._stream();
-_st($9)._nextPutAll_("])");
+_st(self._stream())._nextPutAll_("])");
 return self}, function($ctx1) {$ctx1.fill(self,"visitSuperSend:",{anIRSend:anIRSend},smalltalk.IRJSTranslator)})},
 args: ["anIRSend"],
 source: "visitSuperSend: anIRSend\x0a\x09self stream\x0a\x09\x09nextPutAll: self currentClass asJavascript;\x0a\x09\x09nextPutAll: '.superclass.fn.prototype.';\x0a\x09\x09nextPutAll: anIRSend selector asSelector, '.apply(';\x0a\x09\x09nextPutAll: '_st('.\x0a\x09self visit: anIRSend instructions first.\x0a\x09self stream nextPutAll: '), ['.\x0a\x09anIRSend instructions allButFirst\x0a\x09\x09do: [ :each | self visit: each ]\x0a\x09\x09separatedBy: [ self stream nextPutAll: ',' ].\x0a\x09self stream nextPutAll: '])'",
@@ -3544,7 +3502,7 @@ category: 'streaming',
 fn: function (anIRClosure,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$5,$9,$8,$7,$6,$13,$12,$11,$10,$14,$16,$15,$23,$22,$21,$20,$26,$25,$24,$19,$18,$17;
+var $4,$3,$2,$1,$5,$9,$8,$7,$6,$13,$12,$11,$10,$14,$15,$22,$21,$20,$19,$18,$17,$16;
 $4=_st(anIRClosure)._scope();
 $ctx1.sendIdx["scope"]=1;
 $3=_st($4)._alias();
@@ -3583,8 +3541,7 @@ self._nextPutAll_($14);
 $ctx2.sendIdx["nextPutAll:"]=4;
 self._nextPutAll_(":");
 $ctx2.sendIdx["nextPutAll:"]=5;
-$16=_st(each)._asVariableName();
-$15=self._nextPutAll_($16);
+$15=self._nextPutAll_(_st(each)._asVariableName());
 $ctx2.sendIdx["nextPutAll:"]=6;
 return $15;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
@@ -3594,22 +3551,19 @@ $ctx2.sendIdx["nextPutAll:"]=7;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 self._nextPutAll_("},");
 $ctx1.sendIdx["nextPutAll:"]=8;
-$23=_st(anIRClosure)._scope();
+$22=_st(anIRClosure)._scope();
 $ctx1.sendIdx["scope"]=4;
-$22=_st($23)._outerScope();
-$21=_st($22)._alias();
-$20=_st($21).__comma(",");
-$26=_st(anIRClosure)._scope();
-$25=_st($26)._blockIndex();
-$24=_st($25)._asString();
-$19=_st($20).__comma($24);
+$21=_st($22)._outerScope();
+$20=_st($21)._alias();
+$19=_st($20).__comma(",");
+$18=_st($19).__comma(_st(_st(_st(anIRClosure)._scope())._blockIndex())._asString());
 $ctx1.sendIdx[","]=7;
-$18=_st($19).__comma(")})");
+$17=_st($18).__comma(")})");
 $ctx1.sendIdx[","]=6;
-$17=self._nextPutAll_($18);
+$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: []
 }),
@@ -3689,7 +3643,7 @@ category: 'streaming',
 fn: function (aMethod,aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$5,$10,$9,$8,$7,$12,$11,$6,$16,$15,$14,$13,$17,$19,$18,$20,$21;
+var $4,$3,$2,$1,$5,$10,$9,$8,$7,$6,$14,$13,$12,$11,$15,$16,$17;
 $4=_st(aMethod)._scope();
 $ctx1.sendIdx["scope"]=1;
 $3=_st($4)._alias();
@@ -3710,31 +3664,28 @@ $8="}, function(".__comma($9);
 $ctx1.sendIdx[","]=5;
 $7=_st($8).__comma(") {");
 $ctx1.sendIdx[","]=4;
-$12=_st(aMethod)._scope();
-$11=_st($12)._alias();
-$6=_st($7).__comma($11);
+$6=_st($7).__comma(_st(_st(aMethod)._scope())._alias());
 $ctx1.sendIdx[","]=3;
 self._nextPutAll_($6);
 $ctx1.sendIdx["nextPutAll:"]=2;
-$16=_st(_st(aMethod)._selector())._asJavascript();
+$14=_st(_st(aMethod)._selector())._asJavascript();
 $ctx1.sendIdx["asJavascript"]=1;
-$15=".fill(self,".__comma($16);
-$14=_st($15).__comma(",{");
+$13=".fill(self,".__comma($14);
+$12=_st($13).__comma(",{");
 $ctx1.sendIdx[","]=6;
-$13=self._nextPutAll_($14);
+$11=self._nextPutAll_($12);
 $ctx1.sendIdx["nextPutAll:"]=3;
 _st(_st(aMethod)._locals())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$17=_st(each)._asVariableName();
+$15=_st(each)._asVariableName();
 $ctx2.sendIdx["asVariableName"]=1;
-self._nextPutAll_($17);
+self._nextPutAll_($15);
 $ctx2.sendIdx["nextPutAll:"]=4;
 self._nextPutAll_(":");
 $ctx2.sendIdx["nextPutAll:"]=5;
-$19=_st(each)._asVariableName();
-$18=self._nextPutAll_($19);
+$16=self._nextPutAll_(_st(each)._asVariableName());
 $ctx2.sendIdx["nextPutAll:"]=6;
-return $18;
+return $16;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return self._nextPutAll_(",");
@@ -3742,13 +3693,12 @@ $ctx2.sendIdx["nextPutAll:"]=7;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 self._nextPutAll_("},");
 $ctx1.sendIdx["nextPutAll:"]=8;
-$20=_st(_st(aMethod)._theClass())._asJavascript();
-self._nextPutAll_($20);
+self._nextPutAll_(_st(_st(aMethod)._theClass())._asJavascript());
 $ctx1.sendIdx["nextPutAll:"]=9;
-$21=self._nextPutAll_(")})");
+$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: []
 }),
@@ -3858,7 +3808,7 @@ fn: function (aMethod,aBlock){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3,$6,$9,$8,$7,$10,$11,$12,$15,$14,$13,$16,$19,$18,$17,$20,$24,$23,$22,$21,$25,$26,$27,$28,$29;
+var $1,$2,$5,$4,$3,$6,$9,$8,$7,$10,$11,$12,$15,$14,$13,$16,$19,$18,$17,$20,$23,$22,$21,$24,$25,$26;
 $1=self["@stream"];
 _st($1)._nextPutAll_("smalltalk.method({");
 $ctx1.sendIdx["nextPutAll:"]=1;
@@ -3910,11 +3860,10 @@ $ctx1.sendIdx["nextPutAll:"]=5;
 _st($11)._lf();
 $ctx1.sendIdx["lf"]=5;
 $20=$11;
-$24=_st(_st(_st(aMethod)._arguments())._collect_((function(each){
+$23=_st(_st(_st(_st(aMethod)._arguments())._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._value();
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._asArray();
-$23=_st($24)._asJavascript();
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._asArray())._asJavascript();
 $ctx1.sendIdx["asJavascript"]=4;
 $22="args: ".__comma($23);
 $21=_st($22).__comma(",");
@@ -3922,26 +3871,24 @@ $ctx1.sendIdx[","]=8;
 _st($20)._nextPutAll_($21);
 $ctx1.sendIdx["nextPutAll:"]=6;
 _st($11)._lf();
-$25=_st($11)._nextPutAll_("referencedClasses: [");
+$24=_st($11)._nextPutAll_("referencedClasses: [");
 $ctx1.sendIdx["nextPutAll:"]=7;
 _st(_st(aMethod)._classReferences())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$26=self["@stream"];
-$27=_st(each)._asJavascript();
-return _st($26)._nextPutAll_($27);
+return _st(self["@stream"])._nextPutAll_(_st(each)._asJavascript());
 $ctx2.sendIdx["nextPutAll:"]=8;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(self["@stream"])._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=9;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$28=self["@stream"];
-_st($28)._nextPutAll_("]");
+$25=self["@stream"];
+_st($25)._nextPutAll_("]");
 $ctx1.sendIdx["nextPutAll:"]=10;
-$29=_st($28)._nextPutAll_("})");
+$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"]
 }),
@@ -4128,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: []
 }),

+ 97 - 145
js/Compiler-Inlining.js

@@ -341,7 +341,7 @@ category: 'testing',
 fn: function (anIRAssignment){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$6,$5,$1;
+var $4,$3,$2,$1;
 $1=_st(_st(_st(anIRAssignment)._isInlined())._not())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 $4=_st(anIRAssignment)._instructions();
@@ -351,9 +351,7 @@ $ctx2.sendIdx["last"]=1;
 $2=_st($3)._isSend();
 return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$6=_st(anIRAssignment)._instructions();
-$5=_st($6)._last();
-return self._shouldInlineSend_($5);
+return self._shouldInlineSend_(_st(_st(anIRAssignment)._instructions())._last());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["and:"]=1;
@@ -373,7 +371,7 @@ category: 'testing',
 fn: function (anIRReturn){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$6,$5,$1;
+var $4,$3,$2,$1;
 $1=_st(_st(_st(anIRReturn)._isInlined())._not())._and_((function(){
 return smalltalk.withContext(function($ctx2) {
 $4=_st(anIRReturn)._instructions();
@@ -383,9 +381,7 @@ $ctx2.sendIdx["first"]=1;
 $2=_st($3)._isSend();
 return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$6=_st(anIRReturn)._instructions();
-$5=_st($6)._first();
-return self._shouldInlineSend_($5);
+return self._shouldInlineSend_(_st(_st(anIRReturn)._instructions())._first());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["and:"]=1;
@@ -429,7 +425,7 @@ var self=this;
 var localReturn;
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$5,$6,$7,$8,$9,$10,$11;
+var $2,$1,$4,$3,$5,$6,$7,$8,$9;
 $2=_st(anIRNonLocalReturn)._scope();
 $ctx1.sendIdx["scope"]=1;
 $1=_st($2)._canInlineNonLocalReturns();
@@ -441,22 +437,20 @@ $5=_st(anIRNonLocalReturn)._scope();
 $ctx1.sendIdx["scope"]=3;
 _st($3)._removeNonLocalReturn_($5);
 $6=_st($IRReturn())._new();
-$7=$6;
-$8=_st(anIRNonLocalReturn)._scope();
-_st($7)._scope_($8);
-$9=_st($6)._yourself();
-localReturn=$9;
+_st($6)._scope_(_st(anIRNonLocalReturn)._scope());
+$7=_st($6)._yourself();
+localReturn=$7;
 localReturn;
 _st(_st(anIRNonLocalReturn)._instructions())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(localReturn)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 _st(anIRNonLocalReturn)._replaceWith_(localReturn);
-$10=localReturn;
-return $10;
+$8=localReturn;
+return $8;
 };
-$11=smalltalk.IRInliner.superclass.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
-return $11;
+$9=smalltalk.IRInliner.superclass.fn.prototype._visitIRNonLocalReturn_.apply(_st(self), [anIRNonLocalReturn]);
+return $9;
 }, function($ctx1) {$ctx1.fill(self,"transformNonLocalReturn:",{anIRNonLocalReturn:anIRNonLocalReturn,localReturn:localReturn},smalltalk.IRInliner)})},
 args: ["anIRNonLocalReturn"],
 source: "transformNonLocalReturn: anIRNonLocalReturn\x0a\x09\x22Replace a non local return into a local return\x22\x0a\x0a\x09| localReturn |\x0a\x09anIRNonLocalReturn scope canInlineNonLocalReturns ifTrue: [\x0a\x09\x09anIRNonLocalReturn scope methodScope removeNonLocalReturn: anIRNonLocalReturn scope.\x0a\x09\x09localReturn := IRReturn new\x0a\x09\x09\x09scope: anIRNonLocalReturn scope;\x0a\x09\x09\x09yourself.\x0a\x09\x09anIRNonLocalReturn instructions do: [ :each |\x0a\x09\x09\x09localReturn add: each ].\x0a\x09\x09anIRNonLocalReturn replaceWith: localReturn.\x0a\x09\x09^ localReturn ].\x0a\x09^ super visitIRNonLocalReturn: anIRNonLocalReturn",
@@ -602,7 +596,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfFalse){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6;
+var $1,$2,$4,$3;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIf_with_((function(){
@@ -616,13 +610,10 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(")");
+return _st(self._stream())._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfFalse)._instructions();
-$6=_st($7)._last();
-return self._visit_($6);
+return self._visit_(_st(_st(anIRInlinedIfFalse)._instructions())._last());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfFalse:",{anIRInlinedIfFalse:anIRInlinedIfFalse},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfFalse"],
@@ -639,7 +630,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfNil){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6;
+var $1,$2,$4,$3;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIf_with_((function(){
@@ -653,13 +644,10 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(") == nil || $receiver == null");
+return _st(self._stream())._nextPutAll_(") == nil || $receiver == null");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfNil)._instructions();
-$6=_st($7)._last();
-return self._visit_($6);
+return self._visit_(_st(_st(anIRInlinedIfNil)._instructions())._last());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNil:",{anIRInlinedIfNil:anIRInlinedIfNil},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfNil"],
@@ -676,7 +664,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfNilIfNotNil){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6,$9,$8;
+var $1,$2,$4,$3,$6,$5;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIfElse_with_with_((function(){
@@ -690,20 +678,17 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(") == nil || $receiver == null");
+return _st(self._stream())._nextPutAll_(") == nil || $receiver == null");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfNilIfNotNil)._instructions();
+$6=_st(anIRInlinedIfNilIfNotNil)._instructions();
 $ctx2.sendIdx["instructions"]=2;
-$6=_st($7)._second();
-return self._visit_($6);
+$5=_st($6)._second();
+return self._visit_($5);
 $ctx2.sendIdx["visit:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$9=_st(anIRInlinedIfNilIfNotNil)._instructions();
-$8=_st($9)._third();
-return self._visit_($8);
+return self._visit_(_st(_st(anIRInlinedIfNilIfNotNil)._instructions())._third());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfNilIfNotNil:",{anIRInlinedIfNilIfNotNil:anIRInlinedIfNilIfNotNil},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfNilIfNotNil"],
@@ -720,7 +705,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfTrue){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6;
+var $1,$2,$4,$3;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIf_with_((function(){
@@ -734,13 +719,10 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(")");
+return _st(self._stream())._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfTrue)._instructions();
-$6=_st($7)._last();
-return self._visit_($6);
+return self._visit_(_st(_st(anIRInlinedIfTrue)._instructions())._last());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrue:",{anIRInlinedIfTrue:anIRInlinedIfTrue},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfTrue"],
@@ -757,7 +739,7 @@ category: 'visiting',
 fn: function (anIRInlinedIfTrueIfFalse){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6,$9,$8;
+var $1,$2,$4,$3,$6,$5;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutIfElse_with_with_((function(){
@@ -771,20 +753,17 @@ $ctx2.sendIdx["instructions"]=1;
 $3=_st($4)._first();
 self._visit_($3);
 $ctx2.sendIdx["visit:"]=1;
-$5=self._stream();
-return _st($5)._nextPutAll_(")");
+return _st(self._stream())._nextPutAll_(")");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$7=_st(anIRInlinedIfTrueIfFalse)._instructions();
+$6=_st(anIRInlinedIfTrueIfFalse)._instructions();
 $ctx2.sendIdx["instructions"]=2;
-$6=_st($7)._second();
-return self._visit_($6);
+$5=_st($6)._second();
+return self._visit_($5);
 $ctx2.sendIdx["visit:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$9=_st(anIRInlinedIfTrueIfFalse)._instructions();
-$8=_st($9)._third();
-return self._visit_($8);
+return self._visit_(_st(_st(anIRInlinedIfTrueIfFalse)._instructions())._third());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedIfTrueIfFalse:",{anIRInlinedIfTrueIfFalse:anIRInlinedIfTrueIfFalse},smalltalk.IRInliningJSTranslator)})},
 args: ["anIRInlinedIfTrueIfFalse"],
@@ -801,15 +780,14 @@ category: 'visiting',
 fn: function (anIRInlinedReturn){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._stream();
 $ctx1.sendIdx["stream"]=1;
 _st($1)._nextPutStatementWith_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._visit_(_st(_st(anIRInlinedReturn)._instructions())._last());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$2=self._stream();
-_st($2)._nextPutNonLocalReturnWith_((function(){
+_st(self._stream())._nextPutNonLocalReturnWith_((function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"visitIRInlinedNonLocalReturn:",{anIRInlinedReturn:anIRInlinedReturn},smalltalk.IRInliningJSTranslator)})},
@@ -1059,7 +1037,7 @@ function $IRAssignment(){return smalltalk.IRAssignment||(typeof IRAssignment=="u
 function $IRVariable(){return smalltalk.IRVariable||(typeof IRVariable=="undefined"?nil:IRVariable)}
 function $AliasVar(){return smalltalk.AliasVar||(typeof AliasVar=="undefined"?nil:AliasVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$4,$7,$9,$10,$12,$14,$15,$16,$17,$13,$11,$18,$20,$22,$23,$24,$25,$21,$19,$26,$8,$28,$27,$31,$30,$32,$29,$33,$36,$35,$34,$37,$38,$39;
+var $1,$2,$3,$5,$6,$4,$7,$9,$10,$12,$14,$15,$16,$17,$13,$11,$18,$20,$22,$23,$21,$19,$24,$8,$26,$25,$29,$28,$30,$27,$31,$34,$33,$32,$35;
 inlinedClosure=self._inlinedClosure();
 $1=inlinedClosure;
 $2=_st(anIRClosure)._scope();
@@ -1111,29 +1089,27 @@ $18=$9;
 $20=_st($IRVariable())._new();
 $ctx2.sendIdx["new"]=5;
 $22=_st($AliasVar())._new();
-$23=$22;
-$24=_st(inlinedClosure)._scope();
-_st($23)._scope_($24);
+_st($22)._scope_(_st(inlinedClosure)._scope());
 _st($22)._name_("$receiver");
-$25=_st($22)._yourself();
+$23=_st($22)._yourself();
 $ctx2.sendIdx["yourself"]=3;
-$21=$25;
+$21=$23;
 $19=_st($20)._variable_($21);
 _st($18)._add_($19);
 $ctx2.sendIdx["add:"]=5;
-$26=_st($9)._yourself();
-$8=$26;
+$24=_st($9)._yourself();
+$8=$24;
 return _st($7)._add_($8);
 $ctx2.sendIdx["add:"]=3;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 $ctx1.sendIdx["do:"]=2;
 _st(inlinedClosure)._add_(sequence);
 $ctx1.sendIdx["add:"]=6;
-$28=_st(anIRClosure)._instructions();
+$26=_st(anIRClosure)._instructions();
 $ctx1.sendIdx["instructions"]=2;
-$27=_st($28)._last();
+$25=_st($26)._last();
 $ctx1.sendIdx["last"]=1;
-statements=_st($27)._instructions();
+statements=_st($25)._instructions();
 $ctx1.sendIdx["instructions"]=1;
 _st(statements)._ifNotEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
@@ -1142,31 +1118,29 @@ return smalltalk.withContext(function($ctx3) {
 return _st(sequence)._add_(each);
 $ctx3.sendIdx["add:"]=7;
 }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,4)})}));
-$31=_st(statements)._last();
+$29=_st(statements)._last();
 $ctx2.sendIdx["last"]=2;
-$30=_st($31)._isReturn();
-$29=_st($30)._and_((function(){
+$28=_st($29)._isReturn();
+$27=_st($28)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$32=_st(statements)._last();
+$30=_st(statements)._last();
 $ctx3.sendIdx["last"]=3;
-return _st($32)._isBlockReturn();
+return _st($30)._isBlockReturn();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
-if(smalltalk.assert($29)){
-$33=sequence;
-$36=_st(statements)._last();
+if(smalltalk.assert($27)){
+$31=sequence;
+$34=_st(statements)._last();
 $ctx2.sendIdx["last"]=4;
-$35=_st($36)._instructions();
-$34=_st($35)._first();
-return _st($33)._add_($34);
+$33=_st($34)._instructions();
+$32=_st($33)._first();
+return _st($31)._add_($32);
 $ctx2.sendIdx["add:"]=8;
 } else {
-$37=sequence;
-$38=_st(statements)._last();
-return _st($37)._add_($38);
+return _st(sequence)._add_(_st(statements)._last());
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$39=inlinedClosure;
-return $39;
+$35=inlinedClosure;
+return $35;
 }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,sequence:sequence,statements:statements},smalltalk.IRSendInliner)})},
 args: ["anIRClosure"],
 source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure sequence statements |\x0a\x0a\x09inlinedClosure := self inlinedClosure.\x0a\x09inlinedClosure scope: anIRClosure scope.\x0a\x0a\x09\x22Add the possible temp declarations\x22\x0a\x09anIRClosure tempDeclarations do: [ :each |\x0a\x09\x09\x09inlinedClosure add: each ].\x0a\x0a\x09\x22Add a block sequence\x22\x0a\x09sequence := self inlinedSequence.\x0a\x0a\x09\x22Map the closure arguments to the receiver of the message send\x22\x0a\x09anIRClosure arguments do: [ :each |\x0a\x09\x09inlinedClosure add: (IRTempDeclaration new name: each; yourself).\x0a\x09\x09sequence add: (IRAssignment new\x0a\x09\x09\x09add: (IRVariable new variable: (AliasVar new scope: inlinedClosure scope; name: each; yourself));\x0a\x09\x09\x09add: (IRVariable new variable: (AliasVar new scope: inlinedClosure scope; name: '$receiver'; yourself));\x0a\x09\x09\x09yourself) ].\x0a\x09\x09\x09\x0a\x09\x22To ensure the correct order of the closure instructions: first the temps then the sequence\x22\x0a\x09inlinedClosure add: sequence.\x0a\x0a\x09\x22Get all the statements\x22\x0a\x09statements := anIRClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements allButLast do: [ :each | sequence add: each ].\x0a\x0a\x09\x09\x22Inlined closures don't have implicit local returns\x22\x0a\x09\x09(statements last isReturn and: [ statements last isBlockReturn ])\x0a\x09\x09\x09ifTrue: [ sequence add: statements last instructions first ]\x0a\x09\x09\x09ifFalse: [ sequence add: statements last ] ].\x0a\x0a\x09^ inlinedClosure",
@@ -1182,15 +1156,12 @@ category: 'inlining',
 fn: function (anIRSend){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$6,$5,$4,$1;
+var $3,$2,$1;
 self._send_(anIRSend);
 $3=self._send();
 $ctx1.sendIdx["send"]=1;
 $2=_st($3)._selector();
-$6=self._send();
-$5=_st($6)._instructions();
-$4=_st($5)._allButFirst();
-$1=self._perform_withArguments_($2,$4);
+$1=self._perform_withArguments_($2,_st(_st(self._send())._instructions())._allButFirst());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inlineSend:",{anIRSend:anIRSend},smalltalk.IRSendInliner)})},
 args: ["anIRSend"],
@@ -1227,7 +1198,7 @@ fn: function (inlinedSend,anIRInstruction){
 var self=this;
 var inlinedClosure;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3,$6,$7;
+var $1,$2,$5,$4,$3,$6;
 $1=_st(anIRInstruction)._isClosure();
 if(! smalltalk.assert($1)){
 self._inliningError_("Message argument should be a block");
@@ -1245,8 +1216,7 @@ $3=_st($4)._first();
 _st(inlinedSend)._add_($3);
 $ctx1.sendIdx["add:"]=1;
 $6=_st(inlinedSend)._add_(inlinedClosure);
-$7=self._send();
-_st($7)._replaceWith_(inlinedSend);
+_st(self._send())._replaceWith_(inlinedSend);
 return inlinedSend;
 }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,inlinedClosure:inlinedClosure},smalltalk.IRSendInliner)})},
 args: ["inlinedSend", "anIRInstruction"],
@@ -1264,7 +1234,7 @@ fn: function (inlinedSend,anIRInstruction,anotherIRInstruction){
 var self=this;
 var inlinedClosure1,inlinedClosure2;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$9,$8,$7,$10,$11;
+var $1,$2,$3,$4,$7,$6,$5,$8;
 $1=_st(anIRInstruction)._isClosure();
 $ctx1.sendIdx["isClosure"]=1;
 if(! smalltalk.assert($1)){
@@ -1281,20 +1251,17 @@ $4=self._inlineClosure_(anIRInstruction);
 $ctx1.sendIdx["inlineClosure:"]=1;
 inlinedClosure1=_st($3)._visit_($4);
 $ctx1.sendIdx["visit:"]=1;
-$5=self._translator();
-$6=self._inlineClosure_(anotherIRInstruction);
-inlinedClosure2=_st($5)._visit_($6);
-$9=self._send();
+inlinedClosure2=_st(self._translator())._visit_(self._inlineClosure_(anotherIRInstruction));
+$7=self._send();
 $ctx1.sendIdx["send"]=1;
-$8=_st($9)._instructions();
-$7=_st($8)._first();
-_st(inlinedSend)._add_($7);
+$6=_st($7)._instructions();
+$5=_st($6)._first();
+_st(inlinedSend)._add_($5);
 $ctx1.sendIdx["add:"]=1;
 _st(inlinedSend)._add_(inlinedClosure1);
 $ctx1.sendIdx["add:"]=2;
-$10=_st(inlinedSend)._add_(inlinedClosure2);
-$11=self._send();
-_st($11)._replaceWith_(inlinedSend);
+$8=_st(inlinedSend)._add_(inlinedClosure2);
+_st(self._send())._replaceWith_(inlinedSend);
 return inlinedSend;
 }, function($ctx1) {$ctx1.fill(self,"inlinedSend:with:with:",{inlinedSend:inlinedSend,anIRInstruction:anIRInstruction,anotherIRInstruction:anotherIRInstruction,inlinedClosure1:inlinedClosure1,inlinedClosure2:inlinedClosure2},smalltalk.IRSendInliner)})},
 args: ["inlinedSend", "anIRInstruction", "anotherIRInstruction"],
@@ -1505,7 +1472,7 @@ var self=this;
 var inlinedAssignment;
 function $IRInlinedAssignment(){return smalltalk.IRInlinedAssignment||(typeof IRInlinedAssignment=="undefined"?nil:IRInlinedAssignment)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4;
+var $1,$2;
 self._assignment_(anIRAssignment);
 inlinedAssignment=_st($IRInlinedAssignment())._new();
 $1=_st(anIRAssignment)._instructions();
@@ -1515,11 +1482,9 @@ return smalltalk.withContext(function($ctx2) {
 return _st(inlinedAssignment)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 _st(anIRAssignment)._replaceWith_(inlinedAssignment);
-$3=_st(inlinedAssignment)._instructions();
-$2=_st($3)._last();
-self._inlineSend_($2);
-$4=inlinedAssignment;
-return $4;
+self._inlineSend_(_st(_st(inlinedAssignment)._instructions())._last());
+$2=inlinedAssignment;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"inlineAssignment:",{anIRAssignment:anIRAssignment,inlinedAssignment:inlinedAssignment},smalltalk.IRAssignmentInliner)})},
 args: ["anIRAssignment"],
 source: "inlineAssignment: anIRAssignment\x0a\x09| inlinedAssignment |\x0a\x09self assignment: anIRAssignment.\x0a\x09inlinedAssignment := IRInlinedAssignment new.\x0a\x09anIRAssignment instructions do: [ :each |\x0a\x09\x09inlinedAssignment add: each ].\x0a\x09anIRAssignment replaceWith: inlinedAssignment.\x0a\x09self inlineSend: inlinedAssignment instructions last.\x0a\x09^ inlinedAssignment",
@@ -1537,7 +1502,7 @@ var self=this;
 var inlinedClosure,statements;
 function $IRAssignment(){return smalltalk.IRAssignment||(typeof IRAssignment=="undefined"?nil:IRAssignment)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$5,$7,$8,$10,$9,$11,$13,$12,$14,$6,$15;
+var $2,$1,$4,$3,$5,$7,$8,$6,$9;
 inlinedClosure=smalltalk.IRAssignmentInliner.superclass.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
 $2=_st(inlinedClosure)._instructions();
 $ctx1.sendIdx["instructions"]=2;
@@ -1554,22 +1519,16 @@ if(smalltalk.assert($3)){
 $5=_st(statements)._last();
 $ctx2.sendIdx["last"]=3;
 $7=_st($IRAssignment())._new();
-$8=$7;
-$10=_st(self._assignment())._instructions();
-$9=_st($10)._first();
-_st($8)._add_($9);
+_st($7)._add_(_st(_st(self._assignment())._instructions())._first());
 $ctx2.sendIdx["add:"]=1;
-$11=$7;
-$13=_st(statements)._last();
-$12=_st($13)._copy();
-_st($11)._add_($12);
-$14=_st($7)._yourself();
-$6=$14;
+_st($7)._add_(_st(_st(statements)._last())._copy());
+$8=_st($7)._yourself();
+$6=$8;
 return _st($5)._replaceWith_($6);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$15=inlinedClosure;
-return $15;
+$9=inlinedClosure;
+return $9;
 }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,inlinedClosure:inlinedClosure,statements:statements},smalltalk.IRAssignmentInliner)})},
 args: ["anIRClosure"],
 source: "inlineClosure: anIRClosure\x0a\x09| inlinedClosure statements |\x0a\x0a\x09inlinedClosure := super inlineClosure: anIRClosure.\x0a\x09statements := inlinedClosure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last canBeAssigned ifTrue: [\x0a\x09\x09\x09statements last replaceWith: (IRAssignment new\x0a\x09\x09\x09\x09add: self assignment instructions first;\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself) ] ].\x0a\x0a\x09^ inlinedClosure",
@@ -1591,33 +1550,28 @@ var self=this;
 var closure,statements;
 function $IRReturn(){return smalltalk.IRReturn||(typeof IRReturn=="undefined"?nil:IRReturn)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$5,$7,$8,$10,$9,$11,$6,$12;
+var $1,$3,$2,$4,$5,$6,$7;
 closure=smalltalk.IRReturnInliner.superclass.fn.prototype._inlineClosure_.apply(_st(self), [anIRClosure]);
-$2=_st(closure)._instructions();
-$1=_st($2)._last();
+$1=_st(_st(closure)._instructions())._last();
 $ctx1.sendIdx["last"]=1;
 statements=_st($1)._instructions();
 $ctx1.sendIdx["instructions"]=1;
 _st(statements)._ifNotEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(statements)._last();
+$3=_st(statements)._last();
 $ctx2.sendIdx["last"]=2;
-$3=_st($4)._isReturn();
-if(! smalltalk.assert($3)){
-$5=_st(statements)._last();
+$2=_st($3)._isReturn();
+if(! smalltalk.assert($2)){
+$4=_st(statements)._last();
 $ctx2.sendIdx["last"]=3;
-$7=_st($IRReturn())._new();
-$8=$7;
-$10=_st(statements)._last();
-$9=_st($10)._copy();
-_st($8)._add_($9);
-$11=_st($7)._yourself();
-$6=$11;
-return _st($5)._replaceWith_($6);
+$5=_st($IRReturn())._new();
+_st($5)._add_(_st(_st(statements)._last())._copy());
+$6=_st($5)._yourself();
+return _st($4)._replaceWith_($6);
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$12=closure;
-return $12;
+$7=closure;
+return $7;
 }, function($ctx1) {$ctx1.fill(self,"inlineClosure:",{anIRClosure:anIRClosure,closure:closure,statements:statements},smalltalk.IRReturnInliner)})},
 args: ["anIRClosure"],
 source: "inlineClosure: anIRClosure\x0a\x09| closure statements |\x0a\x0a\x09closure := super inlineClosure: anIRClosure.\x0a\x09statements := closure instructions last instructions.\x0a\x09\x0a\x09statements ifNotEmpty: [\x0a\x09\x09statements last isReturn\x0a\x09\x09\x09ifFalse: [ statements last replaceWith: (IRReturn new\x0a\x09\x09\x09\x09add: statements last copy;\x0a\x09\x09\x09\x09yourself)] ].\x0a\x0a\x09^ closure",
@@ -1634,7 +1588,7 @@ fn: function (anIRReturn){
 var self=this;
 var return_;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4;
+var $1,$2;
 return_=self._inlinedReturn();
 $1=_st(anIRReturn)._instructions();
 $ctx1.sendIdx["instructions"]=1;
@@ -1643,11 +1597,9 @@ return smalltalk.withContext(function($ctx2) {
 return _st(return_)._add_(each);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 _st(anIRReturn)._replaceWith_(return_);
-$3=_st(return_)._instructions();
-$2=_st($3)._last();
-self._inlineSend_($2);
-$4=return_;
-return $4;
+self._inlineSend_(_st(_st(return_)._instructions())._last());
+$2=return_;
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"inlineReturn:",{anIRReturn:anIRReturn,return_:return_},smalltalk.IRReturnInliner)})},
 args: ["anIRReturn"],
 source: "inlineReturn: anIRReturn\x0a\x09| return |\x0a\x09return := self inlinedReturn.\x0a\x09anIRReturn instructions do: [ :each |\x0a\x09\x09return add: each ].\x0a\x09anIRReturn replaceWith: return.\x0a\x09self inlineSend: return instructions last.\x0a\x09^ return",

+ 70 - 83
js/Compiler-Interpreter.js

@@ -184,7 +184,7 @@ fn: function (aCollection){
 var self=this;
 var context,sequenceNode;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$7,$6;
+var $1,$2,$3,$4,$5,$6;
 context=_st(self["@outerContext"])._newBlockContext();
 $1=_st(_st(_st(self["@node"])._nodes())._first())._copy();
 _st($1)._parent_(nil);
@@ -204,8 +204,7 @@ $4=_st($3)._proceed();
 $5=_st(self["@outerContext"])._interpreter();
 $ctx1.sendIdx["interpreter"]=2;
 _st($5)._setNonLocalReturnFromContext_(context);
-$7=_st(context)._interpreter();
-$6=_st($7)._pop();
+$6=_st(_st(context)._interpreter())._pop();
 return $6;
 }, function($ctx1) {$ctx1.fill(self,"valueWithPossibleArguments:",{aCollection:aCollection,context:context,sequenceNode:sequenceNode},smalltalk.AIBlockClosure)})},
 args: ["aCollection"],
@@ -378,14 +377,11 @@ fn: function (){
 var self=this;
 function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2;
+var $1;
 $1=self._method();
 $ctx1.sendIdx["method"]=1;
 self["@ast"]=_st($1)._ast();
-$4=self._method();
-$3=_st($4)._methodClass();
-$2=_st($SemanticAnalyzer())._on_($3);
-_st($2)._visit_(self["@ast"]);
+_st(_st($SemanticAnalyzer())._on_(_st(self._method())._methodClass()))._visit_(self["@ast"]);
 return self}, function($ctx1) {$ctx1.fill(self,"initializeAST",{},smalltalk.AIContext)})},
 args: [],
 source: "initializeAST\x0a\x09ast := self method ast.\x0a\x09(SemanticAnalyzer on: self method methodClass)\x0a\x09\x09visit: ast",
@@ -401,7 +397,7 @@ category: 'initialization',
 fn: function (aMethodContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$4,$7,$8;
+var $1,$2,$3,$4;
 self._evaluatedSelector_(_st(aMethodContext)._evaluatedSelector());
 self._index_(_st(aMethodContext)._index());
 self._sendIndexes_(_st(aMethodContext)._sendIndexes());
@@ -418,17 +414,13 @@ $3=_st(outer)._methodContext();
 if(($receiver = $3) == nil || $receiver == null){
 $3;
 } else {
-$5=self._class();
-$6=_st(aMethodContext)._outerContext();
-$4=_st($5)._fromMethodContext_($6);
-self._outerContext_($4);
+self._outerContext_(_st(self._class())._fromMethodContext_(_st(aMethodContext)._outerContext()));
 };
-$7=_st(aMethodContext)._locals();
+$4=_st(aMethodContext)._locals();
 $ctx1.sendIdx["locals"]=1;
-_st($7)._keysAndValuesDo_((function(key,value){
+_st($4)._keysAndValuesDo_((function(key,value){
 return smalltalk.withContext(function($ctx2) {
-$8=self._locals();
-return _st($8)._at_put_(key,value);
+return _st(self._locals())._at_put_(key,value);
 }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,3)})}));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethodContext:",{aMethodContext:aMethodContext},smalltalk.AIContext)})},
@@ -608,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: []
 }),
@@ -661,7 +653,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$5,$4,$3,$7,$6,$1;
+var $2,$5,$4,$3,$1;
 $2=self._methodContext();
 $ctx1.sendIdx["methodContext"]=1;
 if(($receiver = $2) == nil || $receiver == null){
@@ -671,9 +663,7 @@ $5=self._methodContext();
 $ctx1.sendIdx["methodContext"]=2;
 $4=_st($5)._receiver();
 $3=_st($4)._class();
-$7=self._methodContext();
-$6=_st($7)._selector();
-$1=_st($3)._lookupSelector_($6);
+$1=_st($3)._lookupSelector_(_st(self._methodContext())._selector());
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.AIContext)})},
@@ -878,7 +868,7 @@ var self=this;
 var currentNode;
 function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3,$7,$6;
+var $1,$2,$5,$4,$3;
 $1=_st($ASTPCNodeVisitor())._new();
 _st($1)._selector_(self._evaluatedSelector());
 _st($1)._context_(self);
@@ -895,9 +885,7 @@ return smalltalk.withContext(function($ctx2) {
 return _st(anInterpreter)._push_(each);
 $ctx2.sendIdx["push:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
-$7=self._innerContext();
-$6=_st($7)._receiver();
-_st(anInterpreter)._push_($6);
+_st(anInterpreter)._push_(_st(self._innerContext())._receiver());
 return self}, function($ctx1) {$ctx1.fill(self,"setupInterpreter:",{anInterpreter:anInterpreter,currentNode:currentNode},smalltalk.AIContext)})},
 args: ["anInterpreter"],
 source: "setupInterpreter: anInterpreter\x0a\x09| currentNode |\x0a\x09\x0a\x09\x22Retrieve the current node\x22\x0a\x09currentNode := ASTPCNodeVisitor new\x0a\x09\x09\x09selector: self evaluatedSelector;\x0a\x09\x09\x09context: self;\x0a\x09\x09\x09visit: self ast;\x0a\x09\x09\x09currentNode.\x0a\x09\x0a\x09anInterpreter node: currentNode.\x0a\x0a\x09\x22Push the send args and receiver to the interpreter stack\x22\x09\x0a\x09self innerContext arguments reversed do: [ :each | \x0a\x09\x09anInterpreter push: each ].\x0a\x09\x09\x0a\x09anInterpreter push: (self innerContext receiver)",
@@ -930,7 +918,7 @@ smalltalk.AIContext.klass);
 
 
 smalltalk.addClass('ASTDebugger', smalltalk.Object, ['interpreter', 'context'], 'Compiler-Interpreter');
-smalltalk.ASTDebugger.comment="I am a stepping debugger interface for Amber code.\x0aI internally use an instance of `ASTSteppingInterpreter` to actually step through node and interpret them.\x0a\x0aMy instances are created from a `MethodContext` with `ASTDebugger class >> context:`.\x0aThey hold an `AIContext` instance internally, recursive copy of the `MethodContext`.\x0a\x0a## API\x0a\x0aUse the methods of the `'stepping'` protocol to do stepping.";
+smalltalk.ASTDebugger.comment="I am a stepping debugger interface for Amber code.\x0aI internally use an instance of `ASTInterpreter` to actually step through node and interpret them.\x0a\x0aMy instances are created from an `AIContext` with `ASTDebugger class >> context:`.\x0aThey hold an `AIContext` instance internally, recursive copy of the `MethodContext`.\x0a\x0a## API\x0a\x0aUse the methods of the `'stepping'` protocol to do stepping.";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "atEnd",
@@ -1173,6 +1161,22 @@ referencedClasses: []
 }),
 smalltalk.ASTDebugger);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "skip",
+category: 'stepping',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._interpreter())._skip();
+return self}, function($ctx1) {$ctx1.fill(self,"skip",{},smalltalk.ASTDebugger)})},
+args: [],
+source: "skip\x0a\x09self interpreter skip",
+messageSends: ["skip", "interpreter"],
+referencedClasses: []
+}),
+smalltalk.ASTDebugger);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "stepInto",
@@ -1237,7 +1241,7 @@ category: 'private',
 fn: function (aNode,anObject){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$5,$6;
+var $1,$3,$2,$4;
 $1=_st(_st(aNode)._binding())._isInstanceVar();
 if(smalltalk.assert($1)){
 $3=self._context();
@@ -1247,9 +1251,7 @@ $4=_st(aNode)._value();
 $ctx1.sendIdx["value"]=1;
 _st($2)._instVarAt_put_($4,anObject);
 } else {
-$5=self._context();
-$6=_st(aNode)._value();
-_st($5)._localAt_put_($6,anObject);
+_st(self._context())._localAt_put_(_st(aNode)._value(),anObject);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"assign:to:",{aNode:aNode,anObject:anObject},smalltalk.ASTInterpreter)})},
 args: ["aNode", "anObject"],
@@ -1324,7 +1326,7 @@ var source,function_;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$6,$9,$8,$7,$5;
+var $3,$2,$1,$4,$5;
 source=_st($String())._streamContents_((function(str){
 return smalltalk.withContext(function($ctx2) {
 _st(str)._nextPutAll_("(function(");
@@ -1351,11 +1353,7 @@ $4=_st(str)._nextPutAll_("})() })");
 return $4;
 }, function($ctx2) {$ctx2.fillBlock({str:str},$ctx1,1)})}));
 function_=_st(_st($Compiler())._new())._eval_(source);
-$6=function_;
-$9=self._context();
-$8=_st($9)._locals();
-$7=_st($8)._values();
-$5=_st($6)._valueWithPossibleArguments_($7);
+$5=_st(function_)._valueWithPossibleArguments_(_st(_st(self._context())._locals())._values());
 return $5;
 }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,source:source,function_:function_},smalltalk.ASTInterpreter)})},
 args: ["aString"],
@@ -1522,7 +1520,7 @@ category: 'stack',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1,$2;
 var $early={};
 try {
 $1=self._stack();
@@ -1531,8 +1529,7 @@ _st($1)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
 throw $early=[nil];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
-$3=self._stack();
-$2=_st($3)._last();
+$2=_st(self._stack())._last();
 return $2;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
@@ -1581,7 +1578,7 @@ return self._step();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},smalltalk.ASTInterpreter)})},
 args: [],
-source: "proceed\x0a\x09\x22Eagerly evaluate the ast\x22\x0a\x09\x0a\x09[ self atEnd ] whileFalse: [ \x0a\x09\x09self step ]",
+source: "proceed\x0a\x09\x22Eagerly evaluate the ast\x22\x0a\x09\x0a\x09[ self atEnd ] \x0a\x09\x09whileFalse: [ self step ]",
 messageSends: ["whileFalse:", "atEnd", "step"],
 referencedClasses: []
 }),
@@ -1686,7 +1683,7 @@ fn: function (aMessage,anObject,aBoolean){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$7,$6,$5,$8,$9;
+var $1,$3,$2,$4,$5,$6;
 var $early={};
 try {
 if(! smalltalk.assert(aBoolean)){
@@ -1704,16 +1701,13 @@ return $4;
 } else {
 $2;
 };
-$7=_st(anObject)._class();
-$6=_st($7)._superclass();
-$5=_st($6)._methodDictionary();
-method=_st($5)._at_ifAbsent_(_st(aMessage)._selector(),(function(){
+method=_st(_st(_st(_st(anObject)._class())._superclass())._methodDictionary())._at_ifAbsent_(_st(aMessage)._selector(),(function(){
 return smalltalk.withContext(function($ctx2) {
-$8=self._messageNotUnderstood_receiver_(aMessage,anObject);
-throw $early=[$8];
+$5=self._messageNotUnderstood_receiver_(aMessage,anObject);
+throw $early=[$5];
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$9=_st(method)._sendTo_arguments_(anObject,_st(aMessage)._arguments());
-return $9;
+$6=_st(method)._sendTo_arguments_(anObject,_st(aMessage)._arguments());
+return $6;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"sendMessage:to:superSend:",{aMessage:aMessage,anObject:anObject,aBoolean:aBoolean,method:method},smalltalk.ASTInterpreter)})},
@@ -1731,16 +1725,14 @@ category: 'interpreting',
 fn: function (aContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=_st(aContext)._interpreter();
 $ctx1.sendIdx["interpreter"]=1;
 $1=_st($2)._hasReturned();
 if(smalltalk.assert($1)){
 self["@returned"]=true;
 self["@returned"];
-$4=_st(aContext)._interpreter();
-$3=_st($4)._returnValue();
-self._returnValue_($3);
+self._returnValue_(_st(_st(aContext)._interpreter())._returnValue());
 };
 return self}, function($ctx1) {$ctx1.fill(self,"setNonLocalReturnFromContext:",{aContext:aContext},smalltalk.ASTInterpreter)})},
 args: ["aContext"],
@@ -2056,7 +2048,7 @@ var self=this;
 function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$5,$6,$4,$3,$9,$8,$11,$10,$12,$13,$14,$16,$15,$17,$18,$19,$20,$7;
+var $2,$1,$5,$6,$4,$3,$8,$10,$9,$11,$12,$13,$15,$14,$16,$17,$7;
 $2=_st(aNode)._binding();
 $ctx1.sendIdx["binding"]=1;
 $1=_st($2)._isUnknownVar();
@@ -2074,33 +2066,30 @@ $3=self._push_($4);
 $ctx1.sendIdx["push:"]=1;
 return $3;
 };
-$9=_st(aNode)._binding();
-$8=_st($9)._isInstanceVar();
+$8=_st(_st(aNode)._binding())._isInstanceVar();
 if(smalltalk.assert($8)){
-$11=self._context();
+$10=self._context();
 $ctx1.sendIdx["context"]=1;
-$10=_st($11)._receiver();
-$12=_st(aNode)._value();
+$9=_st($10)._receiver();
+$11=_st(aNode)._value();
 $ctx1.sendIdx["value"]=2;
-$7=_st($10)._instVarAt_($12);
+$7=_st($9)._instVarAt_($11);
 } else {
-$13=self._context();
-$14=_st(aNode)._value();
+$12=self._context();
+$13=_st(aNode)._value();
 $ctx1.sendIdx["value"]=3;
-$7=_st($13)._localAt_ifAbsent_($14,(function(){
+$7=_st($12)._localAt_ifAbsent_($13,(function(){
 return smalltalk.withContext(function($ctx2) {
-$16=_st(aNode)._value();
+$15=_st(aNode)._value();
 $ctx2.sendIdx["value"]=4;
-$15=_st($16)._isCapitalized();
-if(smalltalk.assert($15)){
-$17=_st($Smalltalk())._current();
-$18=_st(aNode)._value();
+$14=_st($15)._isCapitalized();
+if(smalltalk.assert($14)){
+$16=_st($Smalltalk())._current();
+$17=_st(aNode)._value();
 $ctx2.sendIdx["value"]=5;
-return _st($17)._at_ifAbsent_($18,(function(){
+return _st($16)._at_ifAbsent_($17,(function(){
 return smalltalk.withContext(function($ctx3) {
-$19=_st($PlatformInterface())._globals();
-$20=_st(aNode)._value();
-return _st($19)._at_($20);
+return _st(_st($PlatformInterface())._globals())._at_(_st(aNode)._value());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
@@ -2108,7 +2097,7 @@ return _st($19)._at_($20);
 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"]
 }),
@@ -2272,7 +2261,7 @@ fn: function (aNode){
 var self=this;
 var sendIndex;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$3,$7,$6,$9,$8;
+var $1,$2,$4,$3,$6,$5,$7;
 $1=self._context();
 $2=self._selector();
 $ctx1.sendIdx["selector"]=1;
@@ -2280,16 +2269,14 @@ sendIndex=_st($1)._sendIndexAt_($2);
 smalltalk.ASTPCNodeVisitor.superclass.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
 $4=self._selector();
 $ctx1.sendIdx["selector"]=2;
-$5=_st(aNode)._selector();
-$3=_st($4).__eq($5);
+$3=_st($4).__eq(_st(aNode)._selector());
 if(smalltalk.assert($3)){
-$7=self._index();
+$6=self._index();
 $ctx1.sendIdx["index"]=1;
-$6=_st($7).__lt(sendIndex);
-if(! smalltalk.assert($6)){
-$9=self._index();
-$8=_st($9).__gt(sendIndex);
-if(! smalltalk.assert($8)){
+$5=_st($6).__lt(sendIndex);
+if(! smalltalk.assert($5)){
+$7=_st(self._index()).__gt(sendIndex);
+if(! smalltalk.assert($7)){
 self["@currentNode"]=aNode;
 self["@currentNode"];
 };

+ 43 - 69
js/Compiler-Semantic.js

@@ -12,13 +12,11 @@ fn: function (aString){
 var self=this;
 function $ArgVar(){return smalltalk.ArgVar||(typeof ArgVar=="undefined"?nil:ArgVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 $1=self._args();
 $ctx1.sendIdx["args"]=1;
 _st($1)._at_put_(aString,_st($ArgVar())._on_(aString));
-$3=self._args();
-$2=_st($3)._at_(aString);
-_st($2)._scope_(self);
+_st(_st(self._args())._at_(aString))._scope_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"addArg:",{aString:aString},smalltalk.LexicalScope)})},
 args: ["aString"],
 source: "addArg: aString\x0a\x09self args at: aString put: (ArgVar on: aString).\x0a\x09(self args at: aString) scope: self",
@@ -35,13 +33,11 @@ fn: function (aString){
 var self=this;
 function $TempVar(){return smalltalk.TempVar||(typeof TempVar=="undefined"?nil:TempVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 $1=self._temps();
 $ctx1.sendIdx["temps"]=1;
 _st($1)._at_put_(aString,_st($TempVar())._on_(aString));
-$3=self._temps();
-$2=_st($3)._at_(aString);
-_st($2)._scope_(self);
+_st(_st(self._temps())._at_(aString))._scope_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"addTemp:",{aString:aString},smalltalk.LexicalScope)})},
 args: ["aString"],
 source: "addTemp: aString\x0a\x09self temps at: aString put: (TempVar on: aString).\x0a\x09(self temps at: aString) scope: self",
@@ -75,11 +71,10 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=_st(self._args())._keys();
 $ctx1.sendIdx["keys"]=1;
-$3=_st(self._temps())._keys();
-$1=_st($2).__comma($3);
+$1=_st($2).__comma(_st(self._temps())._keys());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"allVariableNames",{},smalltalk.LexicalScope)})},
 args: [],
@@ -121,7 +116,7 @@ category: 'accessing',
 fn: function (aStringOrNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$6,$7,$1;
+var $2,$3,$4,$5,$1;
 $2=self._pseudoVars();
 $3=_st(aStringOrNode)._value();
 $ctx1.sendIdx["value"]=1;
@@ -132,9 +127,7 @@ $5=_st(aStringOrNode)._value();
 $ctx2.sendIdx["value"]=2;
 return _st($4)._at_ifAbsent_($5,(function(){
 return smalltalk.withContext(function($ctx3) {
-$6=self._temps();
-$7=_st(aStringOrNode)._value();
-return _st($6)._at_ifAbsent_($7,(function(){
+return _st(self._temps())._at_ifAbsent_(_st(aStringOrNode)._value(),(function(){
 return smalltalk.withContext(function($ctx4) {
 return nil;
 }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
@@ -270,14 +263,13 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$4,$1;
+var $3,$2,$1;
 $3=self._instruction();
 $ctx1.sendIdx["instruction"]=1;
 $2=_st($3)._notNil();
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$4=self._instruction();
-return _st($4)._isInlined();
+return _st(self._instruction())._isInlined();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isInlined",{},smalltalk.LexicalScope)})},
@@ -312,7 +304,7 @@ fn: function (aNode){
 var self=this;
 var lookup;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2,$3;
 lookup=self._bindingFor_(aNode);
 $1=lookup;
 if(($receiver = $1) == nil || $receiver == null){
@@ -321,15 +313,14 @@ $ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 lookup=$2;
 } else {
-$3=self._outerScope();
-lookup=_st($3)._lookupVariable_(aNode);
+lookup=_st(self._outerScope())._lookupVariable_(aNode);
 };
 lookup;
 } else {
 $1;
 };
-$4=lookup;
-return $4;
+$3=lookup;
+return $3;
 }, function($ctx1) {$ctx1.fill(self,"lookupVariable:",{aNode:aNode,lookup:lookup},smalltalk.LexicalScope)})},
 args: ["aNode"],
 source: "lookupVariable: aNode\x0a\x09| lookup |\x0a\x09lookup := (self bindingFor: aNode).\x0a\x09lookup ifNil: [\x0a\x09\x09lookup := self outerScope ifNotNil: [\x0a\x09\x09\x09(self outerScope lookupVariable: aNode) ]].\x0a\x09^ lookup",
@@ -345,14 +336,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=self._outerScope();
 $ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1=$2;
 } else {
-$3=self._outerScope();
-$1=_st($3)._methodScope();
+$1=_st(self._outerScope())._methodScope();
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methodScope",{},smalltalk.LexicalScope)})},
@@ -456,7 +446,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$7,$6,$5;
+var $1,$2,$4,$3,$5;
 $1=self._outerScope();
 $ctx1.sendIdx["outerScope"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -472,9 +462,7 @@ $3=_st($4)._scopeLevel();
 $ctx1.sendIdx["scopeLevel"]=1;
 return $3;
 };
-$7=self._outerScope();
-$6=_st($7)._scopeLevel();
-$5=_st($6).__plus((1));
+$5=_st(_st(self._outerScope())._scopeLevel()).__plus((1));
 return $5;
 }, function($ctx1) {$ctx1.fill(self,"scopeLevel",{},smalltalk.LexicalScope)})},
 args: [],
@@ -521,13 +509,11 @@ fn: function (aString){
 var self=this;
 function $InstanceVar(){return smalltalk.InstanceVar||(typeof InstanceVar=="undefined"?nil:InstanceVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 $1=self._iVars();
 $ctx1.sendIdx["iVars"]=1;
 _st($1)._at_put_(aString,_st($InstanceVar())._on_(aString));
-$3=self._iVars();
-$2=_st($3)._at_(aString);
-_st($2)._scope_(self);
+_st(_st(self._iVars())._at_(aString))._scope_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"addIVar:",{aString:aString},smalltalk.MethodLexicalScope)})},
 args: ["aString"],
 source: "addIVar: aString\x0a\x09self iVars at: aString put: (InstanceVar on: aString).\x0a\x09(self iVars at: aString) scope: self",
@@ -1182,9 +1168,8 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="$".__comma(self._name());
-$1=_st($2).__comma("()");
+var $1;
+$1=_st("$".__comma(self._name())).__comma("()");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.ClassRefVar)})},
@@ -1238,9 +1223,8 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="self[\x22@".__comma(self._name());
-$1=_st($2).__comma("\x22]");
+var $1;
+$1=_st("self[\x22@".__comma(self._name())).__comma("\x22]");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"alias",{},smalltalk.InstanceVar)})},
@@ -1420,7 +1404,7 @@ var identifier;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $UnknownVariableError(){return smalltalk.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6,$7;
+var $1,$2,$3,$4,$5;
 identifier=_st(aNode)._value();
 $ctx1.sendIdx["value"]=1;
 $1=_st(_st(_st(_st(_st($Smalltalk())._current())._globalJsVariables())._includes_(identifier))._not())._and_((function(){
@@ -1436,9 +1420,7 @@ _st($3)._variableName_($4);
 $5=_st($2)._signal();
 $5;
 } else {
-$6=_st(_st(self["@currentScope"])._methodScope())._unknownVariables();
-$7=_st(aNode)._value();
-_st($6)._add_($7);
+_st(_st(_st(self["@currentScope"])._methodScope())._unknownVariables())._add_(_st(aNode)._value());
 };
 return self}, function($ctx1) {$ctx1.fill(self,"errorUnknownVariable:",{aNode:aNode,identifier:identifier},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
@@ -1745,15 +1727,14 @@ category: 'visiting',
 fn: function (aNode){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4;
+var $3,$2,$1;
 smalltalk.SemanticAnalyzer.superclass.fn.prototype._visitCascadeNode_.apply(_st(self), [aNode]);
 $3=_st(aNode)._nodes();
 $ctx1.sendIdx["nodes"]=1;
 $2=_st($3)._first();
 $1=_st($2)._superSend();
 if(smalltalk.assert($1)){
-$4=_st(aNode)._nodes();
-_st($4)._do_((function(each){
+_st(_st(aNode)._nodes())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._superSend_(true);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
@@ -1794,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: []
 }),
@@ -1833,7 +1814,7 @@ var self=this;
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
 function $IRSendInliner(){return smalltalk.IRSendInliner||(typeof IRSendInliner=="undefined"?nil:IRSendInliner)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$5,$6,$8,$9,$7,$11,$12,$10,$13,$14,$15,$17,$18,$16,$21,$22,$20,$19;
+var $3,$2,$1,$4,$5,$6,$8,$9,$7,$11,$12,$10,$13,$14,$16,$17,$15;
 $3=_st(aNode)._receiver();
 $ctx1.sendIdx["receiver"]=1;
 $2=_st($3)._value();
@@ -1867,30 +1848,25 @@ $ctx1.sendIdx["selector"]=3;
 $10=_st($11)._includes_($12);
 if(smalltalk.assert($10)){
 _st(aNode)._shouldBeInlined_(true);
-$13=_st(aNode)._receiver();
-_st($13)._shouldBeAliased_(true);
+_st(_st(aNode)._receiver())._shouldBeAliased_(true);
 };
 };
-$14=self._messageSends();
+$13=self._messageSends();
 $ctx1.sendIdx["messageSends"]=1;
-$15=_st(aNode)._selector();
+$14=_st(aNode)._selector();
 $ctx1.sendIdx["selector"]=4;
-_st($14)._at_ifAbsentPut_($15,(function(){
+_st($13)._at_ifAbsentPut_($14,(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st($Set())._new();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
-$17=self._messageSends();
+$16=self._messageSends();
 $ctx1.sendIdx["messageSends"]=2;
-$18=_st(aNode)._selector();
+$17=_st(aNode)._selector();
 $ctx1.sendIdx["selector"]=5;
-$16=_st($17)._at_($18);
+$15=_st($16)._at_($17);
 $ctx1.sendIdx["at:"]=2;
-_st($16)._add_(aNode);
-$21=self._messageSends();
-$22=_st(aNode)._selector();
-$20=_st($21)._at_($22);
-$19=_st($20)._size();
-_st(aNode)._index_($19);
+_st($15)._add_(aNode);
+_st(aNode)._index_(_st(_st(self._messageSends())._at_(_st(aNode)._selector()))._size());
 smalltalk.SemanticAnalyzer.superclass.fn.prototype._visitSendNode_.apply(_st(self), [aNode]);
 return self}, function($ctx1) {$ctx1.fill(self,"visitSendNode:",{aNode:aNode},smalltalk.SemanticAnalyzer)})},
 args: ["aNode"],
@@ -1931,7 +1907,7 @@ var binding;
 function $ClassRefVar(){return smalltalk.ClassRefVar||(typeof ClassRefVar=="undefined"?nil:ClassRefVar)}
 function $UnknownVar(){return smalltalk.UnknownVar||(typeof UnknownVar=="undefined"?nil:UnknownVar)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13;
+var $1,$3,$2,$4,$5,$6,$7,$8,$9,$10,$11;
 binding=_st(self["@currentScope"])._lookupVariable_(aNode);
 $1=binding;
 if(($receiver = $1) == nil || $receiver == null){
@@ -1957,11 +1933,9 @@ _st($8)._add_($9);
 } else {
 self._errorUnknownVariable_(aNode);
 $10=_st($UnknownVar())._new();
-$11=$10;
-$12=_st(aNode)._value();
-_st($11)._name_($12);
-$13=_st($10)._yourself();
-binding=$13;
+_st($10)._name_(_st(aNode)._value());
+$11=_st($10)._yourself();
+binding=$11;
 binding;
 };
 } else {

+ 54 - 71
js/Compiler-Tests.js

@@ -70,16 +70,15 @@ var self=this;
 function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
 function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$4,$6,$1;
+var $2,$3,$4,$5,$1;
 $2=_st($ASTPCNodeVisitor())._new();
 $ctx1.sendIdx["new"]=1;
 $3=$2;
-$5=_st($AIContext())._new();
-$4=_st($5)._yourself();
+$4=_st(_st($AIContext())._new())._yourself();
 $ctx1.sendIdx["yourself"]=1;
 _st($3)._context_($4);
-$6=_st($2)._yourself();
-$1=$6;
+$5=_st($2)._yourself();
+$1=$5;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"astPCNodeVisitor",{},smalltalk.ASTPCNodeVisitorTest)})},
 args: [],
@@ -98,17 +97,16 @@ var self=this;
 function $ASTPCNodeVisitor(){return smalltalk.ASTPCNodeVisitor||(typeof ASTPCNodeVisitor=="undefined"?nil:ASTPCNodeVisitor)}
 function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$4,$6,$1;
+var $2,$3,$4,$5,$1;
 $2=_st($ASTPCNodeVisitor())._new();
 $ctx1.sendIdx["new"]=1;
 _st($2)._selector_(aString);
 $3=$2;
-$5=_st($AIContext())._new();
-$4=_st($5)._yourself();
+$4=_st(_st($AIContext())._new())._yourself();
 $ctx1.sendIdx["yourself"]=1;
 _st($3)._context_($4);
-$6=_st($2)._yourself();
-$1=$6;
+$5=_st($2)._yourself();
+$1=$5;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"astPCNodeVisitorForSelector:",{aString:aString},smalltalk.ASTPCNodeVisitorTest)})},
 args: ["aString"],
@@ -196,7 +194,7 @@ var self=this;
 var ast;
 function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$1,$7,$8,$6,$5;
+var $3,$4,$2,$1,$5,$6;
 ast=self._parse_forClass_("foo true ifTrue: [ self asString yourself ]. ^ self asBoolean",$Object());
 $ctx1.sendIdx["parse:forClass:"]=1;
 $3=self._astPCNodeVisitorForSelector_("yourself");
@@ -211,12 +209,10 @@ $ctx1.sendIdx["selector"]=1;
 self._assert_equals_($1,"yourself");
 $ctx1.sendIdx["assert:equals:"]=1;
 ast=self._parse_forClass_("foo true ifTrue: [ self asString yourself ]. ^ self asBoolean",$Object());
-$7=self._astPCNodeVisitorForSelector_("asBoolean");
-_st($7)._visit_(ast);
-$8=_st($7)._currentNode();
-$6=$8;
-$5=_st($6)._selector();
-self._assert_equals_($5,"asBoolean");
+$5=self._astPCNodeVisitorForSelector_("asBoolean");
+_st($5)._visit_(ast);
+$6=_st($5)._currentNode();
+self._assert_equals_(_st($6)._selector(),"asBoolean");
 return self}, function($ctx1) {$ctx1.fill(self,"testMessageSendWithInlining",{ast:ast},smalltalk.ASTPCNodeVisitorTest)})},
 args: [],
 source: "testMessageSendWithInlining\x0a\x09| ast |\x0a\x09\x0a\x09ast := self parse: 'foo true ifTrue: [ self asString yourself ]. ^ self asBoolean' forClass: Object.\x0a\x09self assert: ((self astPCNodeVisitorForSelector: 'yourself')\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) selector equals: 'yourself'.\x0a\x09\x09\x0a\x09ast := self parse: 'foo true ifTrue: [ self asString yourself ]. ^ self asBoolean' forClass: Object.\x0a\x09self assert: ((self astPCNodeVisitorForSelector: 'asBoolean')\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) selector equals: 'asBoolean'",
@@ -338,15 +334,14 @@ fn: function (aString,anObject,aResult){
 var self=this;
 var method,result;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 self["@receiver"]=anObject;
 $1=self._compiler();
 $2=_st(anObject)._class();
 $ctx1.sendIdx["class"]=1;
 method=_st($1)._install_forClass_category_(aString,$2,"tests");
 result=_st(self["@receiver"])._perform_(_st(method)._selector());
-$3=_st(anObject)._class();
-_st($3)._removeCompiledMethod_(method);
+_st(_st(anObject)._class())._removeCompiledMethod_(method);
 self._assert_equals_(aResult,result);
 return self}, function($ctx1) {$ctx1.fill(self,"should:receiver:return:",{aString:aString,anObject:anObject,aResult:aResult,method:method,result:result},smalltalk.CodeGeneratorTest)})},
 args: ["aString", "anObject", "aResult"],
@@ -470,10 +465,12 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
+self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { x. x := 2 }\x0a",[(1), (2)]);
+$ctx1.sendIdx["should:return:"]=1;
 self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { x. true ifTrue: [ x := 2 ] }\x0a",[(1), (2)]);
 return self}, function($ctx1) {$ctx1.fill(self,"testDynamicArrayElementsOrdered",{},smalltalk.CodeGeneratorTest)})},
 args: [],
-source: "testDynamicArrayElementsOrdered\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { x. true ifTrue: [ x := 2 ] }\x0a' return: #(1 2).",
+source: "testDynamicArrayElementsOrdered\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { x. x := 2 }\x0a' return: #(1 2).\x0a\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { x. true ifTrue: [ x := 2 ] }\x0a' return: #(1 2).",
 messageSends: ["should:return:"],
 referencedClasses: []
 }),
@@ -486,11 +483,10 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2="foo".__minus_gt((1));
 $ctx1.sendIdx["->"]=1;
-$3="bar".__minus_gt((2));
-$1=smalltalk.HashedCollection._from_([$2,$3]);
+$1=smalltalk.HashedCollection._from_([$2,"bar".__minus_gt((2))]);
 self._should_return_("foo\x0a\x09| x |\x0a\x09x := 'foo'->1.\x0a\x09^ #{ x. (true ifTrue: [ x := 'bar'->2 ]) }\x0a",$1);
 return self}, function($ctx1) {$ctx1.fill(self,"testDynamicDictionaryElementsOrdered",{},smalltalk.CodeGeneratorTest)})},
 args: [],
@@ -529,36 +525,42 @@ fn: function (){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$5,$6,$4,$8,$9,$7,$11,$12,$10;
+var $2,$3,$1,$5,$6,$4,$8,$9,$7,$11,$12,$10,$14,$13;
 $2="foo".__minus_gt($Array());
 $ctx1.sendIdx["->"]=1;
 $3="bar".__minus_gt((2));
 $ctx1.sendIdx["->"]=2;
 $1=[$2,$3];
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",$1);
+self._should_return_("foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: 'foo'->x with: 'bar'->(x := 2)\x0a",$1);
 $ctx1.sendIdx["should:return:"]=1;
-$5="foo".__minus_gt((1));
+$5="foo".__minus_gt($Array());
 $ctx1.sendIdx["->"]=3;
 $6="bar".__minus_gt((2));
 $ctx1.sendIdx["->"]=4;
 $4=[$5,$6];
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",$4);
+self._should_return_("foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",$4);
 $ctx1.sendIdx["should:return:"]=2;
 $8="foo".__minus_gt((1));
 $ctx1.sendIdx["->"]=5;
 $9="bar".__minus_gt((2));
 $ctx1.sendIdx["->"]=6;
 $7=[$8,$9];
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",$7);
+self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: 'foo'->x with: 'bar'->(true ifTrue: [ x := 2 ])\x0a",$7);
 $ctx1.sendIdx["should:return:"]=3;
 $11="foo".__minus_gt((1));
 $ctx1.sendIdx["->"]=7;
 $12="bar".__minus_gt((2));
-$10=smalltalk.HashedCollection._from_([$11,$12]);
-self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ #{ 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",$10);
+$ctx1.sendIdx["->"]=8;
+$10=[$11,$12];
+self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",$10);
+$ctx1.sendIdx["should:return:"]=4;
+$14="foo".__minus_gt((1));
+$ctx1.sendIdx["->"]=9;
+$13=smalltalk.HashedCollection._from_([$14,"bar".__minus_gt((2))]);
+self._should_return_("foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ #{ 'foo'->x. 'bar'->(true ifTrue: [ x := 2 ]) }\x0a",$13);
 return self}, function($ctx1) {$ctx1.fill(self,"testInnerTemporalDependentElementsOrdered",{},smalltalk.CodeGeneratorTest)})},
 args: [],
-source: "testInnerTemporalDependentElementsOrdered\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])\x0a' return: {'foo'->Array. 'bar'->2}.\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])\x0a' return: {'foo'->1. 'bar'->2}.\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: {'foo'->1. 'bar'->2}.\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ #{ ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: #{'foo'->1. 'bar'->2}.",
+source: "testInnerTemporalDependentElementsOrdered\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: ''foo''->x with: ''bar''->(x := 2)\x0a' return: {'foo'->Array. 'bar'->2}.\x0a\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := Array.\x0a\x09^ x with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])\x0a' return: {'foo'->Array. 'bar'->2}.\x0a\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ Array with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])\x0a' return: {'foo'->1. 'bar'->2}.\x0a\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ { ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: {'foo'->1. 'bar'->2}.\x0a\x0a\x09self should: 'foo\x0a\x09| x |\x0a\x09x := 1.\x0a\x09^ #{ ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }\x0a' return: #{'foo'->1. 'bar'->2}.",
 messageSends: ["should:return:", "->"],
 referencedClasses: ["Array"]
 }),
@@ -587,7 +589,7 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 self._should_return_("foo ^ 1",(1));
 $ctx1.sendIdx["should:return:"]=1;
 self._should_return_("foo ^ 'hello'","hello");
@@ -602,8 +604,7 @@ self._should_return_("foo ^ false",false);
 $ctx1.sendIdx["should:return:"]=6;
 $2=(1).__minus_gt((2));
 $ctx1.sendIdx["->"]=1;
-$3=(3).__minus_gt((4));
-$1=smalltalk.HashedCollection._from_([$2,$3]);
+$1=smalltalk.HashedCollection._from_([$2,(3).__minus_gt((4))]);
 self._should_return_("foo ^ #{1->2. 3->4}",$1);
 $ctx1.sendIdx["should:return:"]=7;
 self._should_return_("foo ^ #hello","hello");
@@ -833,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: []
 }),
@@ -1201,7 +1202,7 @@ function $VariableNode(){return smalltalk.VariableNode||(typeof VariableNode=="u
 function $SemanticAnalyzer(){return smalltalk.SemanticAnalyzer||(typeof SemanticAnalyzer=="undefined"?nil:SemanticAnalyzer)}
 function $MethodLexicalScope(){return smalltalk.MethodLexicalScope||(typeof MethodLexicalScope=="undefined"?nil:MethodLexicalScope)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6;
+var $1,$2,$3,$4;
 $1=_st($VariableNode())._new();
 $ctx1.sendIdx["new"]=1;
 _st($1)._value_("Object");
@@ -1209,10 +1210,8 @@ $2=_st($1)._yourself();
 node=$2;
 $3=_st($SemanticAnalyzer())._new();
 $ctx1.sendIdx["new"]=2;
-$4=$3;
-$5=_st($MethodLexicalScope())._new();
-_st($4)._pushScope_($5);
-$6=_st($3)._visit_(node);
+_st($3)._pushScope_(_st($MethodLexicalScope())._new());
+$4=_st($3)._visit_(node);
 self._assert_(_st(_st(node)._binding())._isClassRefVar());
 return self}, function($ctx1) {$ctx1.fill(self,"testClassRefVar",{node:node},smalltalk.ScopeVarTest)})},
 args: [],
@@ -1259,7 +1258,7 @@ var node,pseudoVars;
 function $VariableNode(){return smalltalk.VariableNode||(typeof VariableNode=="undefined"?nil:VariableNode)}
 function $MethodLexicalScope(){return smalltalk.MethodLexicalScope||(typeof MethodLexicalScope=="undefined"?nil:MethodLexicalScope)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3;
+var $1,$2;
 pseudoVars=["self", "super", "true", "false", "nil"];
 _st(pseudoVars)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
@@ -1269,10 +1268,7 @@ _st($1)._value_(each);
 $2=_st($1)._yourself();
 node=$2;
 node;
-$5=_st($MethodLexicalScope())._new();
-$4=_st($5)._bindingFor_(node);
-$3=_st($4)._isPseudoVar();
-return self._assert_($3);
+return self._assert_(_st(_st(_st($MethodLexicalScope())._new())._bindingFor_(node))._isPseudoVar());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"testPseudoVar",{node:node,pseudoVars:pseudoVars},smalltalk.ScopeVarTest)})},
 args: [],
@@ -1319,16 +1315,13 @@ var node;
 function $VariableNode(){return smalltalk.VariableNode||(typeof VariableNode=="undefined"?nil:VariableNode)}
 function $MethodLexicalScope(){return smalltalk.MethodLexicalScope||(typeof MethodLexicalScope=="undefined"?nil:MethodLexicalScope)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$3;
+var $1,$2;
 $1=_st($VariableNode())._new();
 $ctx1.sendIdx["new"]=1;
 _st($1)._value_("bzzz");
 $2=_st($1)._yourself();
 node=$2;
-$5=_st($MethodLexicalScope())._new();
-$4=_st($5)._bindingFor_(node);
-$3=_st($4)._isNil();
-self._assert_($3);
+self._assert_(_st(_st(_st($MethodLexicalScope())._new())._bindingFor_(node))._isNil());
 return self}, function($ctx1) {$ctx1.fill(self,"testUnknownVar",{node:node},smalltalk.ScopeVarTest)})},
 args: [],
 source: "testUnknownVar\x0a\x09| node |\x0a\x09node := VariableNode new\x0a\x09\x09value: 'bzzz';\x0a\x09\x09yourself.\x0a\x09self assert: (MethodLexicalScope new bindingFor: node) isNil",
@@ -1429,19 +1422,16 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
-var $6,$5,$4,$3,$2,$7,$1;
+var $4,$3,$2,$1;
 src="foo | a | a + 1. [ | b | b := a ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-$6=_st(ast)._nodes();
-$5=_st($6)._first();
-$4=_st($5)._nodes();
+$4=_st(_st(_st(ast)._nodes())._first())._nodes();
 $ctx1.sendIdx["nodes"]=1;
 $3=_st($4)._last();
 $2=_st($3)._scope();
 $ctx1.sendIdx["scope"]=1;
-$7=_st(ast)._scope();
-$1=_st($2).__eq_eq($7);
+$1=_st($2).__eq_eq(_st(ast)._scope());
 self._deny_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"testScope",{src:src,ast:ast},smalltalk.SemanticAnalyzerTest)})},
 args: [],
@@ -1459,13 +1449,11 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
-var $10,$9,$8,$7,$6,$5,$4,$3,$2,$11,$1;
+var $8,$7,$6,$5,$4,$3,$2,$1;
 src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
-$10=_st(ast)._nodes();
-$9=_st($10)._first();
-$8=_st($9)._nodes();
+$8=_st(_st(_st(ast)._nodes())._first())._nodes();
 $ctx1.sendIdx["nodes"]=3;
 $7=_st($8)._last();
 $6=_st($7)._nodes();
@@ -1478,8 +1466,7 @@ $3=_st($4)._first();
 $ctx1.sendIdx["first"]=1;
 $2=_st($3)._scope();
 $ctx1.sendIdx["scope"]=1;
-$11=_st(ast)._scope();
-$1=_st($2).__eq_eq($11);
+$1=_st($2).__eq_eq(_st(ast)._scope());
 self._deny_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"testScope2",{src:src,ast:ast},smalltalk.SemanticAnalyzerTest)})},
 args: [],
@@ -1497,7 +1484,7 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$12,$11,$10,$9,$8,$7,$6,$5,$4,$3;
+var $2,$1,$10,$9,$8,$7,$6,$5,$4,$3;
 src="foo | a | a + 1. [ [ | b | b := a ] ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
@@ -1507,9 +1494,7 @@ $1=_st($2)._scopeLevel();
 $ctx1.sendIdx["scopeLevel"]=1;
 self._assert_equals_($1,(1));
 $ctx1.sendIdx["assert:equals:"]=1;
-$12=_st(ast)._nodes();
-$11=_st($12)._first();
-$10=_st($11)._nodes();
+$10=_st(_st(_st(ast)._nodes())._first())._nodes();
 $ctx1.sendIdx["nodes"]=3;
 $9=_st($10)._last();
 $8=_st($9)._nodes();
@@ -1688,7 +1673,7 @@ fn: function (){
 var self=this;
 var src,ast;
 return smalltalk.withContext(function($ctx1) { 
-var $7,$6,$5,$4,$3,$2,$1,$15,$14,$13,$12,$11,$10,$9,$16,$8,$27,$26,$25,$24,$23,$22,$21,$20,$19,$18,$17,$39,$38,$37,$36,$35,$34,$33,$32,$31,$30,$29,$44,$43,$42,$41,$40,$28;
+var $7,$6,$5,$4,$3,$2,$1,$15,$14,$13,$12,$11,$10,$9,$16,$8,$27,$26,$25,$24,$23,$22,$21,$20,$19,$18,$17,$39,$38,$37,$36,$35,$34,$33,$32,$31,$30,$29,$42,$41,$40,$28;
 src="foo | a | a + 1. [ | b | b := a ]";
 ast=_st(smalltalk)._parse_(src);
 _st(self["@analyzer"])._visit_(ast);
@@ -1770,9 +1755,7 @@ $31=_st($32)._left();
 $30=_st($31)._binding();
 $29=_st($30)._scope();
 $ctx1.sendIdx["scope"]=3;
-$44=_st(ast)._nodes();
-$43=_st($44)._first();
-$42=_st($43)._nodes();
+$42=_st(_st(_st(ast)._nodes())._first())._nodes();
 $ctx1.sendIdx["nodes"]=13;
 $41=_st($42)._last();
 $40=_st($41)._scope();

+ 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: []
 }),

+ 90 - 123
js/Helios-Browser.js

@@ -228,21 +228,19 @@ function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="unde
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $5,$4,$6,$3,$2,$1,$7;
+var $5,$4,$3,$2,$1;
 $5=self._packagesListWidget();
 $ctx1.sendIdx["packagesListWidget"]=1;
 $4=_st($HLVerticalSplitter())._with_with_($5,self._classesListWidget());
 $ctx1.sendIdx["with:with:"]=3;
-$6=_st($HLVerticalSplitter())._with_with_(self._protocolsListWidget(),self._methodsListWidget());
-$3=_st($HLVerticalSplitter())._with_with_($4,$6);
+$3=_st($HLVerticalSplitter())._with_with_($4,_st($HLVerticalSplitter())._with_with_(self._protocolsListWidget(),self._methodsListWidget()));
 $ctx1.sendIdx["with:with:"]=2;
 $2=_st($HLHorizontalSplitter())._with_with_($3,self._sourceWidget());
 $ctx1.sendIdx["with:with:"]=1;
 $1=_st($HLContainer())._with_($2);
 _st(html)._with_($1);
 $ctx1.sendIdx["with:"]=1;
-$7=self._packagesListWidget();
-_st($7)._focus();
+_st(self._packagesListWidget())._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLBrowser)})},
 args: ["html"],
 source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a    \x09with: (HLVerticalSplitter\x0a        \x09with: (HLVerticalSplitter\x0a            \x09with: self packagesListWidget\x0a                with: self classesListWidget)\x0a            with: (HLVerticalSplitter\x0a            \x09with: self protocolsListWidget\x0a                with: self methodsListWidget)) \x0a        with: self sourceWidget)).\x0a\x09\x0a\x09self packagesListWidget focus",
@@ -853,7 +851,7 @@ fn: function (aBoolean){
 var self=this;
 function $HLShowInstanceToggled(){return smalltalk.HLShowInstanceToggled||(typeof HLShowInstanceToggled=="undefined"?nil:HLShowInstanceToggled)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2;
+var $1,$3,$2;
 self._withChangesDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 self["@showInstance"]=aBoolean;
@@ -868,8 +866,7 @@ $3=self._selectedClass();
 $ctx2.sendIdx["selectedClass"]=2;
 $2=_st($3)._theNonMetaClass();
 } else {
-$4=self._selectedClass();
-$2=_st($4)._theMetaClass();
+$2=_st(self._selectedClass())._theMetaClass();
 };
 self._selectedClass_($2);
 };
@@ -877,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"]
 }),
@@ -937,7 +934,7 @@ category: 'actions',
 fn: function (aSelector){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$6,$5,$3,$7;
+var $2,$1,$3,$4;
 $2=self._theClass();
 $ctx1.sendIdx["theClass"]=1;
 $1=_st($2)._superclass();
@@ -945,13 +942,10 @@ $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$4=self._selectorsCache();
-$6=self._theClass();
-$5=_st($6)._superclass();
-$3=_st($4)._cacheFor_($5);
+$3=_st(self._selectorsCache())._cacheFor_(_st(self._theClass())._superclass());
 _st($3)._removeSelector_(aSelector);
-$7=_st($3)._invalidateParentSelector_(aSelector);
-$7;
+$4=_st($3)._invalidateParentSelector_(aSelector);
+$4;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"invalidateParentSelector:",{aSelector:aSelector},smalltalk.HLClassCache)})},
 args: ["aSelector"],
@@ -1195,7 +1189,7 @@ category: 'accessing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4;
+var $3,$2,$1,$4;
 $3=_st(aClass)._theNonMetaClass();
 $ctx1.sendIdx["theNonMetaClass"]=1;
 $2=_st($3)._comment();
@@ -1203,8 +1197,7 @@ $1=_st($2)._isEmpty();
 if(smalltalk.assert($1)){
 return "uncommented";
 };
-$5=_st(aClass)._theNonMetaClass();
-$4=_st($5)._heliosClass();
+$4=_st(_st(aClass)._theNonMetaClass())._heliosClass();
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"cssClassForItem:",{aClass:aClass},smalltalk.HLClassesListWidget)})},
 args: ["aClass"],
@@ -1429,7 +1422,7 @@ fn: function (anAnnouncement){
 var self=this;
 var class_,oldClass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2,$5;
+var $1,$4,$3,$2;
 class_=_st(anAnnouncement)._theClass();
 oldClass=_st(anAnnouncement)._oldClass();
 $1=_st(self._items())._includes_(oldClass);
@@ -1441,8 +1434,7 @@ $ctx1.sendIdx["model"]=1;
 $3=_st($4)._selectedClass();
 $2=_st($3).__eq(oldClass);
 if(smalltalk.assert($2)){
-$5=self._model();
-_st($5)._selectedClass_(class_);
+_st(self._model())._selectedClass_(class_);
 };
 self._setItemsForSelectedPackage();
 self._refresh();
@@ -1462,7 +1454,7 @@ fn: function (anAnnouncement){
 var self=this;
 var class_,oldPackage;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$5,$4,$2,$6,$8,$7,$1,$10,$12,$11,$9,$13;
+var $3,$5,$4,$2,$6,$8,$7,$1,$9,$10;
 class_=_st(anAnnouncement)._theClass();
 oldPackage=_st(anAnnouncement)._oldPackage();
 $3=oldPackage;
@@ -1485,14 +1477,11 @@ $ctx2.sendIdx["="]=2;
 if(! smalltalk.assert($1)){
 return self;
 };
-$10=oldPackage;
-$12=self._model();
-$11=_st($12)._selectedPackage();
-$9=_st($10).__eq($11);
+$9=_st(oldPackage).__eq(_st(self._model())._selectedPackage());
 if(smalltalk.assert($9)){
 self._selectedItem_(nil);
-$13=self._selectItem_(nil);
-$13;
+$10=self._selectItem_(nil);
+$10;
 };
 self._setItemsForSelectedPackage();
 self._refresh();
@@ -1558,7 +1547,7 @@ fn: function (anAnnouncement){
 var self=this;
 var selectedClass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4;
+var $1,$2,$3;
 $1=_st(anAnnouncement)._item();
 $ctx1.sendIdx["item"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -1566,14 +1555,13 @@ return self;
 } else {
 $1;
 };
-$2=_st(anAnnouncement)._item();
-selectedClass=_st($2)._theNonMetaClass();
+selectedClass=_st(_st(anAnnouncement)._item())._theNonMetaClass();
 self._selectedItem_(selectedClass);
-$3=self._hasFocus();
-if(! smalltalk.assert($3)){
+$2=self._hasFocus();
+if(! smalltalk.assert($2)){
 self._activateItem_(selectedClass);
-$4=self._focus();
-$4;
+$3=self._focus();
+$3;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onClassSelected:",{anAnnouncement:anAnnouncement,selectedClass:selectedClass},smalltalk.HLClassesListWidget)})},
 args: ["anAnnouncement"],
@@ -1658,7 +1646,7 @@ var self=this;
 var checkbox;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$6,$5,$7,$8,$9,$11,$10,$12,$2,$13,$15,$16,$14,$17;
+var $1,$3,$4,$6,$5,$7,$8,$9,$10,$2,$11,$13,$14,$12,$15;
 $1=_st(html)._div();
 _st($1)._class_("btn-group");
 $ctx1.sendIdx["class:"]=1;
@@ -1690,45 +1678,43 @@ $ctx3.sendIdx["showInstance:"]=1;
 $ctx2.sendIdx["onClick:"]=1;
 $7;
 $8=_st(html)._button();
-$9=$8;
-$10=_st($String())._streamContents_((function(str){
+_st($8)._class_(_st($String())._streamContents_((function(str){
 return smalltalk.withContext(function($ctx3) {
 _st(str)._nextPutAll_("btn");
 $ctx3.sendIdx["nextPutAll:"]=3;
-$11=self._showClass();
-if(smalltalk.assert($11)){
+$9=self._showClass();
+if(smalltalk.assert($9)){
 return _st(str)._nextPutAll_(" active");
 };
-}, function($ctx3) {$ctx3.fillBlock({str:str},$ctx2,5)})}));
-_st($9)._class_($10);
+}, function($ctx3) {$ctx3.fillBlock({str:str},$ctx2,5)})})));
 $ctx2.sendIdx["class:"]=3;
 _st($8)._with_("Class");
 $ctx2.sendIdx["with:"]=3;
-$12=_st($8)._onClick_((function(){
+$10=_st($8)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._showInstance_(false);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
 $ctx2.sendIdx["onClick:"]=2;
-return $12;
+return $10;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["with:"]=1;
-$13=_st(html)._label();
-_st($13)._class_("checkbox");
-$14=_st($13)._with_((function(){
+$11=_st(html)._label();
+_st($11)._class_("checkbox");
+$12=_st($11)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-$15=_st(html)._input();
-_st($15)._type_("checkbox");
-$16=_st($15)._onClick_((function(){
+$13=_st(html)._input();
+_st($13)._type_("checkbox");
+$14=_st($13)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._toggleShowComment();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
-checkbox=$16;
+checkbox=$14;
 checkbox;
 return _st(html)._with_("Doc");
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,8)})}));
 $ctx1.sendIdx["with:"]=4;
-$17=self._showComment();
-if(smalltalk.assert($17)){
+$15=self._showComment();
+if(smalltalk.assert($15)){
 _st(checkbox)._at_put_("checked","checked");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,checkbox:checkbox},smalltalk.HLClassesListWidget)})},
@@ -1747,25 +1733,27 @@ fn: function (aClass,anInteger,html){
 var self=this;
 var li;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2;
+var $1,$2,$4,$5,$3;
 li=_st(html)._li();
-$1=li;
-_st($1)._at_put_("list-data",self._listDataKeyFor_(aClass));
-_st($1)._class_(self._listCssClassForItem_(aClass));
+$1=_st(li)._asJQuery();
+$ctx1.sendIdx["asJQuery"]=1;
+_st($1)._data_put_("item",aClass);
+$2=li;
+_st($2)._class_(self._listCssClassForItem_(aClass));
 $ctx1.sendIdx["class:"]=1;
-$2=_st($1)._with_((function(){
+$3=_st($2)._with_((function(){
 return smalltalk.withContext(function($ctx2) {
-$3=_st(html)._a();
-_st($3)._with_((function(){
+$4=_st(html)._a();
+_st($4)._with_((function(){
 return smalltalk.withContext(function($ctx3) {
 _st(_st(html)._tag_("i"))._class_(self._cssClassForItem_(aClass));
 return self._renderItemLabel_level_on_(aClass,anInteger,html);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
-$4=_st($3)._onClick_((function(){
+$5=_st($4)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._activateListItem_(_st(li)._asJQuery());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
-return $4;
+return $5;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["with:"]=1;
 _st(self._getChildrenOf_(aClass))._do_((function(each){
@@ -1774,8 +1762,8 @@ return self._renderItem_level_on_(each,_st(anInteger).__plus((1)),html);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"renderItem:level:on:",{aClass:aClass,anInteger:anInteger,html:html,li:li},smalltalk.HLClassesListWidget)})},
 args: ["aClass", "anInteger", "html"],
-source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a    \x0a\x09li := html li.\x0a\x09\x0a    li\x0a    \x09at: 'list-data' put: (self listDataKeyFor: aClass);\x0a\x09\x09class: (self listCssClassForItem: aClass);\x0a\x09\x09with: [ \x0a        \x09html a\x0a            \x09with: [ \x0a            \x09\x09(html tag: 'i') class: (self cssClassForItem: aClass).\x0a  \x09\x09\x09\x09\x09self renderItemLabel: aClass level: anInteger on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a                  \x09self activateListItem: li asJQuery ] ].\x0a                    \x0a    (self getChildrenOf: aClass) do: [ :each |\x0a    \x09self renderItem: each level: anInteger + 1 on: html ]",
-messageSends: ["li", "at:put:", "listDataKeyFor:", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:level:on:", "onClick:", "activateListItem:", "asJQuery", "do:", "getChildrenOf:", "renderItem:level:on:", "+"],
+source: "renderItem: aClass level: anInteger on: html\x0a\x09| li |\x0a    \x0a\x09li := html li.\x0a\x09li asJQuery data: 'item' put: aClass.\x0a    li\x0a\x09\x09class: (self listCssClassForItem: aClass);\x0a\x09\x09with: [ \x0a        \x09html a\x0a            \x09with: [ \x0a            \x09\x09(html tag: 'i') class: (self cssClassForItem: aClass).\x0a  \x09\x09\x09\x09\x09self renderItemLabel: aClass level: anInteger on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a                  \x09self activateListItem: li asJQuery ] ].\x0a                    \x0a    (self getChildrenOf: aClass) do: [ :each |\x0a    \x09self renderItem: each level: anInteger + 1 on: html ]",
+messageSends: ["li", "data:put:", "asJQuery", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:level:on:", "onClick:", "activateListItem:", "do:", "getChildrenOf:", "renderItem:level:on:", "+"],
 referencedClasses: []
 }),
 smalltalk.HLClassesListWidget);
@@ -1819,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"]
 }),
@@ -1883,7 +1871,7 @@ category: 'private',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 if(($receiver = aPackage) == nil || $receiver == null){
 $1=[];
 } else {
@@ -1894,14 +1882,13 @@ return _st(each)._theNonMetaClass();
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._name();
 $ctx2.sendIdx["name"]=1;
-$3=_st(b)._name();
-return _st($2).__lt($3);
+return _st($2).__lt(_st(b)._name());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,4)})}));
 };
 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: []
 }),
@@ -2249,7 +2236,7 @@ category: 'reactions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $5,$4,$3,$2,$1,$9,$8,$7,$6;
+var $5,$4,$3,$2,$1;
 $5=self._model();
 $ctx1.sendIdx["model"]=1;
 $4=_st($5)._selectedClass();
@@ -2258,11 +2245,7 @@ $3=_st($4)._theNonMetaClass();
 $ctx1.sendIdx["theNonMetaClass"]=1;
 $2=_st($3)._name();
 $1=_st($2).__comma(" comment");
-$9=self._model();
-$8=_st($9)._selectedClass();
-$7=_st($8)._theNonMetaClass();
-$6=_st($7)._comment();
-self._request_value_do_($1,$6,(function(comment){
+self._request_value_do_($1,_st(_st(_st(self._model())._selectedClass())._theNonMetaClass())._comment(),(function(comment){
 return smalltalk.withContext(function($ctx2) {
 return self._setClassComment_(comment);
 }, function($ctx2) {$ctx2.fillBlock({comment:comment},$ctx1,1)})}));
@@ -2306,7 +2289,7 @@ fn: function (html){
 var self=this;
 function $Showdown(){return smalltalk.Showdown||(typeof Showdown=="undefined"?nil:Showdown)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$3,$7,$8,$6;
+var $1,$2,$4,$5,$3,$6,$7;
 $1=self._selectedItem();
 if(($receiver = $1) == nil || $receiver == null){
 $1;
@@ -2329,11 +2312,10 @@ return $5;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 $ctx1.sendIdx["with:"]=2;
 $3;
-$7=_st(html)._div();
-_st($7)._class_("markdown");
-$8=_st($7)._asJQuery();
-$6=$8;
-_st($6)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(self._documentation()));
+$6=_st(html)._div();
+_st($6)._class_("markdown");
+$7=_st($6)._asJQuery();
+_st($7)._html_(_st(_st(_st($Showdown())._at_("converter"))._new())._makeHtml_(self._documentation()));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"renderDocOn:",{html:html},smalltalk.HLDocumentationWidget)})},
 args: ["html"],
@@ -2369,7 +2351,7 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$5,$6,$9,$8,$7,$12,$11,$10,$2;
+var $1,$4,$3,$5,$6,$9,$8,$7,$10,$2;
 $1=_st(html)._div();
 _st($1)._class_("inheritance");
 $2=_st($1)._with_((function(){
@@ -2394,9 +2376,7 @@ $7=_st($8)._name();
 _st($6)._with_($7);
 $10=_st($5)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
-$12=self._selectedItem();
-$11=_st($12)._superclass();
-return self._selectClass_($11);
+return self._selectClass_(_st(self._selectedItem())._superclass());
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
 return $10;
 };
@@ -2620,7 +2600,7 @@ category: 'accessing',
 fn: function (aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$5,$7,$6,$9,$8,$4;
+var $2,$1,$3,$5,$7,$6,$4;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._selectedClass();
@@ -2639,9 +2619,7 @@ $6=_st($7)._selectedClass();
 $ctx1.sendIdx["selectedClass"]=2;
 $4=_st($6)._methods();
 } else {
-$9=self._model();
-$8=_st($9)._selectedClass();
-$4=_st($8)._methodsInProtocol_(aString);
+$4=_st(_st(self._model())._selectedClass())._methodsInProtocol_(aString);
 };
 return $4;
 }, function($ctx1) {$ctx1.fill(self,"methodsInProtocol:",{aString:aString},smalltalk.HLMethodsListWidget)})},
@@ -2740,7 +2718,7 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$6,$5,$8,$7,$4,$9;
+var $3,$2,$1,$6,$5,$4,$7;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._selectedMethod();
@@ -2752,15 +2730,13 @@ return self;
 $6=self._model();
 $ctx1.sendIdx["model"]=2;
 $5=_st($6)._selectedProtocol();
-$8=self._model();
-$7=_st($8)._allProtocol();
-$4=_st($5).__eq($7);
+$4=_st($5).__eq(_st(self._model())._allProtocol());
 if(! smalltalk.assert($4)){
 self._selectedItem_(nil);
 self._selectItem_(nil);
 self._setItemsForSelectedProtocol();
-$9=self._refresh();
-$9;
+$7=self._refresh();
+$7;
 };
 return self}, function($ctx1) {$ctx1.fill(self,"onMethodMoved:",{anAnnouncement:anAnnouncement},smalltalk.HLMethodsListWidget)})},
 args: ["anAnnouncement"],
@@ -2778,7 +2754,7 @@ fn: function (anAnnouncement){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$5,$6,$3,$7;
+var $1,$2,$4,$3,$5;
 var $early={};
 try {
 method=_st(anAnnouncement)._method();
@@ -2801,14 +2777,12 @@ $4=_st(_st(method)._methodClass()).__eq(_st(self._model())._selectedClass());
 $ctx1.sendIdx["="]=2;
 $3=_st($4)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=_st(method)._selector();
-$6=self._selectedItem();
-return _st($5).__eq($6);
+return _st(_st(method)._selector()).__eq(self._selectedItem());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
 if(smalltalk.assert($3)){
 self._selectedItem_(nil);
-$7=self._selectItem_(nil);
-$7;
+$5=self._selectItem_(nil);
+$5;
 };
 };
 self._setItemsForSelectedProtocol();
@@ -3051,7 +3025,7 @@ category: 'actions',
 fn: function (aSelector){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $2,$1;
 if(($receiver = aSelector) == nil || $receiver == null){
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
@@ -3061,8 +3035,7 @@ return $1;
 } else {
 aSelector;
 };
-$3=self._model();
-_st($3)._selectedMethod_(self._methodForSelector_(aSelector));
+_st(self._model())._selectedMethod_(self._methodForSelector_(aSelector));
 return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aSelector:aSelector},smalltalk.HLMethodsListWidget)})},
 args: ["aSelector"],
 source: "selectItem: aSelector\x0a\x09aSelector ifNil: [ ^ self model selectedMethod: nil ].\x0a\x0a   \x09self model selectedMethod: (self methodForSelector: aSelector)",
@@ -3229,13 +3202,12 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 self["@items"]=_st(_st(self._model())._packages())._sort_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._name();
 $ctx2.sendIdx["name"]=1;
-$3=_st(b)._name();
-return _st($2).__lt($3);
+return _st($2).__lt(_st(b)._name());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
 $1=self["@items"];
 return $1;
@@ -3317,16 +3289,14 @@ var self=this;
 function $ClassAdded(){return smalltalk.ClassAdded||(typeof ClassAdded=="undefined"?nil:ClassAdded)}
 function $PackageAdded(){return smalltalk.PackageAdded||(typeof PackageAdded=="undefined"?nil:PackageAdded)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._systemAnnouncer();
 $ctx1.sendIdx["systemAnnouncer"]=1;
 _st($1)._on_send_to_($ClassAdded(),"onClassAdded:",self);
 $ctx1.sendIdx["on:send:to:"]=1;
-$4=self._model();
-$3=_st($4)._systemAnnouncer();
-_st($3)._on_send_to_($PackageAdded(),"onPackageAdded:",self);
+_st(_st(self._model())._systemAnnouncer())._on_send_to_($PackageAdded(),"onPackageAdded:",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeSystem",{},smalltalk.HLPackagesListWidget)})},
 args: [],
 source: "observeSystem\x0a    self model systemAnnouncer \x0a\x09\x09on: ClassAdded \x0a\x09\x09send: #onClassAdded:\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model systemAnnouncer\x0a\x09\x09on: PackageAdded\x0a\x09\x09send: #onPackageAdded:\x0a\x09\x09to: self",
@@ -3621,7 +3591,7 @@ fn: function (anAnnouncement){
 var self=this;
 var class_,protocol;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$1,$7,$6,$5,$8;
+var $2,$4,$3,$1,$5,$6;
 class_=_st(anAnnouncement)._theClass();
 protocol=_st(anAnnouncement)._protocol();
 $2=class_;
@@ -3633,13 +3603,11 @@ $ctx1.sendIdx["="]=1;
 if(! smalltalk.assert($1)){
 return self;
 };
-$7=self._model();
-$6=_st($7)._selectedProtocol();
-$5=_st($6).__eq(protocol);
+$5=_st(_st(self._model())._selectedProtocol()).__eq(protocol);
 if(smalltalk.assert($5)){
 self._selectedItem_(nil);
-$8=self._selectItem_(nil);
-$8;
+$6=self._selectItem_(nil);
+$6;
 };
 self._setItemsForSelectedClass();
 self._refresh();
@@ -3769,18 +3737,17 @@ fn: function (aClass){
 var self=this;
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$5,$1;
+var $2,$3,$4,$1;
 if(($receiver = aClass) == nil || $receiver == null){
 $2=self._allProtocol();
 $ctx1.sendIdx["allProtocol"]=1;
 $1=_st($Array())._with_($2);
 $ctx1.sendIdx["with:"]=1;
 } else {
-$4=self._allProtocol();
-$3=_st($Array())._with_($4);
+$3=_st($Array())._with_(self._allProtocol());
 _st($3)._addAll_(_st(aClass)._protocols());
-$5=_st($3)._yourself();
-$1=$5;
+$4=_st($3)._yourself();
+$1=$4;
 };
 self._items_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"setItemsForClass:",{aClass:aClass},smalltalk.HLProtocolsListWidget)})},

+ 4 - 9
js/Helios-Commands-Browser.js

@@ -355,15 +355,13 @@ category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._showComment();
 $1=_st($2)._and_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._model();
-$4=_st($5)._selectedClass();
-return _st($4)._notNil();
+return _st(_st(self._model())._selectedClass())._notNil();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"isActive",{},smalltalk.HLEditCommentCommand)})},
@@ -451,13 +449,10 @@ category: 'executing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2;
+var $1;
 $1=self._model();
 $ctx1.sendIdx["model"]=1;
-$4=self._model();
-$3=_st($4)._showComment();
-$2=_st($3)._not();
-_st($1)._showComment_($2);
+_st($1)._showComment_(_st(_st(self._model())._showComment())._not());
 return self}, function($ctx1) {$ctx1.fill(self,"execute",{},smalltalk.HLToggleClassCommentCommand)})},
 args: [],
 source: "execute\x0a\x09self model showComment: self model showComment not",

+ 4 - 6
js/Helios-Commands-Core.js

@@ -851,14 +851,12 @@ var self=this;
 var activeTab;
 function $HLTabSelectionWidget(){return smalltalk.HLTabSelectionWidget||(typeof HLTabSelectionWidget=="undefined"?nil:HLTabSelectionWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
+var $2,$3,$1;
 activeTab=self._selectedTab();
 $ctx1.sendIdx["selectedTab"]=1;
 $2=_st($HLTabSelectionWidget())._new();
 _st($2)._tabs_(self._tabs());
-$3=$2;
-$4=self._selectedTab();
-_st($3)._selectedTab_($4);
+_st($2)._selectedTab_(self._selectedTab());
 _st($2)._selectCallback_((function(tab){
 return smalltalk.withContext(function($ctx2) {
 return _st(tab)._activate();
@@ -872,8 +870,8 @@ _st($2)._cancelCallback_((function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(activeTab)._activate();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$5=_st($2)._show();
-$1=$5;
+$3=_st($2)._show();
+$1=$3;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"execute",{activeTab:activeTab},smalltalk.HLSwitchTabCommand)})},
 args: [],

+ 4 - 7
js/Helios-Commands-Tools.js

@@ -507,13 +507,12 @@ category: 'defaults',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$4,$1;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._selectedMethod();
 if(($receiver = $2) == nil || $receiver == null){
-$5=self._model();
-$4=_st($5)._selectedClass();
+$4=_st(self._model())._selectedClass();
 if(($receiver = $4) == nil || $receiver == null){
 $1="";
 } else {
@@ -578,13 +577,11 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._model();
 $ctx1.sendIdx["model"]=1;
 $2=_st($3)._availableClassNames();
-$5=self._model();
-$4=_st($5)._allSelectors();
-$1=_st($2).__comma($4);
+$1=_st($2).__comma(_st(self._model())._allSelectors());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},smalltalk.HLFindReferencesCommand)})},
 args: [],

File diff suppressed because it is too large
+ 179 - 311
js/Helios-Core.js


+ 66 - 28
js/Helios-Debugger.js

@@ -46,7 +46,7 @@ var self=this;
 var variables,inspectedContext;
 function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6;
+var $1,$2,$3,$4;
 variables=_st($Dictionary())._new();
 inspectedContext=self._context();
 $1=variables;
@@ -68,13 +68,11 @@ $3=inspectedContext;
 if(($receiver = $3) == nil || $receiver == null){
 return $3;
 } else {
-$4=variables;
-$5=_st(inspectedContext)._locals();
-return _st($4)._addAll_($5);
+return _st(variables)._addAll_(_st(inspectedContext)._locals());
 };
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 _st(anInspector)._setLabel_("Context");
-$6=_st(anInspector)._setVariables_(variables);
+$4=_st(anInspector)._setVariables_(variables);
 return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,inspectedContext:inspectedContext},smalltalk.HLContextInspectorDecorator)})},
 args: ["anInspector"],
 source: "inspectOn: anInspector\x0a\x09| variables inspectedContext |\x0a\x09\x0a\x09variables := Dictionary new.\x0a\x09inspectedContext := self context.\x0a\x09\x0a\x09variables addAll: inspectedContext locals.\x0a\x09\x0a\x09[ inspectedContext notNil and: [ inspectedContext isBlockContext ] ] whileTrue: [\x0a\x09\x09inspectedContext := inspectedContext outerContext.\x0a\x09\x09inspectedContext ifNotNil: [\x0a\x09\x09\x09variables addAll: inspectedContext locals ] ].\x0a\x09\x0a\x09anInspector\x0a\x09\x09setLabel: 'Context';\x0a\x09\x09setVariables: variables",
@@ -229,16 +227,14 @@ var self=this;
 function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
 function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._announcer();
 $ctx1.sendIdx["announcer"]=1;
 _st($1)._on_send_to_($HLDebuggerContextSelected(),"onContextSelected:",self);
 $ctx1.sendIdx["on:send:to:"]=1;
-$4=self._model();
-$3=_st($4)._announcer();
-_st($3)._on_send_to_($HLDebuggerStepped(),"onContextSelected:",self);
+_st(_st(self._model())._announcer())._on_send_to_($HLDebuggerStepped(),"onContextSelected:",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDebugger)})},
 args: [],
 source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self",
@@ -291,10 +287,8 @@ function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="unde
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$1;
-$3=self._stackListWidget();
-$4=_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget());
-$2=_st($HLHorizontalSplitter())._with_with_($3,$4);
+var $2,$1;
+$2=_st($HLHorizontalSplitter())._with_with_(self._stackListWidget(),_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget()));
 $ctx1.sendIdx["with:with:"]=1;
 $1=_st($HLContainer())._with_($2);
 _st(html)._with_($1);
@@ -503,7 +497,7 @@ fn: function (aNode){
 var self=this;
 var token;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$6,$5,$4,$3,$9,$8,$7,$2,$13,$12,$11,$10,$14,$19,$18,$17,$16,$20,$15,$25,$24,$23,$22,$26,$21;
+var $1,$6,$5,$4,$3,$9,$8,$7,$2,$13,$12,$11,$10,$14,$19,$18,$17,$16,$20,$15,$22,$21;
 if(($receiver = aNode) == nil || $receiver == null){
 aNode;
 } else {
@@ -546,13 +540,9 @@ $ctx1.sendIdx["->"]=3;
 $20="ch".__minus_gt(_st(token)._start());
 $ctx1.sendIdx["->"]=4;
 $15=smalltalk.HashedCollection._from_([$16,$20]);
-$25=_st(aNode)._position();
-$24=_st($25)._x();
-$23=_st($24).__minus((1));
-$22="line".__minus_gt($23);
+$22="line".__minus_gt(_st(_st(_st(aNode)._position())._x()).__minus((1)));
 $ctx1.sendIdx["->"]=5;
-$26="ch".__minus_gt(_st(token)._end());
-$21=smalltalk.HashedCollection._from_([$22,$26]);
+$21=smalltalk.HashedCollection._from_([$22,"ch".__minus_gt(_st(token)._end())]);
 _st($14)._setSelection_to_($15,$21);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token},smalltalk.HLDebuggerCodeWidget)})},
@@ -573,7 +563,7 @@ function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected
 function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
 function $HLDebuggerWhere(){return smalltalk.HLDebuggerWhere||(typeof HLDebuggerWhere=="undefined"?nil:HLDebuggerWhere)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3,$6,$5;
+var $2,$1,$4,$3;
 smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._observeBrowserModel.apply(_st(self), []);
 $2=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
@@ -587,9 +577,7 @@ $3=_st($4)._announcer();
 $ctx1.sendIdx["announcer"]=2;
 _st($3)._on_send_to_($HLDebuggerStepped(),"onContextSelected",self);
 $ctx1.sendIdx["on:send:to:"]=2;
-$6=self._browserModel();
-$5=_st($6)._announcer();
-_st($5)._on_send_to_($HLDebuggerWhere(),"onContextSelected",self);
+_st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerWhere(),"onContextSelected",self);
 return self}, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},smalltalk.HLDebuggerCodeWidget)})},
 args: [],
 source: "observeBrowserModel\x0a\x09super observeBrowserModel.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerWhere\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self",
@@ -809,6 +797,28 @@ referencedClasses: []
 }),
 smalltalk.HLDebuggerModel);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "skip",
+category: 'actions',
+fn: function (){
+var self=this;
+function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
+return smalltalk.withContext(function($ctx1) { 
+var $1,$2;
+_st(self._interpreter())._skip();
+$1=_st($HLDebuggerStepped())._new();
+_st($1)._context_(self._currentContext());
+$2=_st($1)._yourself();
+_st(self._announcer())._announce_($2);
+return self}, function($ctx1) {$ctx1.fill(self,"skip",{},smalltalk.HLDebuggerModel)})},
+args: [],
+source: "skip\x0a\x09self interpreter skip.\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
+messageSends: ["skip", "interpreter", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
+referencedClasses: ["HLDebuggerStepped"]
+}),
+smalltalk.HLDebuggerModel);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "stepOver",
@@ -986,7 +996,7 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$5,$6,$7,$8,$2;
+var $1,$3,$4,$5,$6,$7,$8,$9,$10,$2;
 $1=_st(html)._div();
 _st($1)._class_("debugger_bar");
 $ctx1.sendIdx["class:"]=1;
@@ -1017,19 +1027,31 @@ return self._where();
 $ctx2.sendIdx["onClick:"]=2;
 $6;
 $7=_st(html)._button();
+$ctx2.sendIdx["button"]=3;
 _st($7)._class_("btn stepOver");
+$ctx2.sendIdx["class:"]=4;
 _st($7)._with_("Step over");
+$ctx2.sendIdx["with:"]=4;
 $8=_st($7)._onClick_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._stepOver();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
-return $8;
+$ctx2.sendIdx["onClick:"]=3;
+$8;
+$9=_st(html)._button();
+_st($9)._class_("btn skip");
+_st($9)._with_("Skip");
+$10=_st($9)._onClick_((function(){
+return smalltalk.withContext(function($ctx3) {
+return self._skip();
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
+return $10;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLStackListWidget)})},
 args: ["html"],
-source: "renderButtonsOn: html\x0a\x09html div \x0a\x09\x09class: 'debugger_bar'; \x0a\x09\x09with: [\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn restart';\x0a\x09\x09\x09\x09with: 'Restart';\x0a\x09\x09\x09\x09onClick: [ self restart ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn where';\x0a\x09\x09\x09\x09with: 'Where';\x0a\x09\x09\x09\x09onClick: [ self where ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn stepOver';\x0a\x09\x09\x09\x09with: 'Step over';\x0a\x09\x09\x09\x09onClick: [ self stepOver ] ]",
-messageSends: ["class:", "div", "with:", "button", "onClick:", "restart", "where", "stepOver"],
+source: "renderButtonsOn: html\x0a\x09html div \x0a\x09\x09class: 'debugger_bar'; \x0a\x09\x09with: [\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn restart';\x0a\x09\x09\x09\x09with: 'Restart';\x0a\x09\x09\x09\x09onClick: [ self restart ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn where';\x0a\x09\x09\x09\x09with: 'Where';\x0a\x09\x09\x09\x09onClick: [ self where ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn stepOver';\x0a\x09\x09\x09\x09with: 'Step over';\x0a\x09\x09\x09\x09onClick: [ self stepOver ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn skip';\x0a\x09\x09\x09\x09with: 'Skip';\x0a\x09\x09\x09\x09onClick: [ self skip ] ]",
+messageSends: ["class:", "div", "with:", "button", "onClick:", "restart", "where", "stepOver", "skip"],
 referencedClasses: []
 }),
 smalltalk.HLStackListWidget);
@@ -1066,6 +1088,22 @@ referencedClasses: []
 }),
 smalltalk.HLStackListWidget);
 
+smalltalk.addMethod(
+smalltalk.method({
+selector: "skip",
+category: 'actions',
+fn: function (){
+var self=this;
+return smalltalk.withContext(function($ctx1) { 
+_st(self._model())._skip();
+return self}, function($ctx1) {$ctx1.fill(self,"skip",{},smalltalk.HLStackListWidget)})},
+args: [],
+source: "skip\x0a\x09self model skip",
+messageSends: ["skip", "model"],
+referencedClasses: []
+}),
+smalltalk.HLStackListWidget);
+
 smalltalk.addMethod(
 smalltalk.method({
 selector: "stepOver",

+ 10 - 12
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"]
 }),
@@ -1121,9 +1121,8 @@ var self=this;
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget());
-$1=_st($HLHorizontalSplitter())._with_with_($2,self._codeWidget());
+var $1;
+$1=_st($HLHorizontalSplitter())._with_with_(_st($HLVerticalSplitter())._with_with_(self._variablesWidget(),self._displayWidget()),self._codeWidget());
 $ctx1.sendIdx["with:with:"]=1;
 _st(html)._with_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspectorWidget)})},
@@ -1241,7 +1240,7 @@ function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="unde
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1,$5;
+var $4,$3,$2,$1;
 $4=self._variablesWidget();
 $ctx1.sendIdx["variablesWidget"]=1;
 $3=_st($HLVerticalSplitter())._with_with_($4,self._displayWidget());
@@ -1250,8 +1249,7 @@ $ctx1.sendIdx["with:with:"]=1;
 $1=_st($HLContainer())._with_($2);
 _st(html)._with_($1);
 $ctx1.sendIdx["with:"]=1;
-$5=self._variablesWidget();
-_st($5)._focus();
+_st(self._variablesWidget())._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLInspector)})},
 args: ["html"],
 source: "renderContentOn: html\x0a   \x09html with: (HLContainer with: (HLHorizontalSplitter\x0a    \x09with: (HLVerticalSplitter \x0a            with: self variablesWidget\x0a            with: self displayWidget)\x0a        with: self codeWidget)).\x0a\x09\x0a\x09self variablesWidget focus",
@@ -1304,12 +1302,12 @@ var self=this;
 return smalltalk.withContext(function($ctx1) { 
 var $1,$2;
 $1=self._new();
-_st($1)._inspect_(anObject);
-$2=_st($1)._openAsTab();
+_st($1)._openAsTab();
+$2=_st($1)._inspect_(anObject);
 return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.HLInspector.klass)})},
 args: ["anObject"],
-source: "inspect: anObject\x0a\x09self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09openAsTab",
-messageSends: ["inspect:", "new", "openAsTab"],
+source: "inspect: anObject\x0a\x09self new\x0a\x09\x09openAsTab;\x0a\x09\x09inspect: anObject",
+messageSends: ["openAsTab", "new", "inspect:"],
 referencedClasses: []
 }),
 smalltalk.HLInspector.klass);

+ 28 - 43
js/Helios-KeyBindings.js

@@ -361,7 +361,7 @@ fn: function (){
 var self=this;
 function $HLBindingActionInputWidget(){return smalltalk.HLBindingActionInputWidget||(typeof HLBindingActionInputWidget=="undefined"?nil:HLBindingActionInputWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$5,$4,$6,$8,$7,$9,$11,$10,$12,$13,$1;
+var $2,$3,$5,$4,$6,$8,$7,$9,$10,$1;
 $2=_st($HLBindingActionInputWidget())._new();
 $3=$2;
 $5=self._command();
@@ -373,18 +373,15 @@ $8=self._command();
 $ctx1.sendIdx["command"]=2;
 $7=_st($8)._defaultInput();
 _st($6)._defaultValue_($7);
-$9=$2;
-$11=self._command();
-$10=_st($11)._inputCompletion();
-_st($9)._inputCompletion_($10);
+_st($2)._inputCompletion_(_st(self._command())._inputCompletion());
 _st($2)._callback_((function(value){
 return smalltalk.withContext(function($ctx2) {
 self._input_(value);
-$12=self._executeCommand();
-return $12;
+$9=self._executeCommand();
+return $9;
 }, function($ctx2) {$ctx2.fillBlock({value:value},$ctx1,1)})}));
-$13=_st($2)._yourself();
-$1=$13;
+$10=_st($2)._yourself();
+$1=$10;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"inputWidget",{},smalltalk.HLBindingAction)})},
 args: [],
@@ -808,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"]
 }),
@@ -976,7 +973,7 @@ category: 'rendering',
 fn: function (html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$6,$8,$10,$9,$7,$5,$11,$12,$13,$3,$14;
+var $1,$2,$4,$6,$8,$10,$9,$7,$5,$11,$12,$13,$3;
 $1=self["@wrapper"];
 if(($receiver = $1) == nil || $receiver == null){
 self["@wrapper"]=_st(html)._span();
@@ -1021,8 +1018,7 @@ return self["@messageTag"];
 $ctx1.sendIdx["with:"]=1;
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-$14=_st(self["@input"])._asJQuery();
-return _st($14)._focus();
+return _st(_st(self["@input"])._asJQuery())._focus();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}))._valueWithTimeout_((10));
 return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.HLBindingActionInputWidget)})},
 args: ["html"],
@@ -1206,7 +1202,7 @@ function $HLCloseTabCommand(){return smalltalk.HLCloseTabCommand||(typeof HLClos
 function $HLSwitchTabCommand(){return smalltalk.HLSwitchTabCommand||(typeof HLSwitchTabCommand=="undefined"?nil:HLSwitchTabCommand)}
 function $HLOpenCommand(){return smalltalk.HLOpenCommand||(typeof HLOpenCommand=="undefined"?nil:HLOpenCommand)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$7,$6,$8,$9;
+var $1,$2,$4,$3,$5,$6;
 $1=_st($HLBindingGroup())._new();
 $ctx1.sendIdx["new"]=1;
 $2=$1;
@@ -1216,15 +1212,12 @@ $3=_st($4)._asBinding();
 $ctx1.sendIdx["asBinding"]=1;
 _st($2)._add_($3);
 $ctx1.sendIdx["add:"]=1;
-$5=$1;
-$7=_st($HLSwitchTabCommand())._new();
-$6=_st($7)._asBinding();
-_st($5)._add_($6);
-$8=_st($1)._yourself();
-group=$8;
+_st($1)._add_(_st(_st($HLSwitchTabCommand())._new())._asBinding());
+$5=_st($1)._yourself();
+group=$5;
 _st($HLOpenCommand())._registerConcreteClassesOn_(group);
-$9=group;
-return $9;
+$6=group;
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"defaultBindings",{group:group},smalltalk.HLKeyBinder)})},
 args: [],
 source: "defaultBindings\x0a\x09| group |\x0a\x09\x0a\x09group := HLBindingGroup new\x0a\x09\x09add: HLCloseTabCommand new asBinding;\x0a\x09\x09add: HLSwitchTabCommand new asBinding;\x0a\x09\x09yourself.\x0a\x09\x09\x0a\x09HLOpenCommand registerConcreteClassesOn: group.\x0a\x09\x09\x09\x09\x0a\x09^ group",
@@ -1272,16 +1265,14 @@ category: 'events',
 fn: function (event){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1,$6;
+var $3,$2,$1,$4;
 $3=_st(event)._which();
 $ctx1.sendIdx["which"]=1;
 $2=_st($3).__eq(self._escapeKey());
 $ctx1.sendIdx["="]=1;
 $1=_st($2)._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=_st(event)._which();
-$4=_st($5).__eq((71));
-return _st($4)._and_((function(){
+return _st(_st(_st(event)._which()).__eq((71)))._and_((function(){
 return smalltalk.withContext(function($ctx3) {
 return _st(event)._ctrlKey();
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
@@ -1291,8 +1282,8 @@ self._deactivate();
 _st(event)._preventDefault();
 return false;
 };
-$6=self._handleBindingFor_(event);
-return $6;
+$4=self._handleBindingFor_(event);
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"handleActiveKeyDown:",{event:event},smalltalk.HLKeyBinder)})},
 args: ["event"],
 source: "handleActiveKeyDown: event\x0a\x0a\x09\x22ESC or ctrl+g deactivate the keyBinder\x22\x0a\x09(event which = self escapeKey or: [\x0a\x09\x09event which = 71 and: [ event ctrlKey ] ])\x0a        \x09ifTrue: [ \x0a            \x09self deactivate.\x0a\x09\x09\x09\x09event preventDefault.\x0a\x09\x09\x09\x09^ false ].\x0a            \x0a    \x22Handle the keybinding\x22\x0a    ^ self handleBindingFor: event",
@@ -1704,13 +1695,12 @@ category: 'rendering',
 fn: function (aBindingGroup,html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 _st(_st(_st(aBindingGroup)._activeBindings())._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 $1=_st(a)._key();
 $ctx2.sendIdx["key"]=1;
-$2=_st(b)._key();
-return _st($1).__lt($2);
+return _st($1).__lt(_st(b)._key());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._renderBindingActionFor_on_(each,html);
@@ -1867,7 +1857,7 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$5,$7,$6,$4,$2,$8,$9;
+var $1,$3,$5,$6,$4,$2,$7;
 $1="#helper"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._remove();
@@ -1876,19 +1866,17 @@ return smalltalk.withContext(function($ctx2) {
 $3=_st(html)._div();
 _st($3)._id_("helper");
 $5=$3;
-$7="Press ".__comma(_st(self._keyBinder())._activationKeyLabel());
-$6=_st($7).__comma(" to start");
+$6=_st("Press ".__comma(_st(self._keyBinder())._activationKeyLabel())).__comma(" to start");
 $ctx2.sendIdx[","]=1;
 $4=_st($5)._with_($6);
 return $4;
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
-$8="body"._asJQuery();
+$7="body"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=2;
-_st($2)._appendToJQuery_($8);
+_st($2)._appendToJQuery_($7);
 _st((function(){
 return smalltalk.withContext(function($ctx2) {
-$9="#helper"._asJQuery();
-return _st($9)._fadeOut_((1000));
+return _st("#helper"._asJQuery())._fadeOut_((1000));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}))._valueWithTimeout_((2000));
 return self}, function($ctx1) {$ctx1.fill(self,"renderStart",{},smalltalk.HLKeyBinderHelperWidget)})},
 args: [],
@@ -1956,7 +1944,7 @@ category: 'actions',
 fn: function (aWidget){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$6,$5,$4;
+var $3,$2,$1;
 $3=self._mainId();
 $ctx1.sendIdx["mainId"]=1;
 $2="#".__comma($3);
@@ -1964,10 +1952,7 @@ $ctx1.sendIdx[","]=1;
 $1=_st($2)._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._empty();
-$6=self._mainId();
-$5="#".__comma($6);
-$4=_st($5)._asJQuery();
-_st(aWidget)._appendToJQuery_($4);
+_st(aWidget)._appendToJQuery_(_st("#".__comma(self._mainId()))._asJQuery());
 return self}, function($ctx1) {$ctx1.fill(self,"showWidget:",{aWidget:aWidget},smalltalk.HLKeyBinderHelperWidget)})},
 args: ["aWidget"],
 source: "showWidget: aWidget\x0a\x09\x22Some actions need to display more info to the user or request input.\x0a\x09This method is the right place for that\x22\x0a\x09\x0a\x09('#', self mainId) asJQuery empty.\x0a\x09aWidget appendToJQuery: ('#', self mainId) asJQuery",

+ 16 - 30
js/Helios-Layout.js

@@ -354,7 +354,7 @@ fn: function (anInteger){
 var self=this;
 var container,size,offset,percentage;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$6,$7,$5,$4,$8,$10,$9,$11,$14,$13,$12,$15,$18,$17,$16;
+var $1,$3,$2,$6,$7,$5,$4,$8,$10,$9,$11,$14,$13,$12;
 $1=_st(self["@firstPane"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 container=_st($1)._parent();
@@ -389,11 +389,7 @@ $12=_st($13).__comma("%");
 $ctx1.sendIdx[","]=2;
 _st($11)._css_put_("top",$12);
 $ctx1.sendIdx["css:put:"]=2;
-$15=_st(self["@secondPane"])._asJQuery();
-$18=(100).__minus(percentage);
-$17=_st($18)._asString();
-$16=_st($17).__comma("%");
-_st($15)._css_put_("top",$16);
+_st(_st(self["@secondPane"])._asJQuery())._css_put_("top",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
 return self}, function($ctx1) {$ctx1.fill(self,"resize:",{anInteger:anInteger,container:container,size:size,offset:offset,percentage:percentage},smalltalk.HLHorizontalSplitter)})},
 args: ["anInteger"],
 source: "resize: anInteger\x0a\x09| container size offset percentage |\x0a    \x0a    container := firstPane asJQuery parent.\x0a\x09offset := firstPane asJQuery offset top.\x0a    size := container height.\x0a\x09\x0a\x09percentage := (size - (anInteger - offset)) / size * 100.\x0a\x09percentage := 80 min: (percentage max: 20).\x0a\x09\x0a    firstPane asJQuery css: 'bottom' put: percentage asString, '%'.\x0a\x09\x0a\x09splitter asJQuery css: 'top' put: (100 - percentage) asString, '%'.\x0a\x09secondPane asJQuery css: 'top' put: (100 - percentage) asString, '%'",
@@ -409,27 +405,24 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$6,$5,$4,$7,$8,$9,$2;
+var $1,$3,$4,$5,$6,$2;
 $1=_st(self["@splitter"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 $3="axis".__minus_gt("y");
 $ctx1.sendIdx["->"]=1;
-$6=_st(self["@splitter"])._asJQuery();
-$5=_st($6)._parent();
-$4="containment".__minus_gt($5);
+$4="containment".__minus_gt(_st(_st(self["@splitter"])._asJQuery())._parent());
 $ctx1.sendIdx["->"]=2;
-$7="helper".__minus_gt("clone");
+$5="helper".__minus_gt("clone");
 $ctx1.sendIdx["->"]=3;
-$8="start".__minus_gt((function(e,ui){
+$6="start".__minus_gt((function(e,ui){
 return smalltalk.withContext(function($ctx2) {
 return self._startResizing_(_st(ui)._helper());
 }, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,1)})}));
 $ctx1.sendIdx["->"]=4;
-$9="drag".__minus_gt((function(e,ui){
+$2=smalltalk.HashedCollection._from_([$3,$4,$5,$6,"drag".__minus_gt((function(e,ui){
 return smalltalk.withContext(function($ctx2) {
 return self._resize_(_st(_st(ui)._offset())._top());
-}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}));
-$2=smalltalk.HashedCollection._from_([$3,$4,$7,$8,$9]);
+}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}))]);
 _st($1)._draggable_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLHorizontalSplitter)})},
 args: [],
@@ -518,7 +511,7 @@ fn: function (anInteger){
 var self=this;
 var container,size,offset,percentage;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$6,$7,$5,$4,$8,$10,$9,$11,$14,$13,$12,$15,$18,$17,$16;
+var $1,$3,$2,$6,$7,$5,$4,$8,$10,$9,$11,$14,$13,$12;
 $1=_st(self["@firstPane"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 container=_st($1)._parent();
@@ -553,11 +546,7 @@ $12=_st($13).__comma("%");
 $ctx1.sendIdx[","]=2;
 _st($11)._css_put_("left",$12);
 $ctx1.sendIdx["css:put:"]=2;
-$15=_st(self["@secondPane"])._asJQuery();
-$18=(100).__minus(percentage);
-$17=_st($18)._asString();
-$16=_st($17).__comma("%");
-_st($15)._css_put_("left",$16);
+_st(_st(self["@secondPane"])._asJQuery())._css_put_("left",_st(_st((100).__minus(percentage))._asString()).__comma("%"));
 return self}, function($ctx1) {$ctx1.fill(self,"resize:",{anInteger:anInteger,container:container,size:size,offset:offset,percentage:percentage},smalltalk.HLVerticalSplitter)})},
 args: ["anInteger"],
 source: "resize: anInteger\x0a\x09| container size offset percentage |\x0a    \x0a    container := firstPane asJQuery parent.\x0a\x09offset := firstPane asJQuery offset left.\x0a    size := container width.\x0a\x09\x0a\x09percentage := (size - (anInteger - offset)) / size * 100.\x0a\x09percentage := 80 min: (percentage max: 20).\x0a\x09\x0a    firstPane asJQuery css: 'right' put: percentage asString, '%'.\x0a\x09\x0a\x09splitter asJQuery css: 'left' put: (100 - percentage) asString, '%'.\x0a\x09secondPane asJQuery css: 'left' put: (100 - percentage) asString, '%'",
@@ -573,27 +562,24 @@ category: 'rendering',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$6,$5,$4,$7,$8,$9,$2;
+var $1,$3,$4,$5,$6,$2;
 $1=_st(self["@splitter"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 $3="axis".__minus_gt("x");
 $ctx1.sendIdx["->"]=1;
-$6=_st(self["@splitter"])._asJQuery();
-$5=_st($6)._parent();
-$4="containment".__minus_gt($5);
+$4="containment".__minus_gt(_st(_st(self["@splitter"])._asJQuery())._parent());
 $ctx1.sendIdx["->"]=2;
-$7="helper".__minus_gt("clone");
+$5="helper".__minus_gt("clone");
 $ctx1.sendIdx["->"]=3;
-$8="start".__minus_gt((function(e,ui){
+$6="start".__minus_gt((function(e,ui){
 return smalltalk.withContext(function($ctx2) {
 return self._startResizing_(_st(ui)._helper());
 }, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,1)})}));
 $ctx1.sendIdx["->"]=4;
-$9="drag".__minus_gt((function(e,ui){
+$2=smalltalk.HashedCollection._from_([$3,$4,$5,$6,"drag".__minus_gt((function(e,ui){
 return smalltalk.withContext(function($ctx2) {
 return self._resize_(_st(_st(ui)._offset())._left());
-}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}));
-$2=smalltalk.HashedCollection._from_([$3,$4,$7,$8,$9]);
+}, function($ctx2) {$ctx2.fillBlock({e:e,ui:ui},$ctx1,2)})}))]);
 _st($1)._draggable_($2);
 return self}, function($ctx1) {$ctx1.fill(self,"setupSplitter",{},smalltalk.HLVerticalSplitter)})},
 args: [],

+ 9 - 13
js/Helios-References.js

@@ -298,21 +298,19 @@ function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="unde
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $5,$4,$6,$3,$2,$1,$7;
+var $5,$4,$3,$2,$1;
 $5=self._sendersListWidget();
 $ctx1.sendIdx["sendersListWidget"]=1;
 $4=_st($HLVerticalSplitter())._with_with_($5,self._implementorsListWidget());
 $ctx1.sendIdx["with:with:"]=3;
-$6=_st($HLVerticalSplitter())._with_with_(self._classReferencesListWidget(),self._regexpListWidget());
-$3=_st($HLVerticalSplitter())._with_with_($4,$6);
+$3=_st($HLVerticalSplitter())._with_with_($4,_st($HLVerticalSplitter())._with_with_(self._classReferencesListWidget(),self._regexpListWidget()));
 $ctx1.sendIdx["with:with:"]=2;
 $2=_st($HLHorizontalSplitter())._with_with_($3,self._sourceCodeWidget());
 $ctx1.sendIdx["with:with:"]=1;
 $1=_st($HLContainer())._with_($2);
 _st(html)._with_($1);
 $ctx1.sendIdx["with:"]=1;
-$7=self._sendersListWidget();
-_st($7)._focus();
+_st(self._sendersListWidget())._focus();
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLReferences)})},
 args: ["html"],
 source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter \x0a    \x09with: (HLVerticalSplitter\x0a        \x09with: (HLVerticalSplitter\x0a            \x09with: self sendersListWidget\x0a                with: self implementorsListWidget)\x0a            with: (HLVerticalSplitter\x0a            \x09with: self classReferencesListWidget\x0a                with: self regexpListWidget)) \x0a        with: self sourceCodeWidget)).\x0a\x09\x0a\x09self sendersListWidget focus",
@@ -544,7 +542,7 @@ category: 'reactions',
 fn: function (aMethod){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3;
+var $1,$2,$3;
 var $early={};
 try {
 if(($receiver = aMethod) == nil || $receiver == null){
@@ -564,8 +562,7 @@ throw $early=[self];
 $2=_st(aMethod)._selector();
 $ctx1.sendIdx["selector"]=2;
 self._selectedItem_($2);
-$4=_st(aMethod)._selector();
-$3=self._activateItem_($4);
+$3=self._activateItem_(_st(aMethod)._selector());
 return self}
 catch(e) {if(e===$early)return e[0]; throw e}
 }, function($ctx1) {$ctx1.fill(self,"onMethodSelected:",{aMethod:aMethod},smalltalk.HLReferencesListWidget)})},
@@ -599,9 +596,8 @@ category: 'rendering',
 fn: function (aMethod,html){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #");
-$1=_st($2).__comma(_st(aMethod)._selector());
+var $1;
+$1=_st(_st(_st(_st(aMethod)._methodClass())._name()).__comma(" >> #")).__comma(_st(aMethod)._selector());
 $ctx1.sendIdx[","]=1;
 _st(html)._with_($1);
 return self}, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aMethod:aMethod,html:html},smalltalk.HLReferencesListWidget)})},
@@ -1093,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"]
 }),
@@ -1114,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"]
 }),

+ 2 - 3
js/Helios-Workspace-Tests.js

@@ -12,13 +12,12 @@ var self=this;
 function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(_st($HLCodeWidget())._pcKeyMap())._isKindOf_($HashedCollection());
 $ctx1.sendIdx["isKindOf:"]=1;
 self._assert_($1);
 $ctx1.sendIdx["assert:"]=1;
-$2=_st(_st($HLCodeWidget())._macKeyMap())._isKindOf_($HashedCollection());
-self._assert_($2);
+self._assert_(_st(_st($HLCodeWidget())._macKeyMap())._isKindOf_($HashedCollection()));
 return self}, function($ctx1) {$ctx1.fill(self,"testKeyMap",{},smalltalk.HLCodeWidgetTest)})},
 args: [],
 source: "testKeyMap\x0a\x09\x22Key maps are a collection of associations.\x22\x0a\x09self assert: (HLCodeWidget pcKeyMap isKindOf: HashedCollection).\x0a\x09self assert: (HLCodeWidget macKeyMap isKindOf: HashedCollection)",

+ 71 - 113
js/Helios-Workspace.js

@@ -241,12 +241,11 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=self._editor();
 $ctx1.sendIdx["editor"]=1;
 _st($1)._at_put_("amberCodeWidget",self);
-$2=self._editor();
-_st($2)._on_do_("change",(function(){
+_st(self._editor())._on_do_("change",(function(){
 return smalltalk.withContext(function($ctx2) {
 return self._onChange();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -350,7 +349,7 @@ var result;
 function $HLDoItRequested(){return smalltalk.HLDoItRequested||(typeof HLDoItRequested=="undefined"?nil:HLDoItRequested)}
 function $HLDoItExecuted(){return smalltalk.HLDoItExecuted||(typeof HLDoItExecuted=="undefined"?nil:HLDoItExecuted)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$5,$4,$6,$7;
+var $2,$1,$3,$4;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._announcer();
@@ -360,12 +359,9 @@ $ctx1.sendIdx["on:"]=1;
 _st($1)._announce_($3);
 $ctx1.sendIdx["announce:"]=1;
 result=_st(self["@model"])._doIt_(self._currentLineOrSelection());
-$5=self._model();
-$4=_st($5)._announcer();
-$6=_st($HLDoItExecuted())._on_(self["@model"]);
-_st($4)._announce_($6);
-$7=result;
-return $7;
+_st(_st(self._model())._announcer())._announce_(_st($HLDoItExecuted())._on_(self["@model"]));
+$4=result;
+return $4;
 }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},smalltalk.HLCodeWidget)})},
 args: [],
 source: "doIt\x0a\x09| result |\x0a\x0a\x09self model announcer announce: (HLDoItRequested on: model).\x0a\x09result := model doIt: self currentLineOrSelection.\x0a\x09self model announcer announce: (HLDoItExecuted on: model).\x0a\x0a\x09^ result",
@@ -399,7 +395,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$6,$7,$8,$9,$12,$11,$10,$1;
+var $2,$3,$4,$5,$6,$7,$8,$9,$10,$1;
 $2="theme".__minus_gt("amber");
 $ctx1.sendIdx["->"]=1;
 $3="lineNumbers".__minus_gt(true);
@@ -416,9 +412,7 @@ $8="electricChars".__minus_gt(false);
 $ctx1.sendIdx["->"]=7;
 $9="keyMap".__minus_gt("Amber");
 $ctx1.sendIdx["->"]=8;
-$12="Shift-Space".__minus_gt("autocomplete");
-$11=smalltalk.HashedCollection._from_([$12]);
-$10="extraKeys".__minus_gt($11);
+$10="extraKeys".__minus_gt(smalltalk.HashedCollection._from_(["Shift-Space".__minus_gt("autocomplete")]));
 $ctx1.sendIdx["->"]=9;
 $1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10]);
 return $1;
@@ -489,13 +483,12 @@ var self=this;
 var newInspector;
 function $HLInspectItRequested(){return smalltalk.HLInspectItRequested||(typeof HLInspectItRequested=="undefined"?nil:HLInspectItRequested)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $2,$1;
 $2=self._model();
 $ctx1.sendIdx["model"]=1;
 $1=_st($2)._announcer();
 _st($1)._announce_(_st($HLInspectItRequested())._on_(self["@model"]));
-$3=self._model();
-_st($3)._inspect_(self._doIt());
+_st(self._model())._inspect_(self._doIt());
 return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{newInspector:newInspector},smalltalk.HLCodeWidget)})},
 args: [],
 source: "inspectIt\x0a\x09| newInspector |\x0a       \x0a\x09self model announcer announce: (HLInspectItRequested on: model).\x0a\x09self model inspect: self doIt",
@@ -512,7 +505,7 @@ fn: function (anEditor,aToken){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $1=_st(_st(_st(_st(_st(_st($Smalltalk())._current())._at_("allSelectors"))._value())._asArray())._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(aToken)._string();
@@ -520,8 +513,7 @@ $ctx2.sendIdx["string"]=1;
 return _st(each)._includesSubString_($2);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._reject_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$3=_st(aToken)._string();
-return _st(each).__eq($3);
+return _st(each).__eq(_st(aToken)._string());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"messageHintFor:token:",{anEditor:anEditor,aToken:aToken},smalltalk.HLCodeWidget)})},
@@ -599,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: []
 }),
@@ -661,7 +653,7 @@ var self=this;
 var start,stop,currentLine;
 function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5,$6,$7,$8,$10,$11,$9,$12,$15,$16,$14,$13,$17,$21,$20,$19,$18,$22,$23;
+var $1,$2,$4,$3,$5,$6,$7,$8,$10,$9,$11,$12,$13,$15,$14;
 $1=_st(self["@editor"])._getCursor_(false);
 $ctx1.sendIdx["getCursor:"]=1;
 currentLine=_st($1)._line();
@@ -687,32 +679,24 @@ $ctx2.sendIdx["at:put:"]=3;
 $8=self["@editor"];
 $10="line".__minus_gt(currentLine);
 $ctx2.sendIdx["->"]=1;
-$11="ch".__minus_gt((0));
-$9=smalltalk.HashedCollection._from_([$10,$11]);
+$9=smalltalk.HashedCollection._from_([$10,"ch".__minus_gt((0))]);
 return _st($8)._setSelection_end_($9,start);
 $ctx2.sendIdx["setSelection:end:"]=1;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 stop=_st($HashedCollection())._new();
 _st(stop)._at_put_("line",currentLine);
 $ctx1.sendIdx["at:put:"]=4;
-$12=stop;
-$15=_st(start)._at_("ch");
-$16=_st(aString)._size();
-$14=_st($15).__plus($16);
-$13=_st($14).__plus((2));
+$11=stop;
+$12=_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2));
 $ctx1.sendIdx["+"]=1;
-_st($12)._at_put_("ch",$13);
-$17=self["@editor"];
-$21=_st(self["@editor"])._getSelection();
-$20=_st($21).__comma(" ");
-$19=_st($20).__comma(aString);
+_st($11)._at_put_("ch",$12);
+$13=self["@editor"];
+$15=_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
 $ctx1.sendIdx[","]=2;
-$18=_st($19).__comma(" ");
+$14=_st($15).__comma(" ");
 $ctx1.sendIdx[","]=1;
-_st($17)._replaceSelection_($18);
-$22=self["@editor"];
-$23=_st(self["@editor"])._getCursor_(true);
-_st($22)._setCursor_($23);
+_st($13)._replaceSelection_($14);
+_st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
 _st(self["@editor"])._setSelection_end_(stop,start);
 return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},smalltalk.HLCodeWidget)})},
 args: ["aString"],
@@ -737,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"]
 }),
@@ -985,15 +969,14 @@ category: 'updating',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._hasModification();
 if(smalltalk.assert($1)){
 $2=_st(self["@state"])._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($2)._addClass_("modified");
 } else {
-$3=_st(self["@state"])._asJQuery();
-_st($3)._removeClass_("modified");
+_st(_st(self["@state"])._asJQuery())._removeClass_("modified");
 };
 return self}, function($ctx1) {$ctx1.fill(self,"updateState",{},smalltalk.HLCodeWidget)})},
 args: [],
@@ -1012,43 +995,39 @@ var self=this;
 var variables,classNames,pseudoVariables;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$4,$6,$5,$7,$13,$12,$11,$10,$14,$9,$15,$8;
+var $3,$2,$1,$5,$4,$10,$9,$8,$11,$7,$6;
 $3=_st(_st(_st(anEditor)._display())._wrapper())._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 $2=_st($3)._find_("span.cm-variable");
 $1=_st($2)._get();
 variables=_st($1)._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(each)._asJQuery();
-return _st($4)._html();
+return _st(_st(each)._asJQuery())._html();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 $ctx1.sendIdx["collect:"]=1;
-$6=_st($Smalltalk())._current();
+$5=_st($Smalltalk())._current();
 $ctx1.sendIdx["current"]=1;
-$5=_st($6)._classes();
-classNames=_st($5)._collect_((function(each){
+$4=_st($5)._classes();
+classNames=_st($4)._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(each)._name();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
-$7=_st($Smalltalk())._current();
-pseudoVariables=_st($7)._pseudoVariableNames();
-$13=_st(variables).__comma(classNames);
-$12=_st($13).__comma(pseudoVariables);
+pseudoVariables=_st(_st($Smalltalk())._current())._pseudoVariableNames();
+$10=_st(_st(variables).__comma(classNames)).__comma(pseudoVariables);
 $ctx1.sendIdx[","]=1;
-$11=_st($12)._asSet();
-$10=_st($11)._asArray();
-$9=_st($10)._select_((function(each){
+$9=_st($10)._asSet();
+$8=_st($9)._asArray();
+$7=_st($8)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$14=_st(aToken)._string();
+$11=_st(aToken)._string();
 $ctx2.sendIdx["string"]=1;
-return _st(each)._includesSubString_($14);
+return _st(each)._includesSubString_($11);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
-$8=_st($9)._reject_((function(each){
+$6=_st($7)._reject_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$15=_st(aToken)._string();
-return _st(each).__eq($15);
+return _st(each).__eq(_st(aToken)._string());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
-return $8;
+return $6;
 }, function($ctx1) {$ctx1.fill(self,"variableHintFor:token:",{anEditor:anEditor,aToken:aToken,variables:variables,classNames:classNames,pseudoVariables:pseudoVariables},smalltalk.HLCodeWidget)})},
 args: ["anEditor", "aToken"],
 source: "variableHintFor: anEditor token: aToken\x0a\x09| variables classNames pseudoVariables |\x0a\x09\x0a\x09variables := (anEditor display wrapper asJQuery find: 'span.cm-variable') get\x0a\x09\x09collect: [ :each | each asJQuery html ].\x0a\x09\x0a\x09classNames := Smalltalk current classes collect: [ :each | each name ].\x0a\x09pseudoVariables := Smalltalk current pseudoVariableNames.\x0a\x09\x0a\x09^ ((variables, classNames, pseudoVariables) asSet asArray \x0a\x09\x09select: [ :each | each includesSubString: aToken string ])\x0a\x09\x09reject: [ :each | each = aToken string ]",
@@ -1068,7 +1047,7 @@ var cursor,token,completions;
 function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
 function $HLCodeWidget(){return smalltalk.HLCodeWidget||(typeof HLCodeWidget=="undefined"?nil:HLCodeWidget)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2,$5,$7,$10,$11,$9,$8,$14,$15,$13,$12,$6;
+var $1,$4,$3,$2,$5,$7,$10,$11,$9,$8,$6;
 cursor=_st(anEditor)._getCursor();
 token=_st(anEditor)._getTokenAt_(cursor);
 $1=token;
@@ -1094,11 +1073,7 @@ $9=_st($10)._value_value_($11,_st(token)._end());
 $ctx1.sendIdx["value:value:"]=2;
 $8="from".__minus_gt($9);
 $ctx1.sendIdx["->"]=2;
-$14=_st($CodeMirror())._basicAt_("Pos");
-$15=_st(cursor)._line();
-$13=_st($14)._value_value_($15,_st(token)._start());
-$12="to".__minus_gt($13);
-$6=smalltalk.HashedCollection._from_([$7,$8,$12]);
+$6=smalltalk.HashedCollection._from_([$7,$8,"to".__minus_gt(_st(_st($CodeMirror())._basicAt_("Pos"))._value_value_(_st(cursor)._line(),_st(token)._start()))]);
 return $6;
 }, function($ctx1) {$ctx1.fill(self,"hintFor:options:",{anEditor:anEditor,options:options,cursor:cursor,token:token,completions:completions},smalltalk.HLCodeWidget.klass)})},
 args: ["anEditor", "options"],
@@ -1159,7 +1134,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$1;
+var $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$1;
 $2="Alt-Backspace".__minus_gt("delWordBefore");
 $ctx1.sendIdx["->"]=1;
 $3="Alt-Delete".__minus_gt("delWordAfter");
@@ -1210,8 +1185,7 @@ $25="Shift-Cmd-G".__minus_gt("findPrev");
 $ctx1.sendIdx["->"]=24;
 $26="Shift-Cmd-Z".__minus_gt("redo");
 $ctx1.sendIdx["->"]=25;
-$27="fallthrough".__minus_gt(["basic","emacsy"]);
-$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27]);
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,"fallthrough".__minus_gt(["basic","emacsy"])]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"macKeyMap",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1246,7 +1220,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$1;
+var $2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$1;
 $2="Alt-Left".__minus_gt("goLineStart");
 $ctx1.sendIdx["->"]=1;
 $3="Alt-Right".__minus_gt("goLineEnd");
@@ -1297,8 +1271,7 @@ $25="Shift-Ctrl-R".__minus_gt("replaceAll");
 $ctx1.sendIdx["->"]=24;
 $26="Shift-Ctrl-Z".__minus_gt("redo");
 $ctx1.sendIdx["->"]=25;
-$27="fallthrough".__minus_gt(["basic"]);
-$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27]);
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,"fallthrough".__minus_gt(["basic"])]);
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"pcKeyMap",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1318,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: []
 }),
@@ -1337,7 +1310,7 @@ fn: function (){
 var self=this;
 function $CodeMirror(){return smalltalk.CodeMirror||(typeof CodeMirror=="undefined"?nil:CodeMirror)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$5;
+var $1,$2,$3,$4,$5;
 $1=_st($CodeMirror())._basicAt_("commands");
 _st($1)._at_put_("doIt",(function(cm){
 return smalltalk.withContext(function($ctx2) {
@@ -1362,8 +1335,7 @@ return _st($4)._printIt();
 $ctx1.sendIdx["at:put:"]=3;
 $5=_st($1)._at_put_("saveIt",(function(cm){
 return smalltalk.withContext(function($ctx2) {
-$6=_st(cm)._amberCodeWidget();
-return _st($6)._saveIt();
+return _st(_st(cm)._amberCodeWidget())._saveIt();
 }, function($ctx2) {$ctx2.fillBlock({cm:cm},$ctx1,4)})}));
 return self}, function($ctx1) {$ctx1.fill(self,"setupCommands",{},smalltalk.HLCodeWidget.klass)})},
 args: [],
@@ -1731,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 +1749,7 @@ fn: function (anAnnouncement){
 var self=this;
 var method;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4,$9,$8,$7,$10,$6;
+var $3,$2,$1,$5,$4,$7,$6;
 method=_st(anAnnouncement)._method();
 $3=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
@@ -1796,19 +1768,16 @@ return self;
 } else {
 $4;
 };
-$9=self._browserModel();
-$8=_st($9)._selectedMethod();
-$7=_st($8)._selector();
+$7=_st(_st(self._browserModel())._selectedMethod())._selector();
 $ctx1.sendIdx["selector"]=1;
-$10=_st(method)._selector();
-$6=_st($7).__eq($10);
+$6=_st($7).__eq(_st(method)._selector());
 if(! smalltalk.assert($6)){
 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: []
 }),
@@ -1835,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: []
 }),
@@ -1862,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: []
 }),
@@ -1877,7 +1846,7 @@ var self=this;
 var lineIndex,newContents;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$7,$6,$5,$4;
+var $1,$3,$2,$6,$5,$4;
 lineIndex=(1);
 self._contents_(_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
@@ -1897,8 +1866,7 @@ _st(stream)._nextPutAll_(_st(anAnnouncement)._message());
 $ctx3.sendIdx["nextPutAll:"]=3;
 _st(stream)._nextPutAll_(" ");
 $ctx3.sendIdx["nextPutAll:"]=4;
-$7=_st(anAnnouncement)._column();
-$6=_st($7).__plus((1));
+$6=_st(_st(anAnnouncement)._column()).__plus((1));
 $ctx3.sendIdx["+"]=1;
 $5=_st(each)._copyFrom_to_($6,_st(each)._size());
 $4=_st(stream)._nextPutAll_($5);
@@ -1928,7 +1896,7 @@ category: 'reactions',
 fn: function (anAnnouncement){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$6,$5,$4;
+var $2,$1,$3;
 $2=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
 $1=_st($2)._selectedClass();
@@ -1940,13 +1908,10 @@ return $3;
 } else {
 $1;
 };
-$6=self._browserModel();
-$5=_st($6)._selectedClass();
-$4=_st($5)._definition();
-self._contents_($4);
+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: []
 }),
@@ -1975,7 +1940,7 @@ category: 'reactions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$6,$5,$4;
+var $2,$1,$3;
 $2=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
 $1=_st($2)._selectedClass();
@@ -1987,13 +1952,10 @@ return $3;
 } else {
 $1;
 };
-$6=self._browserModel();
-$5=_st($6)._selectedClass();
-$4=_st($5)._definition();
-self._contents_($4);
+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: []
 }),
@@ -2135,16 +2097,14 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 smalltalk.HLBrowserCodeWidget.superclass.fn.prototype._unregsiter.apply(_st(self), []);
 $2=self._browserModel();
 $ctx1.sendIdx["browserModel"]=1;
 $1=_st($2)._announcer();
 _st($1)._unsubscribe_(self);
 $ctx1.sendIdx["unsubscribe:"]=1;
-$4=self._browserModel();
-$3=_st($4)._systemAnnouncer();
-_st($3)._unsubscribe_(self);
+_st(_st(self._browserModel())._systemAnnouncer())._unsubscribe_(self);
 return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLBrowserCodeWidget)})},
 args: [],
 source: "unregister\x0a\x09super unregsiter.\x0a\x09\x0a\x09self browserModel announcer unsubscribe: self.\x0a\x09self browserModel systemAnnouncer unsubscribe: self",
@@ -2261,12 +2221,10 @@ var self=this;
 function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
 function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
 return smalltalk.withContext(function($ctx1) { 
-var $1;
-$1=_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._codeWidget(),(function(canvas){
+_st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._codeWidget(),(function(canvas){
 return smalltalk.withContext(function($ctx2) {
 return self._renderTranscriptOn_(canvas);
-}, function($ctx2) {$ctx2.fillBlock({canvas:canvas},$ctx1,1)})})));
-_st(html)._with_($1);
+}, function($ctx2) {$ctx2.fillBlock({canvas:canvas},$ctx1,1)})}))));
 $ctx1.sendIdx["with:"]=1;
 return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLWorkspace)})},
 args: ["html"],

File diff suppressed because it is too large
+ 139 - 178
js/IDE.js


+ 88 - 122
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"]
 }),
@@ -159,13 +159,12 @@ category: 'output',
 fn: function (aCategory,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2;
+var $1,$3,$2;
 $1="!".__comma(self._classNameFor_(_st(aCategory)._theClass()));
 $ctx1.sendIdx[","]=1;
 _st(aStream)._nextPutAll_($1);
 $ctx1.sendIdx["nextPutAll:"]=1;
-$4=" methodsFor: '".__comma(_st(aCategory)._name());
-$3=_st($4).__comma("'!");
+$3=_st(" methodsFor: '".__comma(_st(aCategory)._name())).__comma("'!");
 $ctx1.sendIdx[","]=2;
 $2=_st(aStream)._nextPutAll_($3);
 return self}, function($ctx1) {$ctx1.fill(self,"exportCategoryPrologueOf:on:",{aCategory:aCategory,aStream:aStream},smalltalk.ChunkExporter)})},
@@ -183,7 +182,7 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$4,$6,$5,$7,$9,$8,$12,$11,$10,$15,$14,$13,$16;
+var $1,$3,$2,$4,$6,$5,$7,$9,$8,$11,$10,$12;
 $1=self._classNameFor_(_st(aClass)._superclass());
 $ctx1.sendIdx["classNameFor:"]=1;
 _st(aStream)._nextPutAll_($1);
@@ -226,8 +225,7 @@ $9=_st(aClass)._comment();
 $ctx1.sendIdx["comment"]=1;
 $8=_st($9)._notEmpty();
 if(smalltalk.assert($8)){
-$12=self._classNameFor_(aClass);
-$11="!".__comma($12);
+$11="!".__comma(self._classNameFor_(aClass));
 $ctx1.sendIdx[","]=5;
 $10=_st($11).__comma(" commentStamp!");
 $ctx1.sendIdx[","]=4;
@@ -235,18 +233,15 @@ _st(aStream)._nextPutAll_($10);
 $ctx1.sendIdx["nextPutAll:"]=8;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=4;
-$15=_st(aClass)._comment();
-$14=self._chunkEscape_($15);
-$13=_st($14).__comma("!");
-_st(aStream)._nextPutAll_($13);
-$16=_st(aStream)._lf();
+_st(aStream)._nextPutAll_(_st(self._chunkEscape_(_st(aClass)._comment())).__comma("!"));
+$12=_st(aStream)._lf();
 $ctx1.sendIdx["lf"]=5;
-$16;
+$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: []
 }),
@@ -259,7 +254,7 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4,$6,$8,$7,$9;
+var $3,$2,$1,$5,$4,$6,$7;
 $3=_st(aClass)._class();
 $ctx1.sendIdx["class"]=1;
 $2=_st($3)._instanceVariableNames();
@@ -274,9 +269,7 @@ $ctx1.sendIdx["nextPutAll:"]=1;
 $6=_st(aStream)._nextPutAll_(" instanceVariableNames: '");
 $ctx1.sendIdx["nextPutAll:"]=2;
 $6;
-$8=_st(aClass)._class();
-$7=_st($8)._instanceVariableNames();
-_st($7)._do_separatedBy_((function(each){
+_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(each);
 $ctx2.sendIdx["nextPutAll:"]=3;
@@ -288,12 +281,12 @@ $ctx2.sendIdx["nextPutAll:"]=4;
 _st(aStream)._nextPutAll_("'!");
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=1;
-$9=_st(aStream)._lf();
-$9;
+$7=_st(aStream)._lf();
+$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: []
 }),
@@ -330,7 +323,7 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 self._exportPackageDefinitionOf_on_(aPackage,aStream);
 _st(_st(aPackage)._sortedClasses())._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
@@ -340,8 +333,7 @@ $ctx2.sendIdx["ownMethodProtocolsOfClass:"]=1;
 self._exportProtocols_on_($1,aStream);
 $ctx2.sendIdx["exportProtocols:on:"]=1;
 self._exportMetaDefinitionOf_on_(each,aStream);
-$2=self._ownMethodProtocolsOfClass_(_st(each)._class());
-return self._exportProtocols_on_($2,aStream);
+return self._exportProtocols_on_(self._ownMethodProtocolsOfClass_(_st(each)._class()),aStream);
 $ctx2.sendIdx["exportProtocols:on:"]=2;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
 self._exportProtocols_on_(self._extensionProtocolsOfPackage_(aPackage),aStream);
@@ -360,12 +352,11 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
-$2="Smalltalk current createPackage: '".__comma(_st(aPackage)._name());
-$1=_st($2).__comma("'!");
+var $1,$2;
+$1=_st("Smalltalk current createPackage: '".__comma(_st(aPackage)._name())).__comma("'!");
 $ctx1.sendIdx[","]=1;
 _st(aStream)._nextPutAll_($1);
-$3=_st(aStream)._lf();
+$2=_st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.ChunkExporter)})},
 args: ["aPackage", "aStream"],
 source: "exportPackageDefinitionOf: aPackage on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'Smalltalk current createPackage: ''', aPackage name, '''!';\x0a\x09\x09lf",
@@ -422,13 +413,12 @@ category: 'output',
 fn: function (aProtocol,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$2;
+var $1,$3,$2;
 $1="!".__comma(self._classNameFor_(_st(aProtocol)._theClass()));
 $ctx1.sendIdx[","]=1;
 _st(aStream)._nextPutAll_($1);
 $ctx1.sendIdx["nextPutAll:"]=1;
-$4=" methodsFor: '".__comma(_st(aProtocol)._name());
-$3=_st($4).__comma("'!");
+$3=_st(" methodsFor: '".__comma(_st(aProtocol)._name())).__comma("'!");
 $ctx1.sendIdx[","]=2;
 $2=_st(aStream)._nextPutAll_($3);
 return self}, function($ctx1) {$ctx1.fill(self,"exportProtocolPrologueOf:on:",{aProtocol:aProtocol,aStream:aStream},smalltalk.ChunkExporter)})},
@@ -502,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"]
 }),
@@ -537,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"]
 }),
@@ -555,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: []
 }),
@@ -611,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: []
 }),
@@ -624,7 +614,7 @@ category: 'output',
 fn: function (aClass,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4,$6,$8,$7,$9,$10,$12,$11,$13,$15,$14,$16;
+var $3,$2,$1,$5,$4,$6,$8,$7,$9,$11,$10,$12;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=1;
 _st(aStream)._nextPutAll_("smalltalk.addClass(");
@@ -660,35 +650,31 @@ $ctx2.sendIdx["nextPutAll:"]=6;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(aStream)._nextPutAll_("], '");
 $ctx1.sendIdx["nextPutAll:"]=7;
-$9=_st(_st(aClass)._category()).__comma("'");
-_st(aStream)._nextPutAll_($9);
+_st(aStream)._nextPutAll_(_st(_st(aClass)._category()).__comma("'"));
 $ctx1.sendIdx["nextPutAll:"]=8;
-$10=_st(aStream)._nextPutAll_(");");
+$9=_st(aStream)._nextPutAll_(");");
 $ctx1.sendIdx["nextPutAll:"]=9;
-$12=_st(aClass)._comment();
+$11=_st(aClass)._comment();
 $ctx1.sendIdx["comment"]=1;
-$11=_st($12)._notEmpty();
-if(smalltalk.assert($11)){
+$10=_st($11)._notEmpty();
+if(smalltalk.assert($10)){
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=2;
 _st(aStream)._nextPutAll_("smalltalk.");
 $ctx1.sendIdx["nextPutAll:"]=10;
-$13=self._classNameFor_(aClass);
-_st(aStream)._nextPutAll_($13);
+_st(aStream)._nextPutAll_(self._classNameFor_(aClass));
 $ctx1.sendIdx["nextPutAll:"]=11;
 _st(aStream)._nextPutAll_(".comment=");
 $ctx1.sendIdx["nextPutAll:"]=12;
-$15=_st(aClass)._comment();
-$14=_st($15)._asJavascript();
-_st(aStream)._nextPutAll_($14);
+_st(aStream)._nextPutAll_(_st(_st(aClass)._comment())._asJavascript());
 $ctx1.sendIdx["nextPutAll:"]=13;
-$16=_st(aStream)._nextPutAll_(";");
-$16;
+$12=_st(aStream)._nextPutAll_(";");
+$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: []
 }),
@@ -702,7 +688,7 @@ fn: function (aClass,aStream){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$6,$5,$4,$7,$9,$8,$11,$10,$13,$12;
+var $3,$2,$1,$6,$5,$4,$7,$9,$8;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=1;
 $3=_st(aClass)._class();
@@ -721,28 +707,24 @@ $ctx1.sendIdx["nextPutAll:"]=1;
 $7=_st(aStream)._nextPutAll_(".iVarNames = [");
 $ctx1.sendIdx["nextPutAll:"]=2;
 $7;
-$9=_st(aClass)._class();
-$8=_st($9)._instanceVariableNames();
-_st($8)._do_separatedBy_((function(each){
+_st(_st(_st(aClass)._class())._instanceVariableNames())._do_separatedBy_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$11="'".__comma(each);
+$9="'".__comma(each);
 $ctx2.sendIdx[","]=3;
-$10=_st($11).__comma("'");
+$8=_st($9).__comma("'");
 $ctx2.sendIdx[","]=2;
-return _st(aStream)._nextPutAll_($10);
+return _st(aStream)._nextPutAll_($8);
 $ctx2.sendIdx["nextPutAll:"]=3;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
 return _st(aStream)._nextPutAll_(",");
 $ctx2.sendIdx["nextPutAll:"]=4;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
-$13=_st($String())._lf();
-$12="];".__comma($13);
-_st(aStream)._nextPutAll_($12);
+_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"]
 }),
@@ -755,7 +737,7 @@ category: 'output',
 fn: function (aMethod,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1,$5,$4,$7,$6,$10,$9,$8,$13,$12,$11,$16,$15,$14,$19,$18,$17,$20,$21;
+var $3,$2,$1,$5,$4,$7,$6,$10,$9,$8,$13,$12,$11,$16,$15,$14,$18,$17,$19;
 _st(aStream)._nextPutAll_("smalltalk.addMethod(");
 $ctx1.sendIdx["nextPutAll:"]=1;
 _st(aStream)._lf();
@@ -820,8 +802,7 @@ _st(aStream)._nextPutAll_($14);
 $ctx1.sendIdx["nextPutAll:"]=8;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=8;
-$19=_st(_st(aMethod)._referencedClasses())._asJavascript();
-$18="referencedClasses: ".__comma($19);
+$18="referencedClasses: ".__comma(_st(_st(aMethod)._referencedClasses())._asJavascript());
 $ctx1.sendIdx[","]=13;
 $17=_st(aStream)._nextPutAll_($18);
 $ctx1.sendIdx["nextPutAll:"]=9;
@@ -831,13 +812,12 @@ _st(aStream)._nextPutAll_("}),");
 $ctx1.sendIdx["nextPutAll:"]=10;
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=10;
-$20="smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass()));
-_st(aStream)._nextPutAll_($20);
+_st(aStream)._nextPutAll_("smalltalk.".__comma(self._classNameFor_(_st(aMethod)._methodClass())));
 $ctx1.sendIdx["nextPutAll:"]=11;
 _st(aStream)._nextPutAll_(");");
 _st(aStream)._lf();
 $ctx1.sendIdx["lf"]=11;
-$21=_st(aStream)._lf();
+$19=_st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportMethod:on:",{aMethod:aMethod,aStream:aStream},smalltalk.Exporter)})},
 args: ["aMethod", "aStream"],
 source: "exportMethod: aMethod on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.addMethod(';lf;\x0a\x09\x09\x22nextPutAll: aMethod selector asSelector asJavascript, ',';lf;\x22\x0a\x09\x09nextPutAll: 'smalltalk.method({';lf;\x0a\x09\x09nextPutAll: 'selector: ', aMethod selector asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'category: ''', aMethod category, ''',';lf;\x0a\x09\x09nextPutAll: 'fn: ', aMethod fn compiledSource, ',';lf;\x0a\x09\x09nextPutAll: 'args: ', aMethod arguments asJavascript, ','; lf;\x0a\x09\x09nextPutAll: 'source: ', aMethod source asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'messageSends: ', aMethod messageSends asJavascript, ',';lf;\x0a\x09\x09nextPutAll: 'referencedClasses: ', aMethod referencedClasses asJavascript.\x0a\x09aStream\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: '}),';lf;\x0a\x09\x09nextPutAll: 'smalltalk.', (self classNameFor: aMethod methodClass);\x0a\x09\x09nextPutAll: ');';lf;lf",
@@ -853,7 +833,7 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 self._exportPackagePrologueOf_on_(aPackage,aStream);
 self._exportPackageDefinitionOf_on_(aPackage,aStream);
 $1=self._exportPackageTransportOf_on_(aPackage,aStream);
@@ -869,8 +849,7 @@ $ctx3.sendIdx["exportMethod:on:"]=1;
 }, function($ctx3) {$ctx3.fillBlock({method:method},$ctx2,2)})}));
 $ctx2.sendIdx["do:"]=2;
 self._exportMetaDefinitionOf_on_(each,aStream);
-$3=_st(_st(each)._class())._ownMethods();
-return _st($3)._do_((function(method){
+return _st(_st(_st(each)._class())._ownMethods())._do_((function(method){
 return smalltalk.withContext(function($ctx3) {
 return self._exportMethod_on_(method,aStream);
 $ctx3.sendIdx["exportMethod:on:"]=2;
@@ -898,14 +877,13 @@ category: 'output',
 fn: function (aPackage,aStream){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3;
+var $1,$2;
 _st(aStream)._nextPutAll_("smalltalk.addPackage(");
 $ctx1.sendIdx["nextPutAll:"]=1;
-$2="'".__comma(_st(aPackage)._name());
-$1=_st($2).__comma("');");
+$1=_st("'".__comma(_st(aPackage)._name())).__comma("');");
 $ctx1.sendIdx[","]=1;
 _st(aStream)._nextPutAll_($1);
-$3=_st(aStream)._lf();
+$2=_st(aStream)._lf();
 return self}, function($ctx1) {$ctx1.fill(self,"exportPackageDefinitionOf:on:",{aPackage:aPackage,aStream:aStream},smalltalk.Exporter)})},
 args: ["aPackage", "aStream"],
 source: "exportPackageDefinitionOf: aPackage on: aStream\x0a\x09aStream\x0a\x09\x09nextPutAll: 'smalltalk.addPackage(';\x0a\x09\x09nextPutAll: '''', aPackage name, ''');';\x0a\x09\x09lf",
@@ -983,13 +961,12 @@ category: 'accessing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $1=_st(_st(_st(_st(aClass)._methodDictionary())._values())._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._selector();
 $ctx2.sendIdx["selector"]=1;
-$3=_st(b)._selector();
-return _st($2).__lt_eq($3);
+return _st($2).__lt_eq(_st(b)._selector());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._reject_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(each)._category())._match_("^\x5c*");
@@ -997,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: []
 }),
@@ -1015,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: []
 }),
@@ -1032,7 +1009,7 @@ category: 'private',
 fn: function (anArray){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$3,$1;
+var $2,$1;
 $1=_st(_st(anArray)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
 $2=self._amdNamespaceOfPackage_(each);
@@ -1040,9 +1017,7 @@ $ctx2.sendIdx["amdNamespaceOfPackage:"]=1;
 return _st($2)._notNil();
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$4=self._amdNamespaceOfPackage_(each);
-$3=_st($4).__comma("/");
-return _st($3).__comma(_st(each)._name());
+return _st(_st(self._amdNamespaceOfPackage_(each)).__comma("/")).__comma(_st(each)._name());
 $ctx2.sendIdx[","]=1;
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 return $1;
@@ -1061,14 +1036,13 @@ category: 'private',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$5,$1;
+var $4,$3,$2,$1;
 $4=_st(aPackage)._transport();
 $ctx1.sendIdx["transport"]=1;
 $3=_st($4)._type();
 $2=_st($3).__eq("amd");
 if(smalltalk.assert($2)){
-$5=_st(aPackage)._transport();
-$1=_st($5)._namespace();
+$1=_st(_st(aPackage)._transport())._namespace();
 } else {
 $1=nil;
 };
@@ -1171,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: []
 }),
@@ -1206,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: []
 }),
@@ -1222,13 +1196,12 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $1=_st(_st(self._theClass())._methodsInProtocol_(self._name()))._sorted_((function(a,b){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._selector();
 $ctx2.sendIdx["selector"]=1;
-$3=_st(b)._selector();
-return _st($2).__lt_eq($3);
+return _st($2).__lt_eq(_st(b)._selector());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"methods",{},smalltalk.ExportMethodProtocol)})},
@@ -1251,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: []
 }),
@@ -1285,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: []
 }),
@@ -1324,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: []
 }),
@@ -1370,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"]
 }),
@@ -1387,7 +1360,7 @@ category: 'private',
 fn: function (aURL,aString){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$10,$9,$8,$7,$6,$1;
+var $2,$3,$4,$5,$8,$7,$6,$1;
 $2="url".__minus_gt(aURL);
 $ctx1.sendIdx["->"]=1;
 $3="type".__minus_gt("PUT");
@@ -1396,22 +1369,20 @@ $4="data".__minus_gt(aString);
 $ctx1.sendIdx["->"]=3;
 $5="contentType".__minus_gt("text/plain;charset=UTF-8");
 $ctx1.sendIdx["->"]=4;
-$6="error".__minus_gt((function(xhr){
+$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,"error".__minus_gt((function(xhr){
 return smalltalk.withContext(function($ctx2) {
-$10="Commiting ".__comma(aURL);
-$9=_st($10).__comma(" failed with reason: \x22");
+$8=_st("Commiting ".__comma(aURL)).__comma(" failed with reason: \x22");
 $ctx2.sendIdx[","]=3;
-$8=_st($9).__comma(_st(xhr)._responseText());
+$7=_st($8).__comma(_st(xhr)._responseText());
 $ctx2.sendIdx[","]=2;
-$7=_st($8).__comma("\x22");
+$6=_st($7).__comma("\x22");
 $ctx2.sendIdx[","]=1;
-return self._alert_($7);
-}, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1,1)})}));
-$1=smalltalk.HashedCollection._from_([$2,$3,$4,$5,$6]);
+return self._alert_($6);
+}, function($ctx2) {$ctx2.fillBlock({xhr:xhr},$ctx1,1)})}))]);
 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: []
 }),
@@ -1506,9 +1477,8 @@ category: 'committing',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st(self._commitPathJsFor_(aPackage)).__comma("/");
-$2=_st($3).__comma(_st(aPackage)._name());
+var $2,$1;
+$2=_st(_st(self._commitPathJsFor_(aPackage)).__comma("/")).__comma(_st(aPackage)._name());
 $ctx1.sendIdx[","]=2;
 $1=_st($2).__comma(".js");
 $ctx1.sendIdx[","]=1;
@@ -1560,9 +1530,8 @@ category: 'committing',
 fn: function (aPackage){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st(self._commitPathStFor_(aPackage)).__comma("/");
-$2=_st($3).__comma(_st(aPackage)._name());
+var $2,$1;
+$2=_st(_st(self._commitPathStFor_(aPackage)).__comma("/")).__comma(_st(aPackage)._name());
 $ctx1.sendIdx[","]=2;
 $1=_st($2).__comma(".st");
 $ctx1.sendIdx[","]=1;
@@ -1648,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: []
 }),
@@ -1666,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: []
 }),
@@ -2051,15 +2020,13 @@ category: 'registration',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1;
 $1=_st(aClass)._type();
 $ctx1.sendIdx["type"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=self["@registry"];
-$3=_st(aClass)._type();
-_st($2)._at_put_($3,aClass);
+_st(self["@registry"])._at_put_(_st(aClass)._type(),aClass);
 };
 return self}, function($ctx1) {$ctx1.fill(self,"register:",{aClass:aClass},smalltalk.PackageTransport.klass)})},
 args: ["aClass"],
@@ -2153,15 +2120,14 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$1;
+var $3,$2,$1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 _st(stream)._nextPutAll_(_st(self._class())._name());
 $ctx2.sendIdx["nextPutAll:"]=1;
 _st(stream)._nextPutAll_(" namespace: ");
 $ctx2.sendIdx["nextPutAll:"]=2;
-$4="'".__comma(self._namespace());
-$3=_st($4).__comma("'");
+$3=_st("'".__comma(self._namespace())).__comma("'");
 $ctx2.sendIdx[","]=1;
 $2=_st(stream)._nextPutAll_($3);
 return $2;

+ 3 - 6
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: []
 }),
@@ -102,7 +102,7 @@ fn: function (anAnnouncement){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$6,$7,$5,$1;
+var $3,$4,$2,$1;
 $3=_st($Smalltalk())._current();
 $ctx1.sendIdx["current"]=1;
 $4=_st(self._announcementClass())._name();
@@ -114,10 +114,7 @@ return false;
 } else {
 var class_;
 class_=$receiver;
-$6=_st($Smalltalk())._current();
-$7=_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name();
-$5=_st($6)._at_($7);
-$1=_st($5)._includesBehavior_(class_);
+$1=_st(_st(_st($Smalltalk())._current())._at_(_st(_st(_st(anAnnouncement)._class())._theNonMetaClass())._name()))._includesBehavior_(class_);
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"handlesAnnouncement:",{anAnnouncement:anAnnouncement},smalltalk.AnnouncementSubscription)})},

+ 103 - 135
js/Kernel-Classes.js

@@ -33,7 +33,7 @@ function $MethodAdded(){return smalltalk.MethodAdded||(typeof MethodAdded=="unde
 function $MethodModified(){return smalltalk.MethodModified||(typeof MethodModified=="undefined"?nil:MethodModified)}
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1,$4,$5,$6,$7,$8,$9,$10;
+var $2,$3,$1,$4,$5,$6,$7,$8;
 oldMethod=_st(self._methodDictionary())._at_ifAbsent_(_st(aMethod)._selector(),(function(){
 return smalltalk.withContext(function($ctx2) {
 return nil;
@@ -43,26 +43,24 @@ $3=_st(aMethod)._protocol();
 $ctx1.sendIdx["protocol"]=1;
 $1=_st($2)._includes_($3);
 if(! smalltalk.assert($1)){
-$4=self._organization();
-$5=_st(aMethod)._protocol();
-_st($4)._addElement_($5);
+_st(self._organization())._addElement_(_st(aMethod)._protocol());
 };
 self._basicAddCompiledMethod_(aMethod);
-$6=oldMethod;
-if(($receiver = $6) == nil || $receiver == null){
-$7=_st($MethodAdded())._new();
+$4=oldMethod;
+if(($receiver = $4) == nil || $receiver == null){
+$5=_st($MethodAdded())._new();
 $ctx1.sendIdx["new"]=1;
-_st($7)._method_(aMethod);
+_st($5)._method_(aMethod);
 $ctx1.sendIdx["method:"]=1;
-$8=_st($7)._yourself();
+$6=_st($5)._yourself();
 $ctx1.sendIdx["yourself"]=1;
-announcement=$8;
+announcement=$6;
 } else {
-$9=_st($MethodModified())._new();
-_st($9)._oldMethod_(oldMethod);
-_st($9)._method_(aMethod);
-$10=_st($9)._yourself();
-announcement=$10;
+$7=_st($MethodModified())._new();
+_st($7)._oldMethod_(oldMethod);
+_st($7)._method_(aMethod);
+$8=_st($7)._yourself();
+announcement=$8;
 };
 _st(_st($SystemAnnouncer())._current())._announce_(announcement);
 return self}, function($ctx1) {$ctx1.fill(self,"addCompiledMethod:",{aMethod:aMethod,oldMethod:oldMethod,announcement:announcement},smalltalk.Behavior)})},
@@ -81,23 +79,20 @@ fn: function (){
 var self=this;
 var result;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5;
+var $1,$2;
 result=_st(self._instanceVariableNames())._copy();
 $1=self._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=result;
-$4=self._superclass();
-$3=_st($4)._allInstanceVariableNames();
-_st($2)._addAll_($3);
+_st(result)._addAll_(_st(self._superclass())._allInstanceVariableNames());
 };
-$5=result;
-return $5;
+$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: []
 }),
@@ -110,16 +105,15 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$5,$1;
+var $2,$3,$4,$1;
 $2=self._allSuperclasses();
 $3=self._selectors();
 $ctx1.sendIdx["selectors"]=1;
 $1=_st($2)._inject_into_($3,(function(acc,each){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(each)._selectors();
-_st(acc)._addAll_($4);
-$5=_st(acc)._yourself();
-return $5;
+_st(acc)._addAll_(_st(each)._selectors());
+$4=_st(acc)._yourself();
+return $4;
 }, function($ctx2) {$ctx2.fillBlock({acc:acc,each:each},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},smalltalk.Behavior)})},
@@ -138,7 +132,7 @@ fn: function (){
 var self=this;
 var subclasses,index;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1;
 subclasses=self._subclasses();
 $ctx1.sendIdx["subclasses"]=1;
 index=(1);
@@ -147,14 +141,12 @@ return smalltalk.withContext(function($ctx2) {
 return _st(index).__gt(_st(subclasses)._size());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileFalse_((function(){
 return smalltalk.withContext(function($ctx2) {
-$1=subclasses;
-$2=_st(_st(subclasses)._at_(index))._subclasses();
-_st($1)._addAll_($2);
+_st(subclasses)._addAll_(_st(_st(subclasses)._at_(index))._subclasses());
 index=_st(index).__plus((1));
 return index;
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$3=subclasses;
-return $3;
+$1=subclasses;
+return $1;
 }, function($ctx1) {$ctx1.fill(self,"allSubclasses",{subclasses:subclasses,index:index},smalltalk.Behavior)})},
 args: [],
 source: "allSubclasses\x0a\x09\x22Answer an collection of the receiver's and the receiver's descendent's subclasses. \x22\x0a\x0a\x09| subclasses index |\x0a\x09\x0a\x09subclasses := self subclasses.\x0a\x09index := 1.\x0a\x09[ index > subclasses size ]\x0a\x09\x09whileFalse: [ subclasses addAll: (subclasses at: index) subclasses.\x0a\x09\x09\x09index := index + 1 ].\x0a\x0a\x09^ subclasses",
@@ -190,7 +182,7 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$5,$4,$6,$8,$7,$9,$3;
+var $1,$2,$5,$4,$6,$3;
 $1=self._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -202,12 +194,9 @@ $1;
 $5=self._superclass();
 $ctx1.sendIdx["superclass"]=2;
 $4=_st($OrderedCollection())._with_($5);
-$6=$4;
-$8=self._superclass();
-$7=_st($8)._allSuperclasses();
-_st($6)._addAll_($7);
-$9=_st($4)._yourself();
-$3=$9;
+_st($4)._addAll_(_st(self._superclass())._allSuperclasses());
+$6=_st($4)._yourself();
+$3=$6;
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"allSuperclasses",{},smalltalk.Behavior)})},
 args: [],
@@ -272,7 +261,7 @@ category: 'testing',
 fn: function (aSelector){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$4,$1;
+var $3,$2,$1;
 $1=_st(_st(_st(self._methodDictionary())._keys())._includes_(_st(aSelector)._asString()))._or_((function(){
 return smalltalk.withContext(function($ctx2) {
 $3=self._superclass();
@@ -280,14 +269,13 @@ $ctx2.sendIdx["superclass"]=1;
 $2=_st($3)._notNil();
 return _st($2)._and_((function(){
 return smalltalk.withContext(function($ctx3) {
-$4=self._superclass();
-return _st($4)._canUnderstand_(aSelector);
+return _st(self._superclass())._canUnderstand_(aSelector);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 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: []
 }),
@@ -310,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: []
 }),
@@ -355,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"]
 }),
@@ -373,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: []
 }),
@@ -478,7 +466,7 @@ category: 'testing',
 fn: function (aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$4,$3,$5,$2;
+var $1,$4,$3,$2;
 $1=self._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
@@ -491,8 +479,7 @@ $ctx1.sendIdx["superclass"]=2;
 $3=_st(aClass).__eq_eq($4);
 $2=_st($3)._or_((function(){
 return smalltalk.withContext(function($ctx2) {
-$5=self._superclass();
-return _st($5)._inheritsFrom_(aClass);
+return _st(self._superclass())._inheritsFrom_(aClass);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 return $2;
 }, function($ctx1) {$ctx1.fill(self,"inheritsFrom:",{aClass:aClass},smalltalk.Behavior)})},
@@ -678,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"]
 }),
@@ -696,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: []
 }),
@@ -751,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: []
 }),
@@ -783,7 +770,7 @@ fn: function (){
 var self=this;
 function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $1=_st(_st(self._ownProtocols())._inject_into_(_st($OrderedCollection())._new(),(function(acc,each){
 return smalltalk.withContext(function($ctx2) {
 return _st(acc).__comma(self._methodsInProtocol_(each));
@@ -791,8 +778,7 @@ return _st(acc).__comma(self._methodsInProtocol_(each));
 return smalltalk.withContext(function($ctx2) {
 $2=_st(a)._selector();
 $ctx2.sendIdx["selector"]=1;
-$3=_st(b)._selector();
-return _st($2).__lt_eq($3);
+return _st($2).__lt_eq(_st(b)._selector());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"ownMethods",{},smalltalk.Behavior)})},
@@ -868,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"]
 }),
@@ -918,7 +904,7 @@ var self=this;
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $MethodRemoved(){return smalltalk.MethodRemoved||(typeof MethodRemoved=="undefined"?nil:MethodRemoved)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$6;
+var $1,$2,$3,$4;
 self._basicRemoveCompiledMethod_(aMethod);
 _st(self._methods())._detect_ifNone_((function(each){
 return smalltalk.withContext(function($ctx2) {
@@ -929,14 +915,12 @@ $ctx2.sendIdx["protocol"]=2;
 return _st($1).__eq($2);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}),(function(){
 return smalltalk.withContext(function($ctx2) {
-$3=self._organization();
-$4=_st(aMethod)._protocol();
-return _st($3)._removeElement_($4);
+return _st(self._organization())._removeElement_(_st(aMethod)._protocol());
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$5=_st($MethodRemoved())._new();
-_st($5)._method_(aMethod);
-$6=_st($5)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($6);
+$3=_st($MethodRemoved())._new();
+_st($3)._method_(aMethod);
+$4=_st($3)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($4);
 return self}, function($ctx1) {$ctx1.fill(self,"removeCompiledMethod:",{aMethod:aMethod},smalltalk.Behavior)})},
 args: ["aMethod"],
 source: "removeCompiledMethod: aMethod\x0a\x09self basicRemoveCompiledMethod: aMethod.\x0a\x09\x0a\x09self methods\x0a\x09\x09detect: [ :each | each protocol = aMethod protocol ]\x0a\x09\x09ifNone: [ self organization removeElement: aMethod protocol ].\x0a\x09\x0a\x09SystemAnnouncer current\x0a\x09\x09announce: (MethodRemoved new\x0a\x09\x09\x09method: aMethod;\x0a\x09\x09\x09yourself)",
@@ -1045,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"]
 }),
@@ -1080,19 +1064,18 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=self._package();
 $ctx1.sendIdx["package"]=1;
 if(($receiver = $2) == nil || $receiver == null){
 $1="Unclassified";
 } else {
-$3=self._package();
-$1=_st($3)._name();
+$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: []
 }),
@@ -1106,7 +1089,7 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$4,$2,$5,$8,$7,$9,$6,$10,$1;
+var $3,$4,$2,$5,$6,$7,$1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 _st(stream)._nextPutAll_(_st(self._superclass())._asString());
@@ -1135,10 +1118,7 @@ return smalltalk.withContext(function($ctx3) {
 return _st(stream)._nextPutAll_(" ");
 $ctx3.sendIdx["nextPutAll:"]=7;
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
-$8=_st($String())._lf();
-$7="'".__comma($8);
-$9=_st($String())._tab();
-$6=_st($7).__comma($9);
+$6=_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab());
 $ctx2.sendIdx[","]=2;
 _st(stream)._nextPutAll_($6);
 $ctx2.sendIdx["nextPutAll:"]=8;
@@ -1146,8 +1126,8 @@ _st(stream)._nextPutAll_("package: '");
 $ctx2.sendIdx["nextPutAll:"]=9;
 _st(stream)._nextPutAll_(self._category());
 $ctx2.sendIdx["nextPutAll:"]=10;
-$10=_st(stream)._nextPutAll_("'");
-return $10;
+$7=_st(stream)._nextPutAll_("'");
+return $7;
 }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"definition",{},smalltalk.Class)})},
@@ -1168,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: []
 }),
@@ -1202,7 +1182,7 @@ var oldPackage;
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $ClassMoved(){return smalltalk.ClassMoved||(typeof ClassMoved=="undefined"?nil:ClassMoved)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$5,$6;
+var $2,$1,$3,$4,$5;
 $2=self._package();
 $ctx1.sendIdx["package"]=1;
 $1=_st($2).__eq(aPackage);
@@ -1214,13 +1194,12 @@ self._basicAt_put_("pkg",aPackage);
 $3=_st(oldPackage)._organization();
 $ctx1.sendIdx["organization"]=1;
 _st($3)._removeElement_(self);
-$4=_st(aPackage)._organization();
-_st($4)._addElement_(self);
-$5=_st($ClassMoved())._new();
-_st($5)._theClass_(self);
-_st($5)._oldPackage_(oldPackage);
-$6=_st($5)._yourself();
-_st(_st($SystemAnnouncer())._current())._announce_($6);
+_st(_st(aPackage)._organization())._addElement_(self);
+$4=_st($ClassMoved())._new();
+_st($4)._theClass_(self);
+_st($4)._oldPackage_(oldPackage);
+$5=_st($4)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($5);
 return self}, function($ctx1) {$ctx1.fill(self,"package:",{aPackage:aPackage,oldPackage:oldPackage},smalltalk.Class)})},
 args: ["aPackage"],
 source: "package: aPackage\x0a\x09| oldPackage |\x0a\x09\x0a\x09self package = aPackage ifTrue: [ ^ self ].\x0a\x09\x0a\x09oldPackage := self package.\x0a\x09\x0a\x09self basicAt: 'pkg' put: aPackage.\x0a\x09oldPackage organization removeElement: self.\x0a\x09aPackage organization addElement: self.\x0a\x0a\x09SystemAnnouncer current announce: (ClassMoved new\x0a\x09\x09theClass: self;\x0a\x09\x09oldPackage: oldPackage;\x0a\x09\x09yourself)",
@@ -1274,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: []
 }),
@@ -1293,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: []
 }),
@@ -1311,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: []
 }),
@@ -1330,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"]
 }),
@@ -1363,9 +1342,8 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2="smalltalk.".__comma(_st(self._instanceClass())._name());
-$1=_st($2).__comma(".klass");
+var $1;
+$1=_st("smalltalk.".__comma(_st(self._instanceClass())._name())).__comma(".klass");
 $ctx1.sendIdx[","]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"asJavascript",{},smalltalk.Metaclass)})},
@@ -1455,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: []
 }),
@@ -1625,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: []
 }),
@@ -1732,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"]
 }),
@@ -1746,7 +1724,7 @@ fn: function (aClass,anotherClass){
 var self=this;
 function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$3,$4,$5,$6,$8,$7,$11,$10,$9,$12,$13,$14,$15;
+var $2,$1,$3,$4,$5,$6,$8,$7,$11,$10,$9;
 _st(anotherClass)._comment_(_st(aClass)._comment());
 $2=_st(aClass)._methodDictionary();
 $ctx1.sendIdx["methodDictionary"]=1;
@@ -1776,11 +1754,7 @@ $10=_st($11)._methodDictionary();
 $9=_st($10)._values();
 _st($9)._do_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$12=_st($Compiler())._new();
-$13=_st(each)._source();
-$14=_st(anotherClass)._class();
-$15=_st(each)._category();
-return _st($12)._install_forClass_category_($13,$14,$15);
+return _st(_st($Compiler())._new())._install_forClass_category_(_st(each)._source(),_st(anotherClass)._class(),_st(each)._category());
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 self._setupClass_(anotherClass);
 return self}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
@@ -1827,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: []
 }),
@@ -1848,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: []
 }),
@@ -1861,12 +1835,10 @@ category: 'class migration',
 fn: function (aClass,anotherClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$1;
+var $2,$1;
 $2=_st(aClass)._name();
 $ctx1.sendIdx["name"]=1;
-$3=_st(aClass)._instanceVariableNames();
-$4=_st(_st(aClass)._package())._name();
-$1=self._migrateClassNamed_superclass_instanceVariableNames_package_($2,anotherClass,$3,$4);
+$1=self._migrateClassNamed_superclass_instanceVariableNames_package_($2,anotherClass,_st(aClass)._instanceVariableNames(),_st(_st(aClass)._package())._name());
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"migrateClass:superclass:",{aClass:aClass,anotherClass:anotherClass},smalltalk.ClassBuilder)})},
 args: ["aClass", "anotherClass"],
@@ -1888,7 +1860,7 @@ function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $ClassMigrated(){return smalltalk.ClassMigrated||(typeof ClassMigrated=="undefined"?nil:ClassMigrated)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$5,$7,$6,$8,$9,$10,$11;
+var $1,$2,$3,$4,$5,$6,$7,$8,$9;
 tmp="new*".__comma(className);
 $ctx1.sendIdx[","]=1;
 $1=_st($Smalltalk())._current();
@@ -1916,22 +1888,20 @@ $5=(function(each){
 return smalltalk.withContext(function($ctx2) {
 return self._migrateClass_superclass_(each,newClass);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})});
-$7="Recompiling ".__comma(_st(newClass)._name());
-$6=_st($7).__comma("...");
+$6=_st("Recompiling ".__comma(_st(newClass)._name())).__comma("...");
 $ctx1.sendIdx[","]=2;
 _st($4)._do_displayingProgress_($5,$6);
 self._basicRemoveClass_(oldClass);
-$8=_st($SystemAnnouncer())._current();
-$9=_st($ClassMigrated())._new();
-_st($9)._theClass_(newClass);
-_st($9)._oldClass_(oldClass);
-$10=_st($9)._yourself();
-_st($8)._announce_($10);
-$11=newClass;
-return $11;
+$7=_st($ClassMigrated())._new();
+_st($7)._theClass_(newClass);
+_st($7)._oldClass_(oldClass);
+$8=_st($7)._yourself();
+_st(_st($SystemAnnouncer())._current())._announce_($8);
+$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"]
 }),
@@ -2007,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: []
 }),
@@ -2040,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"]
 }),
@@ -2121,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"]
 }),
@@ -2179,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: []
 }),
@@ -2233,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"]
 }),
@@ -2251,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: []
 }),
@@ -2285,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: []
 }),
@@ -2303,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: []
 }),
@@ -2332,7 +2302,7 @@ category: 'visiting',
 fn: function (aCollection){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$5,$4;
+var $1,$3,$2;
 $1=self._theClass();
 $ctx1.sendIdx["theClass"]=1;
 _st(aCollection)._add_($1);
@@ -2342,16 +2312,14 @@ $3=_st(a)._theClass();
 $ctx2.sendIdx["theClass"]=2;
 $2=_st($3)._name();
 $ctx2.sendIdx["name"]=1;
-$5=_st(b)._theClass();
-$4=_st($5)._name();
-return _st($2).__lt_eq($4);
+return _st($2).__lt_eq(_st(_st(b)._theClass())._name());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,1)})})))._do_((function(aNode){
 return smalltalk.withContext(function($ctx2) {
 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: []
 }),
@@ -2375,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: []
 }),

File diff suppressed because it is too large
+ 130 - 146
js/Kernel-Collections.js


+ 18 - 22
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: []
 }),
@@ -361,14 +361,13 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-$2=_st(_st(self._receiver())._asString()).__comma(" does not understand #");
-$1=_st($2).__comma(_st(self._message())._selector());
+var $1;
+$1=_st(_st(_st(self._receiver())._asString()).__comma(" does not understand #")).__comma(_st(self._message())._selector());
 $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: []
 }),
@@ -386,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: []
 }),
@@ -457,19 +456,18 @@ category: 'error handling',
 fn: function (anError){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(anError)._context();
 $ctx1.sendIdx["context"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=_st(anError)._context();
-self._logErrorContext_($2);
+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: []
 }),
@@ -498,19 +496,18 @@ category: 'private',
 fn: function (aContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(aContext)._home();
 $ctx1.sendIdx["home"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=_st(aContext)._home();
-self._logContext_($2);
+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: []
 }),
@@ -539,7 +536,7 @@ category: 'private',
 fn: function (aContext){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 if(($receiver = aContext) == nil || $receiver == null){
 aContext;
 } else {
@@ -548,13 +545,12 @@ $ctx1.sendIdx["home"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=_st(aContext)._home();
-self._logContext_($2);
+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: []
 }),
@@ -580,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: []
 }),

+ 66 - 88
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"]
 }),
@@ -155,17 +155,15 @@ category: 'compiling',
 fn: function (aString,aClass){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$6,$4,$7;
+var $1,$2,$3,$4,$5;
 $1=self._classBuilder();
 $2=_st(aClass)._superclass();
 $3=_st(aClass)._name();
 $ctx1.sendIdx["name"]=1;
-$5=_st(_st(aClass)._instanceVariableNames())._copy();
-_st($5)._add_(aString);
-$6=_st($5)._yourself();
-$4=$6;
-$7=_st(_st(aClass)._package())._name();
-_st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$7);
+$4=_st(_st(aClass)._instanceVariableNames())._copy();
+_st($4)._add_(aString);
+$5=_st($4)._yourself();
+_st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,_st(_st(aClass)._package())._name());
 return self}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},smalltalk.Environment)})},
 args: ["aString", "aClass"],
 source: "addInstVarNamed: aString to: aClass\x0a\x09self classBuilder\x0a\x09\x09addSubclassOf: aClass superclass \x0a\x09\x09named: aClass name \x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name",
@@ -245,20 +243,17 @@ fn: function (aClass){
 var self=this;
 var protocols;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5;
+var $1,$2;
 protocols=_st(aClass)._protocols();
 $1=_st(aClass)._superclass();
 $ctx1.sendIdx["superclass"]=1;
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$2=protocols;
-$4=_st(aClass)._superclass();
-$3=self._availableProtocolsFor_($4);
-_st($2)._addAll_($3);
+_st(protocols)._addAll_(self._availableProtocolsFor_(_st(aClass)._superclass()));
 };
-$5=_st(_st(protocols)._asSet())._asArray();
-return $5;
+$2=_st(_st(protocols)._asSet())._asArray();
+return $2;
 }, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},smalltalk.Environment)})},
 args: ["aClass"],
 source: "availableProtocolsFor: aClass\x0a\x09| protocols |\x0a\x09\x0a\x09protocols := aClass protocols.\x0a\x09aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].\x0a\x09^ protocols asSet asArray",
@@ -405,13 +400,12 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1,$2;
 $1=_st(_st($Smalltalk())._current())._at_(aClassName);
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$3="A class named ".__comma(aClassName);
-$2=_st($3).__comma(" already exists");
+$2=_st("A class named ".__comma(aClassName)).__comma(" already exists");
 $ctx1.sendIdx[","]=1;
 self._error_($2);
 };
@@ -558,7 +552,7 @@ var self=this;
 var destinationClass;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$4,$2,$5;
+var $1,$3,$4,$2;
 destinationClass=_st(_st($Smalltalk())._current())._at_(_st(aClassName)._asSymbol());
 $1=destinationClass;
 if(($receiver = $1) == nil || $receiver == null){
@@ -574,8 +568,7 @@ if(smalltalk.assert($2)){
 return self;
 };
 _st(destinationClass)._compile_category_(_st(aMethod)._source(),_st(aMethod)._protocol());
-$5=_st(aMethod)._methodClass();
-_st($5)._removeCompiledMethod_(aMethod);
+_st(_st(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
 return self}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},smalltalk.Environment)})},
 args: ["aMethod", "aClassName"],
 source: "moveMethod: aMethod toClass: aClassName\x0a\x09| destinationClass |\x0a\x09\x0a\x09destinationClass := Smalltalk current at: aClassName asSymbol.\x0a\x09destinationClass ifNil: [ self error: 'Invalid class name' ].\x0a\x09destinationClass == aMethod methodClass ifTrue: [ ^ self ].\x0a\x09\x0a\x09destinationClass \x0a\x09\x09compile: aMethod source\x0a\x09\x09category: aMethod protocol.\x0a\x09aMethod methodClass \x0a\x09\x09removeCompiledMethod: aMethod",
@@ -734,13 +727,12 @@ var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1,$2;
 $1=_st(_st($Smalltalk())._current())._at_(aClassName);
 if(($receiver = $1) == nil || $receiver == null){
 $1;
 } else {
-$3="A class named ".__comma(aClassName);
-$2=_st($3).__comma(" already exists");
+$2=_st("A class named ".__comma(aClassName)).__comma(" already exists");
 $ctx1.sendIdx[","]=1;
 self._error_($2);
 };
@@ -799,10 +791,8 @@ fn: function (){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$1;
-$3=_st($Smalltalk())._current();
-$2=_st($3)._at_("SystemAnnouncer");
-$1=_st($2)._current();
+var $1;
+$1=_st(_st(_st($Smalltalk())._current())._at_("SystemAnnouncer"))._current();
 $ctx1.sendIdx["current"]=1;
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},smalltalk.Environment)})},
@@ -1003,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: []
 }),
@@ -1136,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: []
 }),
@@ -1313,7 +1303,7 @@ fn: function (){
 var self=this;
 function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$4,$5,$3,$8,$7,$6,$10,$11,$9,$13,$12,$1;
+var $2,$4,$5,$3,$7,$6,$8,$9,$1;
 $1=_st($String())._streamContents_((function(stream){
 return smalltalk.withContext(function($ctx2) {
 $2=_st(self._class())._name();
@@ -1330,24 +1320,20 @@ _st(stream)._nextPutAll_($3);
 $ctx2.sendIdx["nextPutAll:"]=2;
 _st(stream)._nextPutAll_(" named: ");
 $ctx2.sendIdx["nextPutAll:"]=3;
-$8=self._name();
-$7="'".__comma($8);
+$7="'".__comma(self._name());
 $ctx2.sendIdx[","]=3;
 $6=_st($7).__comma("'");
 $ctx2.sendIdx[","]=2;
 _st(stream)._nextPutAll_($6);
 $ctx2.sendIdx["nextPutAll:"]=4;
-$10=_st($String())._lf();
-$11=_st($String())._tab();
-$9=_st($10).__comma($11);
+$8=_st(_st($String())._lf()).__comma(_st($String())._tab());
 $ctx2.sendIdx[","]=4;
-_st(stream)._nextPutAll_($9);
+_st(stream)._nextPutAll_($8);
 $ctx2.sendIdx["nextPutAll:"]=5;
 _st(stream)._nextPutAll_(" transport: (");
 $ctx2.sendIdx["nextPutAll:"]=6;
-$13=_st(_st(self._transport())._definition()).__comma(")");
-$12=_st(stream)._nextPutAll_($13);
-return $12;
+$9=_st(stream)._nextPutAll_(_st(_st(self._transport())._definition()).__comma(")"));
+return $9;
 }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"definition",{},smalltalk.Package)})},
@@ -1396,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: []
 }),
@@ -1411,7 +1397,7 @@ var self=this;
 var starCategoryName;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $4,$3,$2,$5,$7,$6,$8,$1;
+var $4,$3,$2,$5,$1;
 starCategoryName="*".__comma(self._name());
 $4=self._classes();
 $ctx1.sendIdx["classes"]=1;
@@ -1423,19 +1409,16 @@ $2=_st($3)._asSet();
 _st($2)._remove_ifAbsent_(nil,(function(){
 return smalltalk.withContext(function($ctx2) {
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-$5=$2;
-$7=_st(_st($Smalltalk())._current())._classes();
-$6=_st($7)._select_((function(each){
+_st($2)._addAll_(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(_st(each)._protocols())._includes_(starCategoryName);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
-_st($5)._addAll_($6);
-$8=_st($2)._yourself();
-$1=$8;
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})})));
+$5=_st($2)._yourself();
+$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"]
 }),
@@ -1613,13 +1596,12 @@ fn: function (aPackageName){
 var self=this;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$1;
+var $2,$1;
 $2=_st($Smalltalk())._current();
 $ctx1.sendIdx["current"]=1;
 $1=_st($2)._packageAt_ifAbsent_(aPackageName,(function(){
 return smalltalk.withContext(function($ctx2) {
-$3=_st($Smalltalk())._current();
-return _st($3)._createPackage_(aPackageName);
+return _st(_st($Smalltalk())._current())._createPackage_(aPackageName);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"named:",{aPackageName:aPackageName},smalltalk.Package.klass)})},
@@ -1680,7 +1662,7 @@ var children,others,nodes,expandedClasses;
 function $ClassSorterNode(){return smalltalk.ClassSorterNode||(typeof ClassSorterNode=="undefined"?nil:ClassSorterNode)}
 function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2,$5,$4,$6;
+var $1,$3,$2,$4;
 children=[];
 others=[];
 _st(classes)._do_((function(each){
@@ -1704,20 +1686,18 @@ $3=_st(a)._theClass();
 $ctx2.sendIdx["theClass"]=1;
 $2=_st($3)._name();
 $ctx2.sendIdx["name"]=1;
-$5=_st(b)._theClass();
-$4=_st($5)._name();
-return _st($2).__lt_eq($4);
+return _st($2).__lt_eq(_st(_st(b)._theClass())._name());
 }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,5)})}));
 expandedClasses=_st($Array())._new();
 _st(nodes)._do_((function(aNode){
 return smalltalk.withContext(function($ctx2) {
 return _st(aNode)._traverseClassesWith_(expandedClasses);
 }, function($ctx2) {$ctx2.fillBlock({aNode:aNode},$ctx1,6)})}));
-$6=expandedClasses;
-return $6;
+$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"]
 }),
@@ -1745,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: []
 }),
@@ -1768,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: []
 }),
@@ -1791,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: []
 }),
@@ -1862,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"]
 }),
@@ -1885,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: []
 }),
@@ -1946,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: []
 }),
@@ -2100,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: []
 }),
@@ -2297,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: []
 }),
@@ -2361,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: []
 }),
@@ -2383,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: []
 }),
@@ -2435,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: []
 }),
@@ -2449,7 +2429,7 @@ fn: function (anException,aString){
 var self=this;
 function $ParseError(){return smalltalk.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$8,$7,$6,$9,$5,$4,$10,$3,$1;
+var $2,$8,$7,$6,$9,$5,$4,$3,$1;
 $2=_st($ParseError())._new();
 $8=_st(anException)._basicAt_("line");
 $ctx1.sendIdx["basicAt:"]=1;
@@ -2462,8 +2442,7 @@ $5=_st($6).__comma($9);
 $ctx1.sendIdx[","]=3;
 $4=_st($5).__comma(" : Unexpected character ");
 $ctx1.sendIdx[","]=2;
-$10=_st(anException)._basicAt_("found");
-$3=_st($4).__comma($10);
+$3=_st($4).__comma(_st(anException)._basicAt_("found"));
 $ctx1.sendIdx[","]=1;
 $1=_st($2)._messageText_($3);
 return $1;
@@ -2530,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"]
 }),
@@ -2555,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: []
 }),
@@ -2569,7 +2548,7 @@ fn: function (packageName,newName){
 var self=this;
 var pkg;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 pkg=self._packageAt_ifAbsent_(packageName,(function(){
 return smalltalk.withContext(function($ctx2) {
 $1="Missing package: ".__comma(packageName);
@@ -2581,15 +2560,14 @@ $2=self._packageAt_(newName);
 if(($receiver = $2) == nil || $receiver == null){
 $2;
 } else {
-$3="Already exists a package called: ".__comma(newName);
-self._error_($3);
+self._error_("Already exists a package called: ".__comma(newName));
 };
 _st(self._at_("packages"))._at_put_(newName,pkg);
 _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: []
 }),
@@ -2618,10 +2596,10 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-return "0.12.0-pre";
+return "0.13.0-pre";
 }, function($ctx1) {$ctx1.fill(self,"version",{},smalltalk.Smalltalk)})},
 args: [],
-source: "version\x0a\x09\x22Answer the version string of Amber\x22\x0a\x09\x0a\x09^ '0.12.0-pre'",
+source: "version\x0a\x09\x22Answer the version string of Amber\x22\x0a\x09\x0a\x09^ '0.13.0-pre'",
 messageSends: [],
 referencedClasses: []
 }),
@@ -2673,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: []
 }),

+ 26 - 35
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: []
 }),
@@ -519,7 +519,7 @@ var oldProtocol;
 function $SystemAnnouncer(){return smalltalk.SystemAnnouncer||(typeof SystemAnnouncer=="undefined"?nil:SystemAnnouncer)}
 function $MethodMoved(){return smalltalk.MethodMoved||(typeof MethodMoved=="undefined"?nil:MethodMoved)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$5,$4,$8,$7,$9,$6,$11,$10;
+var $1,$2,$3,$5,$4,$8,$7,$6;
 oldProtocol=self._protocol();
 $ctx1.sendIdx["protocol"]=1;
 self._basicAt_put_("category",aString);
@@ -543,14 +543,11 @@ $ctx1.sendIdx["methodClass"]=3;
 $7=_st($8)._methods();
 $6=_st($7)._select_((function(each){
 return smalltalk.withContext(function($ctx2) {
-$9=_st(each)._protocol();
-return _st($9).__eq(oldProtocol);
+return _st(_st(each)._protocol()).__eq(oldProtocol);
 }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
 _st($6)._ifEmpty_((function(){
 return smalltalk.withContext(function($ctx2) {
-$11=self._methodClass();
-$10=_st($11)._organization();
-return _st($10)._removeElement_(oldProtocol);
+return _st(_st(self._methodClass())._organization())._removeElement_(oldProtocol);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
 };
 return self}, function($ctx1) {$ctx1.fill(self,"category:",{aString:aString,oldProtocol:oldProtocol},smalltalk.CompiledMethod)})},
@@ -589,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: []
 }),
@@ -665,7 +662,7 @@ fn: function (){
 var self=this;
 var superclass;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$6,$5,$4,$3;
+var $1,$2,$3;
 $1=self._methodClass();
 $ctx1.sendIdx["methodClass"]=1;
 superclass=_st($1)._superclass();
@@ -676,10 +673,7 @@ return false;
 } else {
 $2;
 };
-$6=self._methodClass();
-$5=_st($6)._superclass();
-$4=_st($5)._lookupSelector_(self._selector());
-$3=_st($4)._notNil();
+$3=_st(_st(_st(self._methodClass())._superclass())._lookupSelector_(self._selector()))._notNil();
 return $3;
 }, function($ctx1) {$ctx1.fill(self,"isOverride",{superclass:superclass},smalltalk.CompiledMethod)})},
 args: [],
@@ -701,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: []
 }),
@@ -719,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: []
 }),
@@ -771,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: []
 }),
@@ -789,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: []
 }),
@@ -846,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: []
 }),
@@ -983,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"]
 }),
@@ -1048,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: []
 }),
@@ -1064,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: []
 }),
@@ -1101,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: []
 }),
@@ -1157,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: []
 }),
@@ -1214,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: []
 }),
@@ -1480,7 +1474,7 @@ category: 'converting',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$3,$4,$1;
+var $2,$3,$1;
 $2=self._isBlockContext();
 if(smalltalk.assert($2)){
 $3="a block (in ".__comma(_st(self._methodContext())._asString());
@@ -1488,14 +1482,13 @@ $ctx1.sendIdx[","]=2;
 $1=_st($3).__comma(")");
 $ctx1.sendIdx[","]=1;
 } else {
-$4=_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ");
-$1=_st($4).__comma(self._selector());
+$1=_st(_st(_st(_st(self._receiver())._class())._name()).__comma(" >> ")).__comma(self._selector());
 $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: []
 }),
@@ -1590,7 +1583,7 @@ category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$5,$4,$3,$7,$6,$1;
+var $2,$5,$4,$3,$1;
 $2=self._methodContext();
 $ctx1.sendIdx["methodContext"]=1;
 if(($receiver = $2) == nil || $receiver == null){
@@ -1600,9 +1593,7 @@ $5=self._methodContext();
 $ctx1.sendIdx["methodContext"]=2;
 $4=_st($5)._receiver();
 $3=_st($4)._class();
-$7=self._methodContext();
-$6=_st($7)._selector();
-$1=_st($3)._lookupSelector_($6);
+$1=_st($3)._lookupSelector_(_st(self._methodContext())._selector());
 };
 return $1;
 }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.MethodContext)})},
@@ -1863,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"]
 }),
@@ -1942,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: []
 }),

File diff suppressed because it is too large
+ 122 - 142
js/Kernel-Objects.js


File diff suppressed because it is too large
+ 150 - 217
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: []
 }),

+ 34 - 46
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"]
 }),
@@ -88,13 +88,12 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 $1=_st(self["@full"])._includes_((5));
 $ctx1.sendIdx["includes:"]=1;
 self._assert_($1);
 $ctx1.sendIdx["assert:"]=1;
-$2=_st(self["@full"])._includes_("abc");
-self._assert_($2);
+self._assert_(_st(self["@full"])._includes_("abc"));
 return self}, function($ctx1) {$ctx1.fill(self,"testIncludes",{},smalltalk.ExampleSetTest)})},
 args: [],
 source: "testIncludes\x0a\x09self assert: (full includes: 5).\x0a\x09self assert: (full includes: #abc)",
@@ -110,7 +109,7 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=_st(self["@empty"])._occurrencesOf_((0));
 $ctx1.sendIdx["occurrencesOf:"]=1;
 self._assert_equals_($1,(0));
@@ -120,8 +119,7 @@ $ctx1.sendIdx["occurrencesOf:"]=2;
 self._assert_equals_($2,(1));
 $ctx1.sendIdx["assert:equals:"]=2;
 _st(self["@full"])._add_((5));
-$3=_st(self["@full"])._occurrencesOf_((5));
-self._assert_equals_($3,(1));
+self._assert_equals_(_st(self["@full"])._occurrencesOf_((5)),(1));
 return self}, function($ctx1) {$ctx1.fill(self,"testOccurrences",{},smalltalk.ExampleSetTest)})},
 args: [],
 source: "testOccurrences\x0a\x09self assert: (empty occurrencesOf: 0) equals: 0.\x0a\x09self assert: (full occurrencesOf: 5) equals: 1.\x0a\x09full add: 5.\x0a\x09self assert: (full occurrencesOf: 5) equals: 1",
@@ -137,13 +135,12 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 _st(self["@full"])._remove_((5));
 $1=_st(self["@full"])._includes_("abc");
 $ctx1.sendIdx["includes:"]=1;
 self._assert_($1);
-$2=_st(self["@full"])._includes_((5));
-self._deny_($2);
+self._deny_(_st(self["@full"])._includes_((5)));
 return self}, function($ctx1) {$ctx1.fill(self,"testRemove",{},smalltalk.ExampleSetTest)})},
 args: [],
 source: "testRemove\x0a\x09full remove: 5.\x0a\x09self assert: (full includes: #abc).\x0a\x09self deny: (full includes: 5)",
@@ -229,24 +226,23 @@ category: 'helpers',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $1;
 self._timeout_((100));
 $ctx1.sendIdx["timeout:"]=1;
 $1=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._timeout_((20));
-$2=self._async_((function(){
+return _st(self._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
-return _st($2)._valueWithTimeout_((30));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._valueWithTimeout_((30));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["async:"]=1;
 _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: []
 }),
@@ -259,17 +255,16 @@ category: 'helpers',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
+var $1;
 self._timeout_((20));
 $ctx1.sendIdx["timeout:"]=1;
 $1=self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._timeout_((40));
-$2=self._async_((function(){
+return _st(self._async_((function(){
 return smalltalk.withContext(function($ctx3) {
 return self._finished();
-}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
-return _st($2)._valueWithTimeout_((20));
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})})))._valueWithTimeout_((20));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
 $ctx1.sendIdx["async:"]=1;
 _st($1)._valueWithTimeout_((10));
@@ -317,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: []
 }),
@@ -365,7 +360,7 @@ var suite,runner,result,assertBlock;
 function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
 function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3,$4,$6,$5,$7;
+var $1,$2,$3,$4;
 suite=["fakeError", "fakeErrorFailingInTearDown", "fakeFailure", "testPass"]._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._class())._selector_(each);
@@ -382,24 +377,21 @@ $2=["fakeError"]._asSet();
 $ctx2.sendIdx["asSet"]=1;
 self._assert_equals_($1,$2);
 $ctx2.sendIdx["assert:equals:"]=1;
-$3=self._selectorSetOf_(_st(result)._failures());
-$4=["fakeErrorFailingInTearDown", "fakeFailure"]._asSet();
-self._assert_equals_($3,$4);
+self._assert_equals_(self._selectorSetOf_(_st(result)._failures()),["fakeErrorFailingInTearDown", "fakeFailure"]._asSet());
 return self._finished();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
 return smalltalk.withContext(function($ctx2) {
-$6=_st(ann)._result();
-$5=_st($6).__eq_eq(result);
-if(smalltalk.assert($5)){
-$7=_st(_st(result)._runs()).__eq(_st(result)._total());
-return _st($7)._ifTrue_(assertBlock);
+$3=_st(_st(ann)._result()).__eq_eq(result);
+if(smalltalk.assert($3)){
+$4=_st(_st(result)._runs()).__eq(_st(result)._total());
+return _st($4)._ifTrue_(assertBlock);
 };
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,3)})}));
 _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"]
 }),
@@ -469,7 +461,7 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$3;
+var $1,$2;
 $1=self._isAsync();
 $ctx1.sendIdx["isAsync"]=1;
 self._deny_($1);
@@ -479,8 +471,7 @@ $2=self._isAsync();
 $ctx1.sendIdx["isAsync"]=2;
 self._assert_($2);
 self._finished();
-$3=self._isAsync();
-self._deny_($3);
+self._deny_(self._isAsync());
 return self}, function($ctx1) {$ctx1.fill(self,"testIsAsyncReturnsCorrectValues",{},smalltalk.SUnitAsyncTest)})},
 args: [],
 source: "testIsAsyncReturnsCorrectValues\x0a\x09self deny: self isAsync.\x0a\x09self timeout: 0.\x0a\x09self assert: self isAsync.\x0a\x09self finished.\x0a\x09self deny: self isAsync",
@@ -524,7 +515,7 @@ function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteR
 function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
 function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$3,$5;
+var $1,$2,$3;
 suite=["fakeTimeout", "fakeMultipleTimeoutFailing", "fakeMultipleTimeoutPassing", "testPass"]._collect_((function(each){
 return smalltalk.withContext(function($ctx2) {
 return _st(self._class())._selector_(each);
@@ -539,23 +530,21 @@ $1=self._selectorSetOf_(_st(result)._errors());
 $ctx2.sendIdx["selectorSetOf:"]=1;
 self._assert_equals_($1,_st($Set())._new());
 $ctx2.sendIdx["assert:equals:"]=1;
-$2=self._selectorSetOf_(_st(result)._failures());
-self._assert_equals_($2,["fakeMultipleTimeoutFailing", "fakeTimeout"]._asSet());
+self._assert_equals_(self._selectorSetOf_(_st(result)._failures()),["fakeMultipleTimeoutFailing", "fakeTimeout"]._asSet());
 return self._finished();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
 _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
 return smalltalk.withContext(function($ctx2) {
-$4=_st(ann)._result();
-$3=_st($4).__eq_eq(result);
-if(smalltalk.assert($3)){
-$5=_st(_st(result)._runs()).__eq(_st(result)._total());
-return _st($5)._ifTrue_(assertBlock);
+$2=_st(_st(ann)._result()).__eq_eq(result);
+if(smalltalk.assert($2)){
+$3=_st(_st(result)._runs()).__eq(_st(result)._total());
+return _st($3)._ifTrue_(assertBlock);
 };
 }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,3)})}));
 _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"]
 }),
@@ -569,7 +558,7 @@ fn: function (){
 var self=this;
 var x;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
+var $1;
 self["@flag"]="bad";
 self._timeout_((10));
 x=(0);
@@ -588,7 +577,7 @@ $ctx2.sendIdx["assert:equals:"]=1;
 $ctx1.sendIdx["async:"]=1;
 self["@flag"]=_st($1)._valueWithTimeout_((0));
 $ctx1.sendIdx["valueWithTimeout:"]=1;
-$2=self._async_((function(){
+self["@flag"]=_st(self._async_((function(){
 return smalltalk.withContext(function($ctx2) {
 self._finished();
 self["@flag"]="ok";
@@ -596,8 +585,7 @@ self["@flag"];
 x=_st(x).__plus((1));
 x;
 return self._assert_equals_(x,(1));
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
-self["@flag"]=_st($2)._valueWithTimeout_((0));
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})})))._valueWithTimeout_((0));
 return self}, function($ctx1) {$ctx1.fill(self,"testTwoAsyncPassesWithFinishedOnlyOneIsRun",{x:x},smalltalk.SUnitAsyncTest)})},
 args: [],
 source: "testTwoAsyncPassesWithFinishedOnlyOneIsRun\x0a\x09| x |\x0a\x09flag := 'bad'.\x0a\x09self timeout: 10.\x0a\x09x := 0.\x0a\x09flag := (self async: [ self finished. flag := 'ok'. x := x+1. self assert: x equals: 1 ]) valueWithTimeout: 0.\x0a\x09flag := (self async: [ self finished. flag := 'ok'. x := x+1. self assert: x equals: 1 ]) valueWithTimeout: 0.",

+ 31 - 34
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: []
 }),
@@ -83,15 +83,14 @@ category: 'testing',
 fn: function (actual,expected){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$6,$5,$4,$7,$3,$1;
+var $2,$6,$5,$4,$3,$1;
 $2=_st(actual).__eq(expected);
 $6=_st(expected)._printString();
 $ctx1.sendIdx["printString"]=1;
 $5="Expected: ".__comma($6);
 $4=_st($5).__comma(" but was: ");
 $ctx1.sendIdx[","]=2;
-$7=_st(actual)._printString();
-$3=_st($4).__comma($7);
+$3=_st($4).__comma(_st(actual)._printString());
 $ctx1.sendIdx[","]=1;
 $1=self._assert_description_($2,$3);
 return $1;
@@ -211,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: []
 }),
@@ -263,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: []
 }),
@@ -333,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: []
 }),
@@ -356,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: []
 }),
@@ -443,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: []
 }),
@@ -464,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: []
 }),
@@ -515,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"]
 }),
@@ -536,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: []
 }),
@@ -554,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: []
 }),
@@ -575,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: []
 }),
@@ -678,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: []
 }),
@@ -794,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: []
 }),
@@ -851,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: []
 }),
@@ -869,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: []
 }),
@@ -922,19 +921,17 @@ category: 'running',
 fn: function (aBlock){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $3,$2,$5,$4,$1;
+var $3,$2,$1;
 $3=self._runs();
 $ctx1.sendIdx["runs"]=1;
 $2=_st($3).__eq_eq(self._total());
 if(! smalltalk.assert($2)){
-$5=self._runs();
-$4=_st($5).__plus((1));
-$1=_st(aBlock)._value_($4);
+$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: []
 }),
@@ -966,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"]
 }),
@@ -984,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: []
 }),
@@ -1013,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: []
 }),
@@ -1031,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: []
 }),
@@ -1049,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: []
 }),
@@ -1087,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: []
 }),
@@ -1109,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"]
 }),
@@ -1141,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"]
 }),
@@ -1159,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: []
 }),
@@ -1245,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: []
 }),

+ 8 - 15
js/Spaces.js

@@ -28,13 +28,11 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$3,$2;
+var $1;
 $1="body"._asJQuery();
 $ctx1.sendIdx["asJQuery"]=1;
 _st($1)._append_("<iframe style=\x22display: none;\x22></iframe>");
-$3="iframe"._asJQuery();
-$2=_st($3)._get();
-self["@frame"]=_st($2)._last();
+self["@frame"]=_st(_st("iframe"._asJQuery())._get())._last();
 _st(_st(self["@frame"])._contentWindow())._location_(_st(window)._location());
 return self}, function($ctx1) {$ctx1.fill(self,"create",{},smalltalk.ObjectSpace)})},
 args: [],
@@ -76,15 +74,14 @@ fn: function (aBlock){
 var self=this;
 function $ObjectSpaceConnectionError(){return smalltalk.ObjectSpaceConnectionError||(typeof ObjectSpaceConnectionError=="undefined"?nil:ObjectSpaceConnectionError)}
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2,$4,$6,$5,$3;
+var $1,$2,$4,$5,$3;
 $1=self._isConnected();
 if(! smalltalk.assert($1)){
 $2=_st($ObjectSpaceConnectionError())._signal();
 return $2;
 };
 $4=_st(self["@frame"])._contentWindow();
-$6="(".__comma(_st(aBlock)._compiledSource());
-$5=_st($6).__comma(")()");
+$5=_st("(".__comma(_st(aBlock)._compiledSource())).__comma(")()");
 $ctx1.sendIdx[","]=1;
 $3=_st($4)._eval_($5);
 return $3;
@@ -308,7 +305,7 @@ var self=this;
 var result;
 function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 _st(self["@space"])._whenReadyDo_((function(){
 return smalltalk.withContext(function($ctx2) {
 result=_st(self["@space"])._do_((function(){
@@ -320,9 +317,7 @@ $2=_st(result)._class();
 $ctx2.sendIdx["class"]=1;
 $1=_st($2)._name();
 self._assert_equals_($1,"Smalltalk");
-$4=_st(result)._class();
-$3=_st($4).__eq($Smalltalk());
-self._deny_($3);
+self._deny_(_st(_st(result)._class()).__eq($Smalltalk()));
 $ctx2.sendIdx["deny:"]=1;
 return self._deny_(_st(result).__eq_eq(smalltalk));
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
@@ -341,16 +336,14 @@ category: 'tests',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1,$4,$3;
+var $2,$1;
 $2=_st(self["@space"])._frame();
 $ctx1.sendIdx["frame"]=1;
 $1=_st($2)._isNil();
 $ctx1.sendIdx["isNil"]=1;
 self._deny_($1);
 _st(self["@space"])._release();
-$4=_st(self["@space"])._frame();
-$3=_st($4)._isNil();
-self._assert_($3);
+self._assert_(_st(_st(self["@space"])._frame())._isNil());
 return self}, function($ctx1) {$ctx1.fill(self,"testRelease",{},smalltalk.ObjectSpaceTest)})},
 args: [],
 source: "testRelease\x0a\x0a\x09self deny: space frame isNil.\x0a\x0a\x09space release.\x0a\x09\x0a\x09self assert: space frame isNil",

+ 3 - 3
package.json

@@ -1,6 +1,6 @@
 {
   "name": "amber",
-  "version": "0.12.0-pre",
+  "version": "0.13.0-pre",
   "description": "An implementation of the Smalltalk language that runs on top of the JS runtime.",
   "homepage": "http://amber-lang.net",
   "keywords": [
@@ -26,8 +26,8 @@
     "node": ">=0.8.0"
   },
   "bin": {
-    "amber": "./bin/amber-cli.js",
-    "amberc": "./bin/amberc"
+    "amber": "./cli/support/amber-cli.js",
+    "amberc": "./cli/support/amberc-cli.js"
   },
   "scripts": {
     "test": "grunt amberc:amber_test_runner && node ./test/amber_test_runner.js"

+ 129 - 154
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,42 +1049,17 @@ 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
 ! !
 
-TagBrush subclass: #DocumentFragmentTag
-	instanceVariableNames: ''
-	package: 'Canvas'!
-
-!DocumentFragmentTag methodsFor: 'initialization'!
-
-initializeFromCanvas: aCanvas
-	canvas := aCanvas.
-	element := self createDocumentFragment
-! !
-
-!DocumentFragmentTag methodsFor: 'private'!
-
-createDocumentFragment
-	<return document.createDocumentFragment()>
-! !
-
-!DocumentFragmentTag class methodsFor: 'instance creation'!
-
-canvas: aCanvas
-	^ self new
-		initializeFromCanvas: aCanvas;
-		yourself
-! !
-
 TagBrush subclass: #StyleTag
 	instanceVariableNames: ''
 	package: 'Canvas'!
@@ -1099,16 +1074,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

+ 41 - 36
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
@@ -211,6 +211,10 @@ right: aNode
 
 isAssignmentNode
 	^ true
+!
+
+shouldBeAliased
+	^ super shouldBeAliased or: [ self isReferenced ]
 ! !
 
 !AssignmentNode methodsFor: 'visiting'!
@@ -240,7 +244,7 @@ nextNode: aNode
 !
 
 parameters
-	^parameters ifNil: [parameters := Array new]
+	^ parameters ifNil: [ parameters := Array new ] 
 !
 
 parameters: aCollection
@@ -258,7 +262,7 @@ scope: aLexicalScope
 !BlockNode methodsFor: 'testing'!
 
 isBlockNode
-	^true
+	^ true
 !
 
 subtreeNeedsAliasing
@@ -280,7 +284,7 @@ I represent an cascade node.!
 !CascadeNode methodsFor: 'accessing'!
 
 receiver
-	^receiver
+	^ receiver
 !
 
 receiver: aNode
@@ -332,7 +336,7 @@ I represent an JavaScript statement node.!
 !JSStatementNode methodsFor: 'accessing'!
 
 source
-	^source ifNil: ['']
+	^ source ifNil: [ '' ] 
 !
 
 source: aString
@@ -362,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
@@ -398,7 +402,7 @@ scope: aMethodScope
 !
 
 selector
-	^selector
+	^ selector
 !
 
 selector: aString
@@ -414,7 +418,7 @@ sendIndexes: aDictionary
 !
 
 source
-	^source
+	^ source
 !
 
 source: aString
@@ -476,7 +480,7 @@ I represent an message send node.!
 !SendNode methodsFor: 'accessing'!
 
 arguments
-	^arguments ifNil: [arguments := #()]
+	^ arguments ifNil: [ arguments := #() ] 
 !
 
 arguments: aCollection
@@ -490,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
@@ -513,7 +517,7 @@ nodes
 !
 
 receiver
-	^receiver
+	^ receiver
 !
 
 receiver: aNode
@@ -523,7 +527,7 @@ receiver: aNode
 !
 
 selector
-	^selector
+	^ selector
 !
 
 selector: aString
@@ -539,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
@@ -560,9 +564,15 @@ isSendNode
 !
 
 shouldBeAliased
+	"Because we keep track of send indexes, some send nodes need additional care for aliasing. 
+	See IRJSVisitor >> visitIRSend:"
+	
+	| sends |
+	
+	sends := (self method sendIndexes at: self selector) size.
+	
 	^ super shouldBeAliased or: [
-		(self method sendIndexes at: self selector) size > 1 and: [
-			self isReferenced ] ]
+		(sends > 1 and: [ self index < sends ]) and: [ self isReferenced ] ]
 !
 
 stopOnStepping
@@ -592,7 +602,7 @@ scope: aLexicalScope
 !
 
 temps
-	^temps ifNil: [#()]
+	^ temps ifNil: [ #() ]
 !
 
 temps: aCollection
@@ -602,7 +612,7 @@ temps: aCollection
 !SequenceNode methodsFor: 'converting'!
 
 asBlockSequenceNode
-	^BlockSequenceNode new
+	^ BlockSequenceNode new
 		position: self position;
 		nodes: self nodes;
 		temps: self temps;
@@ -630,7 +640,7 @@ I represent an special sequence node for block scopes.!
 !BlockSequenceNode methodsFor: 'testing'!
 
 isBlockSequenceNode
-	^true
+	^ true
 ! !
 
 !BlockSequenceNode methodsFor: 'visiting'!
@@ -648,7 +658,7 @@ I represent a value node.!
 !ValueNode methodsFor: 'accessing'!
 
 value
-	^value
+	^ value
 !
 
 value: anObject
@@ -662,7 +672,7 @@ isImmutable
 !
 
 isValueNode
-	^true
+	^ true
 ! !
 
 !ValueNode methodsFor: 'visiting'!
@@ -671,11 +681,6 @@ accept: aVisitor
 	^ aVisitor visitValueNode: self
 ! !
 
-!ValueNode methodsFor: 'xxxDoIt'!
-
-xxxDoIt ^[self stack] value
-! !
-
 ValueNode subclass: #VariableNode
 	instanceVariableNames: 'assigned binding'
 	package: 'Compiler-AST'!
@@ -689,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

+ 10 - 6
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
@@ -301,9 +301,9 @@ Object subclass: #ASTDebugger
 	package: 'Compiler-Interpreter'!
 !ASTDebugger commentStamp!
 I am a stepping debugger interface for Amber code.
-I internally use an instance of `ASTSteppingInterpreter` to actually step through node and interpret them.
+I internally use an instance of `ASTInterpreter` to actually step through node and interpret them.
 
-My instances are created from a `MethodContext` with `ASTDebugger class >> context:`.
+My instances are created from an `AIContext` with `ASTDebugger class >> context:`.
 They hold an `AIContext` instance internally, recursive copy of the `MethodContext`.
 
 ## API
@@ -385,6 +385,10 @@ restart
 	self interpreter restart
 !
 
+skip
+	self interpreter skip
+!
+
 stepInto
 	self shouldBeImplemented
 !
@@ -482,8 +486,8 @@ next
 proceed
 	"Eagerly evaluate the ast"
 	
-	[ self atEnd ] whileFalse: [ 
-		self step ]
+	[ self atEnd ] 
+		whileFalse: [ self step ]
 !
 
 restart
@@ -709,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.

+ 15 - 0
st/Compiler-Tests.st

@@ -176,6 +176,12 @@ testCascades
 !
 
 testDynamicArrayElementsOrdered
+	self should: 'foo
+	| x |
+	x := 1.
+	^ { x. x := 2 }
+' return: #(1 2).
+
 	self should: 'foo
 	| x |
 	x := 1.
@@ -198,21 +204,30 @@ testGlobalVar
 !
 
 testInnerTemporalDependentElementsOrdered
+	self should: 'foo
+	| x |
+	x := Array.
+	^ x with: ''foo''->x with: ''bar''->(x := 2)
+' return: {'foo'->Array. 'bar'->2}.
+
 	self should: 'foo
 	| x |
 	x := Array.
 	^ x with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])
 ' return: {'foo'->Array. 'bar'->2}.
+
 	self should: 'foo
 	| x |
 	x := 1.
 	^ Array with: ''foo''->x with: ''bar''->(true ifTrue: [ x := 2 ])
 ' return: {'foo'->1. 'bar'->2}.
+
 	self should: 'foo
 	| x |
 	x := 1.
 	^ { ''foo''->x. ''bar''->(true ifTrue: [ x := 2 ]) }
 ' return: {'foo'->1. 'bar'->2}.
+
 	self should: 'foo
 	| x |
 	x := 1.

+ 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'!

+ 4 - 5
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
@@ -642,9 +642,8 @@ renderItem: aClass level: anInteger on: html
 	| li |
     
 	li := html li.
-	
+	li asJQuery data: 'item' put: aClass.
     li
-    	at: 'list-data' put: (self listDataKeyFor: aClass);
 		class: (self listCssClassForItem: aClass);
 		with: [ 
         	html a
@@ -667,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 ])
 !
 

+ 16 - 37
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'!
@@ -744,6 +744,11 @@ cssClassForItem: anObject
 	^ ''
 !
 
+findListItemFor: anObject
+	^ (((wrapper asJQuery find: 'li') 
+		filter: [ :thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject ] currySelf) eq: 0)
+!
+
 items
 	^ items ifNil: [ items := self defaultItems ]
 !
@@ -779,26 +784,20 @@ activateFirstListItem
 !
 
 activateItem: anObject
-	| listData |
-	
-	listData := [ self listDataKeyFor: anObject ] 
-		on: HLListItemNotFound 
-		do: [ ^ self ].
-		
-	self activateListItem: ((wrapper asJQuery find: 'li[list-data="', listData , '"]') eq: 0)
+	self activateListItem: (self findListItemFor: anObject)
 !
 
 activateListItem: aListItem
 	| item |
 	
-	(aListItem get: 0) ifNil: [ ^self ].
+	(aListItem get: 0) ifNil: [ ^ self ].
 	aListItem parent children removeClass: 'active'.
 	aListItem addClass: 'active'.
     
 	self ensureVisible: aListItem.
     
    "Activate the corresponding item"
-   item := (self items at: (aListItem attr: 'list-data') asNumber).
+   item := aListItem data: 'item'.
    self selectedItem == item ifFalse: [
 	   self selectItem: item ]
 !
@@ -819,7 +818,7 @@ ensureVisible: aListItem
 	"Move the scrollbar to show the active element"
 	
 	| parent position |
-	
+	(aListItem get: 0) ifNil: [ ^ self ].
 	position := self positionOf: aListItem.
 	parent := aListItem parent.
 	
@@ -835,20 +834,9 @@ focus
 		self selectedItem ifNil: [ self activateFirstListItem ] ]
 !
 
-listDataKeyFor: anObject
-	^ (self items 
-		indexOf: anObject 
-		ifAbsent: [ HLListItemNotFound signal ]) asString
-!
-
 refresh
-	| listData |
-
 	super refresh.
-	listData := [ self listDataKeyFor: self selectedItem ] 
-		on: HLListItemNotFound 
-		do: [ ^ self ].
-	self ensureVisible: ((wrapper asJQuery find: 'li[list-data="', listData , '"]') eq: 0)
+	self ensureVisible: (self findListItemFor: self selectedItem)
 !
 
 selectItem: anObject
@@ -885,13 +873,12 @@ renderContentOn: html
    self setupKeyBindings
 !
 
-renderItem: anObject dataKey: aString on: html
+renderItem: anObject on: html
 	| li |
     
 	li := html li.
-	
+	li asJQuery data: 'item' put: anObject.
     li
-        at: 'list-data' put: aString;
 		class: (self listCssClassForItem: anObject);
         with: [ 
         	html a
@@ -902,17 +889,13 @@ renderItem: anObject dataKey: aString on: html
                   	self activateListItem: li asJQuery ] ]
 !
 
-renderItem: anObject on: html
-	self renderItem: anObject dataKey: (self listDataKeyFor: anObject) on: html
-!
-
 renderItemLabel: anObject on: html
 	html with: anObject asString
 !
 
 renderListOn: html
-	self items withIndexDo: [ :each :index | 
-    	self renderItem: each dataKey: index asString on: html ]
+	self items do: [ :each  | 
+    	self renderItem: each  on: html ]
 ! !
 
 HLListWidget subclass: #HLNavigationListWidget
@@ -941,10 +924,6 @@ previous: aWidget
 
 !HLNavigationListWidget methodsFor: 'actions'!
 
-activateItem: anObject
-	self activateListItem: ((wrapper asJQuery find: 'li[list-data="',  (self items indexOf: anObject ifAbsent: [ ^self ]) asString, '"]') eq: 0)
-!
-
 nextFocus
 	self next ifNotNil: [ self next focus ]
 !

+ 16 - 1
st/Helios-Debugger.st

@@ -269,6 +269,13 @@ restart
 		yourself)
 !
 
+skip
+	self interpreter skip.
+	self announcer announce: (HLDebuggerStepped new
+		context: self currentContext;
+		yourself)
+!
+
 stepOver
 	self interpreter stepOver.
 	self announcer announce: (HLDebuggerStepped new
@@ -364,6 +371,10 @@ selectItem: aContext
    	self model currentContext: aContext
 !
 
+skip
+	self model skip
+!
+
 stepOver
 	self model stepOver
 !
@@ -389,6 +400,10 @@ renderButtonsOn: html
 			html button 
 				class: 'btn stepOver';
 				with: 'Step over';
-				onClick: [ self stepOver ] ]
+				onClick: [ self stepOver ].
+			html button 
+				class: 'btn skip';
+				with: 'Skip';
+				onClick: [ self skip ] ]
 ! !
 

+ 5 - 5
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
@@ -417,8 +417,8 @@ tabPriority
 
 inspect: anObject
 	self new
-		inspect: anObject;
-		openAsTab
+		openAsTab;
+		inspect: anObject
 ! !
 
 !HLInspector class methodsFor: 'initialization'!

+ 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

File diff suppressed because it is too large
+ 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;

File diff suppressed because it is too large
+ 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

+ 37 - 37
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;
@@ -827,7 +827,7 @@ reservedWords
 version
 	"Answer the version string of Amber"
 	
-	^ '0.12.0-pre'
+	^ '0.13.0-pre'
 ! !
 
 !Smalltalk methodsFor: 'accessing amd'!
@@ -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
 ! !
 

+ 29 - 13
support/amber.js

@@ -17,7 +17,23 @@ var require;
 require = function (require) {
     var scripts = document.getElementsByTagName("script");
     var src = scripts[ scripts.length - 1 ].src;
-    var home = resolveViaDOM(src).replace(/\/[^\/]+\/[^\/]+$/, "");
+    // strip the last two elements from the URL
+    // e.g. http://app.com/lib/script.js -> http://app.com/
+    var amber_home = resolveViaDOM(src).replace(/\/[^\/]+\/[^\/]+$/, "");
+    // strip the last element from the URL
+    // e.g. http://app.com/index.html -> http://app.com/
+    var document_home = window.location.href.replace(/\/[^\/]+$/, "");
+
+    // at the present moment, bower tries to have flat hierarchy,
+    // which leads to two possible scenarios:
+    // 1. amber itself was deployed via bower,
+    //    its libraries are next to it; document_home from above covers this
+    // 2. amber was deployed in different fashion,
+    //    its libraries are included by bower locally; document_home is fixed below
+    // The detection is done by looking for '/bower_components/' in amber path.
+    if (!amber_home.match(/\/bower_components\//)) {
+        document_home = amber_home;
+    }
 
     function resolveViaDOM(url) {
         var a = document.createElement("a");
@@ -27,16 +43,16 @@ require = function (require) {
 
     var config = {
         paths: {
-            'amber': home+'/support',
-            'amber_vm': home+'/support',
-            'amber_css': home+'/css',
-            'amber_lib': home+'/bower_components',
-            'amber_inc': home+'/support',
-            'amber_core': home+'/js',
-            'amber_core/_source': home+'/st',
-            'amber_html': home,
-            'jquery': home+'/bower_components/jquery/jquery.min',
-            'jquery-ui': home+'/support/jQuery/jquery-ui-1.8.24.custom.min'
+            'amber': amber_home + '/support',
+            'amber_vm': amber_home + '/support',
+            'amber_css': amber_home + '/css',
+            'amber_lib': document_home + '/bower_components',
+            'amber_inc': amber_home + '/support',
+            'amber_core': amber_home + '/js',
+            'amber_core/_source': amber_home + '/st',
+            'amber_html': amber_home,
+            'jquery': document_home + '/bower_components/jquery/jquery.min',
+            'jquery-ui': amber_home + '/support/jQuery/jquery-ui-1.8.24.custom.min'
         },
         map: {
             '*': {
@@ -48,7 +64,7 @@ require = function (require) {
                 deps: [ 'jquery' ]
             },
             'amber_lib/bootstrap/js/bootstrap': {
-                deps: [ 'css!amber_lib/bootstrap/css/bootstrap' ]
+                deps: [ 'jquery', 'css!amber_lib/bootstrap/css/bootstrap' ]
             },
             'amber_lib/CodeMirror/codemirror': {
                 deps: [ 'css!amber_lib/codemirror/lib/codemirror' ]
@@ -79,4 +95,4 @@ require = function (require) {
     } else {
         return config;
     }
-}(require);
+}(require);

+ 5 - 1
support/boot.js

@@ -7,9 +7,13 @@
 
    ======================================================================
    |
-   | Copyright (c) 2010-2011
+   | Copyright (c) 2010-2013
    | Nicolas Petton <petton.nicolas@gmail.com>
    |
+   | Copyright (c) 2012-2013
+   | The Amber team https://github.com/amber-smalltalk?tab=members
+   | Amber contributors https://github.com/amber-smalltalk/amber/graphs/contributors
+   |
    | Amber is released under the MIT license
    |
    | Permission is hereby granted, free of charge, to any person obtaining

Some files were not shown because too many files changed in this diff