Browse Source

Merge remote-tracking branch 'upstream/master'

Laurent Laffont 13 years ago
parent
commit
647f18ddee
55 changed files with 1323 additions and 3096 deletions
  1. 7 6
      README.md
  2. 98 42
      bin/jtalkc
  3. 33 0
      bin/nodecompile.js
  4. 4 0
      examples/README
  5. 0 0
      examples/nodejs/README
  6. 6 6
      examples/nodejs/benchfib/Benchfib.st
  7. 1 1
      examples/nodejs/benchfib/Makefile
  8. 0 0
      examples/nodejs/benchfib/benchfib
  9. 1 7
      examples/nodejs/hello/Hello.st
  10. 1 1
      examples/nodejs/hello/Makefile
  11. 0 0
      examples/nodejs/hello/README
  12. 0 0
      examples/nodejs/hello/hello
  13. 8 0
      examples/nodejs/meta/Makefile
  14. 23 0
      examples/nodejs/meta/MyScript.st
  15. 1 1
      examples/nodejs/trivialserver/Makefile
  16. 1 1
      examples/nodejs/trivialserver/TrivialServer.st
  17. 0 0
      examples/nodejs/trivialserver/trivial
  18. 11 0
      examples/webos/README
  19. BIN
      examples/webos/eris/DuckQwaq.wav
  20. 36 0
      examples/webos/eris/EnyoJtalk.st
  21. 0 0
      examples/webos/eris/Eris.css
  22. 86 0
      examples/webos/eris/Eris.st
  23. 38 0
      examples/webos/eris/Makefile
  24. 3 0
      examples/webos/eris/README
  25. 10 0
      examples/webos/eris/appinfo.json
  26. 4 0
      examples/webos/eris/depends.js
  27. 12 0
      examples/webos/eris/index.html
  28. 36 0
      examples/webos/hellojtalk/EnyoJtalk.st
  29. 0 0
      examples/webos/hellojtalk/HelloJtalk.css
  30. 86 0
      examples/webos/hellojtalk/HelloJtalk.st
  31. 38 0
      examples/webos/hellojtalk/Makefile
  32. 1 0
      examples/webos/hellojtalk/README
  33. 10 0
      examples/webos/hellojtalk/appinfo.json
  34. 4 0
      examples/webos/hellojtalk/depends.js
  35. 12 0
      examples/webos/hellojtalk/index.html
  36. 14 35
      js/Benchfib.deploy.js
  37. 114 315
      js/Canvas.deploy.js
  38. 118 295
      js/Compiler.deploy.js
  39. 100 250
      js/Examples.deploy.js
  40. 116 287
      js/IDE.deploy.js
  41. 10 9
      js/IDE.js
  42. 0 1203
      js/IDE.js.bak
  43. 6 15
      js/JQuery-Tests.deploy.js
  44. 0 0
      js/JQuery-Tests.js
  45. 8 20
      js/Kernel-Tests.deploy.js
  46. 0 0
      js/Kernel-Tests.js
  47. 62 248
      js/Kernel.deploy.js
  48. 50 5
      js/Kernel.js
  49. 114 285
      js/Parser.deploy.js
  50. 2 2
      js/Parser.js
  51. 0 20
      nodejs/nodecompile.js
  52. 9 11
      st/IDE.st
  53. 16 2
      st/Kernel.st
  54. 12 28
      st/Makefile
  55. 1 1
      st/Parser.st

+ 7 - 6
README.md

@@ -12,16 +12,17 @@ Jtalk is written in itself, including the parser and compiler. Jtalk compiles in
 
 Some highlights:
 
--    Jtalk features an IDE with a Class browser, workspace and transcript
--    [Pharo Smalltalk](http://www.pharo-project.org) is considered as the reference implementation
+-    Jtalk features an IDE with a Class browser, Workspace, Transcript, a ReferencesBrowser supporting senders/implementors and class references, basic Inspector and even a beginning of a Debugger and a unit TestRunner.
+-    [Pharo Smalltalk](http://www.pharo-project.org) is considered as the reference implementation.
 -    Jtalk includes a canvas to generate HTML, like [Seaside](http://www.seaside.st)
--    Jtalk includes a [jQuery](http://www.jquery.com) binding
+-    Jtalk can use Javascript libraries and the current IDE is built on [jQuery](http://www.jquery.com)
+-    You can inline Javascript code and there are many ways to interact between Jtalk and Javascript
 
 How to commit changes from the web-based IDE
 --------------------------------------------
 
 The Jtalk class browser is able to commit changes to disk.
-The "commit category" button will send a PUT request with the JS code of all classes in the selected class category in a file named js/CATEGORY.js
+The "commit category" button will send a PUT request with the JS code of all classes in the selected class category in a file named js/CATEGORY.js and also send the corresponding .st files to the st directory.
 
 The easiest way to enable committing is probably to setup a webdav with Apache.
 
@@ -70,9 +71,9 @@ Make sure the group www-data has required rights to modify files in the webdav d
 License
 -------
 
-Jtalk is released under the MIT license.
+Jtalk is released under the MIT license. All contributions made for inclusion are considered to be under MIT.
 
 More infos
 ----------
 
-More on the [project page](http://nicolaspetton.github.com/jtalk)
+More on the [project page](http://nicolaspetton.github.com/jtalk)

+ 98 - 42
bin/jtalkc

@@ -2,16 +2,25 @@
 #
 # This is a "compiler" for JTalk code. Run without arguments for help.
 
-# Get JTalk root directory from the location of this script.
-JTALK=$(readlink -f `dirname ${0}`/..)
+# Get JTalk root directory from the location of this script so that
+# we can find the st and js directories etc.
+
+# Earlier we used this but it does not work on Mac
+# JTALK=$(readlink -f `dirname ${0}`/..)
+TARGET=`dirname ${0}`/..
+pushd . >/dev/null
+cd $TARGET
+JTALK="`\pwd -P`"
+popd >/dev/null
 
 function usage {
 	cat <<ENDOFHELP
-Usage: $0 [-N|D|E] [-K|C] [-o] [-O] [-m class] [-M file]
-          [-i] [-I file] file1 [file2 ...] [Program]
+Usage: $0 [-N|D|E] [-K|C|J] [-o] [-O|-A] [-d] [-s suffix] [-m class] [-M file]
+          [-i] [-I file] [file1 [file2 ...]] [Program]
 
    Will compile Jtalk files - either separately or into a runnable complete
-   program. Files listed will be handled using these rules:
+   program. If no files are listed only a linking stage is performed.
+   Files listed will be handled using these rules:
 
    *.js
      Files are concatenated in listed order.
@@ -30,14 +39,17 @@ Usage: $0 [-N|D|E] [-K|C] [-o] [-O] [-m class] [-M file]
 
   -N or -D or -E
      Compilation target. Currently Node.js, D8 (V8 shell) or Enyo (webOS 3.0).
-     All imply "-K -I" so boot.js and Kernel.js are added first and init.js
+     All currentl imply "-K -I" so boot.js and Kernel.js are added first and init.js
      is added last.
 
   -K
-     Add libraries to get minimal JTalk Kernel running.
+     Add libraries to get minimal Jtalk Kernel running.
 
   -C
-     Add libraries to get minimal JTalk Compiler running.
+     Add libraries to get minimal Jtalk Compiler running.
+
+  -J
+     Add libraries to get minimal Jtalk IDE running.
 
   -o
      Optimize each js file using the Google closure compiler.
@@ -45,19 +57,32 @@ Usage: $0 [-N|D|E] [-K|C] [-o] [-O] [-m class] [-M file]
 
   -O
      Optimize final <Program>.js using the Google closure compiler.
-     Using Closure at ~/compiler.jar    
+     Using Closure at ~/compiler.jar
+
+  -A Same as -O but use --compilation_level ADVANCED_OPTIMIZATIONS 
+
+  -d
+     Additionally export code for deploy - stripped from source etc.
+     Uses suffix ".deploy.js" in addition to any explicit given suffic using -s.
+
+  -s suffix
+     Add <suffix> to compiled js files so that File.st is compiled into
+     File.<suffix>.js.
+
+  -S suffix
+     Use <suffix> for all libraries accessed using -l or -L and other options.
 
   -l library1,library2
-     Load listed libraries (no spaces) into Compiler before compiling.
+     Load listed libraries (no spaces or .js) into Compiler before compiling.
 
   -L library1,library2
-     Load listed libraries (no spaces) into Compiler before compiling and also
-     into Program.js in listed order.
+     Load listed libraries (no spaces or .js) into Compiler before compiling
+     and also into Program.js in listed order.
 
-  -i
+  -i file
      Add library initializer <file>.
 
-  -I file
+  -I
      Add library standard initializer $JTALK/js/init.js  
 
   -m class
@@ -74,8 +99,8 @@ Usage: $0 [-N|D|E] [-K|C] [-o] [-O] [-m class] [-M file]
         jtalkc Kernel.st
 
      Compile Hello.st to Hello.js and create complete program called
-     Program.js for Node.js including boot.js, Kernel.js, init.js and
-     adding a call to class method #main in class Hello:
+     Program.js for Node.js and adding a call to class method #main
+     in class Hello:
 
         jtalkc -N -m Hello Hello.st Program
 
@@ -95,25 +120,32 @@ if [ -z $1 ] ; then
 fi
 
 # Define our predefined library combinations
-BOOT="$JTALK/js/boot.js"
-KERNEL="$BOOT $JTALK/js/Kernel.js"
-COMPILER="$KERNEL $JTALK/js/Parser.js $JTALK/js/Compiler.js"
-KITCHENSINK="$COMPILER $JTALK/js/Canvas.js"
+BOOT="boot"
+KERNEL="$BOOT Kernel"
+COMPILER="$KERNEL Parser Compiler"
+CANVAS="$COMPILER Canvas"
+IDE="$CANVAS JQuery IDE SUnit Examples"
 
 # Predefined initializer
 INITIALIZER="$JTALK/js/init.js"
 
 # Default values
 ENV=
-INIT=
+INIT=$INITIALIZER
 MAIN=
 MAINFILE=
 BASE=$KERNEL
 LOAD=
 LOADANDADD=
+CLOSUREOPTS=
+# Ok, bad coding practice but hey, who would use such a suffix?
+SUFFIX=no-silly-suffix
+SUFFIXUSED=
+DEPLOY=false
+NODECOMPILE=nodecompile
 
 # Read options and shift them away
-while getopts "NDEKCoOl:L:i:IM:m:h?" o; do
+while getopts "NDEKCJoOAdS:s:l:L:i:IM:m:h?" o; do
 case "$o" in
    N) ENV=NODE
       BASE=$KERNEL
@@ -121,15 +153,24 @@ case "$o" in
    D) ENV=D8
       BASE=$KERNEL
       INIT=$INITIALIZER;;
-   D) ENV=ENYO
+   E) ENV=ENYO
       BASE=$KERNEL
       INIT=$INITIALIZER;;
    K) BASE=$KERNEL;;
    C) BASE=$COMPILER;;
+   J) BASE=$IDE;;
    o) CLOSURE=true
       CLOSUREPARTS=true;;
    O) CLOSURE=true
       CLOSUREFULL=true;;
+   A) CLOSURE=true
+      CLOSUREOPTS="$CLOSUREOPTS --compilation_level ADVANCED_OPTIMIZATIONS"
+      CLOSUREFULL=true;;
+   d) DEPLOY=true;;
+   S) LOADSUFFIX=$OPTARG
+      SUFFIXUSED=$SUFFIX;;
+   s) SUFFIX=$OPTARG
+      SUFFIXUSED=$SUFFIX;;
    l) LOAD=$OPTARG;;
    L) LOADANDADD=$OPTARG;;
    I) INIT=$INITIALIZER;;
@@ -151,26 +192,34 @@ if [ ! -z $CLOSURE ]; then
       exit 1
     fi
   else
-   echo "java is not installed and is needed for -O or -o (Closure compiler)."
+   echo "java is not installed and is needed for -O, -A or -o (Closure compiler)."
    exit 1
   fi
 fi
 
 # Function for looking up listed js files
 function resolvejs {
-  if [ -f "$1" ]; then
-    RESOLVED="$1" 
+  FNAME="$1$LOADSUFFIX.js"
+  if [ -f $FNAME ]; then
+    RESOLVED="$FNAME" 
   else
-    if [ -f $JTALK/js/$1 ]; then
-      RESOLVED="$JTALK/js/$1"
+    if [ -f $JTALK/js/$FNAME ]; then
+      RESOLVED="$JTALK/js/$FNAME"
     else
-      echo "Javascript file not found: $1"
+      echo "Javascript file not found: $FNAME"
       exit 1
     fi
   fi
 }
 
-# Resolve listed libraries in $LOAD separated by spaces
+# Resolve listed libraries in $BASE deparated by spaces
+for FILE in $BASE
+do
+   resolvejs $FILE
+   TOBASE="$TOBASE $RESOLVED"
+done
+
+# Resolve listed libraries in $LOAD separated by ,
 LOAD=${LOAD//,/\ }
 for FILE in $LOAD
 do
@@ -178,7 +227,7 @@ do
    TOLOAD="$TOLOAD $RESOLVED"
 done
 
-# Resolve listed libraries in $LOADANDADD separated by spaces
+# Resolve listed libraries in $LOADANDADD separated by ,
 LOADANDADD=${LOADANDADD//,/\ }
 for FILE in $LOADANDADD
 do
@@ -188,13 +237,20 @@ do
 done
 
 # Define our Compiler loading supplied libraries
-OURCOMPILER="$KITCHENSINK $TOLOAD $JTALK/js/init.js $JTALK/nodejs/nodecompile.js"
+OURCOMPILER="$COMPILER $TOLOAD init $JTALK/bin/$NODECOMPILE"
+
+# Resolve OURCOMPILER
+for FILE in $OURCOMPILER
+do
+   resolvejs $FILE
+   TOOURCOMPILER="$TOOURCOMPILER $RESOLVED"
+done
 
 # Add supplied libraries
-LIBS="$BASE $TOADD"
+LIBS="$TOBASE $TOADD"
 
 # Get a unique tempdir and make it get auto removed on exit
-TMPDIR=`mktemp -d`
+TMPDIR=`mktemp -d jtalkc.XXXXXX`
 trap "rm -rf $TMPDIR" EXIT
 
 
@@ -210,11 +266,11 @@ do
         CATEGORY=`basename $1 .st`
         if [ -f "$1" ]; then
            COMPILE="$COMPILE $1 $CATEGORY"
-           COMPILED="$COMPILED $CATEGORY.js"
+           COMPILED="$COMPILED $CATEGORY$SUFFIXUSED.js"
         else
            if [ -f $JTALK/st/$1 ]; then
              COMPILE="$COMPILE $JTALK/st/$1 $CATEGORY"
-             COMPILED="$COMPILED $CATEGORY.js"
+             COMPILED="$COMPILED $CATEGORY$SUFFIXUSED.js"
            else
              echo "JTalk file not found: $1"
              exit 1
@@ -239,11 +295,11 @@ done
 # --------------------------------------------------
 
 # Create compiler dynamically
-cat $OURCOMPILER > $TMPDIR/compiler.js
-
+cat $TOOURCOMPILER > $TMPDIR/compiler.js
+ 
 # Compile all collected .st files to .js
-echo "Loading libraries $KITCHENSINK $TOLOAD and compiling ..."
-node $TMPDIR/compiler.js $COMPILE
+echo "Loading libraries $TOOURCOMPILER and compiling ..."
+node $TMPDIR/compiler.js $DEPLOY $SUFFIX $COMPILE
 
 # Verify all .js files corresponding to .st files were created, otherwise exit
 IFS=" "
@@ -262,7 +318,7 @@ if [ ! -z $CLOSUREPARTS ]; then
   for FILE in $ALLJSFILES
   do
     mv $FILE $FILE.original
-    java -jar ~/compiler.jar --js $FILE.original --js_output_file $FILE
+    java -jar ~/compiler.jar $CLOSUREOPTS --js $FILE.original --js_output_file $FILE
     rm $FILE.original
   done
 fi
@@ -323,7 +379,7 @@ echo "Done."
 if [ ! -z $CLOSUREFULL ]; then
   echo "Compiling $PROGRAM.js file using Google closure compiler."
   mv $PROGRAM.js $PROGRAM.js.original
-  java -jar ~/compiler.jar --js $PROGRAM.js.original --js_output_file $PROGRAM.js
+  java -jar ~/compiler.jar $CLOSUREOPTS --js $PROGRAM.js.original --js_output_file $PROGRAM.js
   rm $PROGRAM.js.original
   echo "Done."
 fi

+ 33 - 0
bin/nodecompile.js

@@ -0,0 +1,33 @@
+// NOTE: This code is called using the jtalkc bash script - do not use directly.
+// The arguments variable is a series of .st filenames and category names.
+// If it is a .st file we import it, if it is a category name we export it
+// as aCategoryName.js.
+var sys = require('sys'), fs = require('fs');
+
+// Only care about our arguments, strip away node, all.js and debug flag.
+var arguments = process.argv.splice(4);
+
+// First argument is also produce deploy files: "true" or "false"
+var deploy = (process.argv[2] == "true");
+
+// Second argument is suffix: "no-silly-suffix" means none
+suffix = process.argv[3];
+if (suffix == "no-silly-suffix") {
+  suffix = "";
+}
+
+// If it ends with .st, import it, otherwise export category as .js
+arguments.forEach(function(val, index, array) {
+  if (/\.st/.test(val)) {
+    sys.puts("Reading file " + val);
+    code = fs.readFileSync(val, "utf8");
+    smalltalk.Importer._new()._import_(code._stream());
+  } else {
+    sys.puts("Exporting " + (deploy ? "(debug + deploy)" : "(debug)") + " category "
+		+ val + " as " + val + suffix + ".js" + (deploy ? " and " + val + suffix + ".deploy.js" : ""));
+    fs.writeFileSync(val + suffix + ".js", smalltalk.Exporter._new()._exportCategory_(val));
+    if (deploy) {
+	fs.writeFileSync(val + suffix + ".deploy.js", smalltalk.StrippedExporter._new()._exportCategory_(val));
+    }
+  }
+});

+ 4 - 0
examples/README

@@ -0,0 +1,4 @@
+Here you will find examples for command line usage of Jtalk
+that you can typically make and run using "make run".
+
+Sub directories are for different target platforms.

+ 0 - 0
nodejs/README → examples/nodejs/README


+ 6 - 6
nodejs/benchfib/Benchfib.st → examples/nodejs/benchfib/Benchfib.st

@@ -8,9 +8,9 @@ main
 
 	| result |
 	result := 0 tinyBenchmarks.
-	{'console.log(''0 tinyBenchmarks => '' + result);'}.
+	console log: '0 tinyBenchmarks => ' , result asString.
 	result := 0 jstinyBenchmarks.
-	{'console.log(''0 jstinyBenchmarks => '' + result);'}
+	console log: '0 jstinyBenchmarks => ' , result asString
 ! !
 
 !Number methodsFor: '*Benchfib'!
@@ -72,15 +72,15 @@ tinyBenchmarks
 
 jsbenchFib
  
-	{'if (this < 2) {
+	<if (this < 2) {
 return 1;
 } else {
-return (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;}'}
+return (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;}>
 !
 
 jsbenchmark
 
-{'
+<
 var size = 8190;
 var count;
 for (var z=0;z<this;z++) {
@@ -101,7 +101,7 @@ for (var z=0;z<this;z++) {
     }
   }
 }
-return count'}
+return count>
 !
 
 jstinyBenchmarks

+ 1 - 1
nodejs/benchfib/Makefile → examples/nodejs/benchfib/Makefile

@@ -1,5 +1,5 @@
 Program.js: Benchfib.st
-	../../bin/jtalkc -N -m Benchfib Benchfib.st Program
+	../../../bin/jtalkc -N -m Benchfib Benchfib.st Program
 
 run: Program.js
 	./benchfib

+ 0 - 0
nodejs/benchfib/benchfib → examples/nodejs/benchfib/benchfib


+ 1 - 7
nodejs/hello/Hello.st → examples/nodejs/hello/Hello.st

@@ -5,11 +5,5 @@ Object subclass: #Hello
 !Hello class methodsFor: 'main'!
 
 main
-	console log: Hello new hello
+	console log: 'Hello world from JTalk in Node.js'
 ! ! 
-
-!Hello methodsFor: 'printing'!
-
-hello
-        ^'Hello world from JTalk in Node.js'
-! !

+ 1 - 1
nodejs/hello/Makefile → examples/nodejs/hello/Makefile

@@ -1,5 +1,5 @@
 Program.js: Hello.st
-	../../bin/jtalkc -N -m Hello Hello.st Program
+	../../../bin/jtalkc -N -m Hello Hello.st Program
 
 run: Program.js
 	./hello

+ 0 - 0
nodejs/hello/README → examples/nodejs/hello/README


+ 0 - 0
nodejs/hello/hello → examples/nodejs/hello/hello


+ 8 - 0
examples/nodejs/meta/Makefile

@@ -0,0 +1,8 @@
+Program.js: MyScript.st
+	../../../bin/jtalkc -N -C -m MyScript MyScript.st Program
+
+run: Program.js
+	node Program.js
+
+clean:
+	rm -f Program.js MyScript.js

+ 23 - 0
examples/nodejs/meta/MyScript.st

@@ -0,0 +1,23 @@
+Object subclass: #MyScript
+	instanceVariableNames: ''
+	category: 'MyScript'!
+
+!MyScript class methodsFor: 'main'!
+main
+	| class compiler method |
+	Object subclass: #Dummy instanceVariableNames: '' category: 'Dummy'.
+	class := smalltalk at: #Dummy.	
+	compiler := Compiler new.
+
+	method := compiler load: 'foo ^ 10' forClass: class.
+	method category: 'foo'.
+	class addCompiledMethod: method.
+
+	method := compiler load: 'bar ^ self foo * 2' forClass: class.
+	method category: 'foo'.
+	class addCompiledMethod: method.
+
+	console log: (Exporter new exportCategory: 'Dummy')
+! !
+
+

+ 1 - 1
nodejs/trivialserver/Makefile → examples/nodejs/trivialserver/Makefile

@@ -1,5 +1,5 @@
 Program.js: TrivialServer.st
-	../../bin/jtalkc -N -m TrivialServer TrivialServer.st Program
+	../../../bin/jtalkc -N -m TrivialServer TrivialServer.st Program
 
 run: Program.js
 	./trivial

+ 1 - 1
nodejs/trivialserver/TrivialServer.st → examples/nodejs/trivialserver/TrivialServer.st

@@ -34,7 +34,7 @@ start
 	    res end: (self process: req)].
 
         (http createServer: block)
-                listen: #(1337 '127.0.0.1').
+                listen: 1337 host: '127.0.0.1'.
         console log: 'TrivialServer running at http://127.0.0.1:1337/'
 ! !
 

+ 0 - 0
nodejs/trivialserver/trivial → examples/nodejs/trivialserver/trivial


+ 11 - 0
examples/webos/README

@@ -0,0 +1,11 @@
+These are examples that can be run in webOS 3.0 using Enyo - the new UI framework that was released with 3.0.
+
+You can play with them:
+
+- In a real device (a Touchpad or Pre 3 at the moment), but then you would first need to install the webOS SDK 3.0. With your device connected through USB you should be able to do "make run" and it should get installed and started on your device!
+
+- In the emulator included in the SDK. Just start "palm-emulator" and then do "make run" in any of the examples.
+
+- In a WebKit based browser, like Chromium (on Linux, do "make chromium") or Safari on the Mac (yes, it works). But first you would need to ensure that you have a copy of the enyo directory (normally you find it in /opt/PalmSDK/0.1/share/refcode/framework/enyo on Linux, just copy that whole directory into the directory in which you have the jtalk clone from github. Then the relative path in the index.html file referencing Enyo should work.
+
+

BIN
examples/webos/eris/DuckQwaq.wav


+ 36 - 0
examples/webos/eris/EnyoJtalk.st

@@ -0,0 +1,36 @@
+"This is a base class for Jtalk Enyo UI classes. We keep track of an optional sister kind
+in Enyo and typically an instance of it, or an instance without a kind, called ui.
+
+NOTE: Inheritance of ivars seems broken, I need to use #ui: in subclass to set it"
+
+Object subclass: #EnyoFriend
+        instanceVariableNames: 'ui kind'
+        category: 'EnyoJtalk'!
+
+!EnyoFriend methodsFor: 'accessing'!
+
+ui
+	^ui
+!
+
+ui: aUI
+	ui := aUI
+!
+
+dollar
+	"Return the $ of ui for easy access to the components of the UI."
+	<return this['@ui'].$>
+!
+
+kind
+	^kind
+! !
+
+!EnyoFriend methodsFor: 'initializing'!
+initialize
+	"We make sure our JS functions can be used transparently from Jtalk,
+	at this moment we do not use it - trying to create Enyo kinds that are
+	at the same time Jtalk classes failed for me."
+	super initialize.
+	<this.allowJavaScriptCalls = true>
+! !

+ 0 - 0
examples/webos/eris/Eris.css


+ 86 - 0
examples/webos/eris/Eris.st

@@ -0,0 +1,86 @@
+EnyoFriend subclass: #Eris
+        instanceVariableNames: ''
+        category: 'Eris'!
+
+!Eris methodsFor: 'actions'!
+
+doIt
+    | result |
+    [ result := self eval: self dollar richText getValue ]
+	on: Error
+	do: [:ex |
+		^self warn: ex messageText title: 'Error' button: 'Ooops...'].
+    ^result
+!
+
+clear
+	self dollar richText setValue: ''
+!
+
+eval: aString
+    | compiler node |
+    compiler := Compiler new.
+    node := compiler parseExpression: aString.
+    node isParseFailure ifTrue: [
+	^self warn: 'Ehrm, you are a Smalltalk n00b, right? That is not valid syntax.' title: 'Parsing Error' button: 'Okidoki...'].
+    ^compiler loadExpression: aString.
+!
+
+printString
+	^''
+!
+
+warn: aString title: aTitle button: caption
+	| block popup |
+	block := [popup close].
+	<props = {kind: 'ModalDialog', caption: aTitle, components: [
+			{kind: 'Control', content: aString, className: 'enyo-text-error warning-icon'},
+			{kind: 'Button', caption: caption, onclick: 'closePopup', style: 'margin-top:10px'}],
+		 closePopup: block}>.
+	popup := enyo create: props.
+	popup openAtCenter
+!
+
+print: aString
+    self dollar richText setValue: (self dollar richText getValue), ' ', aString
+!
+
+quack
+	"(self kind: 'Sound'; src: 'DuckQwaq.wav'; create) play"
+	(enyo create: (Dictionary new at: 'kind' put: 'Sound'; at: 'src' put: 'DuckQwaq.wav'; yourself)) play
+!
+
+printIt
+    self print: self doIt printString
+! !
+
+!Eris methodsFor: 'initialization'!
+initialize
+	| props doItBlock printItBlock quackBlock clearBlock |
+	super initialize.
+	doItBlock := [self doIt].
+	printItBlock := [self printIt].
+	quackBlock := [self quack].
+	clearBlock := [self clear].
+
+	<props = {kind: 'VFlexBox', components: [
+			{kind: 'PageHeader', content: 'Eris'},
+ 			{kind: 'RowGroup', caption: 'Workspace', components: [
+				{kind: 'RichText', richContent: false,
+					value: 'Put some funky Jtalk code here...',
+					autoWordComplete: false, spellcheck: false, autocorrect: false,
+					autoCapitalize: 'lowercase', alwaysLooksFocused: true
+				},
+				{kind: 'Toolbar', components: [
+					{caption: 'Do it', onclick: 'doit'},
+					{caption: 'Print it', onclick: 'printit'},
+					{caption: 'Clear', onclick: 'clear'},
+					{kind: 'Spacer'},
+					{caption: 'Quack!!', onclick: 'quack'}]}]}],
+		doit: doItBlock,
+		printit: printItBlock,
+		quack: quackBlock,
+		clear: clearBlock}>.
+	ui := enyo create: props.
+! !
+

+ 38 - 0
examples/webos/eris/Makefile

@@ -0,0 +1,38 @@
+#
+# If you copy this file for an Enyo/Jtalk project, just
+# modify these first two lines
+# and then add .st files as you please. This Makefile
+# should pick them all up and compile into Program.js.
+#
+PACKAGE  := jtalk.eris
+VERSION  := 0.0.1
+
+# -E for Enyo, -O for Closure optimization of js code.
+FLAGS    := -E -C
+IPK      := $(PACKAGE)_$(VERSION)_all.ipk
+FILE     := Program
+SOURCES  := $(wildcard *.st)
+OBJECTS  := $(patsubst %.st,%.js,$(wildcard *.st))
+FILEJS   := $(FILE).js
+
+$(FILEJS): $(SOURCES)
+	../../../bin/jtalkc $(FLAGS) $(SOURCES) $(FILE)
+
+$(IPK): $(FILEJS)
+	palm-package .
+
+clean:
+	rm -f $(FILEJS) $(OBJECTS) $(IPK)
+	palm-install -r $(PACKAGE)
+
+install: $(IPK)
+	palm-install $(IPK)
+
+# If you want to run it in the emulator, start the emulator first with palm-emulator
+run:    $(IPK)
+	palm-install $(IPK)
+	palm-launch $(PACKAGE)
+
+# This should fire it up in Chromium (at least under Ubuntu)
+chromium: $(FILEJS)
+	chromium-browser --allow-file-access-from-files index.html

+ 3 - 0
examples/webos/eris/README

@@ -0,0 +1,3 @@
+This is an example that was shown at ESUG 2011 running on a HP Touhpad with webOS 3.0.2.
+It shows the minimal beginning of a Jtalk development environment that dynamically can run and build Enyo applications.
+

+ 10 - 0
examples/webos/eris/appinfo.json

@@ -0,0 +1,10 @@
+{
+	"id": "jtalk.eris",
+	"version": "0.0.1",
+	"vendor": "Krampe Dynamic Development",
+	"type": "web",
+	"main": "index.html",
+	"title": "Eris",
+	"icon": "icon.png",
+	"uiRevision": 2
+}

+ 4 - 0
examples/webos/eris/depends.js

@@ -0,0 +1,4 @@
+enyo.depends(
+	"Program.js",
+	"Eris.css"
+);

+ 12 - 0
examples/webos/eris/index.html

@@ -0,0 +1,12 @@
+<!doctype html>
+<html>
+<head>
+	<title>Eris</title>
+	<script src="../../../../enyo/1.0/framework/enyo.js" type="text/javascript"></script>
+</head>
+<body>
+<script type="text/javascript">
+	smalltalk.Eris._new()._ui().renderInto(document.body);
+</script>
+</body>
+</html>

+ 36 - 0
examples/webos/hellojtalk/EnyoJtalk.st

@@ -0,0 +1,36 @@
+"This is a base class for Jtalk Enyo UI classes. We keep track of an optional sister kind
+in Enyo and typically an instance of it, or an instance without a kind, called ui.
+
+NOTE: Inheritance of ivars seems broken, I need to use #ui: in subclass to set it"
+
+Object subclass: #EnyoFriend
+        instanceVariableNames: 'ui kind'
+        category: 'EnyoJtalk'!
+
+!EnyoFriend methodsFor: 'accessing'!
+
+ui
+	^ui
+!
+
+ui: aUI
+	ui := aUI
+!
+
+dollar
+	"Return the $ of ui for easy access to the components of the UI."
+	<return this['@ui'].$>
+!
+
+kind
+	^kind
+! !
+
+!EnyoFriend methodsFor: 'initializing'!
+initialize
+	"We make sure our JS functions can be used transparently from Jtalk,
+	at this moment we do not use it - trying to create Enyo kinds that are
+	at the same time Jtalk classes failed for me."
+	super initialize.
+	<this.allowJavaScriptCalls = true>
+! !

+ 0 - 0
examples/webos/hellojtalk/HelloJtalk.css


+ 86 - 0
examples/webos/hellojtalk/HelloJtalk.st

@@ -0,0 +1,86 @@
+EnyoFriend subclass: #HelloJtalk
+        instanceVariableNames: 'count popup'
+        category: 'HelloJtalk'!
+
+!HelloJtalk methodsFor: 'accessing'!
+count
+	^count
+! !
+
+!HelloJtalk methodsFor: 'actions'!
+buttonClicked
+	count := count + 1.
+	self dollar input setValue: (self dollar input getValue, 'You clicked the button ', count asString, ' times so far').
+
+	"Okidoki, why not throw up a popup?"
+	popup openAtCenter
+!
+
+popupSelected: value
+	"The user picked a value in the popup."
+	self dollar input setValue: (self dollar input getValue, ' ', value)
+! !
+
+!HelloJtalk methodsFor: 'initialization'!
+initialize
+	"Create Enyo stuff and hook in callback blocks calling our action methods,
+	very similar to how Seaside does it.
+	Creating the templates for component construction
+	is clearly simpler to do in js. Yes, we can use
+	method temps inside the js code and ivars are accessed
+	using this syntax:
+
+		this['@ivarname']
+
+	We can not easily mix in arbitrary Jtalk expressions in the js code, thus
+	we use method temps for holding the blocks instead of embedding the blocks
+	directly. Blocks are js functions which is really neat. And we can use:
+
+		this._jtalkMessage()
+
+	to send messages to self for embedding the result."
+
+	| props block block2 |
+	super initialize.
+	count := 0.
+
+	"Create a callback block to embed below."
+	block := [self buttonClicked].
+
+	"We need to go through a method temp (props) for doing js, just inlining it
+	after 'enyo create:' does not work so js escaping is on the statement level
+	and not on the expression level."
+	<props = {
+		kind: 'VFlexBox',
+		components: [
+			{kind: 'PageHeader', content: 'Jtalk Live'},
+ 			{kind: "RowGroup", caption: "Rock on", components: [
+				{kind: 'Input', components: [
+					{kind: 'Button', caption: 'Click me', onclick: 'ablock'}]
+				}]
+			}],
+		ablock: block}>.
+	self ui: (enyo create: props).
+
+	"If we like we can create a kind for the UI (then the props need a name EnyoHelloJtalk),
+	but we do not have to in this case so this is commented out."
+	"self kind: (enyo kind: props).
+	<this['@ui'] = new EnyoHelloJtalk()>"
+
+	"This Enyo popup instance is created and held in an ivar for later use."
+	block2 := [:sender :value :old | self popupSelected: value].
+
+	<props = {kind: "Popup", components: [
+	    		{content: "Pick something you like a lot"},
+	    		{kind: "ListSelector", onChange: "popupSelected", value: "Foo", items: ["Foo", "Bar", "Bot"]
+			}],
+		popupSelected: block2}>.
+	popup := enyo create: props
+	
+! !
+
+!HelloJtalk class methodsFor: 'initialization'!
+initialize
+
+	enyo log: 'Class initialized'
+! !

+ 38 - 0
examples/webos/hellojtalk/Makefile

@@ -0,0 +1,38 @@
+#
+# If you copy this file for an Enyo/Jtalk project, just
+# modify these first two lines
+# and then add .st files as you please. This Makefile
+# should pick them all up and compile into Program.js.
+#
+PACKAGE  := jtalk.hellojtalk
+VERSION  := 1.0.0
+
+# -E for Enyo, -O for Closure optimization of js code.
+FLAGS    := -E -O
+IPK      := $(PACKAGE)_$(VERSION)_all.ipk
+FILE     := Program
+SOURCES  := $(wildcard *.st)
+OBJECTS  := $(patsubst %.st,%.js,$(wildcard *.st))
+FILEJS   := $(FILE).js
+
+$(FILEJS): $(SOURCES)
+	../../../bin/jtalkc $(FLAGS) $(SOURCES) $(FILE)
+
+$(IPK): $(FILEJS)
+	palm-package .
+
+clean:
+	rm -f $(FILEJS) $(OBJECTS) $(IPK)
+	palm-install -r $(PACKAGE)
+
+install: $(IPK)
+	palm-install $(IPK)
+
+# If you want to run it in the emulator, start the emulator first with palm-emulator
+run:    $(IPK)
+	palm-install $(IPK)
+	palm-launch $(PACKAGE)
+
+# This should fire it up in Chromium (at least under Ubuntu)
+chromium: $(FILEJS)
+	chromium-browser --allow-file-access-from-files index.html

+ 1 - 0
examples/webos/hellojtalk/README

@@ -0,0 +1 @@
+This is just a first kinda messy experiment with Enyo, doesn't do anything sensible.

+ 10 - 0
examples/webos/hellojtalk/appinfo.json

@@ -0,0 +1,10 @@
+{
+	"id": "jtalk.hellojtalk",
+	"version": "1.0.0",
+	"vendor": "Krampe Dynamic Development",
+	"type": "web",
+	"main": "index.html",
+	"title": "Enyo Hello Jtalk",
+	"icon": "icon.png",
+	"uiRevision": 2
+}

+ 4 - 0
examples/webos/hellojtalk/depends.js

@@ -0,0 +1,4 @@
+enyo.depends(
+	"Program.js",
+	"HelloJtalk.css"
+);

+ 12 - 0
examples/webos/hellojtalk/index.html

@@ -0,0 +1,12 @@
+<!doctype html>
+<html>
+<head>
+	<title>Enyo Jtalk HelloWorld</title>
+	<script src="../../../enyo/1.0/framework/enyo.js" type="text/javascript"></script>
+</head>
+<body>
+<script type="text/javascript">
+	smalltalk.HelloJtalk._new()._ui().renderInto(document.body);
+</script>
+</body>
+</html>

+ 14 - 35
js/Benchfib.deploy.js

@@ -4,16 +4,13 @@ smalltalk.addMethod(
 '_main',
 smalltalk.method({
 selector: 'main',
-category: 'not yet classified',
 fn: function (){
 var self=this;
 var result=nil;
 result=smalltalk.send((0), "_tinyBenchmarks", []);
 smalltalk.send(console, "_log_", [smalltalk.send(unescape("0%20tinyBenchmarks%20%3D%3E%20"), "__plus", [result])]);
-return self;},
-source: unescape('main%0A%0A%09%7C%20result%20%7C%0A%09result%20%3A%3D%200%20tinyBenchmarks.%0A%09console%20log%3A%20%270%20tinyBenchmarks%20%3D%3E%20%27%20+%20result'),
-messageSends: ["tinyBenchmarks", "log:", unescape("+")],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Benchfib.klass);
 
@@ -22,14 +19,11 @@ smalltalk.addMethod(
 '_benchFib',
 smalltalk.method({
 selector: 'benchFib',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "__lt", [(2)]), "_ifTrue_ifFalse_", [(function(){return (1);}), (function(){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "__minus", [(1)]), "_benchFib", []), "__plus", [smalltalk.send(smalltalk.send(self, "__minus", [(2)]), "_benchFib", [])]), "__plus", [(1)]);})]);
-return self;},
-source: unescape('benchFib%0A%09%22Handy%20send-heavy%20benchmark%22%0A%09%22%28result%20//%20seconds%20to%20run%29%20%3D%20approx%20calls%20per%20second%22%0A%09%22%20%7C%20r%20t%20%7C%0A%09%20%20t%20%3A%3D%20Time%20millisecondsToRun%3A%20%5Br%20%3A%3D%2026%20benchFib%5D.%0A%09%20%20%28r%20*%201000%29%20//%20t%22%0A%09%22138000%20on%20a%20Mac%208100/100%22%0A%09%5E%20self%20%3C%202%0A%09%09ifTrue%3A%20%5B1%5D%20%0A%09%09ifFalse%3A%20%5B%28self-1%29%20benchFib%20+%20%28self-2%29%20benchFib%20+%201%5D'),
-messageSends: ["ifTrue:ifFalse:", unescape("%3C"), unescape("+"), "benchFib", unescape("-")],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -37,7 +31,6 @@ smalltalk.addMethod(
 '_benchmark',
 smalltalk.method({
 selector: 'benchmark',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 var size=nil;
@@ -48,10 +41,8 @@ var count=nil;
 size=(8190);
 smalltalk.send((1), "_to_do_", [self, (function(iter){count=(0);flags=smalltalk.send(smalltalk.Array, "_new", []);smalltalk.send(size, "_timesRepeat_", [(function(){return smalltalk.send(flags, "_add_", [true]);})]);return smalltalk.send((1), "_to_do_", [size, (function(i){return smalltalk.send(smalltalk.send(flags, "_at_", [i]), "_ifTrue_", [(function(){prime=smalltalk.send(i, "__plus", [(1)]);k=smalltalk.send(i, "__plus", [prime]);smalltalk.send((function(){return smalltalk.send(k, "__lt_eq", [size]);}), "_whileTrue_", [(function(){smalltalk.send(flags, "_at_put_", [k, false]);return k=smalltalk.send(k, "__plus", [prime]);})]);return count=smalltalk.send(count, "__plus", [(1)]);})]);})]);})]);
 return count;
-return self;},
-source: unescape('benchmark%20%20%22Handy%20bytecode-heavy%20benchmark%22%0A%09%22%28500000%20//%20time%20to%20run%29%20%3D%20approx%20bytecodes%20per%20second%22%0A%09%225000000%20//%20%28Time%20millisecondsToRun%3A%20%5B10%20benchmark%5D%29%20*%201000%22%0A%09%223059000%20on%20a%20Mac%208100/100%22%0A%20%20%20%20%7C%20size%20flags%20prime%20k%20count%20%7C%0A%20%20%20%20size%20%3A%3D%208190.%0A%20%20%20%201%20to%3A%20self%20do%3A%0A%20%20%20%20%20%20%20%20%5B%3Aiter%20%7C%0A%20%20%20%20%20%20%20%20count%20%3A%3D%200.%0A%20%20%20%20%20%20%20%20flags%20%3A%3D%20Array%20new.%0A%20%20%20%20%20%20%20%20size%20timesRepeat%3A%20%5B%20flags%20add%3A%20true%5D.%0A%20%20%20%20%20%20%20%201%20to%3A%20size%20do%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%5B%3Ai%20%7C%20%28flags%20at%3A%20i%29%20ifTrue%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Bprime%20%3A%3D%20i+1.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3A%3D%20i%20+%20prime.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Bk%20%3C%3D%20size%5D%20whileTrue%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5Bflags%20at%3A%20k%20put%3A%20false.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20k%20%3A%3D%20k%20+%20prime%5D.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20count%20%3A%3D%20count%20+%201%5D%5D%5D.%0A%20%20%20%20%5E%20count'),
-messageSends: ["to:do:", "new", "timesRepeat:", "add:", "ifTrue:", "at:", unescape("+"), "whileTrue:", unescape("%3C%3D"), "at:put:"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -59,7 +50,6 @@ smalltalk.addMethod(
 '_tinyBenchmarks',
 smalltalk.method({
 selector: 'tinyBenchmarks',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 var t1=nil;
@@ -72,10 +62,8 @@ smalltalk.send((function(){t1=smalltalk.send(smalltalk.Date, "_millisecondsToRun
 n2=(28);
 smalltalk.send((function(){t2=smalltalk.send(smalltalk.Date, "_millisecondsToRun_", [(function(){return r=smalltalk.send(n2, "_benchFib", []);})]);return smalltalk.send(t2, "__lt", [(1000)]);}), "_whileTrue_", [(function(){return n2=smalltalk.send(n2, "__plus", [(1)]);})]);
 return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(n1, "__star", [(500000)]), "__star", [(1000)]), "__slash", [t1]), "_printString", []), "__comma", [unescape("%20bytecodes/sec%3B%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(r, "__star", [(1000)]), "__slash", [t2]), "_printString", [])]), "__comma", [unescape("%20sends/sec")]);
-return self;},
-source: unescape('tinyBenchmarks%0A%09%22Report%20the%20results%20of%20running%20the%20two%20tiny%20Squeak%20benchmarks.%0A%09ar%209/10/1999%3A%20Adjusted%20to%20run%20at%20least%201%20sec%20to%20get%20more%20stable%20results%22%0A%09%220%20tinyBenchmarks%22%0A%09%22On%20a%20292%20MHz%20G3%20Mac%3A%2022727272%20bytecodes/sec%3B%20984169%20sends/sec%22%0A%09%22On%20a%20400%20MHz%20PII/Win98%3A%20%2018028169%20bytecodes/sec%3B%201081272%20sends/sec%22%0A%09%7C%20t1%20t2%20r%20n1%20n2%20%7C%0A%09n1%20%3A%3D%201.%0A%09%5Bt1%20%3A%3D%20Date%20millisecondsToRun%3A%20%5Bn1%20benchmark%5D.%0A%09t1%20%3C%201000%5D%20whileTrue%3A%5Bn1%20%3A%3D%20n1%20*%202%5D.%20%22Note%3A%20%23benchmark%27s%20runtime%20is%20about%20O%28n%29%22%0A%0A%09n2%20%3A%3D%2028.%0A%09%5Bt2%20%3A%3D%20Date%20millisecondsToRun%3A%20%5Br%20%3A%3D%20n2%20benchFib%5D.%0A%09t2%20%3C%201000%5D%20whileTrue%3A%5Bn2%20%3A%3D%20n2%20+%201%5D.%20%0A%09%22Note%3A%20%23benchFib%27s%20runtime%20is%20about%20O%28k%5En%29%2C%0A%09%09where%20k%20is%20the%20golden%20number%20%3D%20%281%20+%205%20sqrt%29%20/%202%20%3D%201.618....%22%0A%0A%09%5E%20%28%28n1%20*%20500000%20*%201000%29%20/%20t1%29%20printString%2C%20%27%20bytecodes/sec%3B%20%27%2C%0A%09%20%20%28%28r%20*%201000%29%20/%20t2%29%20printString%2C%20%27%20sends/sec%27'),
-messageSends: ["whileTrue:", "millisecondsToRun:", "benchmark", unescape("%3C"), unescape("*"), "benchFib", unescape("+"), unescape("%2C"), "printString", unescape("/")],
-referencedClasses: [smalltalk.Date]
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -83,17 +71,14 @@ smalltalk.addMethod(
 '_jsbenchFib',
 smalltalk.method({
 selector: 'jsbenchFib',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 if (this < 2) {
 return 1;
 } else {
 return (this-1)._jsbenchFib() + (this-2)._jsbenchFib() + 1;};
-return self;},
-source: unescape('jsbenchFib%0A%20%0A%09%3Cif%20%28this%20%3C%202%29%20%7B%0Areturn%201%3B%0A%7D%20else%20%7B%0Areturn%20%28this-1%29._jsbenchFib%28%29%20+%20%28this-2%29._jsbenchFib%28%29%20+%201%3B%7D%3E'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -101,7 +86,6 @@ smalltalk.addMethod(
 '_jsbenchmark',
 smalltalk.method({
 selector: 'jsbenchmark',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 
@@ -126,10 +110,8 @@ for (var z=0;z<this;z++) {
   }
 }
 return count;
-return self;},
-source: unescape('jsbenchmark%0A%0A%3C%0Avar%20size%20%3D%208190%3B%0Avar%20count%3B%0Afor%20%28var%20z%3D0%3Bz%3Cthis%3Bz++%29%20%7B%0A%20%20count%20%3D%200%3B%0A%20%20var%20flags%20%3D%20new%20Array%28%29%3B%0A%20%20for%20%28var%20p%3D0%3B%20p%3Csize%3B%20p++%29%20%7B%0A%20%20%20%20flags%5Bp%5D%20%3D%20true%3B%0A%20%20%7D%0A%20%20for%20%28var%20i%3D1%3Bi%3C%3Dsize%3Bi++%29%20%7B%0A%20%20%20%20if%20%28flags%5Bi-1%5D%29%20%7B%0A%20%20%20%20%20%20var%20prime%20%3D%20i+1%3B%0A%20%20%20%20%20%20var%20k%20%3D%20i%20+%20prime%3B%0A%20%20%20%20%20%20while%20%28k%20%3C%3D%20size%29%20%7B%0A%20%20%20%20%20%20%20%20flags%5Bk-1%5D%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20k%20%3D%20k%20+%20prime%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20count%20%3D%20count%20+%201%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0Areturn%20count%3E'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Number);
 
@@ -137,7 +119,6 @@ smalltalk.addMethod(
 '_jstinyBenchmarks',
 smalltalk.method({
 selector: 'jstinyBenchmarks',
-category: '*Benchfib',
 fn: function (){
 var self=this;
 var t1=nil;
@@ -150,10 +131,8 @@ smalltalk.send((function(){t1=smalltalk.send(smalltalk.Date, "_millisecondsToRun
 n2=(28);
 smalltalk.send((function(){t2=smalltalk.send(smalltalk.Date, "_millisecondsToRun_", [(function(){return r=smalltalk.send(n2, "_jsbenchFib", []);})]);return smalltalk.send(t2, "__lt", [(1000)]);}), "_whileTrue_", [(function(){return n2=smalltalk.send(n2, "__plus", [(1)]);})]);
 return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(n1, "__star", [(500000)]), "__star", [(1000)]), "__slash", [t1]), "_printString", []), "__comma", [unescape("%20bytecodes/sec%3B%20")]), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(r, "__star", [(1000)]), "__slash", [t2]), "_printString", [])]), "__comma", [unescape("%20sends/sec")]);
-return self;},
-source: unescape('jstinyBenchmarks%0A%09%220%20jstinyBenchmarks%22%0A%0A%09%7C%20t1%20t2%20r%20n1%20n2%20%7C%0A%09n1%20%3A%3D%201.%0A%09%5Bt1%20%3A%3D%20Date%20millisecondsToRun%3A%20%5Bn1%20jsbenchmark%5D.%0A%09t1%20%3C%201000%5D%20whileTrue%3A%5Bn1%20%3A%3D%20n1%20*%202%5D.%20%22Note%3A%20%23benchmark%27s%20runtime%20is%20about%20O%28n%29%22%0A%0A%09n2%20%3A%3D%2028.%0A%09%5Bt2%20%3A%3D%20Date%20millisecondsToRun%3A%20%5Br%20%3A%3D%20n2%20jsbenchFib%5D.%0A%09t2%20%3C%201000%5D%20whileTrue%3A%5Bn2%20%3A%3D%20n2%20+%201%5D.%20%0A%09%22Note%3A%20%23jsbenchFib%27s%20runtime%20is%20about%20O%28k%5En%29%2C%0A%09%09where%20k%20is%20the%20golden%20number%20%3D%20%281%20+%205%20sqrt%29%20/%202%20%3D%201.618....%22%0A%0A%09%5E%20%28%28n1%20*%20500000%20*%201000%29%20/%20t1%29%20printString%2C%20%27%20bytecodes/sec%3B%20%27%2C%0A%09%20%20%28%28r%20*%201000%29%20/%20t2%29%20printString%2C%20%27%20sends/sec%27'),
-messageSends: ["whileTrue:", "millisecondsToRun:", "jsbenchmark", unescape("%3C"), unescape("*"), "jsbenchFib", unescape("+"), unescape("%2C"), "printString", unescape("/")],
-referencedClasses: [smalltalk.Date]
+return self;}
+]
 }),
 smalltalk.Number);
 

File diff suppressed because it is too large
+ 114 - 315
js/Canvas.deploy.js


File diff suppressed because it is too large
+ 118 - 295
js/Compiler.deploy.js


+ 100 - 250
js/Examples.deploy.js

@@ -3,15 +3,12 @@ smalltalk.addMethod(
 '_increase',
 smalltalk.method({
 selector: 'increase',
-category: 'actions',
 fn: function (){
 var self=this;
 self['@count']=smalltalk.send(self['@count'], "__plus", [(1)]);
 smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);})]);
-return self;},
-source: unescape('increase%0A%20%20%20%20count%20%3A%3D%20count%20+%201.%0A%20%20%20%20header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20count%20asString%5D'),
-messageSends: [unescape("+"), "contents:", "with:", "asString"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Counter);
 
@@ -19,15 +16,12 @@ smalltalk.addMethod(
 '_decrease',
 smalltalk.method({
 selector: 'decrease',
-category: 'actions',
 fn: function (){
 var self=this;
 self['@count']=smalltalk.send(self['@count'], "__minus", [(1)]);
 smalltalk.send(self['@header'], "_contents_", [(function(html){return smalltalk.send(html, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);})]);
-return self;},
-source: unescape('decrease%0A%20%20%20%20count%20%3A%3D%20count%20-%201.%0A%20%20%20%20header%20contents%3A%20%5B%3Ahtml%20%7C%20html%20with%3A%20count%20asString%5D'),
-messageSends: [unescape("-"), "contents:", "with:", "asString"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Counter);
 
@@ -35,15 +29,12 @@ smalltalk.addMethod(
 '_initialize',
 smalltalk.method({
 selector: 'initialize',
-category: 'initialization',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_initialize", [], smalltalk.Widget);
 self['@count']=(0);
-return self;},
-source: unescape('initialize%0A%20%20%20%20super%20initialize.%0A%20%20%20%20count%20%3A%3D%200'),
-messageSends: ["initialize"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Counter);
 
@@ -51,16 +42,13 @@ smalltalk.addMethod(
 '_renderOn_',
 smalltalk.method({
 selector: 'renderOn:',
-category: 'rendering',
 fn: function (html){
 var self=this;
 self['@header']=(function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(self['@count'], "_asString", [])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_h1", []));
 (function($rec){smalltalk.send($rec, "_with_", [unescape("++")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_increase", []);})]);})(smalltalk.send(html, "_button", []));
 (function($rec){smalltalk.send($rec, "_with_", [unescape("--")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_decrease", []);})]);})(smalltalk.send(html, "_button", []));
-return self;},
-source: unescape('renderOn%3A%20html%0A%20%20%20%20header%20%3A%3D%20html%20h1%20%0A%09with%3A%20count%20asString%3B%0A%09yourself.%0A%20%20%20%20html%20button%0A%09with%3A%20%27++%27%3B%0A%09onClick%3A%20%5Bself%20increase%5D.%0A%20%20%20%20html%20button%0A%09with%3A%20%27--%27%3B%0A%09onClick%3A%20%5Bself%20decrease%5D'),
-messageSends: ["with:", "asString", "yourself", "h1", "onClick:", "increase", "button", "decrease"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Counter);
 
@@ -71,14 +59,11 @@ smalltalk.addMethod(
 '_width',
 smalltalk.method({
 selector: 'width',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_class", []), "_width", []);
-return self;},
-source: unescape('width%0A%09%5Eself%20class%20width'),
-messageSends: ["width", "class"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -86,14 +71,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_class", []), "_height", []);
-return self;},
-source: unescape('height%0A%09%5Eself%20class%20height'),
-messageSends: ["height", "class"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -101,14 +83,11 @@ smalltalk.addMethod(
 '_squares',
 smalltalk.method({
 selector: 'squares',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_class", []), "_squares", []);
-return self;},
-source: unescape('squares%0A%09%5Eself%20class%20squares'),
-messageSends: ["squares", "class"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -116,14 +95,11 @@ smalltalk.addMethod(
 '_gluePiece_',
 smalltalk.method({
 selector: 'gluePiece:',
-category: 'accessing',
 fn: function (aPiece){
 var self=this;
 smalltalk.send(aPiece, "_glueOn_", [self]);
-return self;},
-source: unescape('gluePiece%3A%20aPiece%0A%09aPiece%20glueOn%3A%20self'),
-messageSends: ["glueOn:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -131,14 +107,11 @@ smalltalk.addMethod(
 '_rows',
 smalltalk.method({
 selector: 'rows',
-category: 'accessing',
 fn: function (){
 var self=this;
 return self['@rows'];
-return self;},
-source: unescape('rows%0A%09%22An%20array%20of%20rows.%20Each%20row%20is%20a%20collection%20of%20points.%22%0A%09%5Erows'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -146,14 +119,11 @@ smalltalk.addMethod(
 '_addRow_',
 smalltalk.method({
 selector: 'addRow:',
-category: 'accessing',
 fn: function (aCollection){
 var self=this;
 smalltalk.send(smalltalk.send(self, "_rows", []), "_add_", [aCollection]);
-return self;},
-source: unescape('addRow%3A%20aCollection%0A%09self%20rows%20add%3A%20aCollection'),
-messageSends: ["add:", "rows"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -161,16 +131,13 @@ smalltalk.addMethod(
 '_startNewGame',
 smalltalk.method({
 selector: 'startNewGame',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_newGame", []);
 smalltalk.send(self['@timer'], "_ifNotNil_", [(function(){return smalltalk.send(self['@timer'], "_clearInterval", []);})]);
 self['@timer']=smalltalk.send((function(){return smalltalk.send(self, "_nextStep", []);}), "_valueWithInterval_", [self['@speed']]);
-return self;},
-source: unescape('startNewGame%0A%09self%20newGame.%0A%09timer%20ifNotNil%3A%20%5Btimer%20clearInterval%5D.%0A%09timer%20%3A%3D%20%5Bself%20nextStep%5D%20valueWithInterval%3A%20speed'),
-messageSends: ["newGame", "ifNotNil:", "clearInterval", "valueWithInterval:", "nextStep"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -178,16 +145,13 @@ smalltalk.addMethod(
 '_nextStep',
 smalltalk.method({
 selector: 'nextStep',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(self['@movingPiece'], "_ifNil_", [(function(){return smalltalk.send(self, "_newPiece", []);})]);
 smalltalk.send(smalltalk.send(self['@movingPiece'], "_canMoveIn_", [self]), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(self['@movingPiece'], "_position_", [smalltalk.send(smalltalk.send(self['@movingPiece'], "_position", []), "__plus", [smalltalk.send((0), "__at", [(1)])])]);}), (function(){return smalltalk.send(self, "_newPiece", []);})]);
 smalltalk.send(self, "_redraw", []);
-return self;},
-source: unescape('nextStep%0A%09movingPiece%20ifNil%3A%20%5Bself%20newPiece%5D.%0A%09%28movingPiece%20canMoveIn%3A%20self%29%0A%09%09ifTrue%3A%20%5BmovingPiece%20position%3A%20movingPiece%20position%20+%20%280@1%29%5D%0A%09%09ifFalse%3A%20%5Bself%20newPiece%5D.%0A%09self%20redraw'),
-messageSends: ["ifNil:", "newPiece", "ifTrue:ifFalse:", "canMoveIn:", "position:", unescape("+"), "position", unescape("@"), "redraw"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -195,15 +159,12 @@ smalltalk.addMethod(
 '_redraw',
 smalltalk.method({
 selector: 'redraw',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(self['@renderingContext'], "_clearRectFrom_to_", [smalltalk.send((0), "__at", [smalltalk.send(self, "_width", [])]), smalltalk.send((0), "__at", [smalltalk.send(self, "_height", [])])]);
 (function($rec){smalltalk.send($rec, "_drawMap", []);return smalltalk.send($rec, "_drawPiece", []);})(self);
-return self;},
-source: unescape('redraw%0A%09renderingContext%20clearRectFrom%3A%200@%20self%20width%20to%3A%200@%20self%20height.%0A%09self%20%0A%09%09drawMap%3B%0A%09%09drawPiece'),
-messageSends: ["clearRectFrom:to:", unescape("@"), "width", "height", "drawMap", "drawPiece"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -211,7 +172,6 @@ smalltalk.addMethod(
 '_drawMap',
 smalltalk.method({
 selector: 'drawMap',
-category: 'actions',
 fn: function (){
 var self=this;
 (function($rec){smalltalk.send($rec, "_fillStyle_", [unescape("%23fafafa")]);return smalltalk.send($rec, "_fillRectFrom_to_", [smalltalk.send((0), "__at", [(0)]), smalltalk.send(smalltalk.send(self, "_width", []), "__at", [smalltalk.send(self, "_height", [])])]);})(self['@renderingContext']);
@@ -220,10 +180,8 @@ smalltalk.send((0), "_to_do_", [smalltalk.send(smalltalk.send(smalltalk.send(sel
 x=smalltalk.send(each, "__star", [smalltalk.send(smalltalk.send(self, "_class", []), "_squareSize", [])]);return smalltalk.send(self, "_drawLineFrom_to_", [smalltalk.send(x, "__at", [(0)]), smalltalk.send(x, "__at", [smalltalk.send(self, "_height", [])])]);})]);
 smalltalk.send((0), "_to_do_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_squares", []), "_y", []), (function(each){var y=nil;
 y=smalltalk.send(each, "__star", [smalltalk.send(smalltalk.send(self, "_class", []), "_squareSize", [])]);return smalltalk.send(self, "_drawLineFrom_to_", [smalltalk.send((0), "__at", [y]), smalltalk.send(smalltalk.send(self, "_width", []), "__at", [y])]);})]);
-return self;},
-source: unescape('drawMap%0A%09renderingContext%20%0A%09%09fillStyle%3A%20%27%23fafafa%27%3B%0A%09%09fillRectFrom%3A%200@0%20to%3A%20self%20width@self%20height.%0A%09renderingContext%20%0A%09%09lineWidth%3A%200.5%3B%0A%09%09strokeStyle%3A%20%27%23999%27.%0A%090%20to%3A%20self%20class%20squares%20x%20do%3A%20%5B%3Aeach%20%7C%20%7C%20x%20%7C%0A%09%09x%20%3A%3D%20each%20*%20self%20class%20squareSize.%0A%09%09self%20drawLineFrom%3A%20x@0%20to%3A%20x@self%20height%5D.%0A%090%20to%3A%20self%20class%20squares%20y%20do%3A%20%5B%3Aeach%20%7C%20%7C%20y%20%7C%0A%09%09y%20%3A%3D%20each%20*%20self%20class%20squareSize.%0A%09%09self%20drawLineFrom%3A%200@y%20to%3A%20self%20width@y%5D.'),
-messageSends: ["fillStyle:", "fillRectFrom:to:", unescape("@"), "width", "height", "lineWidth:", "strokeStyle:", "to:do:", "x", "squares", "class", unescape("*"), "squareSize", "drawLineFrom:to:", "y"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -231,14 +189,11 @@ smalltalk.addMethod(
 '_drawLineFrom_to_',
 smalltalk.method({
 selector: 'drawLineFrom:to:',
-category: 'actions',
 fn: function (aPoint, anotherPoint){
 var self=this;
 (function($rec){smalltalk.send($rec, "_beginPath", []);smalltalk.send($rec, "_moveTo_", [aPoint]);smalltalk.send($rec, "_lineTo_", [anotherPoint]);return smalltalk.send($rec, "_stroke", []);})(self['@renderingContext']);
-return self;},
-source: unescape('drawLineFrom%3A%20aPoint%20to%3A%20anotherPoint%0A%09renderingContext%20%0A%09%09beginPath%3B%0A%09%09moveTo%3A%20aPoint%3B%0A%09%09lineTo%3A%20anotherPoint%3B%0A%09%09stroke'),
-messageSends: ["beginPath", "moveTo:", "lineTo:", "stroke"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -246,17 +201,14 @@ smalltalk.addMethod(
 '_newGame',
 smalltalk.method({
 selector: 'newGame',
-category: 'actions',
 fn: function (){
 var self=this;
 self['@rows']=[];
 self['@movingPiece']=nil;
 self['@speed']=(200);
 self['@score']=(0);
-return self;},
-source: unescape('newGame%0A%09rows%20%3A%3D%20%23%28%29.%0A%09movingPiece%20%3A%3D%20nil.%0A%09speed%20%3A%3D%20200.%0A%09score%20%3A%3D%200'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -264,14 +216,11 @@ smalltalk.addMethod(
 '_newPiece',
 smalltalk.method({
 selector: 'newPiece',
-category: 'actions',
 fn: function (){
 var self=this;
 self['@movingPiece']=smalltalk.send(smalltalk.TetrisPiece, "_atRandom", []);
-return self;},
-source: unescape('newPiece%0A%09movingPiece%20%3A%3D%20TetrisPiece%20atRandom'),
-messageSends: ["atRandom"],
-referencedClasses: [smalltalk.nil]
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -279,15 +228,12 @@ smalltalk.addMethod(
 '_drawRows',
 smalltalk.method({
 selector: 'drawRows',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(smalltalk.send(self, "_rows", []), "_do_", [(function(each){return nil;})]);
 smalltalk.send(self['@movingPiece'], "_ifNotNil_", [(function(){return smalltalk.send(self['@movingPiece'], "_drawOn_", [self['@renderingContext']]);})]);
-return self;},
-source: unescape('drawRows%0A%09self%20rows%20do%3A%20%5B%3Aeach%20%7C%5D.%0A%09movingPiece%20ifNotNil%3A%20%5BmovingPiece%20drawOn%3A%20renderingContext%5D'),
-messageSends: ["do:", "rows", "ifNotNil:", "drawOn:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -295,14 +241,11 @@ smalltalk.addMethod(
 '_drawPiece',
 smalltalk.method({
 selector: 'drawPiece',
-category: 'actions',
 fn: function (){
 var self=this;
 smalltalk.send(self['@movingPiece'], "_ifNotNil_", [(function(){return smalltalk.send(self['@movingPiece'], "_drawOn_", [self['@renderingContext']]);})]);
-return self;},
-source: unescape('drawPiece%0A%09movingPiece%20ifNotNil%3A%20%5B%0A%09%09movingPiece%20drawOn%3A%20renderingContext%5D'),
-messageSends: ["ifNotNil:", "drawOn:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -310,15 +253,12 @@ smalltalk.addMethod(
 '_initialize',
 smalltalk.method({
 selector: 'initialize',
-category: 'initialization',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_initialize", [], smalltalk.Widget);
 smalltalk.send(self, "_newGame", []);
-return self;},
-source: unescape('initialize%0A%09super%20initialize.%0A%09self%20newGame'),
-messageSends: ["initialize", "newGame"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -326,14 +266,11 @@ smalltalk.addMethod(
 '_renderOn_',
 smalltalk.method({
 selector: 'renderOn:',
-category: 'rendering',
 fn: function (html){
 var self=this;
 (function($rec){smalltalk.send($rec, "_class_", ["tetris"]);return smalltalk.send($rec, "_with_", [(function(){smalltalk.send(smalltalk.send(html, "_h3", []), "_with_", ["Tetris"]);smalltalk.send(self, "_renderCanvasOn_", [html]);return smalltalk.send(self, "_renderButtonsOn_", [html]);})]);})(smalltalk.send(html, "_div", []));
-return self;},
-source: unescape('renderOn%3A%20html%0A%09html%20div%0A%09%09class%3A%20%27tetris%27%3B%0A%09%09with%3A%20%5B%0A%09%09%09html%20h3%20with%3A%20%27Tetris%27.%0A%09%09%09self%20renderCanvasOn%3A%20html.%0A%09%09%09self%20renderButtonsOn%3A%20html%5D'),
-messageSends: ["class:", "with:", "h3", "renderCanvasOn:", "renderButtonsOn:", "div"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -341,7 +278,6 @@ smalltalk.addMethod(
 '_renderCanvasOn_',
 smalltalk.method({
 selector: 'renderCanvasOn:',
-category: 'rendering',
 fn: function (html){
 var self=this;
 var canvas=nil;
@@ -350,10 +286,8 @@ smalltalk.send(canvas, "_at_put_", ["width", smalltalk.send(smalltalk.send(self,
 smalltalk.send(canvas, "_at_put_", ["height", smalltalk.send(smalltalk.send(self, "_height", []), "_asString", [])]);
 self['@renderingContext']=smalltalk.send(smalltalk.CanvasRenderingContext, "_tagBrush_", [canvas]);
 smalltalk.send(self, "_redraw", []);
-return self;},
-source: unescape('renderCanvasOn%3A%20html%0A%09%7C%20canvas%20%7C%0A%09canvas%20%3A%3D%20html%20canvas.%0A%09canvas%20at%3A%20%27width%27%20put%3A%20self%20width%20asString.%0A%09canvas%20at%3A%20%27height%27%20put%3A%20self%20height%20asString.%0A%09renderingContext%20%3A%3D%20CanvasRenderingContext%20tagBrush%3A%20canvas.%0A%09self%20redraw'),
-messageSends: ["canvas", "at:put:", "asString", "width", "height", "tagBrush:", "redraw"],
-referencedClasses: [smalltalk.CanvasRenderingContext]
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -361,14 +295,11 @@ smalltalk.addMethod(
 '_renderButtonsOn_',
 smalltalk.method({
 selector: 'renderButtonsOn:',
-category: 'rendering',
 fn: function (html){
 var self=this;
 (function($rec){smalltalk.send($rec, "_class_", ["tetris_buttons"]);return smalltalk.send($rec, "_with_", [(function(){(function($rec){smalltalk.send($rec, "_with_", ["New game"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_startNewGame", []);})]);})(smalltalk.send(html, "_button", []));return (function($rec){smalltalk.send($rec, "_with_", [unescape("play/pause")]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_update", []);})]);})(smalltalk.send(html, "_button", []));})]);})(smalltalk.send(html, "_div", []));
-return self;},
-source: unescape('renderButtonsOn%3A%20html%0A%09html%20div%20%0A%09%09class%3A%20%27tetris_buttons%27%3B%0A%09%09with%3A%20%5B%0A%09%09%09html%20button%0A%09%09%09%09with%3A%20%27New%20game%27%3B%0A%09%09%09%09onClick%3A%20%5Bself%20startNewGame%5D.%0A%09%09%09html%20button%0A%09%09%09%09with%3A%20%27play/pause%27%3B%0A%09%09%09%09onClick%3A%20%5Bself%20update%5D%5D'),
-messageSends: ["class:", "with:", "onClick:", "startNewGame", "button", "update", "div"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris);
 
@@ -377,14 +308,11 @@ smalltalk.addMethod(
 '_squareSize',
 smalltalk.method({
 selector: 'squareSize',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (22);
-return self;},
-source: unescape('squareSize%0A%09%5E22'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris.klass);
 
@@ -392,14 +320,11 @@ smalltalk.addMethod(
 '_width',
 smalltalk.method({
 selector: 'width',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_squareSize", []), "__star", [smalltalk.send(smalltalk.send(self, "_squares", []), "_x", [])]);
-return self;},
-source: unescape('width%0A%09%5Eself%20squareSize%20*%20%28self%20squares%20x%29'),
-messageSends: [unescape("*"), "squareSize", "x", "squares"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris.klass);
 
@@ -407,14 +332,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(self, "_squareSize", []), "__star", [smalltalk.send(smalltalk.send(self, "_squares", []), "_y", [])]);
-return self;},
-source: unescape('height%0A%09%5Eself%20squareSize%20*%20%28self%20squares%20y%29'),
-messageSends: [unescape("*"), "squareSize", "y", "squares"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris.klass);
 
@@ -422,14 +344,11 @@ smalltalk.addMethod(
 '_squares',
 smalltalk.method({
 selector: 'squares',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send((10), "__at", [(15)]);
-return self;},
-source: unescape('squares%0A%09%5E10@15'),
-messageSends: [unescape("@")],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.Tetris.klass);
 
@@ -439,14 +358,11 @@ smalltalk.addMethod(
 '_rotation',
 smalltalk.method({
 selector: 'rotation',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(self['@rotation'], "_ifNil_", [(function(){return self['@rotation']=(1);})]);
-return self;},
-source: unescape('rotation%0A%09%5Erotation%20ifNil%3A%20%5Brotation%20%3A%3D%201%5D'),
-messageSends: ["ifNil:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -454,14 +370,11 @@ smalltalk.addMethod(
 '_rotation_',
 smalltalk.method({
 selector: 'rotation:',
-category: 'accessing',
 fn: function (aNumber){
 var self=this;
 self['@rotation']=aNumber;
-return self;},
-source: unescape('rotation%3A%20aNumber%0A%09rotation%20%3A%3D%20aNumber'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -469,14 +382,11 @@ smalltalk.addMethod(
 '_position',
 smalltalk.method({
 selector: 'position',
-category: 'accessing',
 fn: function (){
 var self=this;
 return smalltalk.send(self['@position'], "_ifNil_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Tetris, "_squares", []), "_x", []), "__slash", [(2)]), "__minus", [(1)]), "__at", [(0)]);})]);
-return self;},
-source: unescape('position%0A%09%5Eposition%20ifNil%3A%20%5B%28Tetris%20squares%20x%20/%202%29%20-1%20@%200%5D'),
-messageSends: ["ifNil:", unescape("@"), unescape("-"), unescape("/"), "x", "squares"],
-referencedClasses: [smalltalk.Tetris]
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -484,14 +394,11 @@ smalltalk.addMethod(
 '_position_',
 smalltalk.method({
 selector: 'position:',
-category: 'accessing',
 fn: function (aPoint){
 var self=this;
 return self['@position']=aPoint;
-return self;},
-source: unescape('position%3A%20aPoint%0A%09%5Eposition%20%3A%3D%20aPoint'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -499,14 +406,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_subclassResponsibility", []);
-return self;},
-source: unescape('bounds%0A%09self%20subclassResponsibility'),
-messageSends: ["subclassResponsibility"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -514,14 +418,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23afa");
-return self;},
-source: unescape('color%0A%09%5E%27%23afa%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -529,14 +430,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (2);
-return self;},
-source: unescape('height%0A%09%5E2'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -544,15 +442,12 @@ smalltalk.addMethod(
 '_drawOn_',
 smalltalk.method({
 selector: 'drawOn:',
-category: 'drawing',
 fn: function (aRenderingContext){
 var self=this;
 smalltalk.send(aRenderingContext, "_fillStyle_", [smalltalk.send(self, "_color", [])]);
 smalltalk.send(smalltalk.send(self, "_bounds", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_fillRectFrom_to_", [smalltalk.send(smalltalk.send(each, "__plus", [smalltalk.send(self, "_position", [])]), "__star", [smalltalk.send(smalltalk.Tetris, "_squareSize", [])]), smalltalk.send(smalltalk.send((1), "__at", [(1)]), "__star", [smalltalk.send(smalltalk.Tetris, "_squareSize", [])])]);smalltalk.send($rec, "_strokeStyle_", [unescape("%23999")]);smalltalk.send($rec, "_lineWidth_", [(2)]);return smalltalk.send($rec, "_strokeRectFrom_to_", [smalltalk.send(smalltalk.send(each, "__plus", [smalltalk.send(self, "_position", [])]), "__star", [smalltalk.send(smalltalk.Tetris, "_squareSize", [])]), smalltalk.send(smalltalk.send((1), "__at", [(1)]), "__star", [smalltalk.send(smalltalk.Tetris, "_squareSize", [])])]);})(aRenderingContext);})]);
-return self;},
-source: unescape('drawOn%3A%20aRenderingContext%0A%09aRenderingContext%20fillStyle%3A%20self%20color.%0A%09self%20bounds%20do%3A%20%5B%3Aeach%20%7C%0A%09%09aRenderingContext%20%0A%09%09%09fillRectFrom%3A%20each%20+%20self%20position*%20Tetris%20squareSize%20to%3A%201@1%20*%20Tetris%20squareSize%3B%0A%09%09%09strokeStyle%3A%20%27%23999%27%3B%0A%09%09%09lineWidth%3A%202%3B%0A%09%09%09strokeRectFrom%3A%20each%20+%20self%20position*%20Tetris%20squareSize%20to%3A%201@1%20*%20Tetris%20squareSize%5D'),
-messageSends: ["fillStyle:", "color", "do:", "bounds", "fillRectFrom:to:", unescape("*"), unescape("+"), "position", "squareSize", unescape("@"), "strokeStyle:", "lineWidth:", "strokeRectFrom:to:"],
-referencedClasses: [smalltalk.Tetris]
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -560,14 +455,11 @@ smalltalk.addMethod(
 '_canMove',
 smalltalk.method({
 selector: 'canMove',
-category: 'testing',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(smalltalk.send(self, "_position", []), "_y", []), "__lt", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Tetris, "_squares", []), "_y", []), "__minus", [smalltalk.send(self, "_height", [])])]);
-return self;},
-source: unescape('canMove%0A%09%5Eself%20position%20y%20%3C%20%28Tetris%20squares%20y%20-%20self%20height%29'),
-messageSends: [unescape("%3C"), "y", "position", unescape("-"), "squares", "height"],
-referencedClasses: [smalltalk.Tetris]
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -575,14 +467,11 @@ smalltalk.addMethod(
 '_canMoveIn_',
 smalltalk.method({
 selector: 'canMoveIn:',
-category: 'testing',
 fn: function (aTetris){
 var self=this;
 return smalltalk.send(smalltalk.send(smalltalk.send(self, "_position", []), "_y", []), "__lt", [smalltalk.send(smalltalk.send(smalltalk.send(aTetris, "_squares", []), "_y", []), "__minus", [smalltalk.send(self, "_height", [])])]);
-return self;},
-source: unescape('canMoveIn%3A%20aTetris%0A%09%5Eself%20position%20y%20%3C%20%28aTetris%20squares%20y%20-%20self%20height%29'),
-messageSends: [unescape("%3C"), "y", "position", unescape("-"), "squares", "height"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece);
 
@@ -591,14 +480,11 @@ smalltalk.addMethod(
 '_atRandom',
 smalltalk.method({
 selector: 'atRandom',
-category: 'instance creation',
 fn: function (){
 var self=this;
 return smalltalk.send(smalltalk.send(smalltalk.send(self, "_subclasses", []), "_at_", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_subclasses", []), "_size", []), "_atRandom", [])]), "_new", []);
-return self;},
-source: unescape('atRandom%0A%09%5E%28self%20subclasses%20at%3A%20self%20subclasses%20size%20atRandom%29%20new'),
-messageSends: ["new", "at:", "subclasses", "atRandom", "size"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPiece.klass);
 
@@ -608,14 +494,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(1)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(1)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%200@0%3B%0A%09%09add%3A%200@1%3B%0A%09%09add%3A%201@0%3B%0A%09%09add%3A%201@1%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceO);
 
@@ -626,14 +509,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(1)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(2)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(2)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%200@0%3B%0A%09%09add%3A%200@1%3B%0A%09%09add%3A%200@2%3B%0A%09%09add%3A%201@2%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceL);
 
@@ -641,14 +521,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23ffa");
-return self;},
-source: unescape('color%0A%09%5E%27%23ffa%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceL);
 
@@ -656,14 +533,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (3);
-return self;},
-source: unescape('height%0A%09%5E3'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceL);
 
@@ -674,14 +548,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23aaf");
-return self;},
-source: unescape('color%0A%09%5E%27%23aaf%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceJ);
 
@@ -689,14 +560,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(1)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(2)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(2)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%201@0%3B%0A%09%09add%3A%201@1%3B%0A%09%09add%3A%201@2%3B%0A%09%09add%3A%200@2%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceJ);
 
@@ -704,14 +572,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (3);
-return self;},
-source: unescape('height%0A%09%5E3'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceJ);
 
@@ -722,14 +587,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23faa");
-return self;},
-source: unescape('color%0A%09%5E%27%23faa%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceI);
 
@@ -737,14 +599,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(1)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(2)])]);smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(3)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%200@0%3B%0A%09%09add%3A%200@1%3B%0A%09%09add%3A%200@2%3B%0A%09%09add%3A%200@3%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceI);
 
@@ -752,14 +611,11 @@ smalltalk.addMethod(
 '_height',
 smalltalk.method({
 selector: 'height',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (4);
-return self;},
-source: unescape('height%0A%09%5E4'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceI);
 
@@ -770,14 +626,11 @@ smalltalk.addMethod(
 '_bounds',
 smalltalk.method({
 selector: 'bounds',
-category: 'accessing',
 fn: function (){
 var self=this;
 return (function($rec){smalltalk.send($rec, "_add_", [smalltalk.send((0), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((2), "__at", [(0)])]);smalltalk.send($rec, "_add_", [smalltalk.send((1), "__at", [(1)])]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(smalltalk.Array, "_new", []));
-return self;},
-source: unescape('bounds%0A%09%5EArray%20new%0A%09%09add%3A%200@0%3B%0A%09%09add%3A%201@0%3B%0A%09%09add%3A%202@0%3B%0A%09%09add%3A%201@1%3B%0A%09%09yourself'),
-messageSends: ["add:", unescape("@"), "yourself", "new"],
-referencedClasses: [smalltalk.Array]
+return self;}
+]
 }),
 smalltalk.TetrisPieceT);
 
@@ -785,14 +638,11 @@ smalltalk.addMethod(
 '_color',
 smalltalk.method({
 selector: 'color',
-category: 'accessing',
 fn: function (){
 var self=this;
 return unescape("%23aaf");
-return self;},
-source: unescape('color%0A%09%5E%27%23aaf%27'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.TetrisPieceT);
 

File diff suppressed because it is too large
+ 116 - 287
js/IDE.deploy.js


File diff suppressed because it is too large
+ 10 - 9
js/IDE.js


File diff suppressed because it is too large
+ 0 - 1203
js/IDE.js.bak


+ 6 - 15
js/JQuery-Tests.deploy.js

@@ -3,14 +3,11 @@ smalltalk.addMethod(
 '_testFind',
 smalltalk.method({
 selector: 'testFind',
-category: 'tests',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_assert_equals_", ["James", smalltalk.send(smalltalk.send(smalltalk.send(self['@document'], "_asJQuery", []), "_find_", ["li.firstname"]), "_html", [])]);
-return self;},
-source: unescape('testFind%0A%09self%20%0A%09%09assert%3A%20%27James%27%20%0A%09%09equals%3A%20%28document%20asJQuery%20find%3A%20%27li.firstname%27%29%20html.%20'),
-messageSends: ["assert:equals:", "html", "find:", "asJQuery"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.JQueryTest);
 
@@ -18,14 +15,11 @@ smalltalk.addMethod(
 '_setUp',
 smalltalk.method({
 selector: 'setUp',
-category: 'running',
 fn: function (){
 var self=this;
 self['@document']=unescape("%3Cdiv%20class%3D%22person%22%3E%0A%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%3Cli%20class%3D%22firstname%22%3EJames%3C/li%3E%0A%09%09%09%09%09%3Cli%20class%3D%22lastname%22%3EBond%3C/li%3E%0A%09%09%09%09%3C/ul%3E%0A%09%09%09%3C/div%3E");
-return self;},
-source: unescape('setUp%0A%09document%20%3A%3D%20%27%3Cdiv%20class%3D%22person%22%3E%0A%09%09%09%09%3Cul%3E%0A%09%09%09%09%09%3Cli%20class%3D%22firstname%22%3EJames%3C/li%3E%0A%09%09%09%09%09%3Cli%20class%3D%22lastname%22%3EBond%3C/li%3E%0A%09%09%09%09%3C/ul%3E%0A%09%09%09%3C/div%3E%27.'),
-messageSends: [],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.JQueryTest);
 
@@ -33,17 +27,14 @@ smalltalk.addMethod(
 '_testEach',
 smalltalk.method({
 selector: 'testEach',
-category: 'tests',
 fn: function (){
 var self=this;
 var classes=nil;
 classes=smalltalk.send(smalltalk.Array, "_new", []);
 smalltalk.send(smalltalk.send(smalltalk.send(self['@document'], "_asJQuery", []), "_find_", ["li"]), "_each_", [(function(index, element){return smalltalk.send(classes, "_add_", [smalltalk.send(smalltalk.send(smalltalk.JQuery, "_fromElement_", [element]), "_attr_", ["class"])]);})]);
 smalltalk.send(self, "_assert_equals_", [smalltalk.send(["firstname", "lastname"], "_printString", []), smalltalk.send(classes, "_printString", [])]);
-return self;},
-source: unescape('testEach%0A%09%7Cclasses%7C%0A%09classes%20%3A%3D%20Array%20new.%0A%0A%09%28document%20asJQuery%20find%3A%20%27li%27%29%20each%3A%20%5B%3Aindex%20%3Aelement%7C%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%20%20%09classes%20add%3A%20%28%28JQuery%20fromElement%3Aelement%29%20attr%3A%20%27class%27%29%5D.%0A%09self%20%0A%09%09assert%3A%20%23%28%27firstname%27%20%27lastname%27%29%20printString%0A%09%09equals%3A%20classes%20printString'),
-messageSends: ["new", "each:", "find:", "asJQuery", "add:", "attr:", "fromElement:", "assert:equals:", "printString"],
-referencedClasses: [smalltalk.Array,smalltalk.JQuery]
+return self;}
+]
 }),
 smalltalk.JQueryTest);
 

+ 0 - 0
js/JQuery-Tests.js


+ 8 - 20
js/Kernel-Tests.deploy.js

@@ -3,14 +3,11 @@ smalltalk.addMethod(
 '_testJoin',
 smalltalk.method({
 selector: 'testJoin',
-category: 'tests',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_assert_equals_", [unescape("hello%2Cworld"), smalltalk.send(unescape("%2C"), "_join_", [["hello", "world"]])]);
-return self;},
-source: unescape('testJoin%0A%09self%20assert%3A%20%27hello%2Cworld%27%20equals%3A%20%28%27%2C%27%20join%3A%20%23%28%27hello%27%20%27world%27%29%29'),
-messageSends: ["assert:equals:", "join:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.StringTest);
 
@@ -18,14 +15,11 @@ smalltalk.addMethod(
 '_testStreamContents',
 smalltalk.method({
 selector: 'testStreamContents',
-category: 'tests',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_assert_equals_", ["hello world", smalltalk.send(smalltalk.String, "_streamContents_", [(function(aStream){return (function($rec){smalltalk.send($rec, "_nextPutAll_", ["hello"]);smalltalk.send($rec, "_space", []);return smalltalk.send($rec, "_nextPutAll_", ["world"]);})(aStream);})])]);
-return self;},
-source: unescape('testStreamContents%0A%09self%20%0A%09%09assert%3A%20%27hello%20world%27%20%0A%09%09equals%3A%20%28String%20streamContents%3A%20%5B%3AaStream%7C%20aStream%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27hello%27%3B%20space%3B%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09%09%09%09%09nextPutAll%3A%20%27world%27%5D%29%20'),
-messageSends: ["assert:equals:", "streamContents:", "nextPutAll:", "space"],
-referencedClasses: [smalltalk.String]
+return self;}
+]
 }),
 smalltalk.StringTest);
 
@@ -33,15 +27,12 @@ smalltalk.addMethod(
 '_testIncludesSubString',
 smalltalk.method({
 selector: 'testIncludesSubString',
-category: 'tests',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_assert_", [smalltalk.send("jtalk", "_includesSubString_", ["alk"])]);
 smalltalk.send(self, "_deny_", [smalltalk.send("jtalk", "_includesSubString_", ["zork"])]);
-return self;},
-source: unescape('testIncludesSubString%0A%09self%20assert%3A%20%28%27jtalk%27%20includesSubString%3A%20%27alk%27%29.%0A%09self%20deny%3A%20%28%27jtalk%27%20includesSubString%3A%20%27zork%27%29.'),
-messageSends: ["assert:", "includesSubString:", "deny:"],
-referencedClasses: []
+return self;}
+]
 }),
 smalltalk.StringTest);
 
@@ -52,14 +43,11 @@ smalltalk.addMethod(
 '_testPrintString',
 smalltalk.method({
 selector: 'testPrintString',
-category: 'tests',
 fn: function (){
 var self=this;
 smalltalk.send(self, "_assert_equals_", [unescape("a%20Dictionary%28%27firstname%27%20-%3E%20%27James%27%20%2C%20%27lastname%27%20-%3E%20%27Bond%27%29"), (function($rec){smalltalk.send($rec, "_at_put_", ["firstname", "James"]);smalltalk.send($rec, "_at_put_", ["lastname", "Bond"]);return smalltalk.send($rec, "_printString", []);})(smalltalk.send(smalltalk.Dictionary, "_new", []))]);
-return self;},
-source: unescape('testPrintString%0A%09self%20%0A%09%09assert%3A%20%27a%20Dictionary%28%27%27firstname%27%27%20-%3E%20%27%27James%27%27%20%2C%20%27%27lastname%27%27%20-%3E%20%27%27Bond%27%27%29%27%20%0A%09%09equals%3A%20%28Dictionary%20new%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09at%3A%27firstname%27%20put%3A%20%27James%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09at%3A%27lastname%27%20put%3A%20%27Bond%27%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%09printString%29'),
-messageSends: ["assert:equals:", "at:put:", "printString", "new"],
-referencedClasses: [smalltalk.Dictionary]
+return self;}
+]
 }),
 smalltalk.DictionaryTest);
 

+ 0 - 0
js/Kernel-Tests.js


File diff suppressed because it is too large
+ 62 - 248
js/Kernel.deploy.js


+ 50 - 5
js/Kernel.js

@@ -1129,6 +1129,36 @@ referencedClasses: []
 }),
 smalltalk.Behavior);
 
+smalltalk.addMethod(
+'_methodsFor_stamp_',
+smalltalk.method({
+selector: 'methodsFor:stamp:',
+category: 'accessing',
+fn: function (aString, aStamp){
+var self=this;
+return smalltalk.send(self, "_methodsFor_", [aString]);
+return self;},
+source: unescape('methodsFor%3A%20aString%20stamp%3A%20aStamp%0A%09%22Added%20for%20compatibility%2C%20right%20now%20ignores%20stamp.%22%0A%09%5Eself%20methodsFor%3A%20aString'),
+messageSends: ["methodsFor:"],
+referencedClasses: []
+}),
+smalltalk.Behavior);
+
+smalltalk.addMethod(
+'_commentStamp_prior_',
+smalltalk.method({
+selector: 'commentStamp:prior:',
+category: 'accessing',
+fn: function (aStamp, prior){
+var self=this;
+
+return self;},
+source: unescape('commentStamp%3A%20aStamp%20prior%3A%20prior%0A%20%20%20%20%20%20%20%20%20%22Ignored%20right%20now.%22'),
+messageSends: [],
+referencedClasses: []
+}),
+smalltalk.Behavior);
+
 
 
 smalltalk.addClass('Class', smalltalk.Behavior, [], 'Kernel');
@@ -1241,6 +1271,21 @@ referencedClasses: []
 }),
 smalltalk.Class);
 
+smalltalk.addMethod(
+'_subclass_instanceVariableNames_classVariableNames_poolDictionaries_category_',
+smalltalk.method({
+selector: 'subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:',
+category: 'class creation',
+fn: function (aString, aString2, classVars, pools, aString3){
+var self=this;
+return smalltalk.send(self, "_subclass_instanceVariableNames_category_", [aString, aString2, aString3]);
+return self;},
+source: unescape('subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20classVariableNames%3A%20classVars%20poolDictionaries%3A%20pools%20category%3A%20aString3%0A%09%22Just%20ignore%20class%20variables%20and%20pools.%20Added%20for%20compatibility.%22%0A%09%5Eself%20subclass%3A%20aString%20instanceVariableNames%3A%20aString2%20category%3A%20aString3'),
+messageSends: ["subclass:instanceVariableNames:category:"],
+referencedClasses: []
+}),
+smalltalk.Class);
+
 
 
 smalltalk.addClass('Metaclass', smalltalk.Behavior, [], 'Kernel');
@@ -4796,11 +4841,11 @@ fn: function (aBlock){
 var self=this;
 
 		return self.sort(function(a, b) {
-			if(aBlock(a,b)) {return 1} else {return -1}
+			if(aBlock(a,b)) {return -1} else {return 1}
 		})
 	;
 return self;},
-source: unescape('sort%3A%20aBlock%0A%09%3C%0A%09%09return%20self.sort%28function%28a%2C%20b%29%20%7B%0A%09%09%09if%28aBlock%28a%2Cb%29%29%20%7Breturn%201%7D%20else%20%7Breturn%20-1%7D%0A%09%09%7D%29%0A%09%3E'),
+source: unescape('sort%3A%20aBlock%0A%09%3C%0A%09%09return%20self.sort%28function%28a%2C%20b%29%20%7B%0A%09%09%09if%28aBlock%28a%2Cb%29%29%20%7Breturn%20-1%7D%20else%20%7Breturn%201%7D%0A%09%09%7D%29%0A%09%3E'),
 messageSends: [],
 referencedClasses: []
 }),
@@ -4850,10 +4895,10 @@ selector: 'sorted:',
 category: 'enumerating',
 fn: function (aBlock){
 var self=this;
-return smalltalk.send(smalltalk.send(self, "_copy", []), "_sorted_", [aBlock]);
+return smalltalk.send(smalltalk.send(self, "_copy", []), "_sort_", [aBlock]);
 return self;},
-source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sorted%3A%20aBlock'),
-messageSends: ["sorted:", "copy"],
+source: unescape('sorted%3A%20aBlock%0A%09%5Eself%20copy%20sort%3A%20aBlock'),
+messageSends: ["sort:", "copy"],
 referencedClasses: []
 }),
 smalltalk.Array);

File diff suppressed because it is too large
+ 114 - 285
js/Parser.deploy.js


+ 2 - 2
js/Parser.js

@@ -1643,9 +1643,9 @@ selector: 'exportMethod:of:on:',
 category: 'private',
 fn: function (aMethod, aClass, aStream){
 var self=this;
-(function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.addMethod%28")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", [])]), "__comma", [unescape("%27%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.method%28%7B")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("selector%3A%20%27"), "__comma", [smalltalk.send(aMethod, "_selector", [])]), "__comma", [unescape("%27%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])]), "__comma", [unescape("%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("%5D")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("%7D%29%2C")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%29%3B")]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
+(function($rec){smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.addMethod%28")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("%27"), "__comma", [smalltalk.send(smalltalk.send(aMethod, "_selector", []), "_asSelector", [])]), "__comma", [unescape("%27%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("smalltalk.method%28%7B")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send(smalltalk.send(unescape("selector%3A%20%27"), "__comma", [smalltalk.send(aMethod, "_selector", [])]), "__comma", [unescape("%27%2C")])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("fn: ", "__comma", [smalltalk.send(smalltalk.send(aMethod, "_fn", []), "_compiledSource", [])])]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("%5D")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [unescape("%7D%29%2C")]);smalltalk.send($rec, "_lf", []);smalltalk.send($rec, "_nextPutAll_", [smalltalk.send("smalltalk.", "__comma", [smalltalk.send(self, "_classNameFor_", [aClass])])]);smalltalk.send($rec, "_nextPutAll_", [unescape("%29%3B")]);smalltalk.send($rec, "_lf", []);return smalltalk.send($rec, "_lf", []);})(aStream);
 return self;},
-source: unescape('exportMethod%3A%20aMethod%20of%3A%20aClass%20on%3A%20aStream%0A%09aStream%20%0A%09%09nextPutAll%3A%20%27smalltalk.addMethod%28%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27%27%27%27%2C%20aMethod%20selector%20asSelector%2C%20%27%27%27%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.method%28%7B%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27selector%3A%20%27%27%27%2C%20aMethod%20selector%2C%20%27%27%27%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27fn%3A%20%27%2C%20aMethod%20fn%20compiledSource%2C%20%27%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27%5D%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27%7D%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.%27%2C%20%28self%20classNameFor%3A%20aClass%29%3B%0A%09%09nextPutAll%3A%20%27%29%3B%27%3Blf%3Blf'),
+source: unescape('exportMethod%3A%20aMethod%20of%3A%20aClass%20on%3A%20aStream%0A%09aStream%20%0A%09%09nextPutAll%3A%20%27smalltalk.addMethod%28%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27%27%27%27%2C%20aMethod%20selector%20asSelector%2C%20%27%27%27%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.method%28%7B%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27selector%3A%20%27%27%27%2C%20aMethod%20selector%2C%20%27%27%27%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27fn%3A%20%27%2C%20aMethod%20fn%20compiledSource%3Blf%3B%0A%09%09nextPutAll%3A%20%27%5D%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27%7D%29%2C%27%3Blf%3B%0A%09%09nextPutAll%3A%20%27smalltalk.%27%2C%20%28self%20classNameFor%3A%20aClass%29%3B%0A%09%09nextPutAll%3A%20%27%29%3B%27%3Blf%3Blf'),
 messageSends: ["nextPutAll:", "lf", unescape("%2C"), "asSelector", "selector", "compiledSource", "fn", "classNameFor:"],
 referencedClasses: []
 }),

+ 0 - 20
nodejs/nodecompile.js

@@ -1,20 +0,0 @@
-// NOTE: This code is called using the jtalkc bash script - do not use directly.
-// The arguments variable is a series of .st filenames and category names.
-// If it is a .st file we import it, if it is a category name we export it
-// as aCategoryName.js.
-var sys = require('sys'), fs = require('fs');
-
-// Only care about our arguments, strip away node and all.js
-var arguments = process.argv.splice(2);
-
-// If it ends with .st, import it, otherwise export category as .js
-arguments.forEach(function(val, index, array) {
-  if (/\.st/.test(val)) {
-    sys.puts("Reading file " + val);
-    code = fs.readFileSync(val, "utf8");
-    smalltalk.Importer._new()._import_(code._stream());
-  } else {
-    sys.puts("Exporting category " + val);
-    fs.writeFileSync(val + ".js", smalltalk.Exporter._new()._exportCategory_(val));
-  }
-});

+ 9 - 11
st/IDE.st

@@ -384,7 +384,7 @@ categories
 classes
     ^(Smalltalk current classes 
 	select: [:each | each category = selectedCategory])
-	sort: [:a :b | a name > b name]
+	sort: [:a :b | a name < b name]
 !
 
 protocols
@@ -414,7 +414,7 @@ methods
 		ifNotNil: [klass methodDictionary values]]
 	ifNotNil: [
 	    klass methodDictionary values select: [:each |
-		each category = selectedProtocol]]) sort: [:a :b | a selector > b selector]
+		each category = selectedProtocol]]) sort: [:a :b | a selector < b selector]
 !
 
 source
@@ -517,14 +517,12 @@ showMethodButtons
 
 compile
     self disableSaveButton.
-    selectedTab = #comment
-	ifTrue: [
-		selectedClass ifNotNil: [
-	    		self compileClassComment]]
-	ifFalse: [ 
-  		  (selectedProtocol notNil or: [selectedMethod notNil])
-			ifFalse: [self compileDefinition]
-			ifTrue: [self compileMethodDefinition]].
+    selectedTab = #comment ifTrue: [
+	selectedClass ifNotNil: [
+	    self compileClassComment]].
+    (selectedProtocol notNil or: [selectedMethod notNil])
+	ifFalse: [self compileDefinition]
+	ifTrue: [self compileMethodDefinition]
 !
 
 compileClassComment
@@ -576,7 +574,7 @@ commitCategory
 	    send.
 	(Ajax url: self class commitPathJs, '/', selectedCategory, '.deploy.js')
 	    at: 'type' put: 'PUT';
-	    at: 'data' put: (Exporter new exportCategory: selectedCategory);
+	    at: 'data' put: (StrippedExporter new exportCategory: selectedCategory);
 	    at: 'error' put: [self alert: 'Commit failed!!'];
 	    send.
 	(Ajax url: self class commitPathSt, '/', selectedCategory, '.st')

+ 16 - 2
st/Kernel.st

@@ -375,6 +375,15 @@ allInstanceVariableNames
 
 methodAt: aString
 	<return smalltalk.methods(self)[aString]>
+!
+
+methodsFor: aString stamp: aStamp
+	"Added for compatibility, right now ignores stamp."
+	^self methodsFor: aString
+!
+
+commentStamp: aStamp prior: prior
+         "Ignored right now."
 ! !
 
 !Behavior methodsFor: 'instance creation'!
@@ -422,6 +431,11 @@ subclass: aString instanceVariableNames: anotherString
 subclass: aString instanceVariableNames: aString2 category: aString3
 	^ClassBuilder new
 	    superclass: self subclass: aString instanceVariableNames: aString2 category: 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 category: aString3
 ! !
 
 !Class methodsFor: 'printing'!
@@ -1685,7 +1699,7 @@ sort
 sort: aBlock
 	<
 		return self.sort(function(a, b) {
-			if(aBlock(a,b)) {return 1} else {return -1}
+			if(aBlock(a,b)) {return -1} else {return 1}
 		})
 	>
 !
@@ -1695,7 +1709,7 @@ sorted
 !
 
 sorted: aBlock
-	^self copy sorted: aBlock
+	^self copy sort: aBlock
 !
 
 printString

+ 12 - 28
st/Makefile

@@ -1,23 +1,22 @@
 #
 # This Makefile takes .st files in the jtalk/st directory and produces compiled
-# javascript files from them. It also produces one or more concatenated jtalk.js files
-# for development and deployment.
+# javascript files from them, for both debug and deployment.
 #
-# Where we find the current runnable code and where we put our js files when we are done
+# Where we find the current runnable code and where we put our js files on install
 JS	:= ../js/
 
 # The compiler script
 JTALKC	:= ../bin/jtalkc
 
 # Generic flags to JTALKC
-FLAGS   := -g
+FLAGS   := -d
 
 # All corresponding js filenames for every st file available
 # In other words, if we have Kernel.st and Parser.st, then OBJECTS will be "Kernel.js Parser.js"
 OBJECTS := $(patsubst %.st,%.js,$(wildcard *.st))
 
 # Default make target since it is the first target in this Makefile
-all: jtalk.deploy.js jtalk.js
+all: Examples.js
 
 # Step by step
 #
@@ -26,15 +25,11 @@ all: jtalk.deploy.js jtalk.js
 boot.js init.js:
 	cp ../js/$@ .
 
-# Then we compile Kernel.st using boot.js, Kernel.js, init.js
+# Then we compile Kernel.st depending on having using boot.js and init.js
 # $< means the first dependency - in other words Kernel.st
 Kernel.js: Kernel.st boot.js init.js
 	$(JTALKC) $(FLAGS) $<
 
-# And one for deployment, no flags.
-deploy-Kernel.js: Kernel.st boot.js init.js
-	$(JTALKC) -p deploy- $<
-
 # ...then Parser, but using the new Kernel from step above.
 # We only need to depend on Kernel.js since it in turn depends on boot.js and init.js.
 Parser.js: Parser.st Kernel.js
@@ -46,8 +41,8 @@ Compiler.js: Compiler.st Parser.js
 	$(JTALKC) $(FLAGS) $<
 
 # ...now that we have a new Kernel/Parser/Compiler we use them
-# to compile the rest of st files that only depend on Compiler, like
-# for example Canvas.js, Benchfib.js etc
+# to compile the rest of st files presuming that they only depend on Compiler, like
+# for example Canvas.js and Benchfib.js.
 %.js: %.st Compiler.js 
 	$(JTALKC) $(FLAGS) $<
 
@@ -57,37 +52,26 @@ Compiler.js: Compiler.st Parser.js
 #
 # JQuery uses Canvas
 JQuery.js: JQuery.st Canvas.js
-	$(JTALKC) $(FLAGS) -l Canvas.js $<
+	$(JTALKC) $(FLAGS) -l Canvas $<
 
 # IDE uses JQuery
 IDE.js: IDE.st JQuery.js
-	$(JTALKC) $(FLAGS) -l Canvas.js,JQuery.js $<
+	$(JTALKC) $(FLAGS) -l Canvas,JQuery $<
 
 # The SUnit TestRunner uses UI stuff from IDE.
 SUnit.js: SUnit.st IDE.js
-	$(JTALKC) $(FLAGS) -l Canvas.js,JQuery.js,IDE.js $<
+	$(JTALKC) $(FLAGS) -l Canvas,JQuery,IDE $<
 
 # Some Examples use SUnit
 Examples.js: Examples.st SUnit.js
-	$(JTALKC) $(FLAGS) -l Canvas.js,JQuery.js,IDE.js,SUnit.js $<;
-
-# This is the deployment target with only the Jtalk Kernel compiled without -g.
-# Then we push it all through Closure (-O) and add init.js at end (-I).
-jtalk.deploy.js: boot.js init.js deploy-Kernel.js
-	$(JTALKC) -O -I boot.js deploy-Kernel.js jtalk.deploy;
-
-# Full IDE compiled with -g. We do not clean away objects at end.
-# Here we give -J (will include all  libs for Jtalk IDE),
-# push it all through Closure (-O) and add init.js at end (-I).
-jtalk.js: boot.js init.js $(OBJECTS)
-	$(JTALKC) -J -O -I jtalk;
+	$(JTALKC) $(FLAGS) -l Canvas,JQuery,IDE,SUnit $<;
 
 
 # Installing is simply copying all js files to js directory.
 install: all
 	cp *.js $(JS)
 
-# And cleaning is trivial
+# And cleaning is trivial also
 clean:
 	rm -f *.js; 
 

+ 1 - 1
st/Parser.st

@@ -987,7 +987,7 @@ exportMethod: aMethod of: aClass on: aStream
 		nextPutAll: '''', aMethod selector asSelector, ''',';lf;
 		nextPutAll: 'smalltalk.method({';lf;
 		nextPutAll: 'selector: ''', aMethod selector, ''',';lf;
-		nextPutAll: 'fn: ', aMethod fn compiledSource, ',';lf;
+		nextPutAll: 'fn: ', aMethod fn compiledSource;lf;
 		nextPutAll: ']';lf;
 		nextPutAll: '}),';lf;
 		nextPutAll: 'smalltalk.', (self classNameFor: aClass);

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