Browse Source

bump trysmalltalk and re-`bower install` the rest

Herbert Vojčík 9 years ago
parent
commit
c580f1482c
100 changed files with 9005 additions and 6493 deletions
  1. 2 2
      bower.json
  2. 0 6
      bower_components/amber-attic/local.amd.json
  3. 43 0
      bower_components/amber-contrib-jquery/.bower.json
  4. 5 5
      bower_components/amber-contrib-jquery/LICENSE
  5. 4 0
      bower_components/amber-contrib-jquery/README.md
  6. 34 0
      bower_components/amber-contrib-jquery/bower.json
  7. 0 0
      bower_components/amber-contrib-jquery/jquery.amd.json
  8. 11 0
      bower_components/amber-contrib-jquery/local.amd.json
  9. 31 0
      bower_components/amber-contrib-jquery/package.json
  10. 257 0
      bower_components/amber-contrib-jquery/src/Wrappers-JQuery.js
  11. 59 0
      bower_components/amber-contrib-jquery/src/Wrappers-JQuery.st
  12. 12 12
      bower_components/amber-contrib-legacy/.bower.json
  13. 1 1
      bower_components/amber-contrib-legacy/Gruntfile.js
  14. 0 0
      bower_components/amber-contrib-legacy/LICENSE-MIT
  15. 0 0
      bower_components/amber-contrib-legacy/README.md
  16. 5 5
      bower_components/amber-contrib-legacy/bower.json
  17. 0 0
      bower_components/amber-contrib-legacy/codemirror.amd.json
  18. 3 3
      bower_components/amber-contrib-legacy/deploy.js
  19. 0 0
      bower_components/amber-contrib-legacy/devel.js
  20. 1 1
      bower_components/amber-contrib-legacy/index.html
  21. 0 0
      bower_components/amber-contrib-legacy/jquery-ui.amd.json
  22. 14 0
      bower_components/amber-contrib-legacy/local.amd.json
  23. 5 5
      bower_components/amber-contrib-legacy/package.json
  24. 0 0
      bower_components/amber-contrib-legacy/require-css.amd.json
  25. 0 0
      bower_components/amber-contrib-legacy/resources/amber.css
  26. 0 0
      bower_components/amber-contrib-legacy/resources/off.amber.png
  27. 0 0
      bower_components/amber-contrib-legacy/resources/offHover.amber.png
  28. 0 0
      bower_components/amber-contrib-legacy/resources/sprite.amber.png
  29. 0 0
      bower_components/amber-contrib-legacy/resources/tinylogo.amber.png
  30. 2 2
      bower_components/amber-contrib-legacy/src/Benchfib.js
  31. 0 0
      bower_components/amber-contrib-legacy/src/Benchfib.st
  32. 2 2
      bower_components/amber-contrib-legacy/src/Examples.js
  33. 0 0
      bower_components/amber-contrib-legacy/src/Examples.st
  34. 20 312
      bower_components/amber-contrib-legacy/src/IDE.js
  35. 6 93
      bower_components/amber-contrib-legacy/src/IDE.st
  36. 44 0
      bower_components/amber-contrib-web/.bower.json
  37. 22 0
      bower_components/amber-contrib-web/LICENSE
  38. 4 0
      bower_components/amber-contrib-web/README.md
  39. 35 0
      bower_components/amber-contrib-web/bower.json
  40. 13 0
      bower_components/amber-contrib-web/local.amd.json
  41. 32 0
      bower_components/amber-contrib-web/package.json
  42. 108 407
      bower_components/amber-contrib-web/src/Web.js
  43. 19 96
      bower_components/amber-contrib-web/src/Web.st
  44. 5 11
      bower_components/amber/.bower.json
  45. 103 0
      bower_components/amber/API-CHANGES.txt
  46. 85 1
      bower_components/amber/CHANGELOG
  47. 7 5
      bower_components/amber/CONTRIBUTING.md
  48. 123 84
      bower_components/amber/Gruntfile.js
  49. 24 7
      bower_components/amber/README.md
  50. 2 8
      bower_components/amber/bower.json
  51. 7 0
      bower_components/amber/config-node.js
  52. 6 0
      bower_components/amber/local.amd.json
  53. 5 5
      bower_components/amber/package.json
  54. 1 1
      bower_components/amber/src/Compiler-AST.js
  55. 138 87
      bower_components/amber/src/Compiler-Core.js
  56. 41 22
      bower_components/amber/src/Compiler-Core.st
  57. 1 1
      bower_components/amber/src/Compiler-Exceptions.js
  58. 1 1
      bower_components/amber/src/Compiler-IR.js
  59. 1 1
      bower_components/amber/src/Compiler-Inlining.js
  60. 6 6
      bower_components/amber/src/Compiler-Interpreter.js
  61. 2 2
      bower_components/amber/src/Compiler-Interpreter.st
  62. 71 14
      bower_components/amber/src/Compiler-Semantic.js
  63. 20 5
      bower_components/amber/src/Compiler-Semantic.st
  64. 1 1
      bower_components/amber/src/Compiler-Tests.js
  65. 1 1
      bower_components/amber/src/Kernel-Announcements.js
  66. 4 374
      bower_components/amber/src/Kernel-Classes.js
  67. 1 96
      bower_components/amber/src/Kernel-Classes.st
  68. 635 321
      bower_components/amber/src/Kernel-Collections.js
  69. 164 93
      bower_components/amber/src/Kernel-Collections.st
  70. 1 7
      bower_components/amber/src/Kernel-Exceptions.js
  71. 0 6
      bower_components/amber/src/Kernel-Exceptions.st
  72. 1229 3261
      bower_components/amber/src/Kernel-Infrastructure.js
  73. 54 582
      bower_components/amber/src/Kernel-Infrastructure.st
  74. 9 7
      bower_components/amber/src/Kernel-Methods.js
  75. 3 1
      bower_components/amber/src/Kernel-Methods.st
  76. 98 106
      bower_components/amber/src/Kernel-Objects.js
  77. 18 37
      bower_components/amber/src/Kernel-Objects.st
  78. 464 40
      bower_components/amber/src/Kernel-Tests.js
  79. 94 5
      bower_components/amber/src/Kernel-Tests.st
  80. 0 115
      bower_components/amber/src/Kernel-Transcript.js
  81. 0 35
      bower_components/amber/src/Kernel-Transcript.st
  82. 325 0
      bower_components/amber/src/Platform-Browser.js
  83. 73 0
      bower_components/amber/src/Platform-Browser.st
  84. 539 63
      bower_components/amber/src/Platform-ImportExport.js
  85. 156 36
      bower_components/amber/src/Platform-ImportExport.st
  86. 116 0
      bower_components/amber/src/Platform-Node.js
  87. 29 0
      bower_components/amber/src/Platform-Node.st
  88. 2729 0
      bower_components/amber/src/Platform-Services.js
  89. 722 0
      bower_components/amber/src/Platform-Services.st
  90. 1 1
      bower_components/amber/src/SUnit-Tests.js
  91. 1 1
      bower_components/amber/src/SUnit.js
  92. 58 73
      bower_components/amber/support/boot.js
  93. 2 3
      bower_components/amber/support/deploy.js
  94. 1 1
      bower_components/amber/support/lang.js
  95. 4 4
      bower_components/codemirror/.bower.json
  96. 9 0
      bower_components/codemirror/AUTHORS
  97. 2 1
      bower_components/codemirror/README.md
  98. 6 4
      bower_components/codemirror/addon/edit/closebrackets.js
  99. 1 1
      bower_components/codemirror/addon/edit/closetag.js
  100. 12 4
      bower_components/codemirror/addon/fold/foldgutter.js

+ 2 - 2
bower.json

@@ -26,8 +26,8 @@
   ],
   "private": false,
   "dependencies": {
-    "amber": "0.14.3",
-    "trysmalltalk": "0.1.1"
+    "amber": "*",
+    "trysmalltalk": "0.1.2"
   },
   "devDependencies": {
     "amber-ide-starter-dialog": "^0.1.0",

+ 0 - 6
bower_components/amber-attic/local.amd.json

@@ -1,6 +0,0 @@
-{
-    "paths": {
-        "amber-attic": "src",
-        "amber-attic/resources": "resources"
-    }
-}

+ 43 - 0
bower_components/amber-contrib-jquery/.bower.json

@@ -0,0 +1,43 @@
+{
+  "name": "amber-contrib-jquery",
+  "version": "0.1.0",
+  "homepage": "https://github.com/amber-smalltalk/amber-contrib-jquery",
+  "description": "Amber Smalltalk wrapper around jQuery",
+  "main": "local.amd.json",
+  "moduleType": [
+    "amd"
+  ],
+  "keywords": [
+    "amber",
+    "smalltalk",
+    "jquery"
+  ],
+  "license": "MIT",
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "/*.js",
+    "/*.html",
+    "test",
+    "tests"
+  ],
+  "dependencies": {
+    "amber": "*",
+    "jquery": ">=1.7.0"
+  },
+  "devDependencies": {
+    "amber-ide-starter-dialog": "^0.1.0",
+    "amber-contrib-legacy": "^0.2.0",
+    "helios": ">=0.4.3"
+  },
+  "_release": "0.1.0",
+  "_resolution": {
+    "type": "version",
+    "tag": "0.1.0",
+    "commit": "5865bc6a47e13dfe0c617897f6c3bcc09302d7a3"
+  },
+  "_source": "git://github.com/amber-smalltalk/amber-contrib-jquery.git",
+  "_target": ">=0.1.0",
+  "_originalSource": "amber-contrib-jquery"
+}

+ 5 - 5
bower_components/es5-shim/LICENSE → bower_components/amber-contrib-jquery/LICENSE

@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (C) 2009-2014 Kristopher Michael Kowal and contributors
+Copyright (c) 2015 Amber
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
@@ -9,14 +9,14 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
 

+ 4 - 0
bower_components/amber-contrib-jquery/README.md

@@ -0,0 +1,4 @@
+# amber-contrib-jquery
+Amber Smalltalk wrapper around jQuery(obj[, context]) via #asJQuery:[inContext:]
+
+Fromerly part of core Amber, now extracted to own repository.

+ 34 - 0
bower_components/amber-contrib-jquery/bower.json

@@ -0,0 +1,34 @@
+{
+  "name": "amber-contrib-jquery",
+  "version": "0.1.0",
+  "homepage": "https://github.com/amber-smalltalk/amber-contrib-jquery",
+  "description": "Amber Smalltalk wrapper around jQuery",
+  "main": "local.amd.json",
+  "moduleType": [
+    "amd"
+  ],
+  "keywords": [
+    "amber",
+    "smalltalk",
+    "jquery"
+  ],
+  "license": "MIT",
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "/*.js",
+    "/*.html",
+    "test",
+    "tests"
+  ],
+  "dependencies": {
+    "amber": "*",
+    "jquery": ">=1.7.0"
+  },
+  "devDependencies": {
+    "amber-ide-starter-dialog": "^0.1.0",
+    "amber-contrib-legacy": "^0.2.0",
+    "helios": ">=0.4.3"
+  }
+}

+ 0 - 0
bower_components/amber/jquery.amd.json → bower_components/amber-contrib-jquery/jquery.amd.json


+ 11 - 0
bower_components/amber-contrib-jquery/local.amd.json

@@ -0,0 +1,11 @@
+{
+    "paths": {
+        "amber/jquery": "src"
+    },
+  "map": {
+    "*": {
+      "00comment": "These are backward compatibility pointers.",
+      "amber-contrib-jquery/Wrappers-JQuery": "amber/jquery/Wrappers-JQuery"
+    }
+  }
+}

+ 31 - 0
bower_components/amber-contrib-jquery/package.json

@@ -0,0 +1,31 @@
+{
+  "name": "amber-contrib-jquery",
+  "version": "0.1.0",
+  "description": "Amber Smalltalk wrapper around jQuery",
+  "main": "local.amd.json",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/amber-smalltalk/amber-contrib-jquery"
+  },
+  "keywords": [
+    "amber",
+    "smalltalk",
+    "jquery"
+  ],
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/amber-smalltalk/amber-contrib-jquery/issues"
+  },
+  "homepage": "https://github.com/amber-smalltalk/amber-contrib-jquery",
+  "devDependencies": {
+    "amber-dev": "^0.4.0",
+    "grunt": "^0.4.5",
+    "grunt-contrib-clean": "^0.6.0",
+    "grunt-contrib-requirejs": "^0.4.4",
+    "grunt-execute": "^0.2.2",
+    "requirejs": "^2.1.15"
+  }
+}

+ 257 - 0
bower_components/amber-contrib-jquery/src/Wrappers-JQuery.js

@@ -0,0 +1,257 @@
+define("amber/jquery/Wrappers-JQuery", ["amber/boot"
+//>>excludeStart("imports", pragmas.excludeImports);
+, "jquery"
+//>>excludeEnd("imports");
+, "amber_core/Kernel-Objects", "amber_core/Kernel-Methods", "amber_core/Kernel-Collections", "amber_core/Kernel-Infrastructure"], function($boot
+//>>excludeStart("imports", pragmas.excludeImports);
+,jQuery
+//>>excludeEnd("imports");
+){
+var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+$core.addPackage('Wrappers-JQuery');
+$core.packages["Wrappers-JQuery"].innerEval = function (expr) { return eval(expr); };
+$core.packages["Wrappers-JQuery"].imports = ["jQuery=jquery"];
+$core.packages["Wrappers-JQuery"].transport = {"type":"amd","amdNamespace":"amber/jquery"};
+
+$core.addClass('JQuery', $globals.Object, [], 'Wrappers-JQuery');
+
+$core.addMethod(
+$core.method({
+selector: "current",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+var $1;
+$1=jQuery;
+return $1;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "current\x0a\x09^ jQuery",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.JQuery.klass);
+
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($Smalltalk())._optOut_(jQuery);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.JQuery.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09\x22Allow JS method calls for the jQuery object.\x0a\x09See boot.js DNU handling.\x22\x0a\x09\x0a\x09Smalltalk optOut: jQuery",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["optOut:"]
+}),
+$globals.JQuery.klass);
+
+$core.addMethod(
+$core.method({
+selector: "asJQuery",
+protocol: '*Wrappers-JQuery',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv([self])._asJQuery();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},$globals.BlockClosure)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asJQuery\x0a\x09^ {self} asJQuery",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["asJQuery"]
+}),
+$globals.BlockClosure);
+
+$core.addMethod(
+$core.method({
+selector: "asJQueryInContext:",
+protocol: '*Wrappers-JQuery',
+fn: function (aContext){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv([self])._asJQueryInContext_(aContext);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJQueryInContext:",{aContext:aContext},$globals.BlockClosure)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aContext"],
+source: "asJQueryInContext: aContext\x0a\x09^ {self} asJQueryInContext: aContext",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["asJQueryInContext:"]
+}),
+$globals.BlockClosure);
+
+$core.addMethod(
+$core.method({
+selector: "asJQuery",
+protocol: '*Wrappers-JQuery',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return jQuery(self['@jsObject']);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},$globals.JSObjectProxy)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asJQuery\x0a\x09<return jQuery(self['@jsObject'])>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.JSObjectProxy);
+
+$core.addMethod(
+$core.method({
+selector: "asJQueryInContext:",
+protocol: '*Wrappers-JQuery',
+fn: function (aContext){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return jQuery(self['@jsObject'], aContext);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJQueryInContext:",{aContext:aContext},$globals.JSObjectProxy)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aContext"],
+source: "asJQueryInContext: aContext\x0a\x09<return jQuery(self['@jsObject'], aContext)>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.JSObjectProxy);
+
+$core.addMethod(
+$core.method({
+selector: "asJQuery",
+protocol: '*Wrappers-JQuery',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return jQuery(self);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},$globals.Object)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asJQuery\x0a\x09<return jQuery(self)>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.Object);
+
+$core.addMethod(
+$core.method({
+selector: "asJQueryInContext:",
+protocol: '*Wrappers-JQuery',
+fn: function (aContext){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return jQuery(self, aContext);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJQueryInContext:",{aContext:aContext},$globals.Object)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aContext"],
+source: "asJQueryInContext: aContext\x0a\x09<return jQuery(self, aContext)>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.Object);
+
+$core.addMethod(
+$core.method({
+selector: "asJQuery",
+protocol: '*Wrappers-JQuery',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return jQuery(String(self));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},$globals.String)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asJQuery\x0a\x09<return jQuery(String(self))>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.String);
+
+$core.addMethod(
+$core.method({
+selector: "asJQueryInContext:",
+protocol: '*Wrappers-JQuery',
+fn: function (aContext){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return jQuery(String(self), aContext);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"asJQueryInContext:",{aContext:aContext},$globals.String)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aContext"],
+source: "asJQueryInContext: aContext\x0a\x09<return jQuery(String(self), aContext)>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.String);
+
+});

+ 59 - 0
bower_components/amber-contrib-jquery/src/Wrappers-JQuery.st

@@ -0,0 +1,59 @@
+Smalltalk createPackage: 'Wrappers-JQuery'!
+(Smalltalk packageAt: 'Wrappers-JQuery') imports: {'jQuery' -> 'jquery'}!
+Object subclass: #JQuery
+	instanceVariableNames: ''
+	package: 'Wrappers-JQuery'!
+
+!JQuery class methodsFor: 'initialization'!
+
+current
+	^ jQuery
+!
+
+initialize
+	"Allow JS method calls for the jQuery object.
+	See boot.js DNU handling."
+	
+	Smalltalk optOut: jQuery
+! !
+
+!BlockClosure methodsFor: '*Wrappers-JQuery'!
+
+asJQuery
+	^ {self} asJQuery
+!
+
+asJQueryInContext: aContext
+	^ {self} asJQueryInContext: aContext
+! !
+
+!JSObjectProxy methodsFor: '*Wrappers-JQuery'!
+
+asJQuery
+	<return jQuery(self['@jsObject'])>
+!
+
+asJQueryInContext: aContext
+	<return jQuery(self['@jsObject'], aContext)>
+! !
+
+!Object methodsFor: '*Wrappers-JQuery'!
+
+asJQuery
+	<return jQuery(self)>
+!
+
+asJQueryInContext: aContext
+	<return jQuery(self, aContext)>
+! !
+
+!String methodsFor: '*Wrappers-JQuery'!
+
+asJQuery
+	<return jQuery(String(self))>
+!
+
+asJQueryInContext: aContext
+	<return jQuery(String(self), aContext)>
+! !
+

+ 12 - 12
bower_components/amber-attic/.bower.json → bower_components/amber-contrib-legacy/.bower.json

@@ -1,7 +1,7 @@
 {
-  "name": "amber-attic",
+  "name": "amber-contrib-legacy",
   "description": "Legacy IDE and a few other old non-core packages",
-  "version": "0.1.3",
+  "version": "0.2.1",
   "ignore": [
     "**/.*",
     "node_modules",
@@ -18,7 +18,7 @@
       "email": "herby@mailbox.sk"
     }
   ],
-  "homepage": "https://github.com/amber-smalltalk/amber-attic",
+  "homepage": "https://github.com/amber-smalltalk/amber-contrib-legacy",
   "keywords": [
     "Amber",
     "Smalltalk"
@@ -28,23 +28,23 @@
   ],
   "private": false,
   "dependencies": {
-    "amber": ">=0.14.1",
+    "amber": ">=0.14.14",
+    "amber-contrib-web": ">=0.1.0",
     "jquery-ui": ">=1.9.2",
     "codemirror": "^4.7.0",
     "require-css": "^0.1.2"
   },
   "devDependencies": {
     "amber-ide-starter-dialog": "^0.1.0",
-    "amber": ">=0.14.3",
-    "helios": "^0.3.2"
+    "helios": ">=0.5.0"
   },
-  "_release": "0.1.3",
+  "_release": "0.2.1",
   "_resolution": {
     "type": "version",
-    "tag": "0.1.3",
-    "commit": "0896995751413cf1686f2c756af16d3d3290e523"
+    "tag": "0.2.1",
+    "commit": "19dc92309c7557c96c5ecba22a4c5883d868a8ca"
   },
-  "_source": "git://github.com/amber-smalltalk/amber-attic.git",
-  "_target": "^0.1.1",
-  "_originalSource": "amber-attic"
+  "_source": "git://github.com/amber-smalltalk/amber-contrib-legacy.git",
+  "_target": "^0.2.0",
+  "_originalSource": "amber-contrib-legacy"
 }

+ 1 - 1
bower_components/amber-attic/Gruntfile.js → bower_components/amber-contrib-legacy/Gruntfile.js

@@ -45,7 +45,7 @@ module.exports = function (grunt) {
                     'src/Benchfib.st', 'src/Examples.st', 'src/IDE.st' // list all sources in dependency order
                     // list all tests in dependency order
                 ],
-                amd_namespace: 'amber-attic',
+                amd_namespace: 'amber/legacy',
                 libraries: ['Web']
             }
         },

+ 0 - 0
bower_components/amber-attic/LICENSE-MIT → bower_components/amber-contrib-legacy/LICENSE-MIT


+ 0 - 0
bower_components/amber-attic/README.md → bower_components/amber-contrib-legacy/README.md


+ 5 - 5
bower_components/amber-attic/bower.json → bower_components/amber-contrib-legacy/bower.json

@@ -1,7 +1,7 @@
 {
-    "name": "amber-attic",
+    "name": "amber-contrib-legacy",
     "description": "Legacy IDE and a few other old non-core packages",
-    "version": "0.1.3",
+    "version": "0.2.1",
     "ignore": [
         "**/.*",
         "node_modules",
@@ -28,14 +28,14 @@
     ],
     "private": false,
     "dependencies": {
-        "amber": ">=0.14.1",
+        "amber": ">=0.14.14",
+        "amber-contrib-web": ">=0.1.0",
         "jquery-ui": ">=1.9.2",
         "codemirror": "^4.7.0",
         "require-css": "^0.1.2"
     },
     "devDependencies": {
         "amber-ide-starter-dialog": "^0.1.0",
-        "amber": ">=0.14.3",
-        "helios": "^0.3.2"
+        "helios": ">=0.5.0"
     }
 }

+ 0 - 0
bower_components/amber-attic/codemirror.amd.json → bower_components/amber-contrib-legacy/codemirror.amd.json


+ 3 - 3
bower_components/amber-attic/deploy.js → bower_components/amber-contrib-legacy/deploy.js

@@ -1,9 +1,9 @@
 define([
     'amber/deploy',
     // --- packages to be deployed begin here ---
-    'amber-attic/Benchfib',
-    'amber-attic/Examples',
-    'amber-attic/IDE'
+    'amber/legacy/Benchfib',
+    'amber/legacy/Examples',
+    'amber/legacy/IDE'
     // --- packages to be deployed end here ---
 ], function (amber) {
     return amber;

+ 0 - 0
bower_components/amber-attic/devel.js → bower_components/amber-contrib-legacy/devel.js


+ 1 - 1
bower_components/amber-attic/index.html → bower_components/amber-contrib-legacy/index.html

@@ -13,7 +13,7 @@
       require(['app'], function (amber) {
           amber.initialize({
             //used for all new packages in IDE
-            'transport.defaultAmdNamespace': "amber-attic"
+            'transport.defaultAmdNamespace': "amber/legacy"
           });
           require(["amber-ide-starter-dialog"], function (dlg) { dlg.start(); });
       });

+ 0 - 0
bower_components/amber-attic/jquery-ui.amd.json → bower_components/amber-contrib-legacy/jquery-ui.amd.json


+ 14 - 0
bower_components/amber-contrib-legacy/local.amd.json

@@ -0,0 +1,14 @@
+{
+  "paths": {
+    "amber/legacy": "src",
+    "amber/legacy/resources": "resources"
+  },
+  "map": {
+    "*": {
+      "00comment": "These are backward compatibility pointers.",
+      "amber-attic/Benchfib": "amber/legacy/Benchfib",
+      "amber-attic/Examples": "amber/legacy/Examples",
+      "amber-attic/IDE": "amber/legacy/IDE"
+    }
+  }
+}

+ 5 - 5
bower_components/amber-attic/package.json → bower_components/amber-contrib-legacy/package.json

@@ -1,8 +1,8 @@
 {
-  "name": "amber-attic",
+  "name": "amber-contrib-legacy",
   "title": "Amber legacy items",
   "description": "Legacy IDE and a few other old non-core packages",
-  "version": "0.1.3",
+  "version": "0.2.1",
   "homepage": "",
   "author": {
     "name": "Herbert Vojčík",
@@ -10,7 +10,7 @@
   },
   "repository": {
     "type": "git",
-    "url": "git://guthub.com/amber-smalltalk/amber-attic.git"
+    "url": "git://github.com/amber-smalltalk/amber-contrib-legacy.git"
   },
   "licenses": [
     {
@@ -19,13 +19,13 @@
     }
   ],
   "engines": {
-    "node": ">= 0.8.0"
+    "node": ">=0.10.0"
   },
   "scripts": {
     "test": "grunt test"
   },
   "devDependencies": {
-    "amber-dev": "^0.3.0",
+    "amber-dev": "^0.5.0",
     "grunt": "^0.4.5",
     "grunt-contrib-requirejs": "^0.4.4",
     "requirejs": "^2.1.15"

+ 0 - 0
bower_components/amber-attic/require-css.amd.json → bower_components/amber-contrib-legacy/require-css.amd.json


+ 0 - 0
bower_components/amber-attic/resources/amber.css → bower_components/amber-contrib-legacy/resources/amber.css


+ 0 - 0
bower_components/amber-attic/resources/off.amber.png → bower_components/amber-contrib-legacy/resources/off.amber.png


+ 0 - 0
bower_components/amber-attic/resources/offHover.amber.png → bower_components/amber-contrib-legacy/resources/offHover.amber.png


+ 0 - 0
bower_components/amber-attic/resources/sprite.amber.png → bower_components/amber-contrib-legacy/resources/sprite.amber.png


+ 0 - 0
bower_components/amber-attic/resources/tinylogo.amber.png → bower_components/amber-contrib-legacy/resources/tinylogo.amber.png


+ 2 - 2
bower_components/amber-attic/src/Benchfib.js → bower_components/amber-contrib-legacy/src/Benchfib.js

@@ -1,8 +1,8 @@
-define("amber-attic/Benchfib", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
+define("amber/legacy/Benchfib", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Benchfib');
 $core.packages["Benchfib"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Benchfib"].transport = {"type":"amd","amdNamespace":"amber-attic"};
+$core.packages["Benchfib"].transport = {"type":"amd","amdNamespace":"amber/legacy"};
 
 $core.addClass('Benchfib', $globals.Object, [], 'Benchfib');
 

+ 0 - 0
bower_components/amber-attic/src/Benchfib.st → bower_components/amber-contrib-legacy/src/Benchfib.st


+ 2 - 2
bower_components/amber-attic/src/Examples.js → bower_components/amber-contrib-legacy/src/Examples.js

@@ -1,8 +1,8 @@
-define("amber-attic/Examples", ["amber/boot", "amber_core/Web"], function($boot){
+define("amber/legacy/Examples", ["amber/boot", "amber/web/Web"], function($boot){
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Examples');
 $core.packages["Examples"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Examples"].transport = {"type":"amd","amdNamespace":"amber-attic"};
+$core.packages["Examples"].transport = {"type":"amd","amdNamespace":"amber/legacy"};
 
 $core.addClass('Counter', $globals.Widget, ['count', 'header'], 'Examples');
 //>>excludeStart("ide", pragmas.excludeIdeData);

+ 0 - 0
bower_components/amber-attic/src/Examples.st → bower_components/amber-contrib-legacy/src/Examples.st


+ 20 - 312
bower_components/amber-attic/src/IDE.js → bower_components/amber-contrib-legacy/src/IDE.js

@@ -1,9 +1,17 @@
-define("amber-attic/IDE", ["amber/boot", "codemirror/lib/codemirror", "codemirror/mode/smalltalk/smalltalk", "codemirror/addon/hint/show-hint", "css!codemirror/theme/ambiance", "css!codemirror/lib/codemirror", "css!codemirror/addon/hint/show-hint", "jquery-ui", "css!./resources/amber", "amber_core/Web", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function($boot){
+define("amber/legacy/IDE", ["amber/boot"
+//>>excludeStart("imports", pragmas.excludeImports);
+, "codemirror/addon/hint/show-hint", "codemirror/lib/codemirror", "codemirror/mode/smalltalk/smalltalk", "css!./resources/amber", "css!codemirror/addon/hint/show-hint", "css!codemirror/lib/codemirror", "css!codemirror/theme/ambiance", "jquery-ui"
+//>>excludeEnd("imports");
+, "amber/web/Web", "amber_core/Kernel-Objects"], function($boot
+//>>excludeStart("imports", pragmas.excludeImports);
+
+//>>excludeEnd("imports");
+){
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('IDE');
 $core.packages["IDE"].innerEval = function (expr) { return eval(expr); };
 $core.packages["IDE"].imports = ["codemirror/addon/hint/show-hint", "codemirror/lib/codemirror", "codemirror/mode/smalltalk/smalltalk", "css!./resources/amber", "css!codemirror/addon/hint/show-hint", "css!codemirror/lib/codemirror", "css!codemirror/theme/ambiance", "jquery-ui"];
-$core.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber-attic"};
+$core.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber/legacy"};
 
 $core.addClass('ClassesList', $globals.Widget, ['browser', 'ul', 'nodes'], 'IDE');
 $core.addMethod(
@@ -3444,9 +3452,9 @@ selector: "compileMethodDefinitionFor:",
 protocol: 'actions',
 fn: function (aClass){
 var self=this;
-var compiler,method,source,node;
+var compiler,package_,method,compiledSource,source,node;
 function $Compiler(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
-function $PlatformInterface(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -3485,13 +3493,14 @@ $ctx1.sendIdx[","]=1;
 $3=self._alert_($4);
 return $3;
 };
-$recv(compiler)._currentClass_(aClass);
-method=$recv(compiler)._eval_($recv(compiler)._compileNode_(node));
+package_=$recv(aClass)._packageOfProtocol_(self["@selectedProtocol"]);
+compiledSource=$recv(compiler)._compileNode_forClass_package_(node,aClass,package_);
+method=$recv(compiler)._eval_forPackage_(compiledSource,package_);
 $recv($recv(compiler)._unknownVariables())._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$7=$recv($PlatformInterface())._existsGlobal_(each);
+$7=$recv($Smalltalk())._existsJsGlobal_(each);
 if(!$core.assert($7)){
 $9=$recv("Declare '".__comma(each)).__comma("' as instance variable?");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -3515,15 +3524,15 @@ return self;
 }
 catch(e) {if(e===$early)return e[0]; throw e}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},$globals.Browser)});
+}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,package_:package_,method:method,compiledSource:compiledSource,source:source,node:node},$globals.Browser)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass"],
-source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod protocol ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^ self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [ :each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(PlatformInterface existsGlobal: each) ifFalse: [\x0a\x09\x09(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^ self compileMethodDefinitionFor: aClass ]] ].\x0a\x09ClassBuilder new installMethod: method forClass: aClass protocol: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
-referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"],
+source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler package method compiledSource source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod protocol ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^ self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].\x0a\x09package := aClass packageOfProtocol: selectedProtocol.\x0a\x09compiledSource := compiler compileNode: node forClass: aClass package: package.\x0a\x09method := compiler eval: compiledSource forPackage: package.\x0a\x09compiler unknownVariables do: [ :each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(Smalltalk existsJsGlobal: each) ifFalse: [\x0a\x09\x09(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^ self compileMethodDefinitionFor: aClass ]] ].\x0a\x09ClassBuilder new installMethod: method forClass: aClass protocol: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
+referencedClasses: ["Compiler", "Smalltalk", "ClassBuilder"],
 //>>excludeEnd("ide");
-messageSends: ["val", "ifNil:", "protocol", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:protocol:", "updateMethodsList", "selectMethod:"]
+messageSends: ["val", "ifNil:", "protocol", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "packageOfProtocol:", "compileNode:forClass:package:", "eval:forPackage:", "do:", "unknownVariables", "ifFalse:", "existsJsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:protocol:", "updateMethodsList", "selectMethod:"]
 }),
 $globals.Browser);
 
@@ -10917,305 +10926,4 @@ messageSends: ["show", "focus"]
 $globals.Workspace);
 
 
-$core.addMethod(
-$core.method({
-selector: "inspectOn:",
-protocol: '*IDE',
-fn: function (anInspector){
-var self=this;
-var variables;
-function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-variables=$recv($Dictionary())._new();
-$recv(variables)._at_put_("#self",self);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=1;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#keys",self._keys());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=2;
-//>>excludeEnd("ctx");
-self._keysAndValuesDo_((function(key,value){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv(variables)._at_put_(key,value);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-$recv(anInspector)._setLabel_(self._printString());
-$1=$recv(anInspector)._setVariables_(variables);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.AssociativeCollection)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#keys' put: self keys.\x0a\x09self keysAndValuesDo: [ :key :value |\x0a\x09\x09variables at: key put: value ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
-referencedClasses: ["Dictionary"],
-//>>excludeEnd("ide");
-messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"]
-}),
-$globals.AssociativeCollection);
-
-$core.addMethod(
-$core.method({
-selector: "inspectOn:",
-protocol: '*IDE',
-fn: function (anInspector){
-var self=this;
-var variables;
-function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-variables=$recv($Dictionary())._new();
-$recv(variables)._at_put_("#self",self);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=1;
-//>>excludeEnd("ctx");
-self._withIndexDo_((function(each,i){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv(variables)._at_put_(i,each);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-$recv(anInspector)._setLabel_(self._printString());
-$1=$recv(anInspector)._setVariables_(variables);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Collection)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self withIndexDo: [ :each :i |\x0a\x09\x09variables at: i put: each ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
-referencedClasses: ["Dictionary"],
-//>>excludeEnd("ide");
-messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]
-}),
-$globals.Collection);
-
-$core.addMethod(
-$core.method({
-selector: "inspectOn:",
-protocol: '*IDE',
-fn: function (anInspector){
-var self=this;
-var variables;
-function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-variables=$recv($Dictionary())._new();
-$recv(variables)._at_put_("#self",self);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=1;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#year",self._year());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=2;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#month",self._month());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=3;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#day",self._day());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=4;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#hours",self._hours());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=5;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#minutes",self._minutes());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=6;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#seconds",self._seconds());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=7;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#milliseconds",self._milliseconds());
-$recv(anInspector)._setLabel_(self._printString());
-$1=$recv(anInspector)._setVariables_(variables);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Date)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#year' put: self year.\x0a\x09variables at: '#month' put: self month.\x0a\x09variables at: '#day' put: self day.\x0a\x09variables at: '#hours' put: self hours.\x0a\x09variables at: '#minutes' put: self minutes.\x0a\x09variables at: '#seconds' put: self seconds.\x0a\x09variables at: '#milliseconds' put: self milliseconds.\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
-referencedClasses: ["Dictionary"],
-//>>excludeEnd("ide");
-messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"]
-}),
-$globals.Date);
-
-$core.addMethod(
-$core.method({
-selector: "inspectOn:",
-protocol: '*IDE',
-fn: function (anInspector){
-var self=this;
-var variables;
-function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-variables=$recv($Dictionary())._new();
-$recv(variables)._at_put_("#self",self);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=1;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#home",self._home());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=2;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#receiver",self._receiver());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=3;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#selector",self._selector());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=4;
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_("#locals",self._locals());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=5;
-//>>excludeEnd("ctx");
-$recv($recv(self._class())._instanceVariableNames())._do_((function(each){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv(variables)._at_put_(each,self._instVarAt_(each));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-$recv(anInspector)._setLabel_(self._printString());
-$1=$recv(anInspector)._setVariables_(variables);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.MethodContext)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#home' put: self home.\x0a\x09variables at: '#receiver' put: self receiver.\x0a\x09variables at: '#selector' put: self selector.\x0a\x09variables at: '#locals' put: self locals.\x0a\x09self class instanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
-referencedClasses: ["Dictionary"],
-//>>excludeEnd("ide");
-messageSends: ["new", "at:put:", "home", "receiver", "selector", "locals", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
-}),
-$globals.MethodContext);
-
-$core.addMethod(
-$core.method({
-selector: "inspectOn:",
-protocol: '*IDE',
-fn: function (anInspector){
-var self=this;
-var variables,i;
-function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-variables=$recv($Dictionary())._new();
-$recv(variables)._at_put_("#self",self);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=1;
-//>>excludeEnd("ctx");
-i=(1);
-self._do_((function(each){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-$recv(variables)._at_put_(i,each);
-i=$recv(i).__plus((1));
-return i;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-$recv(anInspector)._setLabel_(self._printString());
-$1=$recv(anInspector)._setVariables_(variables);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},$globals.Set)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| variables i |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09i := 1.\x0a\x09self do: [ :each |\x0a\x09\x09variables at: i put: each.\x0a\x09\x09i := i + 1 ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
-referencedClasses: ["Dictionary"],
-//>>excludeEnd("ide");
-messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"]
-}),
-$globals.Set);
-
-$core.addMethod(
-$core.method({
-selector: "inspectOn:",
-protocol: '*IDE',
-fn: function (anInspector){
-var self=this;
-var label;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $3,$2,$1,$5,$4;
-(
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = true, 
-//>>excludeEnd("ctx");
-$globals.String.superclass.fn.prototype._inspectOn_.apply($recv(self), [anInspector]));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = false;
-//>>excludeEnd("ctx");;
-$3=self._printString();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["printString"]=1;
-//>>excludeEnd("ctx");
-$2=$recv($3)._size();
-$1=$recv($2).__gt((30));
-if($core.assert($1)){
-$5=self._printString();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["printString"]=2;
-//>>excludeEnd("ctx");
-$4=$recv($5)._copyFrom_to_((1),(30));
-label=$recv($4).__comma("...'");
-label;
-} else {
-label=self._printString();
-label;
-};
-$recv(anInspector)._setLabel_(label);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},$globals.String)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| label |\x0a\x09super inspectOn: anInspector.\x0a\x09self printString size > 30\x0a\x09\x09ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]\x0a\x09\x09ifFalse: [ label := self printString ].\x0a\x09anInspector setLabel: label",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"]
-}),
-$globals.String);
-
 });

+ 6 - 93
bower_components/amber-attic/src/IDE.st → bower_components/amber-contrib-legacy/src/IDE.st

@@ -1,5 +1,5 @@
 Smalltalk createPackage: 'IDE'!
-(Smalltalk packageAt: 'IDE') imports: {'codemirror/addon/hint/show-hint'. 'codemirror/lib/codemirror'. 'codemirror/mode/smalltalk/smalltalk'. 'css!./resources/amber'. 'css!codemirror/addon/hint/show-hint'. 'css!codemirror/lib/codemirror'. 'css!codemirror/theme/ambiance'. 'jquery-ui'}!
+(Smalltalk packageAt: 'IDE') imports: {'codemirror/addon/hint/show-hint'. 'codemirror/lib/codemirror'. 'codemirror/mode/smalltalk/smalltalk'. 'css!!./resources/amber'. 'css!!codemirror/addon/hint/show-hint'. 'css!!codemirror/lib/codemirror'. 'css!!codemirror/theme/ambiance'. 'jquery-ui'}!
 Widget subclass: #ClassesList
 	instanceVariableNames: 'browser ul nodes'
 	package: 'IDE'!
@@ -857,7 +857,7 @@ compileMethodDefinition
 !
 
 compileMethodDefinitionFor: aClass
-	| compiler method source node |
+	| compiler package method compiledSource source node |
 	source := sourceArea val.
 	selectedProtocol ifNil: [ selectedProtocol := selectedMethod protocol ].
 	compiler := Compiler new.
@@ -865,11 +865,12 @@ compileMethodDefinitionFor: aClass
 	node := compiler parse: source.
 	node isParseFailure ifTrue: [
 	^ self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].
-	compiler currentClass: aClass.
-	method := compiler eval: (compiler compileNode: node).
+	package := aClass packageOfProtocol: selectedProtocol.
+	compiledSource := compiler compileNode: node forClass: aClass package: package.
+	method := compiler eval: compiledSource forPackage: package.
 	compiler unknownVariables do: [ :each |
 		"Do not try to redeclare javascript's objects"
-		(PlatformInterface existsGlobal: each) ifFalse: [
+		(Smalltalk existsJsGlobal: each) ifFalse: [
 		(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [
 			self addInstanceVariableNamed: each toClass: aClass.
 			^ self compileMethodDefinitionFor: aClass ]] ].
@@ -2308,91 +2309,3 @@ renderButtonsOn: html
 	onClick: [ self clearWorkspace ]
 ! !
 
-!AssociativeCollection methodsFor: '*IDE'!
-
-inspectOn: anInspector
-	| variables |
-	variables := Dictionary new.
-	variables at: '#self' put: self.
-	variables at: '#keys' put: self keys.
-	self keysAndValuesDo: [ :key :value |
-		variables at: key put: value ].
-	anInspector
-		setLabel: self printString;
-		setVariables: variables
-! !
-
-!Collection methodsFor: '*IDE'!
-
-inspectOn: anInspector
-	| variables |
-	variables := Dictionary new.
-	variables at: '#self' put: self.
-	self withIndexDo: [ :each :i |
-		variables at: i put: each ].
-	anInspector
-		setLabel: self printString;
-		setVariables: variables
-! !
-
-!Date methodsFor: '*IDE'!
-
-inspectOn: anInspector
-	| variables |
-	variables := Dictionary new.
-	variables at: '#self' put: self.
-	variables at: '#year' put: self year.
-	variables at: '#month' put: self month.
-	variables at: '#day' put: self day.
-	variables at: '#hours' put: self hours.
-	variables at: '#minutes' put: self minutes.
-	variables at: '#seconds' put: self seconds.
-	variables at: '#milliseconds' put: self milliseconds.
-	anInspector
-		setLabel: self printString;
-		setVariables: variables
-! !
-
-!MethodContext methodsFor: '*IDE'!
-
-inspectOn: anInspector
-	| variables |
-	variables := Dictionary new.
-	variables at: '#self' put: self.
-	variables at: '#home' put: self home.
-	variables at: '#receiver' put: self receiver.
-	variables at: '#selector' put: self selector.
-	variables at: '#locals' put: self locals.
-	self class instanceVariableNames do: [ :each |
-		variables at: each put: (self instVarAt: each) ].
-	anInspector
-		setLabel: self printString;
-		setVariables: variables
-! !
-
-!Set methodsFor: '*IDE'!
-
-inspectOn: anInspector
-	| variables i |
-	variables := Dictionary new.
-	variables at: '#self' put: self.
-	i := 1.
-	self do: [ :each |
-		variables at: i put: each.
-		i := i + 1 ].
-	anInspector
-		setLabel: self printString;
-		setVariables: variables
-! !
-
-!String methodsFor: '*IDE'!
-
-inspectOn: anInspector
-	| label |
-	super inspectOn: anInspector.
-	self printString size > 30
-		ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]
-		ifFalse: [ label := self printString ].
-	anInspector setLabel: label
-! !
-

+ 44 - 0
bower_components/amber-contrib-web/.bower.json

@@ -0,0 +1,44 @@
+{
+  "name": "amber-contrib-web",
+  "version": "0.2.0",
+  "homepage": "https://github.com/amber-smalltalk/amber-contrib-web",
+  "description": "Amber Smalltalk's original Seaside-inspired DOM manipulation library",
+  "main": "local.amd.json",
+  "moduleType": [
+    "amd"
+  ],
+  "keywords": [
+    "amber",
+    "smalltalk",
+    "dom",
+    "seaside"
+  ],
+  "license": "MIT",
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "/*.js",
+    "/*.html",
+    "test",
+    "tests"
+  ],
+  "dependencies": {
+    "amber": "*",
+    "amber-contrib-jquery": ">=0.1.0"
+  },
+  "devDependencies": {
+    "amber-ide-starter-dialog": "^0.1.0",
+    "amber-contrib-legacy": "^0.2.0",
+    "helios": ">=0.4.3"
+  },
+  "_release": "0.2.0",
+  "_resolution": {
+    "type": "version",
+    "tag": "0.2.0",
+    "commit": "b9359d309c80b6320588ba98e865ad826cdb0ef5"
+  },
+  "_source": "git://github.com/amber-smalltalk/amber-contrib-web.git",
+  "_target": ">=0.1.0",
+  "_originalSource": "amber-contrib-web"
+}

+ 22 - 0
bower_components/amber-contrib-web/LICENSE

@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Amber
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+

+ 4 - 0
bower_components/amber-contrib-web/README.md

@@ -0,0 +1,4 @@
+# amber-contrib-web
+Seaside-inspired Web page manipulation library for Amber Smalltalk
+
+Formerly part of core Amber, extracted to its own repository.

+ 35 - 0
bower_components/amber-contrib-web/bower.json

@@ -0,0 +1,35 @@
+{
+  "name": "amber-contrib-web",
+  "version": "0.2.0",
+  "homepage": "https://github.com/amber-smalltalk/amber-contrib-web",
+  "description": "Amber Smalltalk's original Seaside-inspired DOM manipulation library",
+  "main": "local.amd.json",
+  "moduleType": [
+    "amd"
+  ],
+  "keywords": [
+    "amber",
+    "smalltalk",
+    "dom",
+    "seaside"
+  ],
+  "license": "MIT",
+  "ignore": [
+    "**/.*",
+    "node_modules",
+    "bower_components",
+    "/*.js",
+    "/*.html",
+    "test",
+    "tests"
+  ],
+  "dependencies": {
+    "amber": "*",
+    "amber-contrib-jquery": ">=0.1.0"
+  },
+  "devDependencies": {
+    "amber-ide-starter-dialog": "^0.1.0",
+    "amber-contrib-legacy": "^0.2.0",
+    "helios": ">=0.4.3"
+  }
+}

+ 13 - 0
bower_components/amber-contrib-web/local.amd.json

@@ -0,0 +1,13 @@
+{
+  "paths": {
+    "amber/web": "src"
+  },
+  "map": {
+    "*": {
+      "00comment": "These are backward compatibility pointers.",
+      "amber-contrib-web/Web": "amber/web/Web",
+      "amber_core/Web": "amber/web/Web",
+      "amber_core/Canvas": "amber/web/Web"
+    }
+  }
+}

+ 32 - 0
bower_components/amber-contrib-web/package.json

@@ -0,0 +1,32 @@
+{
+  "name": "amber-contrib-web",
+  "version": "0.2.0",
+  "description": "Amber Smalltalk's original Seaside-inspired DOM manipulation library",
+  "main": "local.amd.json",
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git://github.com/amber-smalltalk/amber-contrib-web"
+  },
+  "keywords": [
+    "amber",
+    "smalltalk",
+    "seaside",
+    "dom"
+  ],
+  "license": "MIT",
+  "bugs": {
+    "url": "https://github.com/amber-smalltalk/amber-contrib-web/issues"
+  },
+  "homepage": "https://github.com/amber-smalltalk/amber-contrib-web",
+  "devDependencies": {
+    "amber-dev": "^0.6.0",
+    "grunt": "^0.4.5",
+    "grunt-contrib-clean": "^0.6.0",
+    "grunt-contrib-requirejs": "^0.4.4",
+    "grunt-execute": "^0.2.2",
+    "requirejs": "^2.1.15"
+  }
+}

+ 108 - 407
bower_components/amber/src/Web.js → bower_components/amber-contrib-web/src/Web.js

@@ -1,164 +1,17 @@
-define("amber_core/Web", ["amber/boot", "jquery", "amber_core/Kernel-Objects", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Methods", "amber_core/Kernel-Collections"], function($boot,jQuery){
+define("amber/web/Web", ["amber/boot"
+//>>excludeStart("imports", pragmas.excludeImports);
+, "amber/jquery/Wrappers-JQuery"
+//>>excludeEnd("imports");
+, "amber_core/Kernel-Objects", "amber_core/Platform-Services", "amber_core/Kernel-Methods", "amber_core/Kernel-Collections"], function($boot
+//>>excludeStart("imports", pragmas.excludeImports);
+
+//>>excludeEnd("imports");
+){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Web');
 $core.packages["Web"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Web"].imports = ["jQuery=jquery"];
-$core.packages["Web"].transport = {"type":"amd","amdNamespace":"amber_core"};
-
-$core.addClass('BrowserInterface', $globals.Object, [], 'Web');
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.BrowserInterface.comment="I am platform interface class that tries to use window and jQuery; that is, one for browser environment.\x0a\x0a## API\x0a\x0a    self isAvailable. \x22true if window and jQuery exist\x22.\x0a\x0a    self alert: 'Hey, there is a problem'.\x0a    self confirm: 'Affirmative?'.\x0a    self prompt: 'Your name:'.\x0a\x0a    self ajax: #{\x0a        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a    }.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "ajax:",
-protocol: 'actions',
-fn: function (anObject){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=$recv(jQuery)._ajax_(anObject);
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},$globals.BrowserInterface)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "ajax: anObject\x0a\x09^ jQuery ajax: anObject",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["ajax:"]
-}),
-$globals.BrowserInterface);
-
-$core.addMethod(
-$core.method({
-selector: "alert:",
-protocol: 'actions',
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=$recv(window)._alert_(aString);
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.BrowserInterface)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "alert: aString\x0a\x09^ window alert: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["alert:"]
-}),
-$globals.BrowserInterface);
-
-$core.addMethod(
-$core.method({
-selector: "confirm:",
-protocol: 'actions',
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=$recv(window)._confirm_(aString);
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.BrowserInterface)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "confirm: aString\x0a\x09^ window confirm: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["confirm:"]
-}),
-$globals.BrowserInterface);
-
-$core.addMethod(
-$core.method({
-selector: "isAvailable",
-protocol: 'testing',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return typeof window !== "undefined" && typeof jQuery !== "undefined";
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"isAvailable",{},$globals.BrowserInterface)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "isAvailable\x0a<return typeof window !== \x22undefined\x22 && typeof jQuery !== \x22undefined\x22>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.BrowserInterface);
-
-$core.addMethod(
-$core.method({
-selector: "prompt:",
-protocol: 'actions',
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=$recv(window)._prompt_(aString);
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.BrowserInterface)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "prompt: aString\x0a\x09^ window prompt: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["prompt:"]
-}),
-$globals.BrowserInterface);
-
-$core.addMethod(
-$core.method({
-selector: "prompt:default:",
-protocol: 'actions',
-fn: function (aString,defaultString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=$recv(window)._prompt_default_(aString,defaultString);
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.BrowserInterface)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "defaultString"],
-source: "prompt: aString default: defaultString\x0a\x09^ window prompt: aString default: defaultString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["prompt:default:"]
-}),
-$globals.BrowserInterface);
-
-
+$core.packages["Web"].imports = ["amber/jquery/Wrappers-JQuery"];
+$core.packages["Web"].transport = {"type":"amd","amdNamespace":"amber/web"};
 
 $core.addClass('HTMLCanvas', $globals.Object, ['root'], 'Web');
 //>>excludeStart("ide", pragmas.excludeIdeData);
@@ -3053,31 +2906,6 @@ messageSends: ["with:", "root"]
 $globals.HTMLCanvas);
 
 
-$core.addMethod(
-$core.method({
-selector: "initialize",
-protocol: 'initialization',
-fn: function (){
-var self=this;
-function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv($Smalltalk())._optOut_(jQuery);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.HTMLCanvas.klass)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "initialize\x0a\x09\x22Allow JS method calls for the jQuery object.\x0a\x09See boot.js DNU handling.\x22\x0a\x09\x0a\x09Smalltalk optOut: jQuery",
-referencedClasses: ["Smalltalk"],
-//>>excludeEnd("ide");
-messageSends: ["optOut:"]
-}),
-$globals.HTMLCanvas.klass);
-
 $core.addMethod(
 $core.method({
 selector: "onJQuery:",
@@ -5203,6 +5031,32 @@ messageSends: ["append:"]
 $globals.TagBrush);
 
 
+$core.addMethod(
+$core.method({
+selector: "fromJQuery:",
+protocol: 'instance creation',
+fn: function (aJQuery){
+var self=this;
+function $HTMLCanvas(){return $globals.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._fromJQuery_canvas_(aJQuery,$recv($HTMLCanvas())._new());
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"fromJQuery:",{aJQuery:aJQuery},$globals.TagBrush.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aJQuery"],
+source: "fromJQuery: aJQuery\x0a\x09^ self fromJQuery: aJQuery canvas: HTMLCanvas new",
+referencedClasses: ["HTMLCanvas"],
+//>>excludeEnd("ide");
+messageSends: ["fromJQuery:canvas:", "new"]
+}),
+$globals.TagBrush.klass);
+
 $core.addMethod(
 $core.method({
 selector: "fromJQuery:canvas:",
@@ -5231,6 +5085,32 @@ messageSends: ["initializeFromJQuery:canvas:", "new", "yourself"]
 }),
 $globals.TagBrush.klass);
 
+$core.addMethod(
+$core.method({
+selector: "fromString:",
+protocol: 'instance creation',
+fn: function (aString){
+var self=this;
+function $HTMLCanvas(){return $globals.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._fromString_canvas_(aString,$recv($HTMLCanvas())._new());
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},$globals.TagBrush.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "fromString: aString\x0a\x09^ self fromString: aString canvas: HTMLCanvas new",
+referencedClasses: ["HTMLCanvas"],
+//>>excludeEnd("ide");
+messageSends: ["fromString:canvas:", "new"]
+}),
+$globals.TagBrush.klass);
+
 $core.addMethod(
 $core.method({
 selector: "fromString:canvas:",
@@ -5273,7 +5153,15 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._appendToJQuery_($recv(aTagBrush)._asJQuery());
+$recv((function(html){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return self._renderOn_(html);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
+//>>excludeEnd("ctx");
+}))._appendToBrush_(aTagBrush);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},$globals.Widget)});
@@ -5281,10 +5169,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aTagBrush"],
-source: "appendToBrush: aTagBrush\x0a\x09self appendToJQuery: aTagBrush asJQuery",
+source: "appendToBrush: aTagBrush\x0a\x09[ :html | self renderOn: html ] appendToBrush: aTagBrush",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["appendToJQuery:", "asJQuery"]
+messageSends: ["appendToBrush:", "renderOn:"]
 }),
 $globals.Widget);
 
@@ -5359,93 +5247,67 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(aTagBrush)._appendBlock_(self);
+$recv(aTagBrush)._at_put_(self._key(),self._value());
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},$globals.BlockClosure)});
+}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},$globals.Association)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aTagBrush"],
-source: "appendToBrush: aTagBrush\x0a\x09aTagBrush appendBlock: self",
+source: "appendToBrush: aTagBrush\x0a\x09aTagBrush at: self key put: self value",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["appendBlock:"]
+messageSends: ["at:put:", "key", "value"]
 }),
-$globals.BlockClosure);
+$globals.Association);
 
 $core.addMethod(
 $core.method({
-selector: "appendToJQuery:",
+selector: "appendToBrush:",
 protocol: '*Web',
-fn: function (aJQuery){
+fn: function (aTagBrush){
 var self=this;
-function $HTMLCanvas(){return $globals.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._value_($recv($HTMLCanvas())._onJQuery_(aJQuery));
+$recv(aTagBrush)._appendBlock_(self);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},$globals.BlockClosure)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aJQuery"],
-source: "appendToJQuery: aJQuery\x0a\x09self value: (HTMLCanvas onJQuery: aJQuery)",
-referencedClasses: ["HTMLCanvas"],
-//>>excludeEnd("ide");
-messageSends: ["value:", "onJQuery:"]
-}),
-$globals.BlockClosure);
-
-$core.addMethod(
-$core.method({
-selector: "asJQuery",
-protocol: '*Web',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=$recv([self])._asJQuery();
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},$globals.BlockClosure)});
+}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},$globals.BlockClosure)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asJQuery\x0a\x09^ {self} asJQuery",
+args: ["aTagBrush"],
+source: "appendToBrush: aTagBrush\x0a\x09aTagBrush appendBlock: self",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["asJQuery"]
+messageSends: ["appendBlock:"]
 }),
 $globals.BlockClosure);
 
 $core.addMethod(
 $core.method({
-selector: "asJQueryInContext:",
+selector: "appendToJQuery:",
 protocol: '*Web',
-fn: function (aContext){
+fn: function (aJQuery){
 var self=this;
+function $HTMLCanvas(){return $globals.HTMLCanvas||(typeof HTMLCanvas=="undefined"?nil:HTMLCanvas)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=$recv([self])._asJQueryInContext_(aContext);
-return $1;
+self._value_($recv($HTMLCanvas())._onJQuery_(aJQuery));
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJQueryInContext:",{aContext:aContext},$globals.BlockClosure)});
+}, function($ctx1) {$ctx1.fill(self,"appendToJQuery:",{aJQuery:aJQuery},$globals.BlockClosure)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aContext"],
-source: "asJQueryInContext: aContext\x0a\x09^ {self} asJQueryInContext: aContext",
-referencedClasses: [],
+args: ["aJQuery"],
+source: "appendToJQuery: aJQuery\x0a\x09self value: (HTMLCanvas onJQuery: aJQuery)",
+referencedClasses: ["HTMLCanvas"],
 //>>excludeEnd("ide");
-messageSends: ["asJQueryInContext:"]
+messageSends: ["value:", "onJQuery:"]
 }),
 $globals.BlockClosure);
 
@@ -5477,51 +5339,35 @@ $globals.CharacterArray);
 
 $core.addMethod(
 $core.method({
-selector: "asJQuery",
+selector: "appendToBrush:",
 protocol: '*Web',
-fn: function (){
+fn: function (aTagBrush){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return jQuery(self['@jsObject']);
-return self;
+self._do_((function(each){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},$globals.JSObjectProxy)});
+return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asJQuery\x0a\x09<return jQuery(self['@jsObject'])>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.JSObjectProxy);
-
-$core.addMethod(
-$core.method({
-selector: "asJQueryInContext:",
-protocol: '*Web',
-fn: function (aContext){
-var self=this;
+return $recv(aTagBrush)._append_(each);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
 //>>excludeEnd("ctx");
-return jQuery(self['@jsObject'], aContext);
+}));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJQueryInContext:",{aContext:aContext},$globals.JSObjectProxy)});
+}, function($ctx1) {$ctx1.fill(self,"appendToBrush:",{aTagBrush:aTagBrush},$globals.Collection)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aContext"],
-source: "asJQueryInContext: aContext\x0a\x09<return jQuery(self['@jsObject'], aContext)>",
+args: ["aTagBrush"],
+source: "appendToBrush: aTagBrush\x0a\x09self do: [ :each | aTagBrush append: each ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: []
+messageSends: ["do:", "append:"]
 }),
-$globals.JSObjectProxy);
+$globals.Collection);
 
 $core.addMethod(
 $core.method({
@@ -5571,103 +5417,6 @@ messageSends: ["append:", "asString"]
 }),
 $globals.Object);
 
-$core.addMethod(
-$core.method({
-selector: "asJQuery",
-protocol: '*Web',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return jQuery(self);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},$globals.Object)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asJQuery\x0a\x09<return jQuery(self)>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Object);
-
-$core.addMethod(
-$core.method({
-selector: "asJQueryInContext:",
-protocol: '*Web',
-fn: function (aContext){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return jQuery(self, aContext);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJQueryInContext:",{aContext:aContext},$globals.Object)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aContext"],
-source: "asJQueryInContext: aContext\x0a\x09<return jQuery(self, aContext)>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Object);
-
-$core.addMethod(
-$core.method({
-selector: "postMessageTo:",
-protocol: '*Web',
-fn: function (aFrame){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=self._postMessageTo_origin_(aFrame,"*");
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"postMessageTo:",{aFrame:aFrame},$globals.Object)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aFrame"],
-source: "postMessageTo: aFrame\x0a^ self postMessageTo: aFrame origin: '*'",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["postMessageTo:origin:"]
-}),
-$globals.Object);
-
-$core.addMethod(
-$core.method({
-selector: "postMessageTo:origin:",
-protocol: '*Web',
-fn: function (aFrame,aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return aFrame.postMessage(self, aString);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"postMessageTo:origin:",{aFrame:aFrame,aString:aString},$globals.Object)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aFrame", "aString"],
-source: "postMessageTo: aFrame origin: aString\x0a<return aFrame.postMessage(self, aString)>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Object);
-
 $core.addMethod(
 $core.method({
 selector: "appendToBrush:",
@@ -5716,52 +5465,4 @@ messageSends: ["append:"]
 }),
 $globals.String);
 
-$core.addMethod(
-$core.method({
-selector: "asJQuery",
-protocol: '*Web',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return jQuery(String(self));
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJQuery",{},$globals.String)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asJQuery\x0a\x09<return jQuery(String(self))>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.String);
-
-$core.addMethod(
-$core.method({
-selector: "asJQueryInContext:",
-protocol: '*Web',
-fn: function (aContext){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return jQuery(String(self), aContext);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"asJQueryInContext:",{aContext:aContext},$globals.String)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aContext"],
-source: "asJQueryInContext: aContext\x0a\x09<return jQuery(String(self), aContext)>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.String);
-
 });

+ 19 - 96
bower_components/amber/src/Web.st → bower_components/amber-contrib-web/src/Web.st

@@ -1,51 +1,5 @@
 Smalltalk createPackage: 'Web'!
-(Smalltalk packageAt: 'Web') imports: {'jQuery' -> 'jquery'}!
-Object subclass: #BrowserInterface
-	instanceVariableNames: ''
-	package: 'Web'!
-!BrowserInterface commentStamp!
-I am platform interface class that tries to use window and jQuery; that is, one for browser environment.
-
-## API
-
-    self isAvailable. "true if window and jQuery exist".
-
-    self alert: 'Hey, there is a problem'.
-    self confirm: 'Affirmative?'.
-    self prompt: 'Your name:'.
-
-    self ajax: #{
-        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'
-    }.!
-
-!BrowserInterface methodsFor: 'actions'!
-
-ajax: anObject
-	^ jQuery ajax: anObject
-!
-
-alert: aString
-	^ window alert: aString
-!
-
-confirm: aString
-	^ window confirm: aString
-!
-
-prompt: aString
-	^ window prompt: aString
-!
-
-prompt: aString default: defaultString
-	^ window prompt: aString default: defaultString
-! !
-
-!BrowserInterface methodsFor: 'testing'!
-
-isAvailable
-<return typeof window !!== "undefined" && typeof jQuery !!== "undefined">
-! !
-
+(Smalltalk packageAt: 'Web') imports: {'amber/jquery/Wrappers-JQuery'}!
 Object subclass: #HTMLCanvas
 	instanceVariableNames: 'root'
 	package: 'Web'!
@@ -550,15 +504,6 @@ video
 	^ self tag: 'video'
 ! !
 
-!HTMLCanvas class methodsFor: 'initialization'!
-
-initialize
-	"Allow JS method calls for the jQuery object.
-	See boot.js DNU handling."
-	
-	Smalltalk optOut: jQuery
-! !
-
 !HTMLCanvas class methodsFor: 'instance creation'!
 
 onJQuery: aJQuery
@@ -1052,12 +997,20 @@ createTextNodeFor: aString
 
 !TagBrush class methodsFor: 'instance creation'!
 
+fromJQuery: aJQuery
+	^ self fromJQuery: aJQuery canvas: HTMLCanvas new
+!
+
 fromJQuery: aJQuery canvas: aCanvas
 	^ self new
 		initializeFromJQuery: aJQuery canvas: aCanvas;
 		yourself
 !
 
+fromString: aString
+	^ self fromString: aString canvas: HTMLCanvas new
+!
+
 fromString: aString canvas: aCanvas
 	^ self new
 	initializeFromString: aString canvas: aCanvas;
@@ -1083,7 +1036,7 @@ Exemple:
 !Widget methodsFor: 'adding'!
 
 appendToBrush: aTagBrush
-	self appendToJQuery: aTagBrush asJQuery
+	[ :html | self renderOn: html ] appendToBrush: aTagBrush
 !
 
 appendToJQuery: aJQuery
@@ -1106,6 +1059,12 @@ classTag
 	^ 'widget'
 ! !
 
+!Association methodsFor: '*Web'!
+
+appendToBrush: aTagBrush
+	aTagBrush at: self key put: self value
+! !
+
 !BlockClosure methodsFor: '*Web'!
 
 appendToBrush: aTagBrush
@@ -1114,14 +1073,6 @@ appendToBrush: aTagBrush
 
 appendToJQuery: aJQuery
 	self value: (HTMLCanvas onJQuery: aJQuery)
-!
-
-asJQuery
-	^ {self} asJQuery
-!
-
-asJQueryInContext: aContext
-	^ {self} asJQueryInContext: aContext
 ! !
 
 !CharacterArray methodsFor: '*Web'!
@@ -1130,14 +1081,10 @@ asSnippet
 	^ HTMLSnippet current snippetAt: self asString
 ! !
 
-!JSObjectProxy methodsFor: '*Web'!
-
-asJQuery
-	<return jQuery(self['@jsObject'])>
-!
+!Collection methodsFor: '*Web'!
 
-asJQueryInContext: aContext
-	<return jQuery(self['@jsObject'], aContext)>
+appendToBrush: aTagBrush
+	self do: [ :each | aTagBrush append: each ]
 ! !
 
 !Object methodsFor: '*Web'!
@@ -1148,22 +1095,6 @@ appendToBrush: aTagBrush
 
 appendToJQuery: aJQuery
 	aJQuery append: self asString
-!
-
-asJQuery
-	<return jQuery(self)>
-!
-
-asJQueryInContext: aContext
-	<return jQuery(self, aContext)>
-!
-
-postMessageTo: aFrame
-^ self postMessageTo: aFrame origin: '*'
-!
-
-postMessageTo: aFrame origin: aString
-<return aFrame.postMessage(self, aString)>
 ! !
 
 !String methodsFor: '*Web'!
@@ -1174,13 +1105,5 @@ appendToBrush: aTagBrush
 
 appendToJQuery: aJQuery
 	aJQuery append: self
-!
-
-asJQuery
-	<return jQuery(String(self))>
-!
-
-asJQueryInContext: aContext
-	<return jQuery(String(self), aContext)>
 ! !
 

+ 5 - 11
bower_components/amber/.bower.json

@@ -1,6 +1,6 @@
 {
   "name": "amber",
-  "version": "0.14.3",
+  "version": "0.14.16",
   "main": "support/amber.js",
   "ignore": [
     "**/.*",
@@ -14,20 +14,14 @@
     "test",
     "tests"
   ],
-  "dependencies": {
-    "jquery": ">=1.7.0"
-  },
-  "devDependencies": {
-    "jquery": ">=1.7.0 <2.1.0"
-  },
   "homepage": "https://github.com/amber-smalltalk/amber",
-  "_release": "0.14.3",
+  "_release": "0.14.16",
   "_resolution": {
     "type": "version",
-    "tag": "0.14.3",
-    "commit": "4fdd701043d2883990a725aa2911d412efef493d"
+    "tag": "0.14.16",
+    "commit": "d88f3c5ce653555aec43f1bbe0df7e5f41231d66"
   },
   "_source": "git://github.com/amber-smalltalk/amber.git",
-  "_target": "0.14.3",
+  "_target": ">=0.14.13 <0.14.17",
   "_originalSource": "amber"
 }

+ 103 - 0
bower_components/amber/API-CHANGES.txt

@@ -1,3 +1,91 @@
+0.14.14:
+
+* InterfacingObject >> ajax: deprecated
+* PlatformInterface class deprecated
+* Class BrowserInterface removed
+* Class Terminal, BrowserTerminal added
+* Class Platform, BrowserPlatform added
+
++ Environment >>
+  + renamePackage:to:
++ Platform class >>
+  + globals
+  + newXhr
++ Terminal class >>
+  + alert:
+  + confirm:
+  + prompt:
+  + prompt:default:
+SmalltalkImage >>
+  + existsJsGlobal:
+
+- PlatformInterface class >>
+  - initialize
+  - setWorker:
+
+
+0.14.12:
+
++ JSObjectProxy >>
+  + putOn:
++ ProtoStream >>
+  + nextPutJSObject:
+
+
+0.14.11:
+
+* Basic streaming protocol extracted from Stream to ProtoStream
+
++ Object >>
+  + in:
++ JSObjectProxy >>
+  + in:
+
+
+0.14.10:
+
++ JSObjectProxy class >>
+  + addObjectVariablesTo:ofProxy:
+  + compareJSObjectOfProxy:withProxy:
+  + forwardMessage:withArguments:ofProxy:
+  + jsObject:ofProxy:
+  + lookupProperty:ofProxy:
+
+- JSObjectProxy >>
+  - jsObject:
+  - lookupProperty:
+  - compareJSObjectWith:
+  - addObjectVariablesTo:
+  - forwardMessage:withArguments:
+
+
+0.14.4:
+
++ AmdExporter >>
+  + importsForOutput:
++ AbstractCodeGenerator >>
+  + currentPackage
+  + currentPackage:
++ Compiler >>
+  + currentPackage
+  + currentPackage:
+  + compile:forClass:protocol:
+  + compileNode:forClass:package:
++ SemanticAnalyzer >>
+  + thePackage
+  + thePackage:
+  + isVariableUndefined:inPackage:
+
+- Compiler >>
+  - compile:
+  - compile:forClass:
+  - compileExpression:
+- SemanticAnalyzer >>
+  - isVariableGloabllyUndefined:
+- Behavior >>
+  - compile:
+
+
 0.14.3:
 
 * #heliosClass is now #classTag
@@ -24,6 +112,21 @@
   + importsString
 + String >>
   + importsString
++ ProtoObject >>
+  + ifNil:
+  + ifNil:ifNotNil:
+  + ifNotNil:
+  + ifNotNil:ifNil:
+  + isNil
+  + notNil
+
+- Object >>
+  - ifNil:
+  - ifNil:ifNotNil:
+  - ifNotNil:
+  - ifNotNil:ifNil:
+  - isNil
+  - notNil
 
 
 0.14.1:

+ 85 - 1
bower_components/amber/CHANGELOG

@@ -1,4 +1,88 @@
-?? January 2015 - Release 0.14.3
+20 June 2015 - Release 0.14.16
+===================================
+
+Bugfix release - Date >> =, Class >> javascriptConstructor:.
+
+Commits: https://github.com/amber-smalltalk/amber/compare/0.14.15...0.14.16
+
+
+9 June 2015 - Release 0.14.15
+===================================
+
+Bugfix release - in some browsers, package commit failed.
+
+Commits: https://github.com/amber-smalltalk/amber/compare/0.14.14...0.14.15
+
+
+24 May 2015 - Release 0.14.14
+===================================
+
+Highlights:
+
+* Extraction of `Web` and `Wrappers-JQuery` to own repos.
+* Amber core itself formally with no production dependencies.
+* Packages with 'use strict'.
+* `PlatformInterface` replaced by services `Terminal` and `Platform`.
+
+Commits: https://github.com/amber-smalltalk/amber/compare/0.14.13...0.14.14
+
+
+29 March 2015 - Release 0.14.13
+===================================
+
+Highlights:
+
+* Rename namespaces of `Web` and `Wrappers-JQuery`.
+
+Commits: https://github.com/amber-smalltalk/amber/compare/0.14.12...0.14.13
+
+
+22 February 2015 - Release 0.14.12
+===================================
+
+Highlights:
+
+* Wrapped JS object can be put on streams via aStream << anObject.
+
+Commits: https://github.com/amber-smalltalk/amber/compare/0.14.11...0.14.12
+
+
+21 February 2015 - Release 0.14.11
+===================================
+
+Highlights:
+
+* `anObject in: aBlock` added
+* ProtoStream with extracted basic streaming protocol.
+
+Commits: https://github.com/amber-smalltalk/amber/compare/0.14.10...0.14.11
+
+
+17 February 2015 - Release 0.14.10
+===================================
+
+Highlights:
+
+* Package renames, classes moved between packages:
+  * Web and Wrappers-JQuery in amber-contrib-xxx namespaces,
+  * Platform-Xxx packages to keep Kernel-Xxx to kernel.
+* Some core speedups.
+
+Commits: https://github.com/amber-smalltalk/amber/compare/0.14.4...0.14.10
+
+
+1 February 2015 - Release 0.14.4
+===================================
+
+Highlights:
+
+* Compiler now allows the "import them as package-global vars" of 0.14.3.
+* Some core speedups.
+
+Commits: https://github.com/amber-smalltalk/amber/compare/0.14.3...0.14.4
+
+
+20 January 2015 - Release 0.14.3
 ===================================
 
 Highlights:

+ 7 - 5
bower_components/amber/CONTRIBUTING.md

@@ -12,14 +12,16 @@ To get your clone, follow this list:
 
 1. Create a fork of the repository on GitHub
 1. Clone the fork and go to its directory.
-1. Install the tools: ```npm install -g amber-cli grunt-cli bower```.
+1. Install the tools: ```npm install -g amber-cli```.
 1. Run ```npm install``` to install dependencies listed in package.json. Used by development tools. See [here](https://www.npmjs.org/doc/cli/npm-install.html) for more info.
 1. Run ```bower install``` to install dependencies listed in bower.json. Used by Amber in browser. See [here](http://bower.io/) for more info.
-1. Get your copy of Helios IDE into directory `my/helios`, depending if you have your fork or want to use stock version:
-  ```git clone git@github.com:<amber-smalltalk | your username>/helios.git my/helios```.
+1. Run ```cd external/amber-dev && npm install && cd ../..``` to install dependencies of `amber-dev` component.
+1. Get your copy of Helios IDE into directory `my/helios`, choosing among using your own fork / using the stock version:
+    - ```git clone git@github.com:<your username>/helios.git my/helios``` to use your own fork, or
+    - ```git clone git@github.com:amber-smalltalk/helios.git my/helios``` to use stock version.
 1. Install Helios' dependencies: ```cd my/helios && bower install && cd ../..```.
-1. Get your copy of legacy IDE into directory `my/amber-attic`:
-  ```git clone git@github.com:amber-smalltalk/amber-attic.git my/amber-attic```.
+1. Get your copy of legacy IDE into directory `my/amber-contrib-legacy`:
+  ```git clone git@github.com:amber-smalltalk/amber-contrib-legacy.git my/amber-contrib-legacy```.
 1. Run ```grunt devel```. Prepares some transient files.
 1. Run ```amber serve```. Starts the integrated development server.
 

+ 123 - 84
bower_components/amber/Gruntfile.js

@@ -1,99 +1,138 @@
 var path = require('path');
 
-module.exports = function(grunt) {
+module.exports = function (grunt) {
+    var helpers = require('./external/amber-dev/lib/helpers');
 
-  grunt.loadTasks('./internal/grunt-tasks');
-  grunt.loadNpmTasks('amber-dev');
+    grunt.loadTasks('./internal/grunt-tasks');
+    grunt.loadTasks('./external/amber-dev/tasks');
 
-  grunt.loadNpmTasks('grunt-contrib-jshint');
-  grunt.loadNpmTasks('grunt-contrib-clean');
-  grunt.loadNpmTasks('grunt-execute');
+    grunt.loadNpmTasks('grunt-contrib-jshint');
+    grunt.loadNpmTasks('grunt-contrib-clean');
+    grunt.loadNpmTasks('grunt-contrib-requirejs');
+    grunt.loadNpmTasks('grunt-execute');
 
-  grunt.registerTask('default', ['peg', 'amberc:all']);
-  grunt.registerTask('amberc:all', ['amberc:amber', 'amberc:attic', 'amberc:cli']);
-  grunt.registerTask('test', ['amberc:test_runner', 'execute:test_runner', 'clean:test_runner']);
-  grunt.registerTask('devel', ['amdconfig:amber']);
+    grunt.registerTask('default', ['peg', 'build:all']);
+    grunt.registerTask('build:all', ['amberc:amber', 'build:cli', 'amberc:dev']);
+    grunt.registerTask('build:cli', ['amberc:cli', 'requirejs:cli']);
+    grunt.registerTask('test', ['amdconfig:amber', 'requirejs:test_runner', 'execute:test_runner', 'clean:test_runner']);
+    grunt.registerTask('devel', ['amdconfig:amber']);
 
-  grunt.initConfig({
-    pkg: grunt.file.readJSON('package.json'),
+    grunt.initConfig({
+        pkg: grunt.file.readJSON('package.json'),
 
-    meta: {
-      banner: '/*!\n <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n License: <%= pkg.license.type %> \n*/\n'
-    },
+        meta: {
+            banner: '/*!\n <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> \n License: <%= pkg.license.type %> \n*/\n'
+        },
 
-    peg: {
-      parser: {
-        options: {
-          cache: true,
-          export_var: '$globals.SmalltalkParser'
+        peg: {
+            parser: {
+                options: {
+                    cache: true,
+                    export_var: '$globals.SmalltalkParser'
+                },
+                src: 'support/parser.pegjs',
+                dest: 'support/parser.js'
+            }
         },
-        src: 'support/parser.pegjs',
-        dest: 'support/parser.js'
-      }
-    },
 
-    amdconfig: {amber: {dest: 'config.js'}},
+        amdconfig: {amber: {dest: 'config.js'}},
+
+        amberc: {
+            options: {
+                amber_dir: process.cwd(),
+                closure_jar: ''
+            },
+            amber: {
+                output_dir: 'src',
+                src: ['src/Kernel-Objects.st', 'src/Kernel-Classes.st', 'src/Kernel-Methods.st', 'src/Kernel-Collections.st',
+                    'src/Kernel-Infrastructure.st', 'src/Kernel-Exceptions.st', 'src/Kernel-Announcements.st',
+                    'src/Platform-Services.st', 'src/Platform-ImportExport.st', 'src/Platform-Browser.st',
+                    'src/Compiler-Exceptions.st', 'src/Compiler-Core.st', 'src/Compiler-AST.st',
+                    'src/Compiler-IR.st', 'src/Compiler-Inlining.st', 'src/Compiler-Semantic.st', 'src/Compiler-Interpreter.st',
+                    'src/SUnit.st',
+                    'src/Kernel-Tests.st', 'src/Compiler-Tests.st', 'src/SUnit-Tests.st'
+                ],
+                jsGlobals: ['navigator']
+            },
+            cli: {
+                output_dir: 'external/amber-cli/src',
+                src: ['external/amber-cli/src/AmberCli.st'],
+                libraries: [
+                    'Compiler-Exceptions', 'Compiler-Core', 'Compiler-AST',
+                    'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser',
+                    'SUnit', 'Platform-ImportExport',
+                    'Kernel-Tests', 'Compiler-Tests', 'SUnit-Tests'
+                ],
+                amd_namespace: 'amber_cli'
+            },
+            dev: {
+                output_dir: 'external/amber-dev/lib',
+                src: ['external/amber-dev/lib/NodeTestRunner.st'],
+                amd_namespace: 'amber_devkit'
+            }
+        },
 
-    amberc: {
-      options: {
-        amber_dir: process.cwd(),
-        closure_jar: ''
-      },
-      amber: {
-        output_dir : 'src',
-        src: ['src/Kernel-Objects.st', 'src/Kernel-Classes.st', 'src/Kernel-Methods.st', 'src/Kernel-Collections.st',
-              'src/Kernel-Infrastructure.st', 'src/Kernel-Exceptions.st', 'src/Kernel-Transcript.st', 'src/Kernel-Announcements.st',
-              'src/Kernel-ImportExport.st', 'src/Compiler-Exceptions.st', 'src/Compiler-Core.st', 'src/Compiler-AST.st',
-              'src/Compiler-IR.st', 'src/Compiler-Inlining.st', 'src/Compiler-Semantic.st', 'src/Compiler-Interpreter.st',
-              'src/Web.st', 'src/SUnit.st',
-              'src/Kernel-Tests.st', 'src/Compiler-Tests.st', 'src/SUnit-Tests.st'
-              ],
-        jsGlobals: ['navigator']
-      },
-      cli: {
-        output_dir: 'external/amber-cli/src',
-        src: ['external/amber-cli/src/AmberCli.st'],
-        libraries: [
-          'Compiler-Exceptions', 'Compiler-Core', 'Compiler-AST',
-          'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser',
-          'SUnit', 'Kernel-ImportExport',
-          'Kernel-Tests', 'Compiler-Tests', 'SUnit-Tests'
-        ],
-        main_class: 'AmberCli',
-        output_name: '../support/amber-cli',
-        amd_namespace: 'amber_cli'
-      },
-      dev: {
-        output_dir: 'external/amber-dev/lib',
-        src: ['external/amber-dev/lib/Test.st']
-      },
-      test_runner: {
-        src: ['node_modules/amber-dev/lib/Test.st'],
-        libraries: [
-        'Compiler-Exceptions', 'Compiler-Core', 'Compiler-AST',
-        'Compiler-IR', 'Compiler-Inlining', 'Compiler-Semantic', 'Compiler-Interpreter', 'parser',
-        'SUnit', 'Kernel-ImportExport',
-        'Kernel-Tests', 'Compiler-Tests', 'SUnit-Tests'],
-        main_class: 'NodeTestRunner',
-        output_name: 'test_runner'
-      }
-    },
+        requirejs: {
+            cli: {
+                options: {
+                    mainConfigFile: "config.js",
+                    rawText: {
+                        "app": "(" + function () {
+                            define(["amber/devel", "amber_cli/AmberCli"], function (amber) {
+                                amber.initialize();
+                                amber.globals.AmberCli._main();
+                            });
+                        } + "());"
+                    },
+                    pragmas: {
+                        // none, for repl to have all info
+                    },
+                    include: ['config-node', 'app'],
+                    insertRequire: ['app'],
+                    optimize: "none",
+                    wrap: helpers.nodeWrapperWithShebang,
+                    out: "external/amber-cli/support/amber-cli.js"
+                }
+            },
+            test_runner: {
+                options: {
+                    mainConfigFile: "config.js",
+                    rawText: {
+                        "app": "(" + function () {
+                            define(["amber/devel", "amber_devkit/NodeTestRunner"], function (amber) {
+                                amber.initialize();
+                                amber.globals.NodeTestRunner._main();
+                            });
+                        } + "());"
+                    },
+                    paths: {"amber_devkit": helpers.libPath},
+                    pragmas: {
+                        // none, amber tests test contexts as well as eg. class copying which needs sources
+                    },
+                    include: ['config-node', 'app'],
+                    insertRequire: ['app'],
+                    optimize: "none",
+                    wrap: helpers.nodeWrapperWithShebang,
+                    out: "test_runner.js"
+                }
+            }
+        },
 
-    execute: {
-      test_runner: {
-        src: ['test_runner.js']
-      }
-    },
+        execute: {
+            test_runner: {
+                src: ['test_runner.js']
+            }
+        },
 
-    clean: {
-      test_runner: ['test_runner.js']
-    },
+        clean: {
+            test_runner: ['test_runner.js']
+        },
 
-    jshint: {
-      amber: ['src/*.js', 'support/[^p]*.js'],
-      cli: ['external/amber-cli/src/*.js', 'external/amber-cli/support/*.js'],
-      dev: ['external/amber-dev/lib/*.js'],
-      grunt: ['Gruntfile.js', 'internal/grunt-tasks/*.js', 'external/amber-dev/tasks/*.js']
-    }
-  });
+        jshint: {
+            amber: ['src/*.js', 'support/[^p]*.js'],
+            cli: ['external/amber-cli/src/*.js', 'external/amber-cli/support/*.js'],
+            dev: ['external/amber-dev/lib/*.js'],
+            grunt: ['Gruntfile.js', 'internal/grunt-tasks/*.js', 'external/amber-dev/tasks/*.js']
+        }
+    });
 };

+ 24 - 7
bower_components/amber/README.md

@@ -1,4 +1,4 @@
-Amber [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/amber-smalltalk/amber?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Travis CI Status](https://secure.travis-ci.org/amber-smalltalk/amber.png)](https://travis-ci.org/#!/amber-smalltalk/amber) [![devDependency status](https://david-dm.org/amber-smalltalk/amber/dev-status.svg?style=flat)](https://david-dm.org/amber-smalltalk/amber#info=devDependencies)
+Amber [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/amber-smalltalk/amber?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Travis CI Status](https://secure.travis-ci.org/amber-smalltalk/amber.png)](https://travis-ci.org/#!/amber-smalltalk/amber) [![devDependency status](https://david-dm.org/amber-smalltalk/amber/dev-status.svg?style=flat)](https://david-dm.org/amber-smalltalk/amber#info=devDependencies) [![Bountysource](https://www.bountysource.com/badge/team?team_id=19271&style=raised)](https://www.bountysource.com/teams/amber-smalltalk?utm_source=amber-smalltalk&utm_medium=shield&utm_campaign=raised)
 =====
 
 
@@ -34,16 +34,33 @@ Some highlights:
 -    You can inline Javascript code and there are many ways to interact between Amber and Javascript
 
 
-Getting Amber
+Prerequisites
 -------------
 
 Amber is shipped as a cli tool to create new projects and assist with development tasks in a [npm](http://npmjs.org) package  `amber-cli`
 and as a library to be used by projects in a [bower](https://github.com/bower/bower) package `amber`.
 
-Do this [1] to create an Amber project of your own and start working in it:
+For the installation to work, you need to have installed `node`, `npm` and `git` (in Windows, use Git for Windows and select "Run Git from Windows Command Prompt" and "Checkout Windows-style, commit Unix-style" installation options).
+
+For UNIX-based OS (Linux distibutions, FreeBSD, ...) do
+
+    npm config set prefix=~/npm
+    export PATH="$PATH:$HOME/npm/bin"
+   
+to have the installation in a local subdirectory in order to avoid the otherwise necessary ``sudo`` installation of Amber. The export line needs to be added to the ~/.profile file as well so that after a new login the path is set.
+
+
+
+Getting Amber and setting up an initial project
+-----------------------------------------------
+
+Do this to install Amber
 
     # Install the CLI tool `amber-cli` and supporting tools
-    npm install -g amber-cli bower grunt-cli
+    npm install -g amber-cli
+
+
+Use ``amber init``  to create a project of your own
 
     # Initialize your project (directory must be empty)
     cd /path/to/myproject
@@ -53,12 +70,12 @@ Do this [1] to create an Amber project of your own and start working in it:
     bower install amber-compat-es5 --save   # be loadable in older browsers
     bower install amber-compat-ie8 --save   # additional tweaks to load in IE8
 
+
+Start developing in Amber Smalltalk
+
     # Serve amber on localhost:4000
     amber serve
 
-The [Getting started](https://github.com/amber-smalltalk/amber/wiki/Getting-started) page shows more details on ways to obtain Amber and start a project.
-
-[1] For installation to work, you need to install `node`, `npm` and `git` (in Windows, use Git for Windows and select "Run Git from Windows Command Prompt" and "Checkout Windows-style, commit Unix-style" installation options).
 
 
 Reporting issues

+ 2 - 8
bower_components/amber/bower.json

@@ -1,6 +1,6 @@
 {
   "name": "amber",
-  "version": "0.14.3",
+  "version": "0.14.16",
   "main": "support/amber.js",
   "ignore": [
     "**/.*",
@@ -13,11 +13,5 @@
     "/test_runner.js",
     "test",
     "tests"
-  ],
-  "dependencies": {
-    "jquery": ">=1.7.0"
-  },
-  "devDependencies": {
-    "jquery": ">=1.7.0 <2.1.0"
-  }
+  ]
 }

+ 7 - 0
bower_components/amber/config-node.js

@@ -0,0 +1,7 @@
+// This file is used to make additional changes
+// when building an app to run in node.js.
+// Free to edit. You can break tests (cli test runner uses
+// this to build itself - it is a node executable).
+define("amber_core/Platform-Browser", ["amber_core/Platform-Node"], {});
+define("amber/browser-compatibility", {});
+define("jquery", {});

+ 6 - 0
bower_components/amber/local.amd.json

@@ -7,5 +7,11 @@
         "ensure-console": {
             "exports": "console"
         }
+    },
+    "map": {
+        "*": {
+            "00comment": "These are backward compatibility pointers.",
+            "amber_core/Kernel-ImportExport": "amber_core/Platform-ImportExport"
+        }
     }
 }

+ 5 - 5
bower_components/amber/package.json

@@ -1,6 +1,6 @@
 {
   "name": "amber",
-  "version": "0.14.3",
+  "version": "0.14.16",
   "description": "An implementation of the Smalltalk language that runs on top of the JS runtime.",
   "homepage": "http://amber-lang.net",
   "keywords": [
@@ -20,19 +20,19 @@
   },
   "repository": {
     "type": "git",
-    "url": "git://github.com/amber-smalltalk/amber.git#0.14.3"
+    "url": "git://github.com/amber-smalltalk/amber.git#0.14.16"
   },
   "engines": {
-    "node": ">=0.8.0"
+    "node": ">=0.10.0"
   },
   "scripts": {
     "test": "grunt test && cd external && cd amber-cli && npm test && cd .. && cd .."
   },
   "devDependencies": {
-    "amber-dev": "^0.3.0",
     "grunt": "^0.4.0",
     "grunt-contrib-clean": "^0.6.0",
-    "grunt-contrib-jshint": "^0.10.0",
+    "grunt-contrib-jshint": "^0.11.0",
+    "grunt-contrib-requirejs": "^0.4.4",
     "grunt-execute": "^0.2.1",
     "pegjs": "^0.8.0",
     "requirejs": "^2.1.15"

+ 1 - 1
bower_components/amber/src/Compiler-AST.js

@@ -1,4 +1,4 @@
-define("amber_core/Compiler-AST", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Methods"], function($boot){
+define("amber_core/Compiler-AST", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Methods"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Compiler-AST');
 $core.packages["Compiler-AST"].innerEval = function (expr) { return eval(expr); };

+ 138 - 87
bower_components/amber/src/Compiler-Core.js

@@ -1,10 +1,10 @@
-define("amber_core/Compiler-Core", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Collections"], function($boot){
+define("amber_core/Compiler-Core", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Platform-Services", "amber_core/Kernel-Collections"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Compiler-Core');
 $core.packages["Compiler-Core"].innerEval = function (expr) { return eval(expr); };
 $core.packages["Compiler-Core"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$core.addClass('AbstractCodeGenerator', $globals.Object, ['currentClass', 'source'], 'Compiler-Core');
+$core.addClass('AbstractCodeGenerator', $globals.Object, ['currentClass', 'currentPackage', 'source'], 'Compiler-Core');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AbstractCodeGenerator.comment="I am the abstract super class of all code generators and provide their common API.";
 //>>excludeEnd("ide");
@@ -110,6 +110,45 @@ messageSends: []
 }),
 $globals.AbstractCodeGenerator);
 
+$core.addMethod(
+$core.method({
+selector: "currentPackage",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+var $1;
+$1=self["@currentPackage"];
+return $1;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "currentPackage\x0a\x09^ currentPackage",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.AbstractCodeGenerator);
+
+$core.addMethod(
+$core.method({
+selector: "currentPackage:",
+protocol: 'accessing',
+fn: function (anObject){
+var self=this;
+self["@currentPackage"]=anObject;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "currentPackage: anObject\x0a\x09currentPackage := anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.AbstractCodeGenerator);
+
 $core.addMethod(
 $core.method({
 selector: "pseudoVariables",
@@ -265,8 +304,11 @@ function $SemanticAnalyzer(){return $globals.SemanticAnalyzer||(typeof SemanticA
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=$recv($SemanticAnalyzer())._on_(self._currentClass());
+var $2,$3,$1;
+$2=$recv($SemanticAnalyzer())._on_(self._currentClass());
+$recv($2)._thePackage_(self._currentPackage());
+$3=$recv($2)._yourself();
+$1=$3;
 return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"semanticAnalyzer",{},$globals.CodeGenerator)});
@@ -274,10 +316,10 @@ return $1;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "semanticAnalyzer\x0a\x09^ SemanticAnalyzer on: self currentClass",
+source: "semanticAnalyzer\x0a\x09^ (SemanticAnalyzer on: self currentClass)\x0a\x09\x09thePackage: self currentPackage;\x0a\x09\x09yourself",
 referencedClasses: ["SemanticAnalyzer"],
 //>>excludeEnd("ide");
-messageSends: ["on:", "currentClass"]
+messageSends: ["thePackage:", "on:", "currentClass", "currentPackage", "yourself"]
 }),
 $globals.CodeGenerator);
 
@@ -313,7 +355,7 @@ $globals.CodeGenerator);
 
 
 
-$core.addClass('Compiler', $globals.Object, ['currentClass', 'source', 'unknownVariables', 'codeGeneratorClass'], 'Compiler-Core');
+$core.addClass('Compiler', $globals.Object, ['currentClass', 'currentPackage', 'source', 'unknownVariables', 'codeGeneratorClass'], 'Compiler-Core');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Compiler.comment="I provide the public interface for compiling Amber source code into JavaScript.\x0a\x0aThe code generator used to produce JavaScript can be plugged with `#codeGeneratorClass`.\x0aThe default code generator is an instance of `InlinedCodeGenerator`";
 //>>excludeEnd("ide");
@@ -369,85 +411,28 @@ $globals.Compiler);
 
 $core.addMethod(
 $core.method({
-selector: "compile:",
+selector: "compile:forClass:protocol:",
 protocol: 'compiling',
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=self._compileNode_(self._parse_(aString));
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString},$globals.Compiler)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "compile: aString\x0a\x09^ self compileNode: (self parse: aString)",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["compileNode:", "parse:"]
-}),
-$globals.Compiler);
-
-$core.addMethod(
-$core.method({
-selector: "compile:forClass:",
-protocol: 'compiling',
-fn: function (aString,aClass){
+fn: function (aString,aClass,anotherString){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-self._currentClass_(aClass);
+var $2,$1;
 self._source_(aString);
-$1=self._compile_(aString);
+$2=self._compileNode_forClass_package_(self._parse_(aString),aClass,$recv(aClass)._packageOfProtocol_(anotherString));
+$1=$2;
 return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"compile:forClass:",{aString:aString,aClass:aClass},$globals.Compiler)});
+}, function($ctx1) {$ctx1.fill(self,"compile:forClass:protocol:",{aString:aString,aClass:aClass,anotherString:anotherString},$globals.Compiler)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aClass"],
-source: "compile: aString forClass: aClass\x0a\x09self currentClass: aClass.\x0a\x09self source: aString.\x0a\x09^ self compile: aString",
+args: ["aString", "aClass", "anotherString"],
+source: "compile: aString forClass: aClass protocol: anotherString\x0a\x09^ self\x0a\x09\x09source: aString;\x0a\x09\x09compileNode: (self parse: aString)\x0a\x09\x09forClass: aClass\x0a\x09\x09package: (aClass packageOfProtocol: anotherString)",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["currentClass:", "source:", "compile:"]
-}),
-$globals.Compiler);
-
-$core.addMethod(
-$core.method({
-selector: "compileExpression:",
-protocol: 'compiling',
-fn: function (aString){
-var self=this;
-function $DoIt(){return $globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1,$2;
-self._currentClass_($DoIt());
-$1=$recv("doIt ^ [ ".__comma(aString)).__comma(" ] value");
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx[","]=1;
-//>>excludeEnd("ctx");
-self._source_($1);
-$2=self._compileNode_(self._parse_(self._source()));
-return $2;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"compileExpression:",{aString:aString},$globals.Compiler)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "compileExpression: aString\x0a\x09self currentClass: DoIt.\x0a\x09self source: 'doIt ^ [ ', aString, ' ] value'.\x0a\x09^ self compileNode: (self parse: self source)",
-referencedClasses: ["DoIt"],
-//>>excludeEnd("ide");
-messageSends: ["currentClass:", "source:", ",", "compileNode:", "parse:", "source"]
+messageSends: ["source:", "compileNode:forClass:package:", "parse:", "packageOfProtocol:"]
 }),
 $globals.Compiler);
 
@@ -460,25 +445,23 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1,$2;
-self._currentClass_($recv(anObject)._class());
-$1=$recv("xxxDoIt ^ [ ".__comma(aString)).__comma(" ] value");
+var $2,$1;
+$2=$recv("xxxDoIt ^ [ ".__comma(aString)).__comma(" ] value");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx[","]=1;
 //>>excludeEnd("ctx");
-self._source_($1);
-$2=self._compileNode_(self._parse_(self._source()));
-return $2;
+$1=self._compile_forClass_protocol_($2,$recv(anObject)._class(),"**xxxDoIt");
+return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"compileExpression:on:",{aString:aString,anObject:anObject},$globals.Compiler)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject"],
-source: "compileExpression: aString on: anObject\x0a\x09self currentClass: anObject class.\x0a\x09self source: 'xxxDoIt ^ [ ', aString, ' ] value'.\x0a\x09^ self compileNode: (self parse: self source)",
+source: "compileExpression: aString on: anObject\x0a\x09^ self\x0a\x09\x09compile: 'xxxDoIt ^ [ ', aString, ' ] value'\x0a\x09\x09forClass: anObject class\x0a\x09\x09protocol: '**xxxDoIt'",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["currentClass:", "class", "source:", ",", "compileNode:", "parse:", "source"]
+messageSends: ["compile:forClass:protocol:", ",", "class"]
 }),
 $globals.Compiler);
 
@@ -496,7 +479,8 @@ var $1,$2,$3;
 generator=$recv(self._codeGeneratorClass())._new();
 $1=generator;
 $recv($1)._source_(self._source());
-$2=$recv($1)._currentClass_(self._currentClass());
+$recv($1)._currentClass_(self._currentClass());
+$2=$recv($1)._currentPackage_(self._currentPackage());
 result=$recv(generator)._compileNode_(aNode);
 self._unknownVariables_([]);
 $3=result;
@@ -507,10 +491,38 @@ return $3;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "compileNode: aNode\x0a\x09| generator result |\x0a\x09generator := self codeGeneratorClass new.\x0a\x09generator\x0a\x09\x09source: self source;\x0a\x09\x09currentClass: self currentClass.\x0a\x09result := generator compileNode: aNode.\x0a\x09self unknownVariables: #().\x0a\x09^ result",
+source: "compileNode: aNode\x0a\x09| generator result |\x0a\x09generator := self codeGeneratorClass new.\x0a\x09generator\x0a\x09\x09source: self source;\x0a\x09\x09currentClass: self currentClass;\x0a\x09\x09currentPackage: self currentPackage.\x0a\x09result := generator compileNode: aNode.\x0a\x09self unknownVariables: #().\x0a\x09^ result",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "compileNode:", "unknownVariables:"]
+messageSends: ["new", "codeGeneratorClass", "source:", "source", "currentClass:", "currentClass", "currentPackage:", "currentPackage", "compileNode:", "unknownVariables:"]
+}),
+$globals.Compiler);
+
+$core.addMethod(
+$core.method({
+selector: "compileNode:forClass:package:",
+protocol: 'compiling',
+fn: function (aNode,aClass,aPackage){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$1;
+self._currentClass_(aClass);
+self._currentPackage_(aPackage);
+$2=self._compileNode_(aNode);
+$1=$2;
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"compileNode:forClass:package:",{aNode:aNode,aClass:aClass,aPackage:aPackage},$globals.Compiler)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aNode", "aClass", "aPackage"],
+source: "compileNode: aNode forClass: aClass package: aPackage\x0a\x09^ self\x0a\x09\x09currentClass: aClass;\x0a\x09\x09currentPackage: aPackage;\x0a\x09\x09compileNode: aNode",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["currentClass:", "currentPackage:", "compileNode:"]
 }),
 $globals.Compiler);
 
@@ -553,6 +565,45 @@ messageSends: []
 }),
 $globals.Compiler);
 
+$core.addMethod(
+$core.method({
+selector: "currentPackage",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+var $1;
+$1=self["@currentPackage"];
+return $1;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "currentPackage\x0a\x09^ currentPackage",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.Compiler);
+
+$core.addMethod(
+$core.method({
+selector: "currentPackage:",
+protocol: 'accessing',
+fn: function (anObject){
+var self=this;
+self["@currentPackage"]=anObject;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "currentPackage: anObject\x0a\x09currentPackage := anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.Compiler);
+
 $core.addMethod(
 $core.method({
 selector: "eval:",
@@ -676,7 +727,7 @@ function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="un
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-compiledMethod=self._eval_forPackage_(self._compile_forClass_(aString,aBehavior),$recv(aBehavior)._packageOfProtocol_(anotherString));
+compiledMethod=self._eval_forPackage_(self._compile_forClass_protocol_(aString,aBehavior,anotherString),$recv(aBehavior)._packageOfProtocol_(anotherString));
 $1=$recv($recv($ClassBuilder())._new())._installMethod_forClass_protocol_(compiledMethod,aBehavior,anotherString);
 return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -685,10 +736,10 @@ return $1;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aBehavior", "anotherString"],
-source: "install: aString forClass: aBehavior protocol: anotherString\x0a\x09| compiledMethod |\x0a\x09compiledMethod := self\x0a\x09\x09eval: (self compile: aString forClass: aBehavior)\x0a\x09\x09forPackage: (aBehavior packageOfProtocol: anotherString).\x0a\x09^ ClassBuilder new\x0a\x09\x09installMethod: compiledMethod\x0a\x09\x09forClass: aBehavior\x0a\x09\x09protocol: anotherString",
+source: "install: aString forClass: aBehavior protocol: anotherString\x0a\x09| compiledMethod |\x0a\x09compiledMethod := self\x0a\x09\x09eval: (self compile: aString forClass: aBehavior protocol: anotherString)\x0a\x09\x09forPackage: (aBehavior packageOfProtocol: anotherString).\x0a\x09^ ClassBuilder new\x0a\x09\x09installMethod: compiledMethod\x0a\x09\x09forClass: aBehavior\x0a\x09\x09protocol: anotherString",
 referencedClasses: ["ClassBuilder"],
 //>>excludeEnd("ide");
-messageSends: ["eval:forPackage:", "compile:forClass:", "packageOfProtocol:", "installMethod:forClass:protocol:", "new"]
+messageSends: ["eval:forPackage:", "compile:forClass:protocol:", "packageOfProtocol:", "installMethod:forClass:protocol:", "new"]
 }),
 $globals.Compiler);
 

+ 41 - 22
bower_components/amber/src/Compiler-Core.st

@@ -1,6 +1,6 @@
 Smalltalk createPackage: 'Compiler-Core'!
 Object subclass: #AbstractCodeGenerator
-	instanceVariableNames: 'currentClass source'
+	instanceVariableNames: 'currentClass currentPackage source'
 	package: 'Compiler-Core'!
 !AbstractCodeGenerator commentStamp!
 I am the abstract super class of all code generators and provide their common API.!
@@ -24,6 +24,14 @@ currentClass: aClass
 	currentClass := aClass
 !
 
+currentPackage
+	^ currentPackage
+!
+
+currentPackage: anObject
+	currentPackage := anObject
+!
+
 pseudoVariables
 	^ Smalltalk pseudoVariableNames
 !
@@ -66,7 +74,9 @@ irTranslator
 !
 
 semanticAnalyzer
-	^ SemanticAnalyzer on: self currentClass
+	^ (SemanticAnalyzer on: self currentClass)
+		thePackage: self currentPackage;
+		yourself
 !
 
 translator
@@ -77,7 +87,7 @@ translator
 ! !
 
 Object subclass: #Compiler
-	instanceVariableNames: 'currentClass source unknownVariables codeGeneratorClass'
+	instanceVariableNames: 'currentClass currentPackage source unknownVariables codeGeneratorClass'
 	package: 'Compiler-Core'!
 !Compiler commentStamp!
 I provide the public interface for compiling Amber source code into JavaScript.
@@ -103,6 +113,14 @@ currentClass: aClass
 	currentClass := aClass
 !
 
+currentPackage
+	^ currentPackage
+!
+
+currentPackage: anObject
+	currentPackage := anObject
+!
+
 source
 	^ source ifNil: [ '' ]
 !
@@ -121,26 +139,19 @@ unknownVariables: aCollection
 
 !Compiler methodsFor: 'compiling'!
 
-compile: aString
-	^ self compileNode: (self parse: aString)
-!
-
-compile: aString forClass: aClass
-	self currentClass: aClass.
-	self source: aString.
-	^ self compile: aString
-!
-
-compileExpression: aString
-	self currentClass: DoIt.
-	self source: 'doIt ^ [ ', aString, ' ] value'.
-	^ self compileNode: (self parse: self source)
+compile: aString forClass: aClass protocol: anotherString
+	^ self
+		source: aString;
+		compileNode: (self parse: aString)
+		forClass: aClass
+		package: (aClass packageOfProtocol: anotherString)
 !
 
 compileExpression: aString on: anObject
-	self currentClass: anObject class.
-	self source: 'xxxDoIt ^ [ ', aString, ' ] value'.
-	^ self compileNode: (self parse: self source)
+	^ self
+		compile: 'xxxDoIt ^ [ ', aString, ' ] value'
+		forClass: anObject class
+		protocol: '**xxxDoIt'
 !
 
 compileNode: aNode
@@ -148,12 +159,20 @@ compileNode: aNode
 	generator := self codeGeneratorClass new.
 	generator
 		source: self source;
-		currentClass: self currentClass.
+		currentClass: self currentClass;
+		currentPackage: self currentPackage.
 	result := generator compileNode: aNode.
 	self unknownVariables: #().
 	^ result
 !
 
+compileNode: aNode forClass: aClass package: aPackage
+	^ self
+		currentClass: aClass;
+		currentPackage: aPackage;
+		compileNode: aNode
+!
+
 eval: aString
 	<return eval(aString)>
 !
@@ -183,7 +202,7 @@ evaluateExpression: aString on: anObject
 install: aString forClass: aBehavior protocol: anotherString
 	| compiledMethod |
 	compiledMethod := self
-		eval: (self compile: aString forClass: aBehavior)
+		eval: (self compile: aString forClass: aBehavior protocol: anotherString)
 		forPackage: (aBehavior packageOfProtocol: anotherString).
 	^ ClassBuilder new
 		installMethod: compiledMethod

+ 1 - 1
bower_components/amber/src/Compiler-Exceptions.js

@@ -1,4 +1,4 @@
-define("amber_core/Compiler-Exceptions", ["amber/boot", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Objects"], function($boot){
+define("amber_core/Compiler-Exceptions", ["amber/boot", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Objects"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Compiler-Exceptions');
 $core.packages["Compiler-Exceptions"].innerEval = function (expr) { return eval(expr); };

+ 1 - 1
bower_components/amber/src/Compiler-IR.js

@@ -1,4 +1,4 @@
-define("amber_core/Compiler-IR", ["amber/boot", "amber_core/Compiler-Core", "amber_core/Kernel-Objects", "amber_core/Kernel-Methods"], function($boot){
+define("amber_core/Compiler-IR", ["amber/boot", "amber_core/Compiler-Core", "amber_core/Kernel-Objects", "amber_core/Kernel-Methods"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Compiler-IR');
 $core.packages["Compiler-IR"].innerEval = function (expr) { return eval(expr); };

+ 1 - 1
bower_components/amber/src/Compiler-Inlining.js

@@ -1,4 +1,4 @@
-define("amber_core/Compiler-Inlining", ["amber/boot", "amber_core/Compiler-IR", "amber_core/Kernel-Objects", "amber_core/Compiler-Core"], function($boot){
+define("amber_core/Compiler-Inlining", ["amber/boot", "amber_core/Compiler-IR", "amber_core/Kernel-Objects", "amber_core/Compiler-Core"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Compiler-Inlining');
 $core.packages["Compiler-Inlining"].innerEval = function (expr) { return eval(expr); };

+ 6 - 6
bower_components/amber/src/Compiler-Interpreter.js

@@ -1,4 +1,4 @@
-define("amber_core/Compiler-Interpreter", ["amber/boot", "amber_core/Kernel-Methods", "amber_core/Compiler-Semantic", "amber_core/Kernel-Objects", "amber_core/Compiler-Core", "amber_core/Kernel-Exceptions", "amber_core/Compiler-AST"], function($boot){
+define("amber_core/Compiler-Interpreter", ["amber/boot", "amber_core/Kernel-Methods", "amber_core/Compiler-Semantic", "amber_core/Kernel-Objects", "amber_core/Compiler-Core", "amber_core/Kernel-Exceptions", "amber_core/Compiler-AST"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Compiler-Interpreter');
 $core.packages["Compiler-Interpreter"].innerEval = function (expr) { return eval(expr); };
@@ -3390,7 +3390,7 @@ selector: "visitVariableNode:",
 protocol: 'visiting',
 fn: function (aNode){
 var self=this;
-function $PlatformInterface(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+function $Platform(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}
 function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -3402,7 +3402,7 @@ $ctx1.sendIdx["binding"]=1;
 //>>excludeEnd("ctx");
 $1=$recv($2)._isUnknownVar();
 if($core.assert($1)){
-$5=$recv($PlatformInterface())._globals();
+$5=$recv($Platform())._globals();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["globals"]=1;
 //>>excludeEnd("ctx");
@@ -3468,7 +3468,7 @@ return $recv($16)._at_ifAbsent_($17,(function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
-return $recv($recv($PlatformInterface())._globals())._at_($recv(aNode)._value());
+return $recv($recv($Platform())._globals())._at_($recv(aNode)._value());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)});
 //>>excludeEnd("ctx");
@@ -3487,8 +3487,8 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "visitVariableNode: aNode\x0a\x09aNode binding isUnknownVar ifTrue: [\x0a\x09\x09^ self push: (PlatformInterface globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].\x0a\x09\x09\x0a\x09self push: (aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode value ]\x0a\x09\x09ifFalse: [ self context \x0a\x09\x09\x09localAt: aNode value\x0a\x09\x09\x09ifAbsent: [\x0a\x09\x09\x09\x09aNode value isCapitalized\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09Smalltalk globals \x0a\x09\x09\x09\x09\x09\x09\x09at: aNode value \x0a\x09\x09\x09\x09\x09\x09\x09ifAbsent: [ PlatformInterface globals at: aNode value ] ] ] ])",
-referencedClasses: ["PlatformInterface", "Smalltalk"],
+source: "visitVariableNode: aNode\x0a\x09aNode binding isUnknownVar ifTrue: [\x0a\x09\x09^ self push: (Platform globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].\x0a\x09\x09\x0a\x09self push: (aNode binding isInstanceVar\x0a\x09\x09ifTrue: [ self context receiver instVarAt: aNode value ]\x0a\x09\x09ifFalse: [ self context \x0a\x09\x09\x09localAt: aNode value\x0a\x09\x09\x09ifAbsent: [\x0a\x09\x09\x09\x09aNode value isCapitalized\x0a\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09Smalltalk globals \x0a\x09\x09\x09\x09\x09\x09\x09at: aNode value \x0a\x09\x09\x09\x09\x09\x09\x09ifAbsent: [ Platform globals at: aNode value ] ] ] ])",
+referencedClasses: ["Platform", "Smalltalk"],
 //>>excludeEnd("ide");
 messageSends: ["ifTrue:", "isUnknownVar", "binding", "push:", "at:ifAbsent:", "globals", "value", "error:", "ifTrue:ifFalse:", "isInstanceVar", "instVarAt:", "receiver", "context", "localAt:ifAbsent:", "isCapitalized", "at:"]
 }),

+ 2 - 2
bower_components/amber/src/Compiler-Interpreter.st

@@ -849,7 +849,7 @@ visitValueNode: aNode
 
 visitVariableNode: aNode
 	aNode binding isUnknownVar ifTrue: [
-		^ self push: (PlatformInterface globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].
+		^ self push: (Platform globals at: aNode value ifAbsent: [ self error: 'Unknown variable' ]) ].
 		
 	self push: (aNode binding isInstanceVar
 		ifTrue: [ self context receiver instVarAt: aNode value ]
@@ -860,7 +860,7 @@ visitVariableNode: aNode
 					ifTrue: [
 						Smalltalk globals 
 							at: aNode value 
-							ifAbsent: [ PlatformInterface globals at: aNode value ] ] ] ])
+							ifAbsent: [ Platform globals at: aNode value ] ] ] ])
 ! !
 
 Error subclass: #ASTInterpreterError

+ 71 - 14
bower_components/amber/src/Compiler-Semantic.js

@@ -1,4 +1,4 @@
-define("amber_core/Compiler-Semantic", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Compiler-Core"], function($boot){
+define("amber_core/Compiler-Semantic", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Compiler-Core"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Compiler-Semantic');
 $core.packages["Compiler-Semantic"].innerEval = function (expr) { return eval(expr); };
@@ -1759,7 +1759,7 @@ $globals.UnknownVar);
 
 
 
-$core.addClass('SemanticAnalyzer', $globals.NodeVisitor, ['currentScope', 'blockIndex', 'theClass', 'classReferences', 'messageSends', 'superSends'], 'Compiler-Semantic');
+$core.addClass('SemanticAnalyzer', $globals.NodeVisitor, ['currentScope', 'blockIndex', 'thePackage', 'theClass', 'classReferences', 'messageSends', 'superSends'], 'Compiler-Semantic');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.SemanticAnalyzer.comment="I semantically analyze the abstract syntax tree and annotate it with informations such as non local returns and variable scopes.";
 //>>excludeEnd("ide");
@@ -1844,7 +1844,7 @@ $1=$recv($recv($recv($recv($Smalltalk())._globalJsVariables())._includes_(identi
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return self._isVariableGloballyUndefined_(identifier);
+return self._isVariableUndefined_inPackage_(identifier,self._thePackage());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
@@ -1869,34 +1869,52 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNode"],
-source: "errorUnknownVariable: aNode\x0a\x09\x22Throw an error if the variable is undeclared in the global JS scope (i.e. window).\x0a\x09We allow all variables listed by Smalltalk>>#globalJsVariables.\x0a\x09This list includes: `jQuery`, `window`, `document`,  `process` and `global`\x0a\x09for nodejs and browser environments.\x0a\x09\x0a\x09This is only to make sure compilation works on both browser-based and nodejs environments.\x0a\x09The ideal solution would be to use a pragma instead\x22\x0a\x0a\x09| identifier |\x0a\x09identifier := aNode value.\x0a\x09\x0a\x09((Smalltalk globalJsVariables includes: identifier) not\x0a\x09\x09and: [ self isVariableGloballyUndefined: identifier ])\x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09UnknownVariableError new\x0a\x09\x09\x09\x09\x09variableName: aNode value;\x0a\x09\x09\x09\x09\x09signal ]\x0a\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09currentScope methodScope unknownVariables add: aNode value ]",
+source: "errorUnknownVariable: aNode\x0a\x09\x22Throw an error if the variable is undeclared in the global JS scope (i.e. window).\x0a\x09We allow all variables listed by Smalltalk>>#globalJsVariables.\x0a\x09This list includes: `window`, `document`,  `process` and `global`\x0a\x09for nodejs and browser environments.\x0a\x09\x0a\x09This is only to make sure compilation works on both browser-based and nodejs environments.\x0a\x09The ideal solution would be to use a pragma instead\x22\x0a\x0a\x09| identifier |\x0a\x09identifier := aNode value.\x0a\x09\x0a\x09((Smalltalk globalJsVariables includes: identifier) not\x0a\x09\x09and: [ self isVariableUndefined: identifier inPackage: self thePackage ])\x0a\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09UnknownVariableError new\x0a\x09\x09\x09\x09\x09variableName: aNode value;\x0a\x09\x09\x09\x09\x09signal ]\x0a\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09currentScope methodScope unknownVariables add: aNode value ]",
 referencedClasses: ["Smalltalk", "UnknownVariableError"],
 //>>excludeEnd("ide");
-messageSends: ["value", "ifTrue:ifFalse:", "and:", "not", "includes:", "globalJsVariables", "isVariableGloballyUndefined:", "variableName:", "new", "signal", "add:", "unknownVariables", "methodScope"]
+messageSends: ["value", "ifTrue:ifFalse:", "and:", "not", "includes:", "globalJsVariables", "isVariableUndefined:inPackage:", "thePackage", "variableName:", "new", "signal", "add:", "unknownVariables", "methodScope"]
 }),
 $globals.SemanticAnalyzer);
 
 $core.addMethod(
 $core.method({
-selector: "isVariableGloballyUndefined:",
+selector: "isVariableUndefined:inPackage:",
 protocol: 'testing',
-fn: function (aString){
+fn: function (aString,aPackage){
 var self=this;
+function $Compiler(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return eval('typeof ' + aString + ' == "undefined"');
-return self;
+var $1,$3,$4,$2,$receiver;
+if(($receiver = aPackage) == null || $receiver.isNil){
+aPackage;
+} else {
+var packageKnownVars;
+packageKnownVars=$recv($recv($recv(aPackage)._imports())._reject_("isString"))._collect_("key");
+packageKnownVars;
+$1=$recv(packageKnownVars)._includes_(aString);
+if($core.assert($1)){
+return false;
+};
+};
+$3=$recv($Compiler())._new();
+$4=$recv("typeof ".__comma(aString)).__comma(" == \x22undefined\x22");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx[","]=1;
+//>>excludeEnd("ctx");
+$2=$recv($3)._eval_($4);
+return $2;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"isVariableGloballyUndefined:",{aString:aString},$globals.SemanticAnalyzer)});
+}, function($ctx1) {$ctx1.fill(self,"isVariableUndefined:inPackage:",{aString:aString,aPackage:aPackage},$globals.SemanticAnalyzer)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "isVariableGloballyUndefined: aString\x0a\x09<return eval('typeof ' + aString + ' == \x22undefined\x22')>",
-referencedClasses: [],
+args: ["aString", "aPackage"],
+source: "isVariableUndefined: aString inPackage: aPackage\x0a\x09aPackage ifNotNil: [\x0a\x09\x09| packageKnownVars |\x0a\x09\x09packageKnownVars := (aPackage imports\x0a\x09\x09\x09reject: #isString)\x0a\x09\x09\x09collect: #key.\x0a\x09\x09(packageKnownVars includes: aString) ifTrue: [ ^ false ]].\x0a\x09^ Compiler new\x0a\x09\x09eval: 'typeof ', aString, ' == \x22undefined\x22'",
+referencedClasses: ["Compiler"],
 //>>excludeEnd("ide");
-messageSends: []
+messageSends: ["ifNotNil:", "collect:", "reject:", "imports", "ifTrue:", "includes:", "eval:", "new", ","]
 }),
 $globals.SemanticAnalyzer);
 
@@ -2172,6 +2190,45 @@ messageSends: []
 }),
 $globals.SemanticAnalyzer);
 
+$core.addMethod(
+$core.method({
+selector: "thePackage",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+var $1;
+$1=self["@thePackage"];
+return $1;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "thePackage\x0a\x09^ thePackage",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.SemanticAnalyzer);
+
+$core.addMethod(
+$core.method({
+selector: "thePackage:",
+protocol: 'accessing',
+fn: function (aPackage){
+var self=this;
+self["@thePackage"]=aPackage;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aPackage"],
+source: "thePackage: aPackage\x0a\x09thePackage := aPackage",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.SemanticAnalyzer);
+
 $core.addMethod(
 $core.method({
 selector: "validateVariableScope:",

+ 20 - 5
bower_components/amber/src/Compiler-Semantic.st

@@ -404,7 +404,7 @@ isUnknownVar
 ! !
 
 NodeVisitor subclass: #SemanticAnalyzer
-	instanceVariableNames: 'currentScope blockIndex theClass classReferences messageSends superSends'
+	instanceVariableNames: 'currentScope blockIndex thePackage theClass classReferences messageSends superSends'
 	package: 'Compiler-Semantic'!
 !SemanticAnalyzer commentStamp!
 I semantically analyze the abstract syntax tree and annotate it with informations such as non local returns and variable scopes.!
@@ -429,6 +429,14 @@ theClass
 
 theClass: aClass
 	theClass := aClass
+!
+
+thePackage
+	^ thePackage
+!
+
+thePackage: aPackage
+	thePackage := aPackage
 ! !
 
 !SemanticAnalyzer methodsFor: 'error handling'!
@@ -442,7 +450,7 @@ errorShadowingVariable: aString
 errorUnknownVariable: aNode
 	"Throw an error if the variable is undeclared in the global JS scope (i.e. window).
 	We allow all variables listed by Smalltalk>>#globalJsVariables.
-	This list includes: `jQuery`, `window`, `document`,  `process` and `global`
+	This list includes: `window`, `document`,  `process` and `global`
 	for nodejs and browser environments.
 	
 	This is only to make sure compilation works on both browser-based and nodejs environments.
@@ -452,7 +460,7 @@ errorUnknownVariable: aNode
 	identifier := aNode value.
 	
 	((Smalltalk globalJsVariables includes: identifier) not
-		and: [ self isVariableGloballyUndefined: identifier ])
+		and: [ self isVariableUndefined: identifier inPackage: self thePackage ])
 			ifTrue: [
 				UnknownVariableError new
 					variableName: aNode value;
@@ -507,8 +515,15 @@ validateVariableScope: aString
 
 !SemanticAnalyzer methodsFor: 'testing'!
 
-isVariableGloballyUndefined: aString
-	<return eval('typeof ' + aString + ' == "undefined"')>
+isVariableUndefined: aString inPackage: aPackage
+	aPackage ifNotNil: [
+		| packageKnownVars |
+		packageKnownVars := (aPackage imports
+			reject: #isString)
+			collect: #key.
+		(packageKnownVars includes: aString) ifTrue: [ ^ false ]].
+	^ Compiler new
+		eval: 'typeof ', aString, ' == "undefined"'
 ! !
 
 !SemanticAnalyzer methodsFor: 'visiting'!

+ 1 - 1
bower_components/amber/src/Compiler-Tests.js

@@ -1,4 +1,4 @@
-define("amber_core/Compiler-Tests", ["amber/boot", "amber_core/SUnit"], function($boot){
+define("amber_core/Compiler-Tests", ["amber/boot", "amber_core/SUnit"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Compiler-Tests');
 $core.packages["Compiler-Tests"].innerEval = function (expr) { return eval(expr); };

+ 1 - 1
bower_components/amber/src/Kernel-Announcements.js

@@ -1,4 +1,4 @@
-define("amber_core/Kernel-Announcements", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
+define("amber_core/Kernel-Announcements", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Kernel-Announcements');
 $core.packages["Kernel-Announcements"].innerEval = function (expr) { return eval(expr); };

+ 4 - 374
bower_components/amber/src/Kernel-Classes.js

@@ -1,4 +1,4 @@
-define("amber_core/Kernel-Classes", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
+define("amber_core/Kernel-Classes", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Kernel-Classes');
 $core.packages["Kernel-Classes"].innerEval = function (expr) { return eval(expr); };
@@ -489,85 +489,6 @@ messageSends: ["basicAt:put:", "announce:", "current", "theClass:", "new", "your
 }),
 $globals.Behavior);
 
-$core.addMethod(
-$core.method({
-selector: "commentStamp",
-protocol: 'accessing',
-fn: function (){
-var self=this;
-function $ClassCommentReader(){return $globals.ClassCommentReader||(typeof ClassCommentReader=="undefined"?nil:ClassCommentReader)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $2,$3,$1;
-$2=$recv($ClassCommentReader())._new();
-$recv($2)._class_(self);
-$3=$recv($2)._yourself();
-$1=$3;
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"commentStamp",{},$globals.Behavior)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "commentStamp\x0a\x09^ ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
-referencedClasses: ["ClassCommentReader"],
-//>>excludeEnd("ide");
-messageSends: ["class:", "new", "yourself"]
-}),
-$globals.Behavior);
-
-$core.addMethod(
-$core.method({
-selector: "commentStamp:prior:",
-protocol: 'accessing',
-fn: function (aStamp,prior){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=self._commentStamp();
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"commentStamp:prior:",{aStamp:aStamp,prior:prior},$globals.Behavior)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aStamp", "prior"],
-source: "commentStamp: aStamp prior: prior\x0a\x09\x09^ self commentStamp",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["commentStamp"]
-}),
-$globals.Behavior);
-
-$core.addMethod(
-$core.method({
-selector: "compile:",
-protocol: 'compiling',
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=self._compile_protocol_(aString,"");
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString},$globals.Behavior)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "compile: aString\x0a\x09^ self compile: aString protocol: ''",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["compile:protocol:"]
-}),
-$globals.Behavior);
-
 $core.addMethod(
 $core.method({
 selector: "compile:protocol:",
@@ -1032,60 +953,6 @@ messageSends: ["values", "methodDictionary"]
 }),
 $globals.Behavior);
 
-$core.addMethod(
-$core.method({
-selector: "methodsFor:",
-protocol: 'accessing',
-fn: function (aString){
-var self=this;
-function $ClassCategoryReader(){return $globals.ClassCategoryReader||(typeof ClassCategoryReader=="undefined"?nil:ClassCategoryReader)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $2,$3,$1;
-$2=$recv($ClassCategoryReader())._new();
-$recv($2)._class_category_(self,aString);
-$3=$recv($2)._yourself();
-$1=$3;
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"methodsFor:",{aString:aString},$globals.Behavior)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "methodsFor: aString\x0a\x09^ ClassCategoryReader new\x0a\x09\x09class: self category: aString;\x0a\x09\x09yourself",
-referencedClasses: ["ClassCategoryReader"],
-//>>excludeEnd("ide");
-messageSends: ["class:category:", "new", "yourself"]
-}),
-$globals.Behavior);
-
-$core.addMethod(
-$core.method({
-selector: "methodsFor:stamp:",
-protocol: 'accessing',
-fn: function (aString,aStamp){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=self._methodsFor_(aString);
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"methodsFor:stamp:",{aString:aString,aStamp:aStamp},$globals.Behavior)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aStamp"],
-source: "methodsFor: aString stamp: aStamp\x0a\x09\x22Added for file-in compatibility, ignores stamp.\x22\x0a\x09^ self methodsFor: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["methodsFor:"]
-}),
-$globals.Behavior);
-
 $core.addMethod(
 $core.method({
 selector: "methodsInProtocol:",
@@ -2968,7 +2835,7 @@ $1=self._basicRemoveClass_(newClass);
 $ctx2.sendIdx["basicRemoveClass:"]=1;
 //>>excludeEnd("ctx");
 $1;
-return $recv(exception)._signal();
+return $recv(exception)._resignal();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1,2)});
 //>>excludeEnd("ctx");
@@ -3001,10 +2868,10 @@ return $5;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["className", "aClass", "aCollection", "packageName"],
-source: "migrateClassNamed: className superclass: aClass instanceVariableNames: aCollection package: packageName\x0a\x09| oldClass newClass tmp |\x0a\x09\x0a\x09tmp := 'new*', className.\x0a\x09oldClass := Smalltalk globals at: className.\x0a\x09\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass\x0a\x09\x09named: tmp\x0a\x09\x09instanceVariableNames: aCollection\x0a\x09\x09package: packageName.\x0a\x0a\x09self basicSwapClassNames: oldClass with: newClass.\x0a\x0a\x09[ self copyClass: oldClass to: newClass ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :exception |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09basicSwapClassNames: oldClass with: newClass;\x0a\x09\x09\x09\x09basicRemoveClass: newClass.\x0a\x09\x09\x09exception signal ].\x0a\x0a\x09self\x0a\x09\x09rawRenameClass: oldClass to: tmp;\x0a\x09\x09rawRenameClass: newClass to: className.\x0a\x0a\x09oldClass subclasses \x0a\x09\x09do: [ :each | self migrateClass: each superclass: newClass ].\x0a\x0a\x09self basicRemoveClass: oldClass.\x0a\x09\x0a\x09SystemAnnouncer current announce: (ClassMigrated new\x0a\x09\x09theClass: newClass;\x0a\x09\x09oldClass: oldClass;\x0a\x09\x09yourself).\x0a\x09\x0a\x09^ newClass",
+source: "migrateClassNamed: className superclass: aClass instanceVariableNames: aCollection package: packageName\x0a\x09| oldClass newClass tmp |\x0a\x09\x0a\x09tmp := 'new*', className.\x0a\x09oldClass := Smalltalk globals at: className.\x0a\x09\x0a\x09newClass := self\x0a\x09\x09addSubclassOf: aClass\x0a\x09\x09named: tmp\x0a\x09\x09instanceVariableNames: aCollection\x0a\x09\x09package: packageName.\x0a\x0a\x09self basicSwapClassNames: oldClass with: newClass.\x0a\x0a\x09[ self copyClass: oldClass to: newClass ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :exception |\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09basicSwapClassNames: oldClass with: newClass;\x0a\x09\x09\x09\x09basicRemoveClass: newClass.\x0a\x09\x09\x09\x09exception resignal ].\x0a\x0a\x09self\x0a\x09\x09rawRenameClass: oldClass to: tmp;\x0a\x09\x09rawRenameClass: newClass to: className.\x0a\x0a\x09oldClass subclasses \x0a\x09\x09do: [ :each | self migrateClass: each superclass: newClass ].\x0a\x0a\x09self basicRemoveClass: oldClass.\x0a\x09\x0a\x09SystemAnnouncer current announce: (ClassMigrated new\x0a\x09\x09theClass: newClass;\x0a\x09\x09oldClass: oldClass;\x0a\x09\x09yourself).\x0a\x09\x0a\x09^ newClass",
 referencedClasses: ["Smalltalk", "Error", "SystemAnnouncer", "ClassMigrated"],
 //>>excludeEnd("ide");
-messageSends: [",", "at:", "globals", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "copyClass:to:", "basicRemoveClass:", "signal", "rawRenameClass:to:", "do:", "subclasses", "migrateClass:superclass:", "announce:", "current", "theClass:", "new", "oldClass:", "yourself"]
+messageSends: [",", "at:", "globals", "addSubclassOf:named:instanceVariableNames:package:", "basicSwapClassNames:with:", "on:do:", "copyClass:to:", "basicRemoveClass:", "resignal", "rawRenameClass:to:", "do:", "subclasses", "migrateClass:superclass:", "announce:", "current", "theClass:", "new", "oldClass:", "yourself"]
 }),
 $globals.ClassBuilder);
 
@@ -3157,243 +3024,6 @@ $globals.ClassBuilder);
 
 
 
-$core.addClass('ClassCategoryReader', $globals.Object, ['class', 'category'], 'Kernel-Classes');
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.ClassCategoryReader.comment="I provide a mechanism for retrieving class descriptions stored on a file in the Smalltalk chunk format.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "class:category:",
-protocol: 'accessing',
-fn: function (aClass,aString){
-var self=this;
-self["@class"]=aClass;
-self["@category"]=aString;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aClass", "aString"],
-source: "class: aClass category: aString\x0a\x09class := aClass.\x0a\x09category := aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.ClassCategoryReader);
-
-$core.addMethod(
-$core.method({
-selector: "compileMethod:",
-protocol: 'private',
-fn: function (aString){
-var self=this;
-function $Compiler(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv($recv($Compiler())._new())._install_forClass_protocol_(aString,self["@class"],self["@category"]);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString},$globals.ClassCategoryReader)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "compileMethod: aString\x0a\x09Compiler new install: aString forClass: class protocol: category",
-referencedClasses: ["Compiler"],
-//>>excludeEnd("ide");
-messageSends: ["install:forClass:protocol:", "new"]
-}),
-$globals.ClassCategoryReader);
-
-$core.addMethod(
-$core.method({
-selector: "initialize",
-protocol: 'initialization',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-(
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = true, 
-//>>excludeEnd("ctx");
-$globals.ClassCategoryReader.superclass.fn.prototype._initialize.apply($recv(self), []));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = false;
-//>>excludeEnd("ctx");;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ClassCategoryReader)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "initialize\x0a\x09super initialize.",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["initialize"]
-}),
-$globals.ClassCategoryReader);
-
-$core.addMethod(
-$core.method({
-selector: "scanFrom:",
-protocol: 'fileIn',
-fn: function (aChunkParser){
-var self=this;
-var chunk;
-function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-chunk=$recv(aChunkParser)._nextChunk();
-chunk;
-return $recv(chunk)._isEmpty();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}))._whileFalse_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return self._compileMethod_(chunk);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-}));
-$recv($recv($ClassBuilder())._new())._setupClass_(self["@class"]);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},$globals.ClassCategoryReader)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aChunkParser"],
-source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09[ chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty ] whileFalse: [\x0a\x09\x09self compileMethod: chunk ].\x0a\x09ClassBuilder new setupClass: class",
-referencedClasses: ["ClassBuilder"],
-//>>excludeEnd("ide");
-messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:", "setupClass:", "new"]
-}),
-$globals.ClassCategoryReader);
-
-
-
-$core.addClass('ClassCommentReader', $globals.Object, ['class'], 'Kernel-Classes');
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.ClassCommentReader.comment="I provide a mechanism for retrieving class comments stored on a file.\x0a\x0aSee also `ClassCategoryReader`.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "class:",
-protocol: 'accessing',
-fn: function (aClass){
-var self=this;
-self["@class"]=aClass;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aClass"],
-source: "class: aClass\x0a\x09class := aClass",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.ClassCommentReader);
-
-$core.addMethod(
-$core.method({
-selector: "initialize",
-protocol: 'initialization',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-(
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = true, 
-//>>excludeEnd("ctx");
-$globals.ClassCommentReader.superclass.fn.prototype._initialize.apply($recv(self), []));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = false;
-//>>excludeEnd("ctx");;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ClassCommentReader)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "initialize\x0a\x09super initialize.",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["initialize"]
-}),
-$globals.ClassCommentReader);
-
-$core.addMethod(
-$core.method({
-selector: "scanFrom:",
-protocol: 'fileIn',
-fn: function (aChunkParser){
-var self=this;
-var chunk;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-chunk=$recv(aChunkParser)._nextChunk();
-$1=$recv(chunk)._isEmpty();
-if(!$core.assert($1)){
-self._setComment_(chunk);
-};
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},$globals.ClassCommentReader)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aChunkParser"],
-source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty ifFalse: [\x0a\x09\x09self setComment: chunk ].",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"]
-}),
-$globals.ClassCommentReader);
-
-$core.addMethod(
-$core.method({
-selector: "setComment:",
-protocol: 'private',
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv(self["@class"])._comment_(aString);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"setComment:",{aString:aString},$globals.ClassCommentReader)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "setComment: aString\x0a\x09class comment: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["comment:"]
-}),
-$globals.ClassCommentReader);
-
-
-
 $core.addClass('ClassSorterNode', $globals.Object, ['theClass', 'level', 'nodes'], 'Kernel-Classes');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ClassSorterNode.comment="I provide an algorithm for sorting classes alphabetically.\x0a\x0aSee [Issue #143](https://github.com/amber-smalltalk/amber/issues/143) on GitHub.";

+ 1 - 96
bower_components/amber/src/Kernel-Classes.st

@@ -67,16 +67,6 @@ comment: aString
 			yourself)
 !
 
-commentStamp
-	^ ClassCommentReader new
-	class: self;
-	yourself
-!
-
-commentStamp: aStamp prior: prior
-		^ self commentStamp
-!
-
 definition
 	^ ''
 !
@@ -145,17 +135,6 @@ methods
 	^ self methodDictionary values
 !
 
-methodsFor: aString
-	^ ClassCategoryReader new
-		class: self category: aString;
-		yourself
-!
-
-methodsFor: aString stamp: aStamp
-	"Added for file-in compatibility, ignores stamp."
-	^ self methodsFor: aString
-!
-
 methodsInProtocol: aString
 	^ self methods select: [ :each | each protocol = aString ]
 !
@@ -268,10 +247,6 @@ addCompiledMethod: aMethod
 				announce: announcement
 !
 
-compile: aString
-	^ self compile: aString protocol: ''
-!
-
 compile: aString protocol: anotherString
 	^ Compiler new
 		install: aString
@@ -653,7 +628,7 @@ migrateClassNamed: className superclass: aClass instanceVariableNames: aCollecti
 			self
 				basicSwapClassNames: oldClass with: newClass;
 				basicRemoveClass: newClass.
-			exception signal ].
+				exception resignal ].
 
 	self
 		rawRenameClass: oldClass to: tmp;
@@ -779,76 +754,6 @@ setupClass: aClass
 	<$core.init(aClass);>
 ! !
 
-Object subclass: #ClassCategoryReader
-	instanceVariableNames: 'class category'
-	package: 'Kernel-Classes'!
-!ClassCategoryReader commentStamp!
-I provide a mechanism for retrieving class descriptions stored on a file in the Smalltalk chunk format.!
-
-!ClassCategoryReader methodsFor: 'accessing'!
-
-class: aClass category: aString
-	class := aClass.
-	category := aString
-! !
-
-!ClassCategoryReader methodsFor: 'fileIn'!
-
-scanFrom: aChunkParser
-	| chunk |
-	[ chunk := aChunkParser nextChunk.
-	chunk isEmpty ] whileFalse: [
-		self compileMethod: chunk ].
-	ClassBuilder new setupClass: class
-! !
-
-!ClassCategoryReader methodsFor: 'initialization'!
-
-initialize
-	super initialize.
-! !
-
-!ClassCategoryReader methodsFor: 'private'!
-
-compileMethod: aString
-	Compiler new install: aString forClass: class protocol: category
-! !
-
-Object subclass: #ClassCommentReader
-	instanceVariableNames: 'class'
-	package: 'Kernel-Classes'!
-!ClassCommentReader commentStamp!
-I provide a mechanism for retrieving class comments stored on a file.
-
-See also `ClassCategoryReader`.!
-
-!ClassCommentReader methodsFor: 'accessing'!
-
-class: aClass
-	class := aClass
-! !
-
-!ClassCommentReader methodsFor: 'fileIn'!
-
-scanFrom: aChunkParser
-	| chunk |
-	chunk := aChunkParser nextChunk.
-	chunk isEmpty ifFalse: [
-		self setComment: chunk ].
-! !
-
-!ClassCommentReader methodsFor: 'initialization'!
-
-initialize
-	super initialize.
-! !
-
-!ClassCommentReader methodsFor: 'private'!
-
-setComment: aString
-	class comment: aString
-! !
-
 Object subclass: #ClassSorterNode
 	instanceVariableNames: 'theClass level nodes'
 	package: 'Kernel-Classes'!

+ 635 - 321
bower_components/amber/src/Kernel-Collections.js

@@ -1,4 +1,4 @@
-define("amber_core/Kernel-Collections", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
+define("amber_core/Kernel-Collections", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Kernel-Collections');
 $core.packages["Kernel-Collections"].innerEval = function (expr) { return eval(expr); };
@@ -6014,23 +6014,19 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-
-		return aString != null &&
-			typeof aString._isString === "function" &&
-			aString._isString() &&
-			String(self) === String(aString)
-	;
-return self;
+var $1;
+$1=self.__eq_eq(aString);
+return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"=",{aString:aString},$globals.String)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "= aString\x0a\x09<\x0a\x09\x09return aString != null &&\x0a\x09\x09\x09typeof aString._isString === \x22function\x22 &&\x0a\x09\x09\x09aString._isString() &&\x0a\x09\x09\x09String(self) === String(aString)\x0a\x09>",
+source: "= aString\x0a\x09^ self == aString",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: []
+messageSends: ["=="]
 }),
 $globals.String);
 
@@ -6043,19 +6039,18 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=self.__eq(aString);
-return $1;
+return aString != null && String(self) === (typeof aString === "string" ? aString : aString.valueOf());
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"==",{aString:aString},$globals.String)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "== aString\x0a\x09^ self = aString",
+source: "== aString\x0a<return aString != null && String(self) === (typeof aString === \x22string\x22 ? aString : aString.valueOf())>",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["="]
+messageSends: []
 }),
 $globals.String);
 
@@ -6569,31 +6564,6 @@ messageSends: []
 }),
 $globals.String);
 
-$core.addMethod(
-$core.method({
-selector: "identityHash",
-protocol: 'accessing',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=self.__comma("s");
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"identityHash",{},$globals.String)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "identityHash\x0a\x09^ self, 's'",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: [","]
-}),
-$globals.String);
-
 $core.addMethod(
 $core.method({
 selector: "includesSubString:",
@@ -8152,7 +8122,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return anObject.klass && anObject.klass.className;
+return anObject.klass != null && anObject.klass.className;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"classNameOf:",{anObject:anObject},$globals.Set)});
@@ -8160,7 +8130,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "classNameOf: anObject\x0a\x09\x22Answer the class name of `anObject`, or `undefined` \x0a\x09if `anObject` is not an Smalltalk object\x22\x0a\x09\x0a\x09<return anObject.klass && anObject.klass.className>",
+source: "classNameOf: anObject\x0a\x09\x22Answer the class name of `anObject`, or `undefined` \x0a\x09if `anObject` is not an Smalltalk object\x22\x0a\x09\x0a\x09<return anObject.klass != null && anObject.klass.className>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -8679,322 +8649,498 @@ $globals.Set);
 
 
 
-$core.addClass('Queue', $globals.Object, ['read', 'readIndex', 'write'], 'Kernel-Collections');
+$core.addClass('ProtoStream', $globals.Object, [], 'Kernel-Collections');
 //>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.Queue.comment="I am a one-sided queue.\x0a\x0a## Usage\x0a\x0aUse `#nextPut:` to add items to the queue.\x0aUse `#next` or `#nextIfAbsent:` to get (and remove) the next item in the queue.\x0a\x0a## Implementation notes\x0a\x0aA Queue uses two OrderedCollections inside,\x0a`read` is at the front, is not modified and only read using `readIndex`.\x0a`write` is at the back and is appended new items.\x0aWhen `read` is exhausted, `write` is promoted to `read` and new `write` is created.\x0a\x0aAs a consequence, no data moving is done by me, write appending may do data moving\x0awhen growing `write`, but this is left to engine to implement as good as it chooses to.";
+$globals.ProtoStream.comment="I am the abstract base for different accessor for a sequence of objects. This sequence is referred to as my \x22contents\x22.\x0aMy instances are read/write streams modifying the contents.";
 //>>excludeEnd("ide");
 $core.addMethod(
 $core.method({
-selector: "initialize",
-protocol: 'initialization',
-fn: function (){
+selector: "<<",
+protocol: 'writing',
+fn: function (anObject){
 var self=this;
-function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-(
+self._write_(anObject);
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = true, 
+}, function($ctx1) {$ctx1.fill(self,"<<",{anObject:anObject},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
-$globals.Queue.superclass.fn.prototype._initialize.apply($recv(self), []));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.supercall = false;
-//>>excludeEnd("ctx");;
-self["@read"]=$recv($OrderedCollection())._new();
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "<< anObject\x0a\x09self write: anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["write:"]
+}),
+$globals.ProtoStream);
+
+$core.addMethod(
+$core.method({
+selector: "atEnd",
+protocol: 'testing',
+fn: function (){
+var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["new"]=1;
+return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self["@write"]=$recv($OrderedCollection())._new();
-self["@readIndex"]=(1);
+self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Queue)});
+}, function($ctx1) {$ctx1.fill(self,"atEnd",{},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "initialize\x0a\x09super initialize.\x0a\x09read := OrderedCollection new.\x0a\x09write := OrderedCollection new.\x0a\x09readIndex := 1",
-referencedClasses: ["OrderedCollection"],
+source: "atEnd\x0a\x09self subclassResponsibility",
+referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["initialize", "new"]
+messageSends: ["subclassResponsibility"]
 }),
-$globals.Queue);
+$globals.ProtoStream);
 
 $core.addMethod(
 $core.method({
-selector: "next",
-protocol: 'accessing',
+selector: "atStart",
+protocol: 'testing',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=self._nextIfAbsent_((function(){
+self._subclassResponsibility();
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
+}, function($ctx1) {$ctx1.fill(self,"atStart",{},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
-return self._error_("Cannot read from empty Queue.");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "atStart\x0a\x09self subclassResponsibility",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["subclassResponsibility"]
+}),
+$globals.ProtoStream);
+
+$core.addMethod(
+$core.method({
+selector: "contents",
+protocol: 'accessing',
+fn: function (){
+var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-}));
-return $1;
+self._subclassResponsibility();
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"next",{},$globals.Queue)});
+}, function($ctx1) {$ctx1.fill(self,"contents",{},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "next\x0a\x09^ self nextIfAbsent: [ self error: 'Cannot read from empty Queue.' ]",
+source: "contents\x0a\x09self subclassResponsibility",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["nextIfAbsent:", "error:"]
+messageSends: ["subclassResponsibility"]
 }),
-$globals.Queue);
+$globals.ProtoStream);
 
 $core.addMethod(
 $core.method({
-selector: "nextIfAbsent:",
-protocol: 'accessing',
+selector: "do:",
+protocol: 'enumerating',
 fn: function (aBlock){
 var self=this;
-var result;
-function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1,$2,$3,$4;
-var $early={};
-try {
-result=$recv(self["@read"])._at_ifAbsent_(self["@readIndex"],(function(){
+$recv((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$1=$recv(self["@write"])._isEmpty();
-if($core.assert($1)){
-$2=$recv(self["@readIndex"]).__gt((1));
-if($core.assert($2)){
-self["@read"]=[];
-self["@read"];
-self["@readIndex"]=(1);
-self["@readIndex"];
-};
-$3=$recv(aBlock)._value();
-throw $early=[$3];
-};
-self["@read"]=self["@write"];
-self["@read"];
-self["@readIndex"]=(1);
-self["@readIndex"];
-self["@write"]=$recv($OrderedCollection())._new();
-self["@write"];
-return $recv(self["@read"])._first();
+return self._atEnd();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
+}))._whileFalse_((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(aBlock)._value_(self._next());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
+//>>excludeEnd("ctx");
 }));
-$recv(self["@read"])._at_put_(self["@readIndex"],nil);
-self["@readIndex"]=$recv(self["@readIndex"]).__plus((1));
-$4=result;
-return $4;
-}
-catch(e) {if(e===$early)return e[0]; throw e}
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"nextIfAbsent:",{aBlock:aBlock,result:result},$globals.Queue)});
+}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "nextIfAbsent: aBlock\x0a\x09| result |\x0a\x09result := read at: readIndex ifAbsent: [\x0a\x09\x09write isEmpty ifTrue: [\x0a\x09\x09\x09readIndex > 1 ifTrue: [ read := #(). readIndex := 1 ].\x0a\x09\x09\x09^ aBlock value ].\x0a\x09\x09read := write.\x0a\x09\x09readIndex := 1.\x0a\x09\x09write := OrderedCollection new.\x0a\x09\x09read first ].\x0a\x09read at: readIndex put: nil.\x0a\x09readIndex := readIndex + 1.\x0a\x09^ result",
-referencedClasses: ["OrderedCollection"],
+source: "do: aBlock\x0a\x09[ self atEnd ] whileFalse: [ aBlock value: self next ]",
+referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["at:ifAbsent:", "ifTrue:", "isEmpty", ">", "value", "new", "first", "at:put:", "+"]
+messageSends: ["whileFalse:", "atEnd", "value:", "next"]
 }),
-$globals.Queue);
+$globals.ProtoStream);
 
 $core.addMethod(
 $core.method({
-selector: "nextPut:",
-protocol: 'accessing',
-fn: function (anObject){
+selector: "isEmpty",
+protocol: 'testing',
+fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(self["@write"])._add_(anObject);
-return self;
+var $1;
+$1=$recv(self._atStart())._and_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"nextPut:",{anObject:anObject},$globals.Queue)});
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return self._atEnd();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"isEmpty",{},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "nextPut: anObject\x0a\x09write add: anObject",
+args: [],
+source: "isEmpty\x0a\x09^ self atStart and: [ self atEnd ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["add:"]
+messageSends: ["and:", "atStart", "atEnd"]
 }),
-$globals.Queue);
+$globals.ProtoStream);
 
-
-
-$core.addClass('RegularExpression', $globals.Object, [], 'Kernel-Collections');
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.RegularExpression.comment="I represent a regular expression object. My instances are JavaScript `RegExp` object.";
-//>>excludeEnd("ide");
 $core.addMethod(
 $core.method({
-selector: "compile:",
-protocol: 'evaluating',
-fn: function (aString){
+selector: "next",
+protocol: 'reading',
+fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self.compile(aString);
-return self;
+var $2,$1;
+$2=self._atEnd();
+if($core.assert($2)){
+$1=nil;
+} else {
+$1=self._subclassResponsibility();
+};
+return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString},$globals.RegularExpression)});
+}, function($ctx1) {$ctx1.fill(self,"next",{},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "compile: aString\x0a\x09<return self.compile(aString)>",
+args: [],
+source: "next\x0a\x09^ self atEnd\x0a\x09\x09ifTrue: [ nil ]\x0a\x09\x09ifFalse: [ self subclassResponsibility ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: []
+messageSends: ["ifTrue:ifFalse:", "atEnd", "subclassResponsibility"]
 }),
-$globals.RegularExpression);
+$globals.ProtoStream);
 
 $core.addMethod(
 $core.method({
-selector: "exec:",
-protocol: 'evaluating',
-fn: function (aString){
+selector: "nextPut:",
+protocol: 'writing',
+fn: function (anObject){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self.exec(aString) || nil;
+self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"exec:",{aString:aString},$globals.RegularExpression)});
+}, function($ctx1) {$ctx1.fill(self,"nextPut:",{anObject:anObject},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "exec: aString\x0a\x09<return self.exec(aString) || nil>",
+args: ["anObject"],
+source: "nextPut: anObject\x0a\x09self subclassResponsibility",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: []
+messageSends: ["subclassResponsibility"]
 }),
-$globals.RegularExpression);
+$globals.ProtoStream);
 
 $core.addMethod(
 $core.method({
-selector: "test:",
-protocol: 'evaluating',
-fn: function (aString){
+selector: "nextPutAll:",
+protocol: 'writing',
+fn: function (aCollection){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return self.test(aString);
+$recv(aCollection)._do_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return self._nextPut_(each);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"test:",{aString:aString},$globals.RegularExpression)});
+}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aCollection:aCollection},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "test: aString\x0a\x09<return self.test(aString)>",
+args: ["aCollection"],
+source: "nextPutAll: aCollection\x0a\x09aCollection do: [ :each |\x0a\x09\x09self nextPut: each ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: []
+messageSends: ["do:", "nextPut:"]
 }),
-$globals.RegularExpression);
-
+$globals.ProtoStream);
 
 $core.addMethod(
 $core.method({
-selector: "fromString:",
-protocol: 'instance creation',
+selector: "nextPutJSObject:",
+protocol: 'writing',
+fn: function (aJSObject){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._nextPut_(aJSObject);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"nextPutJSObject:",{aJSObject:aJSObject},$globals.ProtoStream)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aJSObject"],
+source: "nextPutJSObject: aJSObject\x0a\x09self nextPut: aJSObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["nextPut:"]
+}),
+$globals.ProtoStream);
+
+$core.addMethod(
+$core.method({
+selector: "nextPutString:",
+protocol: 'writing',
 fn: function (aString){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=self._fromString_flag_(aString,"");
-return $1;
+self._nextPut_(aString);
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},$globals.RegularExpression.klass)});
+}, function($ctx1) {$ctx1.fill(self,"nextPutString:",{aString:aString},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "fromString: aString\x0a\x09\x09^ self fromString: aString flag: ''",
+source: "nextPutString: aString\x0a\x09self nextPut: aString",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["fromString:flag:"]
+messageSends: ["nextPut:"]
 }),
-$globals.RegularExpression.klass);
+$globals.ProtoStream);
 
 $core.addMethod(
 $core.method({
-selector: "fromString:flag:",
-protocol: 'instance creation',
-fn: function (aString,anotherString){
+selector: "peek",
+protocol: 'reading',
+fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return new RegExp(aString, anotherString);
+var $2,$1;
+$2=self._atEnd();
+if($core.assert($2)){
+$1=nil;
+} else {
+$1=self._subclassResponsibility();
+};
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"peek",{},$globals.ProtoStream)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "peek\x0a\x09^ self atEnd\x0a\x09\x09ifTrue: [ nil ]\x0a\x09\x09ifFalse: [ self subclassResponsibility ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["ifTrue:ifFalse:", "atEnd", "subclassResponsibility"]
+}),
+$globals.ProtoStream);
+
+$core.addMethod(
+$core.method({
+selector: "reset",
+protocol: 'actions',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._subclassResponsibility();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"fromString:flag:",{aString:aString,anotherString:anotherString},$globals.RegularExpression.klass)});
+}, function($ctx1) {$ctx1.fill(self,"reset",{},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "anotherString"],
-source: "fromString: aString flag: anotherString\x0a\x09<return new RegExp(aString, anotherString)>",
+args: [],
+source: "reset\x0a\x09self subclassResponsibility",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: []
+messageSends: ["subclassResponsibility"]
 }),
-$globals.RegularExpression.klass);
+$globals.ProtoStream);
 
+$core.addMethod(
+$core.method({
+selector: "resetContents",
+protocol: 'actions',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._subclassResponsibility();
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"resetContents",{},$globals.ProtoStream)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "resetContents\x0a\x09self subclassResponsibility",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["subclassResponsibility"]
+}),
+$globals.ProtoStream);
 
-$core.addClass('Stream', $globals.Object, ['collection', 'position', 'streamSize'], 'Kernel-Collections');
+$core.addMethod(
+$core.method({
+selector: "setToEnd",
+protocol: 'positioning',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._subclassResponsibility();
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"setToEnd",{},$globals.ProtoStream)});
+//>>excludeEnd("ctx");
+},
 //>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.Stream.comment="I represent an accessor for a sequence of objects. This sequence is referred to as my \x22contents\x22.\x0aMy instances are read/write streams to the contents sequence collection.";
+args: [],
+source: "setToEnd\x0a\x09self subclassResponsibility",
+referencedClasses: [],
 //>>excludeEnd("ide");
+messageSends: ["subclassResponsibility"]
+}),
+$globals.ProtoStream);
+
 $core.addMethod(
 $core.method({
-selector: "<<",
+selector: "setToStart",
+protocol: 'positioning',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._reset();
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"setToStart",{},$globals.ProtoStream)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "setToStart\x0a\x09self reset",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["reset"]
+}),
+$globals.ProtoStream);
+
+$core.addMethod(
+$core.method({
+selector: "write:",
 protocol: 'writing',
 fn: function (anObject){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._write_(anObject);
+$recv(anObject)._putOn_(self);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"<<",{anObject:anObject},$globals.Stream)});
+}, function($ctx1) {$ctx1.fill(self,"write:",{anObject:anObject},$globals.ProtoStream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "<< anObject\x0a\x09self write: anObject",
+source: "write: anObject\x0a\x09anObject putOn: self",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["write:"]
+messageSends: ["putOn:"]
 }),
-$globals.Stream);
+$globals.ProtoStream);
+
+
+$core.addMethod(
+$core.method({
+selector: "on:",
+protocol: 'instance creation',
+fn: function (aCollection){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$3,$1;
+$2=self._new();
+$recv($2)._setCollection_(aCollection);
+$recv($2)._setStreamSize_($recv(aCollection)._size());
+$3=$recv($2)._yourself();
+$1=$3;
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"on:",{aCollection:aCollection},$globals.ProtoStream.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aCollection"],
+source: "on: aCollection\x0a\x09\x09^ self new\x0a\x09\x09setCollection: aCollection;\x0a\x09\x09setStreamSize: aCollection size;\x0a\x09\x09yourself",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["setCollection:", "new", "setStreamSize:", "size", "yourself"]
+}),
+$globals.ProtoStream.klass);
+
 
+$core.addClass('Stream', $globals.ProtoStream, ['collection', 'position', 'streamSize'], 'Kernel-Collections');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Stream.comment="I represent an accessor for a sequence of objects. This sequence is referred to as my \x22contents\x22.\x0aMy instances are read/write streams to the contents sequence collection.";
+//>>excludeEnd("ide");
 $core.addMethod(
 $core.method({
 selector: "atEnd",
@@ -9108,46 +9254,6 @@ messageSends: ["copyFrom:to:", "collection", "streamSize"]
 }),
 $globals.Stream);
 
-$core.addMethod(
-$core.method({
-selector: "do:",
-protocol: 'enumerating',
-fn: function (aBlock){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return self._atEnd();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
-//>>excludeEnd("ctx");
-}))._whileFalse_((function(){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv(aBlock)._value_(self._next());
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
-//>>excludeEnd("ctx");
-}));
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"do:",{aBlock:aBlock},$globals.Stream)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aBlock"],
-source: "do: aBlock\x0a\x09[ self atEnd ] whileFalse: [ aBlock value: self next ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["whileFalse:", "atEnd", "value:", "next"]
-}),
-$globals.Stream);
-
 $core.addMethod(
 $core.method({
 selector: "flush",
@@ -9305,93 +9411,37 @@ $globals.Stream);
 
 $core.addMethod(
 $core.method({
-selector: "nextPutAll:",
-protocol: 'writing',
-fn: function (aCollection){
+selector: "peek",
+protocol: 'reading',
+fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-$recv(aCollection)._do_((function(each){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return self._nextPut_(each);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-return self;
+var $2,$1;
+$2=self._atEnd();
+if(!$core.assert($2)){
+$1=$recv(self._collection())._at_($recv(self._position()).__plus((1)));
+};
+return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"nextPutAll:",{aCollection:aCollection},$globals.Stream)});
+}, function($ctx1) {$ctx1.fill(self,"peek",{},$globals.Stream)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aCollection"],
-source: "nextPutAll: aCollection\x0a\x09aCollection do: [ :each |\x0a\x09\x09self nextPut: each ]",
+args: [],
+source: "peek\x0a\x09^ self atEnd ifFalse: [\x0a\x09\x09self collection at: self position + 1 ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["do:", "nextPut:"]
+messageSends: ["ifFalse:", "atEnd", "at:", "collection", "+", "position"]
 }),
 $globals.Stream);
 
 $core.addMethod(
 $core.method({
-selector: "nextPutString:",
-protocol: 'writing',
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-self._nextPut_(aString);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"nextPutString:",{aString:aString},$globals.Stream)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "nextPutString: aString\x0a\x09self nextPut: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["nextPut:"]
-}),
-$globals.Stream);
-
-$core.addMethod(
-$core.method({
-selector: "peek",
-protocol: 'reading',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $2,$1;
-$2=self._atEnd();
-if(!$core.assert($2)){
-$1=$recv(self._collection())._at_($recv(self._position()).__plus((1)));
-};
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"peek",{},$globals.Stream)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "peek\x0a\x09^ self atEnd ifFalse: [\x0a\x09\x09self collection at: self position + 1 ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["ifFalse:", "atEnd", "at:", "collection", "+", "position"]
-}),
-$globals.Stream);
-
-$core.addMethod(
-$core.method({
-selector: "position",
-protocol: 'accessing',
-fn: function (){
+selector: "position",
+protocol: 'accessing',
+fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -9617,30 +9667,6 @@ messageSends: []
 }),
 $globals.Stream);
 
-$core.addMethod(
-$core.method({
-selector: "write:",
-protocol: 'writing',
-fn: function (anObject){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv(anObject)._putOn_(self);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"write:",{anObject:anObject},$globals.Stream)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "write: anObject\x0a\x09anObject putOn: self",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["putOn:"]
-}),
-$globals.Stream);
-
 
 $core.addMethod(
 $core.method({
@@ -9985,4 +10011,292 @@ messageSends: ["nextPutAll:", "tab"]
 $globals.StringStream);
 
 
+
+$core.addClass('Queue', $globals.Object, ['read', 'readIndex', 'write'], 'Kernel-Collections');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Queue.comment="I am a one-sided queue.\x0a\x0a## Usage\x0a\x0aUse `#nextPut:` to add items to the queue.\x0aUse `#next` or `#nextIfAbsent:` to get (and remove) the next item in the queue.\x0a\x0a## Implementation notes\x0a\x0aA Queue uses two OrderedCollections inside,\x0a`read` is at the front, is not modified and only read using `readIndex`.\x0a`write` is at the back and is appended new items.\x0aWhen `read` is exhausted, `write` is promoted to `read` and new `write` is created.\x0a\x0aAs a consequence, no data moving is done by me, write appending may do data moving\x0awhen growing `write`, but this is left to engine to implement as good as it chooses to.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+(
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.supercall = true, 
+//>>excludeEnd("ctx");
+$globals.Queue.superclass.fn.prototype._initialize.apply($recv(self), []));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.supercall = false;
+//>>excludeEnd("ctx");;
+self["@read"]=$recv($OrderedCollection())._new();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["new"]=1;
+//>>excludeEnd("ctx");
+self["@write"]=$recv($OrderedCollection())._new();
+self["@readIndex"]=(1);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Queue)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09super initialize.\x0a\x09read := OrderedCollection new.\x0a\x09write := OrderedCollection new.\x0a\x09readIndex := 1",
+referencedClasses: ["OrderedCollection"],
+//>>excludeEnd("ide");
+messageSends: ["initialize", "new"]
+}),
+$globals.Queue);
+
+$core.addMethod(
+$core.method({
+selector: "next",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._nextIfAbsent_((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return self._error_("Cannot read from empty Queue.");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"next",{},$globals.Queue)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "next\x0a\x09^ self nextIfAbsent: [ self error: 'Cannot read from empty Queue.' ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["nextIfAbsent:", "error:"]
+}),
+$globals.Queue);
+
+$core.addMethod(
+$core.method({
+selector: "nextIfAbsent:",
+protocol: 'accessing',
+fn: function (aBlock){
+var self=this;
+var result;
+function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$3,$4;
+var $early={};
+try {
+result=$recv(self["@read"])._at_ifAbsent_(self["@readIndex"],(function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+$1=$recv(self["@write"])._isEmpty();
+if($core.assert($1)){
+$2=$recv(self["@readIndex"]).__gt((1));
+if($core.assert($2)){
+self["@read"]=[];
+self["@read"];
+self["@readIndex"]=(1);
+self["@readIndex"];
+};
+$3=$recv(aBlock)._value();
+throw $early=[$3];
+};
+self["@read"]=self["@write"];
+self["@read"];
+self["@readIndex"]=(1);
+self["@readIndex"];
+self["@write"]=$recv($OrderedCollection())._new();
+self["@write"];
+return $recv(self["@read"])._first();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+$recv(self["@read"])._at_put_(self["@readIndex"],nil);
+self["@readIndex"]=$recv(self["@readIndex"]).__plus((1));
+$4=result;
+return $4;
+}
+catch(e) {if(e===$early)return e[0]; throw e}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"nextIfAbsent:",{aBlock:aBlock,result:result},$globals.Queue)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aBlock"],
+source: "nextIfAbsent: aBlock\x0a\x09| result |\x0a\x09result := read at: readIndex ifAbsent: [\x0a\x09\x09write isEmpty ifTrue: [\x0a\x09\x09\x09readIndex > 1 ifTrue: [ read := #(). readIndex := 1 ].\x0a\x09\x09\x09^ aBlock value ].\x0a\x09\x09read := write.\x0a\x09\x09readIndex := 1.\x0a\x09\x09write := OrderedCollection new.\x0a\x09\x09read first ].\x0a\x09read at: readIndex put: nil.\x0a\x09readIndex := readIndex + 1.\x0a\x09^ result",
+referencedClasses: ["OrderedCollection"],
+//>>excludeEnd("ide");
+messageSends: ["at:ifAbsent:", "ifTrue:", "isEmpty", ">", "value", "new", "first", "at:put:", "+"]
+}),
+$globals.Queue);
+
+$core.addMethod(
+$core.method({
+selector: "nextPut:",
+protocol: 'accessing',
+fn: function (anObject){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(self["@write"])._add_(anObject);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"nextPut:",{anObject:anObject},$globals.Queue)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "nextPut: anObject\x0a\x09write add: anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["add:"]
+}),
+$globals.Queue);
+
+
+
+$core.addClass('RegularExpression', $globals.Object, [], 'Kernel-Collections');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.RegularExpression.comment="I represent a regular expression object. My instances are JavaScript `RegExp` object.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "compile:",
+protocol: 'evaluating',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self.compile(aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"compile:",{aString:aString},$globals.RegularExpression)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "compile: aString\x0a\x09<return self.compile(aString)>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.RegularExpression);
+
+$core.addMethod(
+$core.method({
+selector: "exec:",
+protocol: 'evaluating',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self.exec(aString) || nil;
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"exec:",{aString:aString},$globals.RegularExpression)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "exec: aString\x0a\x09<return self.exec(aString) || nil>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.RegularExpression);
+
+$core.addMethod(
+$core.method({
+selector: "test:",
+protocol: 'evaluating',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self.test(aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"test:",{aString:aString},$globals.RegularExpression)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "test: aString\x0a\x09<return self.test(aString)>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.RegularExpression);
+
+
+$core.addMethod(
+$core.method({
+selector: "fromString:",
+protocol: 'instance creation',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._fromString_flag_(aString,"");
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"fromString:",{aString:aString},$globals.RegularExpression.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "fromString: aString\x0a\x09\x09^ self fromString: aString flag: ''",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["fromString:flag:"]
+}),
+$globals.RegularExpression.klass);
+
+$core.addMethod(
+$core.method({
+selector: "fromString:flag:",
+protocol: 'instance creation',
+fn: function (aString,anotherString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return new RegExp(aString, anotherString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"fromString:flag:",{aString:aString,anotherString:anotherString},$globals.RegularExpression.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "anotherString"],
+source: "fromString: aString flag: anotherString\x0a\x09<return new RegExp(aString, anotherString)>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.RegularExpression.klass);
+
 });

+ 164 - 93
bower_components/amber/src/Kernel-Collections.st

@@ -1449,10 +1449,6 @@ charCodeAt: anInteger
 	<return self.charCodeAt(anInteger - 1)>
 !
 
-identityHash
-	^ self, 's'
-!
-
 size
 	<return self.length>
 ! !
@@ -1468,16 +1464,11 @@ size
 !
 
 = aString
-	<
-		return aString !!= null &&
-			typeof aString._isString === "function" &&
-			aString._isString() &&
-			String(self) === String(aString)
-	>
+	^ self == aString
 !
 
 == aString
-	^ self = aString
+<return aString !!= null && String(self) === (typeof aString === "string" ? aString : aString.valueOf())>
 !
 
 > aString
@@ -2012,7 +2003,7 @@ classNameOf: anObject
 	"Answer the class name of `anObject`, or `undefined` 
 	if `anObject` is not an Smalltalk object"
 	
-	<return anObject.klass && anObject.klass.className>
+	<return anObject.klass !!= null && anObject.klass.className>
 !
 
 includes: anObject in: anotherObject
@@ -2037,92 +2028,110 @@ includes: anObject
 		ifNotNil: [ :primitiveBucket | self includes: bucket first in: primitiveBucket ]
 ! !
 
-Object subclass: #Queue
-	instanceVariableNames: 'read readIndex write'
+Object subclass: #ProtoStream
+	instanceVariableNames: ''
 	package: 'Kernel-Collections'!
-!Queue commentStamp!
-I am a one-sided queue.
+!ProtoStream commentStamp!
+I am the abstract base for different accessor for a sequence of objects. This sequence is referred to as my "contents".
+My instances are read/write streams modifying the contents.!
 
-## Usage
+!ProtoStream methodsFor: 'accessing'!
 
-Use `#nextPut:` to add items to the queue.
-Use `#next` or `#nextIfAbsent:` to get (and remove) the next item in the queue.
+contents
+	self subclassResponsibility
+! !
 
-## Implementation notes
+!ProtoStream methodsFor: 'actions'!
 
-A Queue uses two OrderedCollections inside,
-`read` is at the front, is not modified and only read using `readIndex`.
-`write` is at the back and is appended new items.
-When `read` is exhausted, `write` is promoted to `read` and new `write` is created.
+reset
+	self subclassResponsibility
+!
 
-As a consequence, no data moving is done by me, write appending may do data moving
-when growing `write`, but this is left to engine to implement as good as it chooses to.!
+resetContents
+	self subclassResponsibility
+! !
 
-!Queue methodsFor: 'accessing'!
+!ProtoStream methodsFor: 'enumerating'!
 
-next
-	^ self nextIfAbsent: [ self error: 'Cannot read from empty Queue.' ]
-!
+do: aBlock
+	[ self atEnd ] whileFalse: [ aBlock value: self next ]
+! !
 
-nextIfAbsent: aBlock
-	| result |
-	result := read at: readIndex ifAbsent: [
-		write isEmpty ifTrue: [
-			readIndex > 1 ifTrue: [ read := #(). readIndex := 1 ].
-			^ aBlock value ].
-		read := write.
-		readIndex := 1.
-		write := OrderedCollection new.
-		read first ].
-	read at: readIndex put: nil.
-	readIndex := readIndex + 1.
-	^ result
+!ProtoStream methodsFor: 'positioning'!
+
+setToEnd
+	self subclassResponsibility
 !
 
-nextPut: anObject
-	write add: anObject
+setToStart
+	self reset
 ! !
 
-!Queue methodsFor: 'initialization'!
+!ProtoStream methodsFor: 'reading'!
 
-initialize
-	super initialize.
-	read := OrderedCollection new.
-	write := OrderedCollection new.
-	readIndex := 1
-! !
+next
+	^ self atEnd
+		ifTrue: [ nil ]
+		ifFalse: [ self subclassResponsibility ]
+!
 
-Object subclass: #RegularExpression
-	instanceVariableNames: ''
-	package: 'Kernel-Collections'!
-!RegularExpression commentStamp!
-I represent a regular expression object. My instances are JavaScript `RegExp` object.!
+peek
+	^ self atEnd
+		ifTrue: [ nil ]
+		ifFalse: [ self subclassResponsibility ]
+! !
 
-!RegularExpression methodsFor: 'evaluating'!
+!ProtoStream methodsFor: 'testing'!
 
-compile: aString
-	<return self.compile(aString)>
+atEnd
+	self subclassResponsibility
 !
 
-exec: aString
-	<return self.exec(aString) || nil>
+atStart
+	self subclassResponsibility
 !
 
-test: aString
-	<return self.test(aString)>
+isEmpty
+	^ self atStart and: [ self atEnd ]
 ! !
 
-!RegularExpression class methodsFor: 'instance creation'!
+!ProtoStream methodsFor: 'writing'!
 
-fromString: aString
-		^ self fromString: aString flag: ''
+<< anObject
+	self write: anObject
 !
 
-fromString: aString flag: anotherString
-	<return new RegExp(aString, anotherString)>
+nextPut: anObject
+	self subclassResponsibility
+!
+
+nextPutAll: aCollection
+	aCollection do: [ :each |
+		self nextPut: each ]
+!
+
+nextPutJSObject: aJSObject
+	self nextPut: aJSObject
+!
+
+nextPutString: aString
+	self nextPut: aString
+!
+
+write: anObject
+	anObject putOn: self
+! !
+
+!ProtoStream class methodsFor: 'instance creation'!
+
+on: aCollection
+		^ self new
+		setCollection: aCollection;
+		setStreamSize: aCollection size;
+		yourself
 ! !
 
-Object subclass: #Stream
+ProtoStream subclass: #Stream
 	instanceVariableNames: 'collection position streamSize'
 	package: 'Kernel-Collections'!
 !Stream commentStamp!
@@ -2182,12 +2191,6 @@ resetContents
 	self setStreamSize: 0
 ! !
 
-!Stream methodsFor: 'enumerating'!
-
-do: aBlock
-	[ self atEnd ] whileFalse: [ aBlock value: self next ]
-! !
-
 !Stream methodsFor: 'positioning'!
 
 setToEnd
@@ -2238,27 +2241,10 @@ isEmpty
 
 !Stream methodsFor: 'writing'!
 
-<< anObject
-	self write: anObject
-!
-
 nextPut: anObject
 	self position: self position + 1.
 	self collection at: self position put: anObject.
 	self setStreamSize: (self streamSize max: self position)
-!
-
-nextPutAll: aCollection
-	aCollection do: [ :each |
-		self nextPut: each ]
-!
-
-nextPutString: aString
-	self nextPut: aString
-!
-
-write: anObject
-	anObject putOn: self
 ! !
 
 !Stream class methodsFor: 'instance creation'!
@@ -2328,3 +2314,88 @@ tab
 	^ self nextPutAll: String tab
 ! !
 
+Object subclass: #Queue
+	instanceVariableNames: 'read readIndex write'
+	package: 'Kernel-Collections'!
+!Queue commentStamp!
+I am a one-sided queue.
+
+## Usage
+
+Use `#nextPut:` to add items to the queue.
+Use `#next` or `#nextIfAbsent:` to get (and remove) the next item in the queue.
+
+## Implementation notes
+
+A Queue uses two OrderedCollections inside,
+`read` is at the front, is not modified and only read using `readIndex`.
+`write` is at the back and is appended new items.
+When `read` is exhausted, `write` is promoted to `read` and new `write` is created.
+
+As a consequence, no data moving is done by me, write appending may do data moving
+when growing `write`, but this is left to engine to implement as good as it chooses to.!
+
+!Queue methodsFor: 'accessing'!
+
+next
+	^ self nextIfAbsent: [ self error: 'Cannot read from empty Queue.' ]
+!
+
+nextIfAbsent: aBlock
+	| result |
+	result := read at: readIndex ifAbsent: [
+		write isEmpty ifTrue: [
+			readIndex > 1 ifTrue: [ read := #(). readIndex := 1 ].
+			^ aBlock value ].
+		read := write.
+		readIndex := 1.
+		write := OrderedCollection new.
+		read first ].
+	read at: readIndex put: nil.
+	readIndex := readIndex + 1.
+	^ result
+!
+
+nextPut: anObject
+	write add: anObject
+! !
+
+!Queue methodsFor: 'initialization'!
+
+initialize
+	super initialize.
+	read := OrderedCollection new.
+	write := OrderedCollection new.
+	readIndex := 1
+! !
+
+Object subclass: #RegularExpression
+	instanceVariableNames: ''
+	package: 'Kernel-Collections'!
+!RegularExpression commentStamp!
+I represent a regular expression object. My instances are JavaScript `RegExp` object.!
+
+!RegularExpression methodsFor: 'evaluating'!
+
+compile: aString
+	<return self.compile(aString)>
+!
+
+exec: aString
+	<return self.exec(aString) || nil>
+!
+
+test: aString
+	<return self.test(aString)>
+! !
+
+!RegularExpression class methodsFor: 'instance creation'!
+
+fromString: aString
+		^ self fromString: aString flag: ''
+!
+
+fromString: aString flag: anotherString
+	<return new RegExp(aString, anotherString)>
+! !
+

+ 1 - 7
bower_components/amber/src/Kernel-Exceptions.js

@@ -1,4 +1,4 @@
-define("amber_core/Kernel-Exceptions", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
+define("amber_core/Kernel-Exceptions", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Kernel-Exceptions');
 $core.packages["Kernel-Exceptions"].innerEval = function (expr) { return eval(expr); };
@@ -832,10 +832,4 @@ messageSends: []
 $globals.NonBooleanReceiver);
 
 
-
-$core.addClass('PackageCommitError', $globals.Error, [], 'Kernel-Exceptions');
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.PackageCommitError.comment="I get signaled when an attempt to commit a package has failed.";
-//>>excludeEnd("ide");
-
 });

+ 0 - 6
bower_components/amber/src/Kernel-Exceptions.st

@@ -223,9 +223,3 @@ object: anObject
 	object := anObject
 ! !
 
-Error subclass: #PackageCommitError
-	instanceVariableNames: ''
-	package: 'Kernel-Exceptions'!
-!PackageCommitError commentStamp!
-I get signaled when an attempt to commit a package has failed.!
-

File diff suppressed because it is too large
+ 1229 - 3261
bower_components/amber/src/Kernel-Infrastructure.js


+ 54 - 582
bower_components/amber/src/Kernel-Infrastructure.st

@@ -1,285 +1,4 @@
 Smalltalk createPackage: 'Kernel-Infrastructure'!
-Object subclass: #ConsoleErrorHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!ConsoleErrorHandler commentStamp!
-I am manage Smalltalk errors, displaying the stack in the console.!
-
-!ConsoleErrorHandler methodsFor: 'error handling'!
-
-handleError: anError
-	anError context ifNotNil: [ self logErrorContext: anError context ].
-	self logError: anError
-! !
-
-!ConsoleErrorHandler methodsFor: 'private'!
-
-log: aString
-	console log: aString
-!
-
-logContext: aContext
-	aContext home ifNotNil: [
-		self logContext: aContext home ].
-	self log: aContext asString
-!
-
-logError: anError
-	self log: anError messageText
-!
-
-logErrorContext: aContext
-	aContext ifNotNil: [
-		aContext home ifNotNil: [
-			self logContext: aContext home ]]
-! !
-
-ConsoleErrorHandler class instanceVariableNames: 'current'!
-
-!ConsoleErrorHandler class methodsFor: 'initialization'!
-
-initialize
-	ErrorHandler registerIfNone: self new
-! !
-
-Object subclass: #InterfacingObject
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!InterfacingObject commentStamp!
-I am superclass of all object that interface with user or environment. `Widget` and a few other classes are subclasses of me. I delegate all of the above APIs to `PlatformInterface`.
-
-## API
-
-    self alert: 'Hey, there is a problem'.
-    self confirm: 'Affirmative?'.
-    self prompt: 'Your name:'.
-
-    self ajax: #{
-        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'
-    }.!
-
-!InterfacingObject methodsFor: 'actions'!
-
-ajax: anObject
-	^ PlatformInterface ajax: anObject
-!
-
-alert: aString
-	^ PlatformInterface alert: aString
-!
-
-confirm: aString
-	^ PlatformInterface confirm: aString
-!
-
-prompt: aString
-	^ PlatformInterface prompt: aString
-!
-
-prompt: aString default: defaultString
-	^ PlatformInterface prompt: aString default: defaultString
-! !
-
-InterfacingObject subclass: #Environment
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!Environment commentStamp!
-I provide an unified entry point to manipulate Amber packages, classes and methods.
-
-Typical use cases include IDEs, remote access and restricting browsing.!
-
-!Environment methodsFor: 'accessing'!
-
-allSelectors
-	^ Smalltalk core allSelectors
-!
-
-availableClassNames
-	^ Smalltalk classes 
-		collect: [ :each | each name ]
-!
-
-availablePackageNames
-	^ Smalltalk packages 
-		collect: [ :each | each name ]
-!
-
-availableProtocolsFor: aClass
-	| protocols |
-	
-	protocols := aClass protocols.
-	aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].
-	^ protocols asSet asArray sort
-!
-
-classBuilder
-	^ ClassBuilder new
-!
-
-classNamed: aString
-	^ (Smalltalk globals at: aString asSymbol)
-		ifNil: [ self error: 'Invalid class name' ]
-!
-
-classes
-	^ Smalltalk classes
-!
-
-doItReceiver
-	^ DoIt new
-!
-
-packages
-	^ Smalltalk packages
-!
-
-systemAnnouncer
-	^ (Smalltalk globals at: #SystemAnnouncer) current
-! !
-
-!Environment methodsFor: 'actions'!
-
-commitPackage: aPackage onSuccess: aBlock onError: anotherBlock
-	aPackage transport
-		commitOnSuccess: aBlock
-		onError: anotherBlock
-!
-
-copyClass: aClass to: aClassName
-	(Smalltalk globals at: aClassName)
-		ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].
-		
-	ClassBuilder new copyClass: aClass named: aClassName
-!
-
-inspect: anObject
-	Inspector inspect: anObject
-!
-
-moveClass: aClass toPackage: aPackageName
-	| package |
-	
-	package := Package named: aPackageName.
-	package ifNil: [ self error: 'Invalid package name' ].
-	package == aClass package ifTrue: [ ^ self ].
-	
-	aClass package: package
-!
-
-moveMethod: aMethod toClass: aClassName
-	| destinationClass |
-	
-	destinationClass := self classNamed: aClassName.
-	destinationClass == aMethod methodClass ifTrue: [ ^ self ].
-	
-	aMethod methodClass isMetaclass ifTrue: [ 
-		destinationClass := destinationClass class ].
-	
-	destinationClass 
-		compile: aMethod source
-		protocol: aMethod protocol.
-	aMethod methodClass 
-		removeCompiledMethod: aMethod
-!
-
-moveMethod: aMethod toProtocol: aProtocol
-	aMethod protocol: aProtocol
-!
-
-removeClass: aClass
-	Smalltalk removeClass: aClass
-!
-
-removeMethod: aMethod
-	aMethod methodClass removeCompiledMethod: aMethod
-!
-
-removeProtocol: aString from: aClass
-	(aClass methodsInProtocol: aString)
-		do: [ :each | aClass removeCompiledMethod: each ]
-!
-
-renameClass: aClass to: aClassName
-	(Smalltalk globals at: aClassName)
-		ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].
-		
-	ClassBuilder new renameClass: aClass to: aClassName
-!
-
-renameProtocol: aString to: anotherString in: aClass
-	(aClass methodsInProtocol: aString)
-		do: [ :each | each protocol: anotherString ]
-!
-
-setClassCommentOf: aClass to: aString
-	aClass comment: aString
-! !
-
-!Environment methodsFor: 'compiling'!
-
-addInstVarNamed: aString to: aClass
-	self classBuilder
-		addSubclassOf: aClass superclass 
-		named: aClass name 
-		instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)
-		package: aClass package name
-!
-
-compileClassComment: aString for: aClass
-	aClass comment: aString
-!
-
-compileClassDefinition: aString
-	[ self evaluate: aString for: DoIt new ]
-		on: Error
-		do: [ :error | self alert: error messageText ]
-!
-
-compileMethod: sourceCode for: class protocol: protocol
-	^ class
-		compile: sourceCode
-		protocol: protocol
-! !
-
-!Environment methodsFor: 'error handling'!
-
-evaluate: aBlock on: anErrorClass do: exceptionBlock
-	"Evaluate a block and catch exceptions happening on the environment stack"
-	
-	aBlock tryCatch: [ :exception | 
-		(exception isKindOf: (self classNamed: anErrorClass name))
-			ifTrue: [ exceptionBlock value: exception ]
- 			ifFalse: [ exception signal ] ]
-! !
-
-!Environment methodsFor: 'evaluating'!
-
-evaluate: aString for: anObject
-	^ Evaluator evaluate: aString for: anObject
-! !
-
-!Environment methodsFor: 'services'!
-
-registerErrorHandler: anErrorHandler
-	ErrorHandler register: anErrorHandler
-!
-
-registerFinder: aFinder
-	Finder register: aFinder
-!
-
-registerInspector: anInspector
-	Inspector register: anInspector
-!
-
-registerProgressHandler: aProgressHandler
-	ProgressHandler register: aProgressHandler
-!
-
-registerTranscript: aTranscript
-	Transcript register: aTranscript
-! !
-
 ProtoObject subclass: #JSObjectProxy
 	instanceVariableNames: 'jsObject'
 	package: 'Kernel-Infrastructure'!
@@ -343,26 +62,19 @@ at: aString put: anObject
 	<return self['@jsObject'][aString] = anObject>
 !
 
-jsObject
-	^ jsObject
+in: aValuable
+	^ aValuable value: jsObject
 !
 
-jsObject: aJSObject
-	jsObject := aJSObject
-!
-
-lookupProperty: aString
-	"Looks up a property in JS object.
-	Answer the property if it is present, or nil if it is not present."
-	
-	<return aString in self._jsObject() ? aString : nil>
+jsObject
+	^ jsObject
 ! !
 
 !JSObjectProxy methodsFor: 'comparing'!
 
 = anObject
 	anObject class == self class ifFalse: [ ^ false ].
-	^ self compareJSObjectWith: anObject jsObject
+	^ JSObjectProxy compareJSObjectOfProxy: self withProxy: anObject
 ! !
 
 !JSObjectProxy methodsFor: 'enumerating'!
@@ -397,72 +109,66 @@ printString
 	>
 ! !
 
-!JSObjectProxy methodsFor: 'private'!
-
-compareJSObjectWith: aJSObject
- 	<return self["@jsObject"] === aJSObject>
-! !
-
 !JSObjectProxy methodsFor: 'proxy'!
 
-addObjectVariablesTo: aDictionary
-	<
-		for(var i in self['@jsObject']) {
-			aDictionary._at_put_(i, self['@jsObject'][i]);
-		}
-	>
-!
-
 doesNotUnderstand: aMessage
-	^ (self lookupProperty: aMessage selector asJavaScriptPropertyName)
+	^ (JSObjectProxy lookupProperty: aMessage selector asJavaScriptPropertyName ofProxy: self)
 		ifNil: [ super doesNotUnderstand: aMessage ]
 		ifNotNil: [ :jsSelector | 
-			self 
+			JSObjectProxy 
 				forwardMessage: jsSelector 
-				withArguments: aMessage arguments ]
-!
+				withArguments: aMessage arguments
+				ofProxy: self ]
+! !
 
-forwardMessage: aString withArguments: anArray
-	<
-		return $core.accessJavaScript(self._jsObject(), aString, anArray);
-	>
-!
+!JSObjectProxy methodsFor: 'streaming'!
 
-inspectOn: anInspector
-	| variables |
-	variables := Dictionary new.
-	variables at: '#self' put: self jsObject.
-	anInspector setLabel: self printString.
-	self addObjectVariablesTo: variables.
-	anInspector setVariables: variables
+putOn: aStream
+	aStream nextPutJSObject: jsObject
 ! !
 
 !JSObjectProxy class methodsFor: 'instance creation'!
 
 on: aJSObject
-	^ self new
-		jsObject: aJSObject;
-		yourself
+	| instance |
+	instance := self new.
+	self jsObject: aJSObject ofProxy: instance.
+	^ instance
 ! !
 
-Object subclass: #NullProgressHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!NullProgressHandler commentStamp!
-I am the default progress handler. I do not display any progress, and simply iterate over the collection.!
+!JSObjectProxy class methodsFor: 'proxy'!
 
-!NullProgressHandler methodsFor: 'progress handling'!
+addObjectVariablesTo: aDictionary ofProxy: aProxy
+	<
+		var jsObject = aProxy['@jsObject'];
+		for(var i in jsObject) {
+			aDictionary._at_put_(i, jsObject[i]);
+		}
+	>
+!
 
-do: aBlock on: aCollection displaying: aString
-	aCollection do: aBlock
-! !
+compareJSObjectOfProxy: aProxy withProxy: anotherProxy
+<
+	var anotherJSObject = anotherProxy.klass ? anotherProxy["@jsObject"] : anotherProxy;
+	return aProxy["@jsObject"] === anotherJSObject
+>
+!
 
-NullProgressHandler class instanceVariableNames: 'current'!
+forwardMessage: aString withArguments: anArray ofProxy: aProxy
+	<
+		return $core.accessJavaScript(aProxy._jsObject(), aString, anArray);
+	>
+!
 
-!NullProgressHandler class methodsFor: 'initialization'!
+jsObject: aJSObject ofProxy: aProxy
+	<aProxy['@jsObject'] = aJSObject>
+!
 
-initialize
-	ProgressHandler registerIfNone: self new
+lookupProperty: aString ofProxy: aProxy
+	"Looks up a property in JS object.
+	Answer the property if it is present, or nil if it is not present."
+	
+	<return aString in aProxy._jsObject() ? aString : nil>
 ! !
 
 Object subclass: #Organizer
@@ -890,238 +596,6 @@ initialize
 	self current observeSystem
 ! !
 
-Object subclass: #PlatformInterface
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!PlatformInterface commentStamp!
-I am single entry point to UI and environment interface.
-My `initialize` tries several options (for now, browser environment only) to set myself up.
-
-## API
-
-    PlatformInterface alert: 'Hey, there is a problem'.
-    PlatformInterface confirm: 'Affirmative?'.
-    PlatformInterface prompt: 'Your name:'.
-
-    PlatformInterface ajax: #{
-        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'
-    }.!
-
-PlatformInterface class instanceVariableNames: 'worker'!
-
-!PlatformInterface class methodsFor: 'accessing'!
-
-globals
-	<return (new Function('return this'))();>
-!
-
-setWorker: anObject
-	worker := anObject
-! !
-
-!PlatformInterface class methodsFor: 'actions'!
-
-ajax: anObject
-	^ worker
-		ifNotNil: [ worker ajax: anObject ]
-		ifNil: [ self error: 'ajax: not available' ]
-!
-
-alert: aString
-	^ worker
-		ifNotNil: [ worker alert: aString ]
-		ifNil: [ self error: 'alert: not available' ]
-!
-
-confirm: aString
-	^ worker
-		ifNotNil: [ worker confirm: aString ]
-		ifNil: [ self error: 'confirm: not available' ]
-!
-
-existsGlobal: aString
-	^ PlatformInterface globals 
-		at: aString 
-		ifPresent: [ true ] 
-		ifAbsent: [ false ]
-!
-
-prompt: aString
-	^ worker
-		ifNotNil: [ worker prompt: aString ]
-		ifNil: [ self error: 'prompt: not available' ]
-!
-
-prompt: aString default: defaultString
-	^ worker
-		ifNotNil: [ worker prompt: aString default: defaultString ]
-		ifNil: [ self error: 'prompt: not available' ]
-! !
-
-!PlatformInterface class methodsFor: 'initialization'!
-
-initialize
-	| candidate |
-	
-	super initialize.
-	
-	BrowserInterface ifNotNil: [
-		candidate := BrowserInterface new.
-		candidate isAvailable ifTrue: [ self setWorker: candidate. ^ self ]
-	]
-! !
-
-Object subclass: #Service
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!Service commentStamp!
-I implement the basic behavior for class registration to a service.
-
-See the `Transcript` class for a concrete service.
-
-## API
-
-Use class-side methods `#register:` and `#registerIfNone:` to register classes to a specific service.!
-
-Service class instanceVariableNames: 'current'!
-
-!Service class methodsFor: 'accessing'!
-
-current
-	^ current
-! !
-
-!Service class methodsFor: 'instance creation'!
-
-new
-	self shouldNotImplement
-! !
-
-!Service class methodsFor: 'registration'!
-
-register: anObject
-	current := anObject
-!
-
-registerIfNone: anObject
-	self current ifNil: [ self register: anObject ]
-! !
-
-Service subclass: #ErrorHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!ErrorHandler commentStamp!
-I am the service used to handle Smalltalk errors.
-See `boot.js` `handleError()` function.
-
-Registered service instances must implement `#handleError:` to perform an action on the thrown exception.!
-
-!ErrorHandler class methodsFor: 'error handling'!
-
-handleError: anError
-	self handleUnhandledError: anError
-!
-
-handleUnhandledError: anError
-	anError wasHandled ifTrue: [ ^ self ].
-	
-	^ self current handleError: anError
-! !
-
-Service subclass: #Finder
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!Finder commentStamp!
-I am the service responsible for finding classes/methods.
-__There is no default finder.__
-
-## API
-
-Use `#browse` on an object to find it.!
-
-!Finder class methodsFor: 'finding'!
-
-findClass: aClass
-	^ self current findClass: aClass
-!
-
-findMethod: aCompiledMethod
-	^ self current findMethod: aCompiledMethod
-!
-
-findString: aString
-	^ self current findString: aString
-! !
-
-Service subclass: #Inspector
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!Inspector commentStamp!
-I am the service responsible for inspecting objects.
-
-The default inspector object is the transcript.!
-
-!Inspector class methodsFor: 'inspecting'!
-
-inspect: anObject
-	^ self current inspect: anObject
-! !
-
-Service subclass: #ProgressHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!ProgressHandler commentStamp!
-I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.
-
-Registered instances must implement `#do:on:displaying:`.
-
-The default behavior is to simply iterate over the collection, using `NullProgressHandler`.!
-
-!ProgressHandler class methodsFor: 'progress handling'!
-
-do: aBlock on: aCollection displaying: aString
-	self current do: aBlock on: aCollection displaying: aString
-! !
-
-Service subclass: #Transcript
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!Transcript commentStamp!
-I am a facade for Transcript actions.
-
-I delegate actions to the currently registered transcript.
-
-## API
-
-    Transcript 
-        show: 'hello world';
-        cr;
-        show: anObject.!
-
-!Transcript class methodsFor: 'instance creation'!
-
-open
-	self current open
-! !
-
-!Transcript class methodsFor: 'printing'!
-
-clear
-	self current clear
-!
-
-cr
-	self current show: String cr
-!
-
-inspect: anObject
-	self show: anObject
-!
-
-show: anObject
-	self current show: anObject
-! !
-
 Object subclass: #Setting
 	instanceVariableNames: 'key value defaultValue'
 	package: 'Kernel-Infrastructure'!
@@ -1276,7 +750,7 @@ settings
 version
 	"Answer the version string of Amber"
 	
-	^ '0.14.3'
+	^ '0.14.16'
 ! !
 
 !SmalltalkImage methodsFor: 'accessing amd'!
@@ -1426,11 +900,18 @@ deletePackage: packageName
 
 !SmalltalkImage methodsFor: 'testing'!
 
+existsJsGlobal: aString
+	^ Platform globals 
+		at: aString 
+		ifPresent: [ true ] 
+		ifAbsent: [ false ]
+!
+
 isSmalltalkObject: anObject
 	"Consider anObject a Smalltalk object if it has a 'klass' property.
 	Note that this may be unaccurate"
 	
-	<return typeof anObject.klass !!== 'undefined'>
+	<return anObject.klass !!= null>
 ! !
 
 SmalltalkImage class instanceVariableNames: 'current'!
@@ -1462,15 +943,6 @@ importsString
 	^ self key importsString, ' -> ', self value importsString
 ! !
 
-!SequenceableCollection methodsFor: '*Kernel-Infrastructure'!
-
-do: aBlock displayingProgress: aString
-	ProgressHandler 
-		do: aBlock 
-		on: self 
-		displaying: aString
-! !
-
 !String methodsFor: '*Kernel-Infrastructure'!
 
 asJavaScriptPropertyName

+ 9 - 7
bower_components/amber/src/Kernel-Methods.js

@@ -1,4 +1,4 @@
-define("amber_core/Kernel-Methods", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
+define("amber_core/Kernel-Methods", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Kernel-Methods');
 $core.packages["Kernel-Methods"].innerEval = function (expr) { return eval(expr); };
@@ -409,6 +409,8 @@ return $core.withContext(function($ctx1) {
 		try {
 			return self._value();
 		} catch(error) {
+			// pass non-local returns undetected
+			if (Array.isArray(error) && error.length === 1) throw error;
 			return aBlock._value_(error);
 		}
 	;
@@ -419,7 +421,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "tryCatch: aBlock\x0a\x09<\x0a\x09\x09try {\x0a\x09\x09\x09return self._value();\x0a\x09\x09} catch(error) {\x0a\x09\x09\x09return aBlock._value_(error);\x0a\x09\x09}\x0a\x09>",
+source: "tryCatch: aBlock\x0a\x09<\x0a\x09\x09try {\x0a\x09\x09\x09return self._value();\x0a\x09\x09} catch(error) {\x0a\x09\x09\x09// pass non-local returns undetected\x0a\x09\x09\x09if (Array.isArray(error) && error.length === 1) throw error;\x0a\x09\x09\x09return aBlock._value_(error);\x0a\x09\x09}\x0a\x09>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3041,12 +3043,12 @@ selector: "exists:",
 protocol: 'testing',
 fn: function (aString){
 var self=this;
-function $PlatformInterface(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-$1=$recv($PlatformInterface())._existsGlobal_(aString);
+$1=$recv($Smalltalk())._existsJsGlobal_(aString);
 return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"exists:",{aString:aString},$globals.NativeFunction.klass)});
@@ -3054,10 +3056,10 @@ return $1;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "exists: aString\x0a\x09^ PlatformInterface existsGlobal: aString",
-referencedClasses: ["PlatformInterface"],
+source: "exists: aString\x0a\x09^ Smalltalk existsJsGlobal: aString",
+referencedClasses: ["Smalltalk"],
 //>>excludeEnd("ide");
-messageSends: ["existsGlobal:"]
+messageSends: ["existsJsGlobal:"]
 }),
 $globals.NativeFunction.klass);
 

+ 3 - 1
bower_components/amber/src/Kernel-Methods.st

@@ -97,6 +97,8 @@ tryCatch: aBlock
 		try {
 			return self._value();
 		} catch(error) {
+			// pass non-local returns undetected
+			if (Array.isArray(error) && error.length === 1) throw error;
 			return aBlock._value_(error);
 		}
 	>
@@ -883,7 +885,7 @@ methodOf: nativeFunc this: thisObject valueWithArgs: args
 !NativeFunction class methodsFor: 'testing'!
 
 exists: aString
-	^ PlatformInterface existsGlobal: aString
+	^ Smalltalk existsJsGlobal: aString
 ! !
 
 Object subclass: #Timeout

+ 98 - 106
bower_components/amber/src/Kernel-Objects.js

@@ -1,4 +1,4 @@
-define("amber_core/Kernel-Objects", ["amber/boot"], function($boot){
+define("amber_core/Kernel-Objects", ["amber/boot"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Kernel-Objects');
 $core.packages["Kernel-Objects"].innerEval = function (expr) { return eval(expr); };
@@ -42,23 +42,18 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $2,$1;
-$2=self._identityHash();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["identityHash"]=1;
-//>>excludeEnd("ctx");
-$1=$recv($2).__eq($recv(anObject)._identityHash());
-return $1;
+return self._class() === $recv(anObject)._class() && self._isSameInstanceAs_(anObject);
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"==",{anObject:anObject},$globals.ProtoObject)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "== anObject\x0a\x09^ self identityHash = anObject identityHash",
+source: "== anObject\x0a<return self._class() === $recv(anObject)._class() && self._isSameInstanceAs_(anObject)>",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["=", "identityHash"]
+messageSends: []
 }),
 $globals.ProtoObject);
 
@@ -445,6 +440,35 @@ messageSends: []
 }),
 $globals.ProtoObject);
 
+$core.addMethod(
+$core.method({
+selector: "isSameInstanceAs:",
+protocol: 'comparing',
+fn: function (anObject){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$1;
+$2=self._identityHash();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["identityHash"]=1;
+//>>excludeEnd("ctx");
+$1=$recv($2).__eq($recv(anObject)._identityHash());
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"isSameInstanceAs:",{anObject:anObject},$globals.ProtoObject)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "isSameInstanceAs: anObject\x0a\x09^ self identityHash = anObject identityHash",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["=", "identityHash"]
+}),
+$globals.ProtoObject);
+
 $core.addMethod(
 $core.method({
 selector: "notNil",
@@ -1161,43 +1185,26 @@ $globals.Object);
 
 $core.addMethod(
 $core.method({
-selector: "inspectOn:",
-protocol: 'inspecting',
-fn: function (anInspector){
+selector: "in:",
+protocol: 'evaluating',
+fn: function (aValuable){
 var self=this;
-var variables;
-function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $1;
-variables=$recv($Dictionary())._new();
-$recv(variables)._at_put_("#self",self);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["at:put:"]=1;
-//>>excludeEnd("ctx");
-$recv($recv(self._class())._allInstanceVariableNames())._do_((function(each){
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx2) {
-//>>excludeEnd("ctx");
-return $recv(variables)._at_put_(each,self._instVarAt_(each));
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
-//>>excludeEnd("ctx");
-}));
-$recv(anInspector)._setLabel_(self._printString());
-$1=$recv(anInspector)._setVariables_(variables);
-return self;
+$1=$recv(aValuable)._value_(self);
+return $1;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Object)});
+}, function($ctx1) {$ctx1.fill(self,"in:",{aValuable:aValuable},$globals.Object)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anInspector"],
-source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
-referencedClasses: ["Dictionary"],
+args: ["aValuable"],
+source: "in: aValuable\x0a\x09^ aValuable value: self",
+referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["new", "at:put:", "do:", "allInstanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
+messageSends: ["value:"]
 }),
 $globals.Object);
 
@@ -1622,7 +1629,7 @@ $globals.Object);
 $core.addMethod(
 $core.method({
 selector: "value",
-protocol: 'accessing',
+protocol: 'evaluating',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -1793,35 +1800,6 @@ messageSends: []
 }),
 $globals.Boolean);
 
-$core.addMethod(
-$core.method({
-selector: "=",
-protocol: 'comparing',
-fn: function (aBoolean){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-
-		return aBoolean != null &&
-			typeof aBoolean._isBoolean === "function" &&
-			aBoolean._isBoolean() &&
-			Boolean(self == true) == aBoolean
-	;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"=",{aBoolean:aBoolean},$globals.Boolean)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aBoolean"],
-source: "= aBoolean\x0a\x09<\x0a\x09\x09return aBoolean != null &&\x0a\x09\x09\x09typeof aBoolean._isBoolean === \x22function\x22 &&\x0a\x09\x09\x09aBoolean._isBoolean() &&\x0a\x09\x09\x09Boolean(self == true) == aBoolean\x0a\x09>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Boolean);
-
 $core.addMethod(
 $core.method({
 selector: "==",
@@ -1831,19 +1809,18 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
-$1=self.__eq(aBoolean);
-return $1;
+return aBoolean != null && self.valueOf() === (typeof aBoolean === "boolean" ? aBoolean : aBoolean.valueOf());
+return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"==",{aBoolean:aBoolean},$globals.Boolean)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBoolean"],
-source: "== aBoolean\x0a\x09^ self = aBoolean",
+source: "== aBoolean\x0a<return aBoolean != null && self.valueOf() === (typeof aBoolean === \x22boolean\x22 ? aBoolean : aBoolean.valueOf())>",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["="]
+messageSends: []
 }),
 $globals.Boolean);
 
@@ -2338,6 +2315,51 @@ messageSends: []
 }),
 $globals.Date);
 
+$core.addMethod(
+$core.method({
+selector: "=",
+protocol: 'comparing',
+fn: function (aDate){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $3,$2,$4,$1;
+$3=$recv(aDate)._class();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["class"]=1;
+//>>excludeEnd("ctx");
+$2=$recv($3).__eq_eq(self._class());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["=="]=1;
+//>>excludeEnd("ctx");
+$1=$recv($2)._and_((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+$4=self._asMilliseconds();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx["asMilliseconds"]=1;
+//>>excludeEnd("ctx");
+return $recv($4).__eq_eq($recv(aDate)._asMilliseconds());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"=",{aDate:aDate},$globals.Date)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aDate"],
+source: "= aDate\x0a\x09^ (aDate class == self class) and: [ self asMilliseconds == aDate asMilliseconds ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["and:", "==", "class", "asMilliseconds"]
+}),
+$globals.Date);
+
 $core.addMethod(
 $core.method({
 selector: ">",
@@ -3462,27 +3484,22 @@ $globals.Number);
 
 $core.addMethod(
 $core.method({
-selector: "=",
+selector: "==",
 protocol: 'comparing',
 fn: function (aNumber){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-
-		return aNumber != null &&
-			typeof aNumber._isNumber === "function" &&
-			aNumber._isNumber() &&
-			Number(self) == aNumber
-	;
+return aNumber != null && Number(self) === (typeof aNumber === "number" ? aNumber : aNumber.valueOf());
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"=",{aNumber:aNumber},$globals.Number)});
+}, function($ctx1) {$ctx1.fill(self,"==",{aNumber:aNumber},$globals.Number)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "= aNumber\x0a\x09<\x0a\x09\x09return aNumber != null &&\x0a\x09\x09\x09typeof aNumber._isNumber === \x22function\x22 &&\x0a\x09\x09\x09aNumber._isNumber() &&\x0a\x09\x09\x09Number(self) == aNumber\x0a\x09>",
+source: "== aNumber\x0a<return aNumber != null && Number(self) === (typeof aNumber === \x22number\x22 ? aNumber : aNumber.valueOf())>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3963,31 +3980,6 @@ messageSends: []
 }),
 $globals.Number);
 
-$core.addMethod(
-$core.method({
-selector: "identityHash",
-protocol: 'accessing',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1;
-$1=$recv(self._asString()).__comma("n");
-return $1;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"identityHash",{},$globals.Number)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "identityHash\x0a\x09^ self asString, 'n'",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: [",", "asString"]
-}),
-$globals.Number);
-
 $core.addMethod(
 $core.method({
 selector: "isImmutable",

+ 18 - 37
bower_components/amber/src/Kernel-Objects.st

@@ -42,6 +42,10 @@ yourself
 !
 
 == anObject
+<return self._class() === $recv(anObject)._class() && self._isSameInstanceAs_(anObject)>
+!
+
+isSameInstanceAs: anObject
 	^ self identityHash = anObject identityHash
 !
 
@@ -209,10 +213,6 @@ basicDelete: aString
 
 size
 	self error: 'Object not indexable'
-!
-
-value
-	<return self.valueOf()>
 ! !
 
 !Object methodsFor: 'browsing'!
@@ -313,17 +313,14 @@ throw: anObject
 	< throw anObject >
 ! !
 
-!Object methodsFor: 'inspecting'!
+!Object methodsFor: 'evaluating'!
 
-inspectOn: anInspector
-	| variables |
-	variables := Dictionary new.
-	variables at: '#self' put: self.
-	self class allInstanceVariableNames do: [ :each |
-		variables at: each put: (self instVarAt: each) ].
-	anInspector
-		setLabel: self printString;
-		setVariables: variables
+in: aValuable
+	^ aValuable value: self
+!
+
+value
+	<return self.valueOf()>
 ! !
 
 !Object methodsFor: 'message handling'!
@@ -436,17 +433,8 @@ I am directly mapped to JavaScript Boolean. The `true` and `false` objects are t
 
 !Boolean methodsFor: 'comparing'!
 
-= aBoolean
-	<
-		return aBoolean !!= null &&
-			typeof aBoolean._isBoolean === "function" &&
-			aBoolean._isBoolean() &&
-			Boolean(self == true) == aBoolean
-	>
-!
-
 == aBoolean
-	^ self = aBoolean
+<return aBoolean !!= null && self.valueOf() === (typeof aBoolean === "boolean" ? aBoolean : aBoolean.valueOf())>
 ! !
 
 !Boolean methodsFor: 'controlling'!
@@ -672,6 +660,10 @@ year: aNumber
 	<return self <= aDate>
 !
 
+= aDate
+	^ (aDate class == self class) and: [ self asMilliseconds == aDate asMilliseconds ]
+!
+
 > aDate
 	<return self >> aDate>
 !
@@ -775,12 +767,6 @@ My instances can also be used to evaluate a block a fixed number of times:
 	
 	1 to: 10 by: 2 do: [ :aNumber| Transcript show: aNumber asString; cr ].!
 
-!Number methodsFor: 'accessing'!
-
-identityHash
-	^ self asString, 'n'
-! !
-
 !Number methodsFor: 'arithmetic'!
 
 * aNumber
@@ -839,13 +825,8 @@ negated
 	<return self <= aNumber>
 !
 
-= aNumber
-	<
-		return aNumber !!= null &&
-			typeof aNumber._isNumber === "function" &&
-			aNumber._isNumber() &&
-			Number(self) == aNumber
-	>
+== aNumber
+<return aNumber !!= null && Number(self) === (typeof aNumber === "number" ? aNumber : aNumber.valueOf())>
 !
 
 > aNumber

+ 464 - 40
bower_components/amber/src/Kernel-Tests.js

@@ -1,4 +1,4 @@
-define("amber_core/Kernel-Tests", ["amber/boot", "amber_core/SUnit", "amber_core/Kernel-Objects"], function($boot){
+define("amber_core/Kernel-Tests", ["amber/boot", "amber_core/SUnit", "amber_core/Kernel-Objects"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('Kernel-Tests');
 $core.packages["Kernel-Tests"].innerEval = function (expr) { return eval(expr); };
@@ -319,6 +319,74 @@ $globals.AnnouncerTest);
 
 
 $core.addClass('BlockClosureTest', $globals.TestCase, [], 'Kernel-Tests');
+$core.addMethod(
+$core.method({
+selector: "localReturnOnDoCatch",
+protocol: 'fixture',
+fn: function (){
+var self=this;
+function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $early={};
+try {
+$recv((function(){
+throw $early=[(2)];
+
+}))._on_do_($Error(),(function(){
+
+}));
+return (3);
+}
+catch(e) {if(e===$early)return e[0]; throw e}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"localReturnOnDoCatch",{},$globals.BlockClosureTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "localReturnOnDoCatch\x0a    [ ^ 2 ] on: Error do: [].\x0a    ^ 3",
+referencedClasses: ["Error"],
+//>>excludeEnd("ide");
+messageSends: ["on:do:"]
+}),
+$globals.BlockClosureTest);
+
+$core.addMethod(
+$core.method({
+selector: "localReturnOnDoMiss",
+protocol: 'fixture',
+fn: function (){
+var self=this;
+function $Class(){return $globals.Class||(typeof Class=="undefined"?nil:Class)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $early={};
+try {
+$recv((function(){
+throw $early=[(2)];
+
+}))._on_do_($Class(),(function(){
+
+}));
+return (3);
+}
+catch(e) {if(e===$early)return e[0]; throw e}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"localReturnOnDoMiss",{},$globals.BlockClosureTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "localReturnOnDoMiss\x0a    [ ^ 2 ] on: Class do: [].\x0a    ^ 3",
+referencedClasses: ["Class"],
+//>>excludeEnd("ide");
+messageSends: ["on:do:"]
+}),
+$globals.BlockClosureTest);
+
 $core.addMethod(
 $core.method({
 selector: "testCanClearInterval",
@@ -617,6 +685,54 @@ messageSends: ["timeout:", "valueWithTimeout:", "async:", "on:do:", "assert:", "
 }),
 $globals.BlockClosureTest);
 
+$core.addMethod(
+$core.method({
+selector: "testLocalReturnOnDoCatch",
+protocol: 'tests',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._assert_equals_(self._localReturnOnDoCatch(),(2));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"testLocalReturnOnDoCatch",{},$globals.BlockClosureTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testLocalReturnOnDoCatch\x0a\x09self assert: self localReturnOnDoCatch equals: 2",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["assert:equals:", "localReturnOnDoCatch"]
+}),
+$globals.BlockClosureTest);
+
+$core.addMethod(
+$core.method({
+selector: "testLocalReturnOnDoMiss",
+protocol: 'tests',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._assert_equals_(self._localReturnOnDoMiss(),(2));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"testLocalReturnOnDoMiss",{},$globals.BlockClosureTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testLocalReturnOnDoMiss\x0a\x09self assert: self localReturnOnDoMiss equals: 2",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["assert:equals:", "localReturnOnDoMiss"]
+}),
+$globals.BlockClosureTest);
+
 $core.addMethod(
 $core.method({
 selector: "testNewWithValues",
@@ -2157,6 +2273,192 @@ $globals.ClassBuilderTest);
 
 
 
+$core.addClass('ClassTest', $globals.TestCase, ['builder', 'theClass'], 'Kernel-Tests');
+$core.addMethod(
+$core.method({
+selector: "jsConstructor",
+protocol: 'running',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+
+		function Foo(){}
+		Foo.prototype.valueOf = function () {return 4;};
+		return Foo;
+	;
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"jsConstructor",{},$globals.ClassTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "jsConstructor\x0a\x09<\x0a\x09\x09function Foo(){}\x0a\x09\x09Foo.prototype.valueOf = function () {return 4;};\x0a\x09\x09return Foo;\x0a\x09>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.ClassTest);
+
+$core.addMethod(
+$core.method({
+selector: "setUp",
+protocol: 'running',
+fn: function (){
+var self=this;
+function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self["@builder"]=$recv($ClassBuilder())._new();
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"setUp",{},$globals.ClassTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "setUp\x0a\x09builder := ClassBuilder new",
+referencedClasses: ["ClassBuilder"],
+//>>excludeEnd("ide");
+messageSends: ["new"]
+}),
+$globals.ClassTest);
+
+$core.addMethod(
+$core.method({
+selector: "tearDown",
+protocol: 'running',
+fn: function (){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+$1=self["@theClass"];
+if(($receiver = $1) == null || $receiver.isNil){
+$1;
+} else {
+$recv($Smalltalk())._removeClass_(self["@theClass"]);
+self["@theClass"]=nil;
+self["@theClass"];
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"tearDown",{},$globals.ClassTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "tearDown\x0a\x09theClass ifNotNil: [ Smalltalk removeClass: theClass. theClass := nil ]",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:", "removeClass:"]
+}),
+$globals.ClassTest);
+
+$core.addMethod(
+$core.method({
+selector: "testSetJavaScriptConstructor",
+protocol: 'tests',
+fn: function (){
+var self=this;
+var instance;
+function $ObjectMock(){return $globals.ObjectMock||(typeof ObjectMock=="undefined"?nil:ObjectMock)}
+function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$1,$4,$3,$6,$5,$8,$7;
+self["@theClass"]=$recv(self["@builder"])._copyClass_named_($ObjectMock(),"ObjectMock2");
+$recv(self["@theClass"])._javascriptConstructor_(self._jsConstructor());
+$2=$recv(self["@theClass"])._superclass();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["superclass"]=1;
+//>>excludeEnd("ctx");
+$1=$recv($2).__eq_eq($recv($ObjectMock())._superclass());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["=="]=1;
+//>>excludeEnd("ctx");
+self._assert_($1);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:"]=1;
+//>>excludeEnd("ctx");
+$4=$recv(self["@theClass"])._instanceVariableNames();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["instanceVariableNames"]=1;
+//>>excludeEnd("ctx");
+$3=$recv($4).__eq_eq($recv($ObjectMock())._instanceVariableNames());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["=="]=2;
+//>>excludeEnd("ctx");
+self._assert_($3);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:"]=2;
+//>>excludeEnd("ctx");
+self._assert_equals_($recv(self["@theClass"])._name(),"ObjectMock2");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:equals:"]=1;
+//>>excludeEnd("ctx");
+$6=$recv(self["@theClass"])._package();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["package"]=1;
+//>>excludeEnd("ctx");
+$5=$recv($6).__eq_eq($recv($ObjectMock())._package());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["=="]=3;
+//>>excludeEnd("ctx");
+self._assert_($5);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:"]=3;
+//>>excludeEnd("ctx");
+$8=$recv(self["@theClass"])._methodDictionary();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["methodDictionary"]=1;
+//>>excludeEnd("ctx");
+$7=$recv($8)._keys();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["keys"]=1;
+//>>excludeEnd("ctx");
+self._assert_equals_($7,$recv($recv($ObjectMock())._methodDictionary())._keys());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:equals:"]=2;
+//>>excludeEnd("ctx");
+instance=$recv(self["@theClass"])._new();
+self._assert_($recv($recv(instance)._class()).__eq_eq(self["@theClass"]));
+self._assert_equals_($recv(instance)._value(),(4));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:equals:"]=3;
+//>>excludeEnd("ctx");
+self._shouldnt_raise_((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(instance)._foo_((9));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+//>>excludeEnd("ctx");
+}),$Error());
+self._assert_equals_($recv(instance)._foo(),(9));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"testSetJavaScriptConstructor",{instance:instance},$globals.ClassTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testSetJavaScriptConstructor\x0a\x09| instance |\x0a\x09theClass := builder copyClass: ObjectMock named: 'ObjectMock2'.\x0a\x09theClass javascriptConstructor: self jsConstructor.\x0a\x09\x22part took from copy class test\x22\x0a\x09self assert: theClass superclass == ObjectMock superclass.\x0a\x09self assert: theClass instanceVariableNames == ObjectMock instanceVariableNames.\x0a\x09self assert: theClass name equals: 'ObjectMock2'.\x0a\x09self assert: theClass package == ObjectMock package.\x0a\x09self assert: theClass methodDictionary keys equals: ObjectMock methodDictionary keys.\x0a\x09\x22testing specific to late-wrapped class\x22\x0a\x09instance := theClass new.\x0a\x09self assert: instance class == theClass.\x0a\x09self assert: instance value equals: 4.\x0a\x09self shouldnt: [ instance foo: 9 ] raise: Error.\x0a\x09self assert: instance foo equals: 9",
+referencedClasses: ["ObjectMock", "Error"],
+//>>excludeEnd("ide");
+messageSends: ["copyClass:named:", "javascriptConstructor:", "jsConstructor", "assert:", "==", "superclass", "instanceVariableNames", "assert:equals:", "name", "package", "keys", "methodDictionary", "new", "class", "value", "shouldnt:raise:", "foo:", "foo"]
+}),
+$globals.ClassTest);
+
+
+
 $core.addClass('CollectionTest', $globals.TestCase, [], 'Kernel-Tests');
 $core.addMethod(
 $core.method({
@@ -8154,45 +8456,6 @@ messageSends: ["assert:", "==", "deny:", "yourself"]
 }),
 $globals.StringTest);
 
-$core.addMethod(
-$core.method({
-selector: "testIdentityHash",
-protocol: 'tests',
-fn: function (){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $1,$2,$4,$3;
-$1="foo"._identityHash();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["identityHash"]=1;
-//>>excludeEnd("ctx");
-$2="foo"._identityHash();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["identityHash"]=2;
-//>>excludeEnd("ctx");
-self._assert_equals_($1,$2);
-$4="foo"._identityHash();
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["identityHash"]=3;
-//>>excludeEnd("ctx");
-$3=$recv($4).__eq("bar"._identityHash());
-self._deny_($3);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"testIdentityHash",{},$globals.StringTest)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "testIdentityHash\x0a\x09self assert: 'foo' identityHash equals: 'foo' identityHash.\x0a\x09self deny: ('foo' identityHash = 'bar' identityHash)",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["assert:equals:", "identityHash", "deny:", "="]
-}),
-$globals.StringTest);
-
 $core.addMethod(
 $core.method({
 selector: "testIncludesSubString",
@@ -9319,6 +9582,167 @@ $globals.ConsoleTranscriptTest);
 
 
 
+$core.addClass('DateTest', $globals.TestCase, [], 'Kernel-Tests');
+$core.addMethod(
+$core.method({
+selector: "testEquality",
+protocol: 'tests',
+fn: function (){
+var self=this;
+var now;
+function $Date(){return $globals.Date||(typeof Date=="undefined"?nil:Date)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$3,$4,$2,$6,$7,$5,$9,$11,$10,$8;
+now=$recv($Date())._new();
+$1=$recv(now).__eq(now);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["="]=1;
+//>>excludeEnd("ctx");
+self._assert_($1);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:"]=1;
+//>>excludeEnd("ctx");
+$3=now;
+$4=$recv($Date())._fromMilliseconds_((0));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["fromMilliseconds:"]=1;
+//>>excludeEnd("ctx");
+$2=$recv($3).__eq($4);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["="]=2;
+//>>excludeEnd("ctx");
+self._deny_($2);
+$6=$recv($Date())._fromMilliseconds_((12345678));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["fromMilliseconds:"]=2;
+//>>excludeEnd("ctx");
+$7=$recv($Date())._fromMilliseconds_((12345678));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["fromMilliseconds:"]=3;
+//>>excludeEnd("ctx");
+$5=$recv($6).__eq($7);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["="]=3;
+//>>excludeEnd("ctx");
+self._assert_($5);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:"]=2;
+//>>excludeEnd("ctx");
+$9=now;
+$11=$recv(now)._asMilliseconds();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["asMilliseconds"]=1;
+//>>excludeEnd("ctx");
+$10=$recv($Date())._fromMilliseconds_($11);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["fromMilliseconds:"]=4;
+//>>excludeEnd("ctx");
+$8=$recv($9).__eq($10);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["="]=4;
+//>>excludeEnd("ctx");
+self._assert_($8);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["assert:"]=3;
+//>>excludeEnd("ctx");
+self._assert_($recv($recv($Date())._fromMilliseconds_($recv(now)._asMilliseconds())).__eq(now));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"testEquality",{now:now},$globals.DateTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testEquality\x0a\x09| now |\x0a\x09now := Date new.\x0a\x0a\x09self assert: now = now.\x0a\x0a\x09self deny: now = (Date fromMilliseconds: 0).\x0a\x0a\x09self assert: (Date fromMilliseconds: 12345678) = (Date fromMilliseconds: 12345678).\x0a\x09self assert: now = (Date fromMilliseconds: now asMilliseconds).\x0a\x09self assert: (Date fromMilliseconds: now asMilliseconds) = now",
+referencedClasses: ["Date"],
+//>>excludeEnd("ide");
+messageSends: ["new", "assert:", "=", "deny:", "fromMilliseconds:", "asMilliseconds"]
+}),
+$globals.DateTest);
+
+$core.addMethod(
+$core.method({
+selector: "testIdentity",
+protocol: 'tests',
+fn: function (){
+var self=this;
+var now;
+function $Date(){return $globals.Date||(typeof Date=="undefined"?nil:Date)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$3,$4,$2,$6,$7,$5,$9,$11,$10,$8;
+now=$recv($Date())._new();
+$1=$recv(now).__eq_eq(now);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["=="]=1;
+//>>excludeEnd("ctx");
+self._assert_($1);
+$3=now;
+$4=$recv($Date())._fromMilliseconds_((0));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["fromMilliseconds:"]=1;
+//>>excludeEnd("ctx");
+$2=$recv($3).__eq_eq($4);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["=="]=2;
+//>>excludeEnd("ctx");
+self._deny_($2);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["deny:"]=1;
+//>>excludeEnd("ctx");
+$6=$recv($Date())._fromMilliseconds_((12345678));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["fromMilliseconds:"]=2;
+//>>excludeEnd("ctx");
+$7=$recv($Date())._fromMilliseconds_((12345678));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["fromMilliseconds:"]=3;
+//>>excludeEnd("ctx");
+$5=$recv($6).__eq_eq($7);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["=="]=3;
+//>>excludeEnd("ctx");
+self._deny_($5);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["deny:"]=2;
+//>>excludeEnd("ctx");
+$9=now;
+$11=$recv(now)._asMilliseconds();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["asMilliseconds"]=1;
+//>>excludeEnd("ctx");
+$10=$recv($Date())._fromMilliseconds_($11);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["fromMilliseconds:"]=4;
+//>>excludeEnd("ctx");
+$8=$recv($9).__eq_eq($10);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["=="]=4;
+//>>excludeEnd("ctx");
+self._deny_($8);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["deny:"]=3;
+//>>excludeEnd("ctx");
+self._deny_($recv($recv($Date())._fromMilliseconds_($recv(now)._asMilliseconds())).__eq_eq(now));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"testIdentity",{now:now},$globals.DateTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testIdentity\x0a\x09| now |\x0a\x09now := Date new.\x0a\x0a\x09self assert: now == now.\x0a\x0a\x09self deny: now == (Date fromMilliseconds: 0).\x0a\x0a\x09self deny: (Date fromMilliseconds: 12345678) == (Date fromMilliseconds: 12345678).\x0a\x09self deny: now == (Date fromMilliseconds: now asMilliseconds).\x0a\x09self deny: (Date fromMilliseconds: now asMilliseconds) == now",
+referencedClasses: ["Date"],
+//>>excludeEnd("ide");
+messageSends: ["new", "assert:", "==", "deny:", "fromMilliseconds:", "asMilliseconds"]
+}),
+$globals.DateTest);
+
+
+
 $core.addClass('JSObjectProxyTest', $globals.TestCase, [], 'Kernel-Tests');
 $core.addMethod(
 $core.method({

+ 94 - 5
bower_components/amber/src/Kernel-Tests.st

@@ -90,6 +90,18 @@ TestCase subclass: #BlockClosureTest
 	instanceVariableNames: ''
 	package: 'Kernel-Tests'!
 
+!BlockClosureTest methodsFor: 'fixture'!
+
+localReturnOnDoCatch
+    [ ^ 2 ] on: Error do: [].
+    ^ 3
+!
+
+localReturnOnDoMiss
+    [ ^ 2 ] on: Class do: [].
+    ^ 3
+! !
+
 !BlockClosureTest methodsFor: 'tests'!
 
 testCanClearInterval
@@ -136,6 +148,14 @@ testExceptionSemantics
 	]) valueWithTimeout: 0
 !
 
+testLocalReturnOnDoCatch
+	self assert: self localReturnOnDoCatch equals: 2
+!
+
+testLocalReturnOnDoMiss
+	self assert: self localReturnOnDoMiss equals: 2
+!
+
 testNewWithValues
 <
 	function TestConstructor(arg1, arg2, arg3) {}
@@ -407,6 +427,48 @@ testInstanceVariableNames
 	self assert: (builder instanceVariableNamesFor: '  hello   world   ') equals: #('hello' 'world')
 ! !
 
+TestCase subclass: #ClassTest
+	instanceVariableNames: 'builder theClass'
+	package: 'Kernel-Tests'!
+
+!ClassTest methodsFor: 'running'!
+
+jsConstructor
+	<
+		function Foo(){}
+		Foo.prototype.valueOf = function () {return 4;};
+		return Foo;
+	>
+!
+
+setUp
+	builder := ClassBuilder new
+!
+
+tearDown
+	theClass ifNotNil: [ Smalltalk removeClass: theClass. theClass := nil ]
+! !
+
+!ClassTest methodsFor: 'tests'!
+
+testSetJavaScriptConstructor
+	| instance |
+	theClass := builder copyClass: ObjectMock named: 'ObjectMock2'.
+	theClass javascriptConstructor: self jsConstructor.
+	"part took from copy class test"
+	self assert: theClass superclass == ObjectMock superclass.
+	self assert: theClass instanceVariableNames == ObjectMock instanceVariableNames.
+	self assert: theClass name equals: 'ObjectMock2'.
+	self assert: theClass package == ObjectMock package.
+	self assert: theClass methodDictionary keys equals: ObjectMock methodDictionary keys.
+	"testing specific to late-wrapped class"
+	instance := theClass new.
+	self assert: instance class == theClass.
+	self assert: instance value equals: 4.
+	self shouldnt: [ instance foo: 9 ] raise: Error.
+	self assert: instance foo equals: 9
+! !
+
 TestCase subclass: #CollectionTest
 	instanceVariableNames: ''
 	package: 'Kernel-Tests'!
@@ -1458,11 +1520,6 @@ testIdentity
 	self deny: '' == 0
 !
 
-testIdentityHash
-	self assert: 'foo' identityHash equals: 'foo' identityHash.
-	self deny: ('foo' identityHash = 'bar' identityHash)
-!
-
 testIncludesSubString
 	self assert: ('amber' includesSubString: 'ber').
 	self deny: ('amber' includesSubString: 'zork').
@@ -1677,6 +1734,38 @@ self shouldnt: [ Transcript show: console ] raise: Error.
 Transcript register: originalTranscript.
 ! !
 
+TestCase subclass: #DateTest
+	instanceVariableNames: ''
+	package: 'Kernel-Tests'!
+
+!DateTest methodsFor: 'tests'!
+
+testEquality
+	| now |
+	now := Date new.
+
+	self assert: now = now.
+
+	self deny: now = (Date fromMilliseconds: 0).
+
+	self assert: (Date fromMilliseconds: 12345678) = (Date fromMilliseconds: 12345678).
+	self assert: now = (Date fromMilliseconds: now asMilliseconds).
+	self assert: (Date fromMilliseconds: now asMilliseconds) = now
+!
+
+testIdentity
+	| now |
+	now := Date new.
+
+	self assert: now == now.
+
+	self deny: now == (Date fromMilliseconds: 0).
+
+	self deny: (Date fromMilliseconds: 12345678) == (Date fromMilliseconds: 12345678).
+	self deny: now == (Date fromMilliseconds: now asMilliseconds).
+	self deny: (Date fromMilliseconds: now asMilliseconds) == now
+! !
+
 TestCase subclass: #JSObjectProxyTest
 	instanceVariableNames: ''
 	package: 'Kernel-Tests'!

+ 0 - 115
bower_components/amber/src/Kernel-Transcript.js

@@ -1,115 +0,0 @@
-define("amber_core/Kernel-Transcript", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){
-var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-$core.addPackage('Kernel-Transcript');
-$core.packages["Kernel-Transcript"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Kernel-Transcript"].transport = {"type":"amd","amdNamespace":"amber_core"};
-
-$core.addClass('ConsoleTranscript', $globals.Object, ['textarea'], 'Kernel-Transcript');
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.ConsoleTranscript.comment="I am a specific transcript emitting to the JavaScript console.\x0a\x0aIf no other transcript is registered, I am the default.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "clear",
-protocol: 'printing',
-fn: function (){
-var self=this;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "clear\x0a\x09\x22no op\x22",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.ConsoleTranscript);
-
-$core.addMethod(
-$core.method({
-selector: "cr",
-protocol: 'printing',
-fn: function (){
-var self=this;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "cr\x0a\x09\x22no op\x22",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.ConsoleTranscript);
-
-$core.addMethod(
-$core.method({
-selector: "open",
-protocol: 'actions',
-fn: function (){
-var self=this;
-return self;
-
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "open",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.ConsoleTranscript);
-
-$core.addMethod(
-$core.method({
-selector: "show:",
-protocol: 'printing',
-fn: function (anObject){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-console.log(String($recv(anObject)._asString()));
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.ConsoleTranscript)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "show: anObject\x0a\x22Smalltalk objects should have no trouble displaying themselves on the Transcript; Javascript objects don't know how, so must be wrapped in a JSObectProxy.\x22\x0a<console.log(String($recv(anObject)._asString()))>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.ConsoleTranscript);
-
-
-$core.addMethod(
-$core.method({
-selector: "initialize",
-protocol: 'initialization',
-fn: function (){
-var self=this;
-function $Transcript(){return $globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-$recv($Transcript())._registerIfNone_(self._new());
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ConsoleTranscript.klass)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "initialize\x0a\x09Transcript registerIfNone: self new",
-referencedClasses: ["Transcript"],
-//>>excludeEnd("ide");
-messageSends: ["registerIfNone:", "new"]
-}),
-$globals.ConsoleTranscript.klass);
-
-});

+ 0 - 35
bower_components/amber/src/Kernel-Transcript.st

@@ -1,35 +0,0 @@
-Smalltalk createPackage: 'Kernel-Transcript'!
-Object subclass: #ConsoleTranscript
-	instanceVariableNames: 'textarea'
-	package: 'Kernel-Transcript'!
-!ConsoleTranscript commentStamp!
-I am a specific transcript emitting to the JavaScript console.
-
-If no other transcript is registered, I am the default.!
-
-!ConsoleTranscript methodsFor: 'actions'!
-
-open
-! !
-
-!ConsoleTranscript methodsFor: 'printing'!
-
-clear
-	"no op"
-!
-
-cr
-	"no op"
-!
-
-show: anObject
-"Smalltalk objects should have no trouble displaying themselves on the Transcript; Javascript objects don't know how, so must be wrapped in a JSObectProxy."
-<console.log(String($recv(anObject)._asString()))>
-! !
-
-!ConsoleTranscript class methodsFor: 'initialization'!
-
-initialize
-	Transcript registerIfNone: self new
-! !
-

+ 325 - 0
bower_components/amber/src/Platform-Browser.js

@@ -0,0 +1,325 @@
+define("amber_core/Platform-Browser", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
+var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+$core.addPackage('Platform-Browser');
+$core.packages["Platform-Browser"].innerEval = function (expr) { return eval(expr); };
+$core.packages["Platform-Browser"].transport = {"type":"amd","amdNamespace":"amber_core"};
+
+$core.addClass('BrowserPlatform', $globals.Object, [], 'Platform-Browser');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.BrowserPlatform.comment="I am `Platform` service implementation for browser.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "globals",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+var $1;
+$1=window;
+return $1;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "globals\x0a\x09^ window",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.BrowserPlatform);
+
+$core.addMethod(
+$core.method({
+selector: "newXhr",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $XMLHttpRequest(){return $globals.XMLHttpRequest||(typeof XMLHttpRequest=="undefined"?nil:XMLHttpRequest)}
+function $NativeFunction(){return $globals.NativeFunction||(typeof NativeFunction=="undefined"?nil:NativeFunction)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+if(($receiver = $XMLHttpRequest()) == null || $receiver.isNil){
+self._error_("XMLHttpRequest not available.");
+} else {
+$1=$recv($NativeFunction())._constructorOf_($XMLHttpRequest());
+return $1;
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"newXhr",{},$globals.BrowserPlatform)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "newXhr\x0a\x09XMLHttpRequest\x0a\x09\x09ifNotNil: [ ^ NativeFunction constructorOf: XMLHttpRequest ]\x0a\x09\x09ifNil: [ self error: 'XMLHttpRequest not available.' ]",
+referencedClasses: ["XMLHttpRequest", "NativeFunction"],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:ifNil:", "constructorOf:", "error:"]
+}),
+$globals.BrowserPlatform);
+
+
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'testing',
+fn: function (){
+var self=this;
+function $Platform(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._isFeasible();
+if($core.assert($1)){
+$recv($Platform())._registerIfNone_(self._new());
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.BrowserPlatform.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09self isFeasible ifTrue: [ Platform registerIfNone: self new ]",
+referencedClasses: ["Platform"],
+//>>excludeEnd("ide");
+messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
+}),
+$globals.BrowserPlatform.klass);
+
+$core.addMethod(
+$core.method({
+selector: "isFeasible",
+protocol: 'testing',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return typeof window !== "undefined";
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"isFeasible",{},$globals.BrowserPlatform.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "isFeasible\x0a<return typeof window !== \x22undefined\x22>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.BrowserPlatform.klass);
+
+
+$core.addClass('BrowserTerminal', $globals.Object, [], 'Platform-Browser');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.BrowserTerminal.comment="I am `Terminal` service implementation for browser.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "alert:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(window)._alert_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.BrowserTerminal)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "alert: aString\x0a\x09^ window alert: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["alert:"]
+}),
+$globals.BrowserTerminal);
+
+$core.addMethod(
+$core.method({
+selector: "confirm:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(window)._confirm_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.BrowserTerminal)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "confirm: aString\x0a\x09^ window confirm: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["confirm:"]
+}),
+$globals.BrowserTerminal);
+
+$core.addMethod(
+$core.method({
+selector: "prompt:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(window)._prompt_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.BrowserTerminal)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "prompt: aString\x0a\x09^ window prompt: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["prompt:"]
+}),
+$globals.BrowserTerminal);
+
+$core.addMethod(
+$core.method({
+selector: "prompt:default:",
+protocol: 'actions',
+fn: function (aString,defaultString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(window)._prompt_default_(aString,defaultString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.BrowserTerminal)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "defaultString"],
+source: "prompt: aString default: defaultString\x0a\x09^ window prompt: aString default: defaultString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["prompt:default:"]
+}),
+$globals.BrowserTerminal);
+
+
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'testing',
+fn: function (){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._isFeasible();
+if($core.assert($1)){
+$recv($Terminal())._registerIfNone_(self._new());
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.BrowserTerminal.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09self isFeasible ifTrue: [ Terminal registerIfNone: self new ]",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
+}),
+$globals.BrowserTerminal.klass);
+
+$core.addMethod(
+$core.method({
+selector: "isFeasible",
+protocol: 'testing',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return typeof window !== "undefined";
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"isFeasible",{},$globals.BrowserTerminal.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "isFeasible\x0a<return typeof window !== \x22undefined\x22>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.BrowserTerminal.klass);
+
+$core.addMethod(
+$core.method({
+selector: "postMessageTo:",
+protocol: '*Platform-Browser',
+fn: function (aFrame){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._postMessageTo_origin_(aFrame,"*");
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"postMessageTo:",{aFrame:aFrame},$globals.Object)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aFrame"],
+source: "postMessageTo: aFrame\x0a^ self postMessageTo: aFrame origin: '*'",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["postMessageTo:origin:"]
+}),
+$globals.Object);
+
+$core.addMethod(
+$core.method({
+selector: "postMessageTo:origin:",
+protocol: '*Platform-Browser',
+fn: function (aFrame,aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return aFrame.postMessage(self, aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"postMessageTo:origin:",{aFrame:aFrame,aString:aString},$globals.Object)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aFrame", "aString"],
+source: "postMessageTo: aFrame origin: aString\x0a<return aFrame.postMessage(self, aString)>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.Object);
+
+});

+ 73 - 0
bower_components/amber/src/Platform-Browser.st

@@ -0,0 +1,73 @@
+Smalltalk createPackage: 'Platform-Browser'!
+Object subclass: #BrowserPlatform
+	instanceVariableNames: ''
+	package: 'Platform-Browser'!
+!BrowserPlatform commentStamp!
+I am `Platform` service implementation for browser.!
+
+!BrowserPlatform methodsFor: 'accessing'!
+
+globals
+	^ window
+!
+
+newXhr
+	XMLHttpRequest
+		ifNotNil: [ ^ NativeFunction constructorOf: XMLHttpRequest ]
+		ifNil: [ self error: 'XMLHttpRequest not available.' ]
+! !
+
+!BrowserPlatform class methodsFor: 'testing'!
+
+initialize
+	self isFeasible ifTrue: [ Platform registerIfNone: self new ]
+!
+
+isFeasible
+<return typeof window !!== "undefined">
+! !
+
+Object subclass: #BrowserTerminal
+	instanceVariableNames: ''
+	package: 'Platform-Browser'!
+!BrowserTerminal commentStamp!
+I am `Terminal` service implementation for browser.!
+
+!BrowserTerminal methodsFor: 'actions'!
+
+alert: aString
+	^ window alert: aString
+!
+
+confirm: aString
+	^ window confirm: aString
+!
+
+prompt: aString
+	^ window prompt: aString
+!
+
+prompt: aString default: defaultString
+	^ window prompt: aString default: defaultString
+! !
+
+!BrowserTerminal class methodsFor: 'testing'!
+
+initialize
+	self isFeasible ifTrue: [ Terminal registerIfNone: self new ]
+!
+
+isFeasible
+<return typeof window !!== "undefined">
+! !
+
+!Object methodsFor: '*Platform-Browser'!
+
+postMessageTo: aFrame
+^ self postMessageTo: aFrame origin: '*'
+!
+
+postMessageTo: aFrame origin: aString
+<return aFrame.postMessage(self, aString)>
+! !
+

+ 539 - 63
bower_components/amber/src/Kernel-ImportExport.js → bower_components/amber/src/Platform-ImportExport.js

@@ -1,10 +1,10 @@
-define("amber_core/Kernel-ImportExport", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Infrastructure"], function($boot){
+define("amber_core/Platform-ImportExport", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Exceptions", "amber_core/Platform-Services", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Classes"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
-$core.addPackage('Kernel-ImportExport');
-$core.packages["Kernel-ImportExport"].innerEval = function (expr) { return eval(expr); };
-$core.packages["Kernel-ImportExport"].transport = {"type":"amd","amdNamespace":"amber_core"};
+$core.addPackage('Platform-ImportExport');
+$core.packages["Platform-ImportExport"].innerEval = function (expr) { return eval(expr); };
+$core.packages["Platform-ImportExport"].transport = {"type":"amd","amdNamespace":"amber_core"};
 
-$core.addClass('AbstractExporter', $globals.Object, [], 'Kernel-ImportExport');
+$core.addClass('AbstractExporter', $globals.Object, [], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AbstractExporter.comment="I am an abstract exporter for Amber source code.\x0a\x0a## API\x0a\x0aUse `#exportPackage:on:` to export a given package on a Stream.";
 //>>excludeEnd("ide");
@@ -180,7 +180,7 @@ $globals.AbstractExporter);
 
 
 
-$core.addClass('ChunkExporter', $globals.AbstractExporter, [], 'Kernel-ImportExport');
+$core.addClass('ChunkExporter', $globals.AbstractExporter, [], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ChunkExporter.comment="I am an exporter dedicated to outputting Amber source code in the classic Smalltalk chunk format.\x0a\x0aI do not output any compiled code.";
 //>>excludeEnd("ide");
@@ -632,7 +632,7 @@ $recv(aStream)._nextPutAll_("') imports: ");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["nextPutAll:"]=3;
 //>>excludeEnd("ctx");
-$recv(aStream)._nextPutAll_($recv(aPackage)._importsDefinition());
+$recv(aStream)._nextPutAll_(self._chunkEscape_($recv(aPackage)._importsDefinition()));
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx2.sendIdx["nextPutAll:"]=4;
 //>>excludeEnd("ctx");
@@ -650,10 +650,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aPackage", "aStream"],
-source: "exportPackageImportsOf: aPackage on: aStream\x0a\x09aPackage imports ifNotEmpty: [ :imports |\x0a\x09\x09aStream\x0a\x09\x09\x09nextPutAll: '(Smalltalk packageAt: ''';\x0a\x09\x09\x09nextPutAll: aPackage name;\x0a\x09\x09\x09nextPutAll: ''') imports: ';\x0a\x09\x09\x09nextPutAll: aPackage importsDefinition;\x0a\x09\x09\x09nextPutAll: '!';\x0a\x09\x09\x09lf ]",
+source: "exportPackageImportsOf: aPackage on: aStream\x0a\x09aPackage imports ifNotEmpty: [ :imports |\x0a\x09\x09aStream\x0a\x09\x09\x09nextPutAll: '(Smalltalk packageAt: ''';\x0a\x09\x09\x09nextPutAll: aPackage name;\x0a\x09\x09\x09nextPutAll: ''') imports: ';\x0a\x09\x09\x09nextPutAll: (self chunkEscape: aPackage importsDefinition);\x0a\x09\x09\x09nextPutAll: '!';\x0a\x09\x09\x09lf ]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["ifNotEmpty:", "imports", "nextPutAll:", "name", "importsDefinition", "lf"]
+messageSends: ["ifNotEmpty:", "imports", "nextPutAll:", "name", "chunkEscape:", "importsDefinition", "lf"]
 }),
 $globals.ChunkExporter);
 
@@ -994,7 +994,7 @@ $globals.ChunkExporter);
 
 
 
-$core.addClass('Exporter', $globals.AbstractExporter, [], 'Kernel-ImportExport');
+$core.addClass('Exporter', $globals.AbstractExporter, [], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Exporter.comment="I am responsible for outputting Amber code into a JavaScript string.\x0a\x0aThe generated output is enough to reconstruct the exported data, including Smalltalk source code and other metadata.\x0a\x0a## Use case\x0a\x0aI am typically used to save code outside of the Amber runtime (committing to disk, etc.).";
 //>>excludeEnd("ide");
@@ -1835,7 +1835,7 @@ $globals.Exporter);
 
 
 
-$core.addClass('AmdExporter', $globals.Exporter, ['namespace'], 'Kernel-ImportExport');
+$core.addClass('AmdExporter', $globals.Exporter, ['namespace'], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AmdExporter.comment="I am used to export Packages in an AMD (Asynchronous Module Definition) JavaScript format.";
 //>>excludeEnd("ide");
@@ -1954,36 +1954,62 @@ selector: "exportPackagePrologueOf:on:",
 protocol: 'output',
 fn: function (aPackage,aStream){
 var self=this;
-var namedImports,anonImports,importVarNames,loadDependencies;
+var importsForOutput,loadDependencies,pragmaStart,pragmaEnd;
+function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1,$5,$4,$3,$2,$6;
-namedImports=[];
-anonImports=[];
-importVarNames=[];
-$recv($recv(aPackage)._imports())._do_((function(each){
+var $1,$3,$2,$4,$6,$5,$7,$13,$12,$11,$10,$9,$8,$17,$16,$15,$14,$18;
+pragmaStart="";
+pragmaEnd="";
+importsForOutput=self._importsForOutput_(aPackage);
+loadDependencies=self._amdNamesOfPackages_($recv(aPackage)._loadDependencies());
+$1=$recv(importsForOutput)._value();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["value"]=1;
+//>>excludeEnd("ctx");
+$recv($1)._ifNotEmpty_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-$1=$recv(each)._isString();
-if($core.assert($1)){
-return $recv(anonImports)._add_(each);
+$3=$recv($String())._lf();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx2.sendIdx["add:"]=1;
+$ctx2.sendIdx["lf"]=1;
 //>>excludeEnd("ctx");
-} else {
-$recv(namedImports)._add_($recv(each)._value());
+$2=$recv($3).__comma("//>>excludeStart(\x22imports\x22, pragmas.excludeImports);");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx2.sendIdx["add:"]=2;
+$ctx2.sendIdx[","]=2;
 //>>excludeEnd("ctx");
-return $recv(importVarNames)._add_($recv(each)._key());
-};
+$4=$recv($String())._lf();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+$ctx2.sendIdx["lf"]=2;
+//>>excludeEnd("ctx");
+pragmaStart=$recv($2).__comma($4);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx[","]=1;
+//>>excludeEnd("ctx");
+pragmaStart;
+$6=$recv($String())._lf();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx["lf"]=3;
+//>>excludeEnd("ctx");
+$5=$recv($6).__comma("//>>excludeEnd(\x22imports\x22);");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx[","]=4;
+//>>excludeEnd("ctx");
+$7=$recv($String())._lf();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx["lf"]=4;
+//>>excludeEnd("ctx");
+pragmaEnd=$recv($5).__comma($7);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx[","]=3;
+//>>excludeEnd("ctx");
+return pragmaEnd;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
 //>>excludeEnd("ctx");
 }));
-loadDependencies=self._amdNamesOfPackages_($recv(aPackage)._loadDependencies());
 $recv(aStream)._nextPutAll_("define(\x22");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=1;
@@ -2004,20 +2030,28 @@ $recv(aStream)._nextPutAll_("\x22, ");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=5;
 //>>excludeEnd("ctx");
-$5=["amber/boot"].__comma(namedImports);
+$13=["amber/boot", ":1:"].__comma($recv(importsForOutput)._value());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx[","]=3;
+$ctx1.sendIdx[","]=7;
 //>>excludeEnd("ctx");
-$4=$recv($5).__comma(anonImports);
+$12=$recv($13).__comma([":2:"]);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx[","]=2;
+$ctx1.sendIdx[","]=6;
 //>>excludeEnd("ctx");
-$3=$recv($4).__comma(loadDependencies);
+$11=$recv($12).__comma(loadDependencies);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx[","]=1;
+$ctx1.sendIdx[","]=5;
 //>>excludeEnd("ctx");
-$2=$recv($3)._asJavascript();
-$recv(aStream)._nextPutAll_($2);
+$10=$recv($11)._asJavascript();
+$9=$recv($10)._replace_with_(",\x5cs*[\x22']:1:[\x22']",pragmaStart);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["replace:with:"]=2;
+//>>excludeEnd("ctx");
+$8=$recv($9)._replace_with_(",\x5cs*[\x22']:2:[\x22']",pragmaEnd);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["replace:with:"]=1;
+//>>excludeEnd("ctx");
+$recv(aStream)._nextPutAll_($8);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=6;
 //>>excludeEnd("ctx");
@@ -2025,37 +2059,97 @@ $recv(aStream)._nextPutAll_(", function(");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=7;
 //>>excludeEnd("ctx");
-$recv(aStream)._nextPutAll_($recv(["$boot"].__comma(importVarNames))._join_(","));
+$17=$recv(["$boot", ":1:"].__comma($recv(importsForOutput)._key())).__comma([":2:"]);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx[","]=8;
+//>>excludeEnd("ctx");
+$16=$recv($17)._join_(",");
+$15=$recv($16)._replace_with_(",\x5cs*:1:",pragmaStart);
+$14=$recv($15)._replace_with_(",\x5cs*:2:",pragmaEnd);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["replace:with:"]=3;
+//>>excludeEnd("ctx");
+$recv(aStream)._nextPutAll_($14);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=8;
 //>>excludeEnd("ctx");
-$recv(aStream)._nextPutAll_("){");
+$recv(aStream)._nextPutAll_("){\x22use strict\x22;");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 $ctx1.sendIdx["nextPutAll:"]=9;
 //>>excludeEnd("ctx");
 $recv(aStream)._lf();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-$ctx1.sendIdx["lf"]=1;
+$ctx1.sendIdx["lf"]=5;
 //>>excludeEnd("ctx");
 $recv(aStream)._nextPutAll_("var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;");
-$6=$recv(aStream)._lf();
+$18=$recv(aStream)._lf();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream,namedImports:namedImports,anonImports:anonImports,importVarNames:importVarNames,loadDependencies:loadDependencies},$globals.AmdExporter)});
+}, function($ctx1) {$ctx1.fill(self,"exportPackagePrologueOf:on:",{aPackage:aPackage,aStream:aStream,importsForOutput:importsForOutput,loadDependencies:loadDependencies,pragmaStart:pragmaStart,pragmaEnd:pragmaEnd},$globals.AmdExporter)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aPackage", "aStream"],
-source: "exportPackagePrologueOf: aPackage on: aStream\x0a\x09| namedImports anonImports importVarNames loadDependencies |\x0a\x09namedImports := #().\x0a\x09anonImports := #().\x0a\x09importVarNames := #().\x0a\x09aPackage imports do: [ :each | each isString\x0a\x09\x09ifTrue: [ anonImports add: each ]\x0a\x09\x09ifFalse: [ namedImports add: each value.\x0a\x09\x09\x09importVarNames add: each key ]].\x0a\x09loadDependencies := self amdNamesOfPackages: aPackage loadDependencies.\x0a\x09aStream\x0a\x09\x09nextPutAll: 'define(\x22';\x0a\x09\x09nextPutAll: (self amdNamespaceOfPackage: aPackage);\x0a\x09\x09nextPutAll: '/'; \x0a\x09\x09nextPutAll: aPackage name;\x0a\x09\x09nextPutAll: '\x22, ';\x0a\x09\x09nextPutAll: (#('amber/boot'), namedImports, anonImports, loadDependencies) asJavascript;\x0a\x09\x09nextPutAll: ', function(';\x0a\x09\x09nextPutAll: (#('$boot'), importVarNames join: ',');\x0a\x09\x09nextPutAll: '){';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;';\x0a\x09\x09lf",
+source: "exportPackagePrologueOf: aPackage on: aStream\x0a\x09| importsForOutput loadDependencies pragmaStart pragmaEnd |\x0a\x09pragmaStart := ''.\x0a\x09pragmaEnd := ''.\x0a\x09importsForOutput := self importsForOutput: aPackage.\x0a\x09loadDependencies := self amdNamesOfPackages: aPackage loadDependencies.\x0a\x09importsForOutput value ifNotEmpty: [\x0a\x09\x09pragmaStart := String lf, '//>>excludeStart(\x22imports\x22, pragmas.excludeImports);', String lf.\x0a\x09\x09pragmaEnd := String lf, '//>>excludeEnd(\x22imports\x22);', String lf ].\x0a\x09aStream\x0a\x09\x09nextPutAll: 'define(\x22';\x0a\x09\x09nextPutAll: (self amdNamespaceOfPackage: aPackage);\x0a\x09\x09nextPutAll: '/'; \x0a\x09\x09nextPutAll: aPackage name;\x0a\x09\x09nextPutAll: '\x22, ';\x0a\x09\x09nextPutAll: (((\x0a\x09\x09\x09(#('amber/boot' ':1:'), importsForOutput value, #(':2:'), loadDependencies) asJavascript)\x0a\x09\x09\x09replace: ',\x5cs*[\x22'']:1:[\x22'']' with: pragmaStart) replace: ',\x5cs*[\x22'']:2:[\x22'']' with: pragmaEnd);\x0a\x09\x09nextPutAll: ', function(';\x0a\x09\x09nextPutAll: (((\x0a\x09\x09\x09(#('$boot' ':1:'), importsForOutput key, #(':2:')) join: ',')\x0a\x09\x09\x09replace: ',\x5cs*:1:' with: pragmaStart) replace: ',\x5cs*:2:' with: pragmaEnd);\x0a\x09\x09nextPutAll: '){\x22use strict\x22;';\x0a\x09\x09lf;\x0a\x09\x09nextPutAll: 'var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;';\x0a\x09\x09lf",
+referencedClasses: ["String"],
+//>>excludeEnd("ide");
+messageSends: ["importsForOutput:", "amdNamesOfPackages:", "loadDependencies", "ifNotEmpty:", "value", ",", "lf", "nextPutAll:", "amdNamespaceOfPackage:", "name", "replace:with:", "asJavascript", "join:", "key"]
+}),
+$globals.AmdExporter);
+
+$core.addMethod(
+$core.method({
+selector: "importsForOutput:",
+protocol: 'private',
+fn: function (aPackage){
+var self=this;
+var namedImports,anonImports,importVarNames;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2;
+namedImports=[];
+anonImports=[];
+importVarNames=[];
+$recv($recv(aPackage)._imports())._do_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+$1=$recv(each)._isString();
+if($core.assert($1)){
+return $recv(anonImports)._add_(each);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx["add:"]=1;
+//>>excludeEnd("ctx");
+} else {
+$recv(namedImports)._add_($recv(each)._value());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx["add:"]=2;
+//>>excludeEnd("ctx");
+return $recv(importVarNames)._add_($recv(each)._key());
+};
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+$2=$recv(importVarNames).__minus_gt($recv(namedImports).__comma(anonImports));
+return $2;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"importsForOutput:",{aPackage:aPackage,namedImports:namedImports,anonImports:anonImports,importVarNames:importVarNames},$globals.AmdExporter)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aPackage"],
+source: "importsForOutput: aPackage\x0a\x09\x22Returns an association where key is list of import variables\x0a\x09and value is list of external dependencies, with ones imported as variables\x0a\x09put at the beginning with same order as is in key.\x0a\x09\x0a\x09For example imports:{'jQuery'->'jquery'. 'bootstrap'} would yield\x0a\x09#('jQuery') -> #('jquery' 'bootstrap')\x22\x0a\x09| namedImports anonImports importVarNames |\x0a\x09namedImports := #().\x0a\x09anonImports := #().\x0a\x09importVarNames := #().\x0a\x09aPackage imports do: [ :each | each isString\x0a\x09\x09ifTrue: [ anonImports add: each ]\x0a\x09\x09ifFalse: [ namedImports add: each value.\x0a\x09\x09\x09importVarNames add: each key ]].\x0a\x09^ importVarNames -> (namedImports, anonImports)",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["do:", "imports", "ifTrue:ifFalse:", "isString", "add:", "value", "key", "amdNamesOfPackages:", "loadDependencies", "nextPutAll:", "amdNamespaceOfPackage:", "name", "asJavascript", ",", "join:", "lf"]
+messageSends: ["do:", "imports", "ifTrue:ifFalse:", "isString", "add:", "value", "key", "->", ","]
 }),
 $globals.AmdExporter);
 
 
 
-$core.addClass('ChunkParser', $globals.Object, ['stream', 'last'], 'Kernel-ImportExport');
+$core.addClass('ChunkParser', $globals.Object, ['stream', 'last'], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ChunkParser.comment="I am responsible for parsing aStream contents in the chunk format.\x0a\x0a## API\x0a\x0a    ChunkParser new\x0a        stream: aStream;\x0a        nextChunk";
 //>>excludeEnd("ide");
@@ -2193,7 +2287,244 @@ messageSends: ["stream:", "new"]
 $globals.ChunkParser.klass);
 
 
-$core.addClass('ExportMethodProtocol', $globals.Object, ['name', 'theClass'], 'Kernel-ImportExport');
+$core.addClass('ClassCommentReader', $globals.Object, ['class'], 'Platform-ImportExport');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.ClassCommentReader.comment="I provide a mechanism for retrieving class comments stored on a file.\x0a\x0aSee also `ClassCategoryReader`.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "class:",
+protocol: 'accessing',
+fn: function (aClass){
+var self=this;
+self["@class"]=aClass;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass"],
+source: "class: aClass\x0a\x09class := aClass",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.ClassCommentReader);
+
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+(
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.supercall = true, 
+//>>excludeEnd("ctx");
+$globals.ClassCommentReader.superclass.fn.prototype._initialize.apply($recv(self), []));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.supercall = false;
+//>>excludeEnd("ctx");;
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ClassCommentReader)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09super initialize.",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["initialize"]
+}),
+$globals.ClassCommentReader);
+
+$core.addMethod(
+$core.method({
+selector: "scanFrom:",
+protocol: 'fileIn',
+fn: function (aChunkParser){
+var self=this;
+var chunk;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+chunk=$recv(aChunkParser)._nextChunk();
+$1=$recv(chunk)._isEmpty();
+if(!$core.assert($1)){
+self._setComment_(chunk);
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},$globals.ClassCommentReader)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aChunkParser"],
+source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty ifFalse: [\x0a\x09\x09self setComment: chunk ].",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["nextChunk", "ifFalse:", "isEmpty", "setComment:"]
+}),
+$globals.ClassCommentReader);
+
+$core.addMethod(
+$core.method({
+selector: "setComment:",
+protocol: 'private',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(self["@class"])._comment_(aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"setComment:",{aString:aString},$globals.ClassCommentReader)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "setComment: aString\x0a\x09class comment: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["comment:"]
+}),
+$globals.ClassCommentReader);
+
+
+
+$core.addClass('ClassProtocolReader', $globals.Object, ['class', 'category'], 'Platform-ImportExport');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.ClassProtocolReader.comment="I provide a mechanism for retrieving class descriptions stored on a file in the Smalltalk chunk format.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "class:category:",
+protocol: 'accessing',
+fn: function (aClass,aString){
+var self=this;
+self["@class"]=aClass;
+self["@category"]=aString;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass", "aString"],
+source: "class: aClass category: aString\x0a\x09class := aClass.\x0a\x09category := aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.ClassProtocolReader);
+
+$core.addMethod(
+$core.method({
+selector: "compileMethod:",
+protocol: 'private',
+fn: function (aString){
+var self=this;
+function $Compiler(){return $globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($recv($Compiler())._new())._install_forClass_protocol_(aString,self["@class"],self["@category"]);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString},$globals.ClassProtocolReader)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "compileMethod: aString\x0a\x09Compiler new install: aString forClass: class protocol: category",
+referencedClasses: ["Compiler"],
+//>>excludeEnd("ide");
+messageSends: ["install:forClass:protocol:", "new"]
+}),
+$globals.ClassProtocolReader);
+
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+(
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.supercall = true, 
+//>>excludeEnd("ctx");
+$globals.ClassProtocolReader.superclass.fn.prototype._initialize.apply($recv(self), []));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.supercall = false;
+//>>excludeEnd("ctx");;
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ClassProtocolReader)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09super initialize.",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["initialize"]
+}),
+$globals.ClassProtocolReader);
+
+$core.addMethod(
+$core.method({
+selector: "scanFrom:",
+protocol: 'fileIn',
+fn: function (aChunkParser){
+var self=this;
+var chunk;
+function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+chunk=$recv(aChunkParser)._nextChunk();
+chunk;
+return $recv(chunk)._isEmpty();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+//>>excludeEnd("ctx");
+}))._whileFalse_((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return self._compileMethod_(chunk);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
+//>>excludeEnd("ctx");
+}));
+$recv($recv($ClassBuilder())._new())._setupClass_(self["@class"]);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"scanFrom:",{aChunkParser:aChunkParser,chunk:chunk},$globals.ClassProtocolReader)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aChunkParser"],
+source: "scanFrom: aChunkParser\x0a\x09| chunk |\x0a\x09[ chunk := aChunkParser nextChunk.\x0a\x09chunk isEmpty ] whileFalse: [\x0a\x09\x09self compileMethod: chunk ].\x0a\x09ClassBuilder new setupClass: class",
+referencedClasses: ["ClassBuilder"],
+//>>excludeEnd("ide");
+messageSends: ["whileFalse:", "nextChunk", "isEmpty", "compileMethod:", "setupClass:", "new"]
+}),
+$globals.ClassProtocolReader);
+
+
+
+$core.addClass('ExportMethodProtocol', $globals.Object, ['name', 'theClass'], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.ExportMethodProtocol.comment="I am an abstraction for a method protocol in a class / metaclass.\x0a\x0aI know of my class, name and methods.\x0aI am used when exporting a package.";
 //>>excludeEnd("ide");
@@ -2343,7 +2674,7 @@ messageSends: ["name:", "new", "theClass:", "yourself"]
 $globals.ExportMethodProtocol.klass);
 
 
-$core.addClass('Importer', $globals.Object, ['lastSection', 'lastChunk'], 'Kernel-ImportExport');
+$core.addClass('Importer', $globals.Object, ['lastSection', 'lastChunk'], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Importer.comment="I can import Amber code from a string in the chunk format.\x0a\x0a## API\x0a\x0a    Importer new import: aString";
 //>>excludeEnd("ide");
@@ -2414,7 +2745,7 @@ return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
 self["@lastChunk"]=$recv(parser)._last();
 self["@lastChunk"];
-return $recv(e)._signal();
+return $recv(e)._resignal();
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,7)});
 //>>excludeEnd("ctx");
@@ -2426,10 +2757,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aStream"],
-source: "import: aStream\x0a\x09| chunk result parser lastEmpty |\x0a\x09parser := ChunkParser on: aStream.\x0a\x09lastEmpty := false.\x0a\x09lastSection := 'n/a, not started'.\x0a\x09lastChunk := nil.\x0a\x09[\x0a\x09[ chunk := parser nextChunk.\x0a\x09chunk isNil ] whileFalse: [\x0a\x09\x09chunk isEmpty\x0a\x09\x09\x09ifTrue: [ lastEmpty := true ]\x0a\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09lastSection := chunk.\x0a\x09\x09\x09\x09result := Compiler new evaluateExpression: chunk.\x0a\x09\x09\x09\x09lastEmpty\x0a\x09\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09lastEmpty := false.\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09result scanFrom: parser ]] ].\x0a\x09lastSection := 'n/a, finished'\x0a\x09] on: Error do: [:e | lastChunk := parser last. e signal ].",
+source: "import: aStream\x0a\x09| chunk result parser lastEmpty |\x0a\x09parser := ChunkParser on: aStream.\x0a\x09lastEmpty := false.\x0a\x09lastSection := 'n/a, not started'.\x0a\x09lastChunk := nil.\x0a\x09[\x0a\x09[ chunk := parser nextChunk.\x0a\x09chunk isNil ] whileFalse: [\x0a\x09\x09chunk isEmpty\x0a\x09\x09\x09ifTrue: [ lastEmpty := true ]\x0a\x09\x09\x09ifFalse: [\x0a\x09\x09\x09\x09lastSection := chunk.\x0a\x09\x09\x09\x09result := Compiler new evaluateExpression: chunk.\x0a\x09\x09\x09\x09lastEmpty\x0a\x09\x09\x09\x09\x09\x09ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09lastEmpty := false.\x0a\x09\x09\x09\x09\x09\x09\x09\x09\x09result scanFrom: parser ]] ].\x0a\x09lastSection := 'n/a, finished'\x0a\x09] on: Error do: [:e | lastChunk := parser last. e resignal ].",
 referencedClasses: ["ChunkParser", "Compiler", "Error"],
 //>>excludeEnd("ide");
-messageSends: ["on:", "on:do:", "whileFalse:", "nextChunk", "isNil", "ifTrue:ifFalse:", "isEmpty", "evaluateExpression:", "new", "ifTrue:", "scanFrom:", "last", "signal"]
+messageSends: ["on:", "on:do:", "whileFalse:", "nextChunk", "isNil", "ifTrue:ifFalse:", "isEmpty", "evaluateExpression:", "new", "ifTrue:", "scanFrom:", "last", "resignal"]
 }),
 $globals.Importer);
 
@@ -2475,7 +2806,13 @@ $globals.Importer);
 
 
 
-$core.addClass('PackageHandler', $globals.InterfacingObject, [], 'Kernel-ImportExport');
+$core.addClass('PackageCommitError', $globals.Error, [], 'Platform-ImportExport');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.PackageCommitError.comment="I get signaled when an attempt to commit a package has failed.";
+//>>excludeEnd("ide");
+
+
+$core.addClass('PackageHandler', $globals.InterfacingObject, [], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageHandler.comment="I am responsible for handling package loading and committing.\x0a\x0aI should not be used directly. Instead, use the corresponding `Package` methods.";
 //>>excludeEnd("ide");
@@ -2485,21 +2822,52 @@ selector: "ajaxPutAt:data:onSuccess:onError:",
 protocol: 'private',
 fn: function (aURL,aString,aBlock,anotherBlock){
 var self=this;
+var xhr;
+function $Platform(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-self._ajax_($globals.HashedCollection._newFromPairs_(["url",aURL,"type","PUT","data",aString,"contentType","text/plain;charset=UTF-8","success",aBlock,"error",anotherBlock]));
+var $1,$4,$3,$2;
+xhr=$recv($Platform())._newXhr();
+$recv(xhr)._open_url_async_("PUT",aURL,true);
+$recv(xhr)._onreadystatechange_((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+$1=$recv($recv(xhr)._readyState()).__eq((4));
+if($core.assert($1)){
+$4=$recv(xhr)._status();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx["status"]=1;
+//>>excludeEnd("ctx");
+$3=$recv($4).__gt_eq((200));
+$2=$recv($3)._and_((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx3) {
+//>>excludeEnd("ctx");
+return $recv($recv(xhr)._status()).__lt((300));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
+//>>excludeEnd("ctx");
+}));
+return $recv($2)._ifTrue_ifFalse_(aBlock,anotherBlock);
+};
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+$recv(xhr)._send_(aString);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:onSuccess:onError:",{aURL:aURL,aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.PackageHandler)});
+}, function($ctx1) {$ctx1.fill(self,"ajaxPutAt:data:onSuccess:onError:",{aURL:aURL,aString:aString,aBlock:aBlock,anotherBlock:anotherBlock,xhr:xhr},$globals.PackageHandler)});
 //>>excludeEnd("ctx");
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aURL", "aString", "aBlock", "anotherBlock"],
-source: "ajaxPutAt: aURL data: aString onSuccess: aBlock onError: anotherBlock\x0a\x09self\x0a\x09\x09ajax: #{\x0a\x09\x09\x09'url' -> aURL.\x0a\x09\x09\x09'type' -> 'PUT'.\x0a\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09'success' -> aBlock.\x0a\x09\x09\x09'error' -> anotherBlock\x0a\x09\x09}",
-referencedClasses: [],
+source: "ajaxPutAt: aURL data: aString onSuccess: aBlock onError: anotherBlock\x0a\x09| xhr |\x0a\x09xhr := Platform newXhr.\x0a\x09xhr open: 'PUT' url: aURL async: true.\x0a\x09xhr onreadystatechange: [\x0a\x09\x09xhr readyState = 4 ifTrue: [\x0a\x09\x09\x09(xhr status >= 200 and: [ xhr status < 300 ])\x0a\x09\x09\x09\x09ifTrue: aBlock\x0a\x09\x09\x09\x09ifFalse: anotherBlock ]].\x0a\x09xhr send: aString",
+referencedClasses: ["Platform"],
 //>>excludeEnd("ide");
-messageSends: ["ajax:"]
+messageSends: ["newXhr", "open:url:async:", "onreadystatechange:", "ifTrue:", "=", "readyState", "ifTrue:ifFalse:", "and:", ">=", "status", "<", "send:"]
 }),
 $globals.PackageHandler);
 
@@ -2922,7 +3290,7 @@ $globals.PackageHandler);
 
 
 
-$core.addClass('AmdPackageHandler', $globals.PackageHandler, [], 'Kernel-ImportExport');
+$core.addClass('AmdPackageHandler', $globals.PackageHandler, [], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AmdPackageHandler.comment="I am responsible for handling package loading and committing.\x0a\x0aI should not be used directly. Instead, use the corresponding `Package` methods.";
 //>>excludeEnd("ide");
@@ -3157,7 +3525,7 @@ messageSends: ["defaultAmdNamespace:"]
 $globals.AmdPackageHandler.klass);
 
 
-$core.addClass('PackageTransport', $globals.Object, ['package'], 'Kernel-ImportExport');
+$core.addClass('PackageTransport', $globals.Object, ['package'], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.PackageTransport.comment="I represent the transport mechanism used to commit a package.\x0a\x0aMy concrete subclasses have a `#handler` to which committing is delegated.";
 //>>excludeEnd("ide");
@@ -3639,7 +4007,7 @@ messageSends: []
 $globals.PackageTransport.klass);
 
 
-$core.addClass('AmdPackageTransport', $globals.PackageTransport, ['namespace'], 'Kernel-ImportExport');
+$core.addClass('AmdPackageTransport', $globals.PackageTransport, ['namespace'], 'Platform-ImportExport');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.AmdPackageTransport.comment="I am the default transport for committing packages.\x0a\x0aSee `AmdExporter` and `AmdPackageHandler`.";
 //>>excludeEnd("ide");
@@ -3955,10 +4323,118 @@ messageSends: []
 }),
 $globals.AmdPackageTransport.klass);
 
+$core.addMethod(
+$core.method({
+selector: "commentStamp",
+protocol: '*Platform-ImportExport',
+fn: function (){
+var self=this;
+function $ClassCommentReader(){return $globals.ClassCommentReader||(typeof ClassCommentReader=="undefined"?nil:ClassCommentReader)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$3,$1;
+$2=$recv($ClassCommentReader())._new();
+$recv($2)._class_(self);
+$3=$recv($2)._yourself();
+$1=$3;
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"commentStamp",{},$globals.Behavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "commentStamp\x0a\x09^ ClassCommentReader new\x0a\x09class: self;\x0a\x09yourself",
+referencedClasses: ["ClassCommentReader"],
+//>>excludeEnd("ide");
+messageSends: ["class:", "new", "yourself"]
+}),
+$globals.Behavior);
+
+$core.addMethod(
+$core.method({
+selector: "commentStamp:prior:",
+protocol: '*Platform-ImportExport',
+fn: function (aStamp,prior){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._commentStamp();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"commentStamp:prior:",{aStamp:aStamp,prior:prior},$globals.Behavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aStamp", "prior"],
+source: "commentStamp: aStamp prior: prior\x0a\x09\x09^ self commentStamp",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["commentStamp"]
+}),
+$globals.Behavior);
+
+$core.addMethod(
+$core.method({
+selector: "methodsFor:",
+protocol: '*Platform-ImportExport',
+fn: function (aString){
+var self=this;
+function $ClassProtocolReader(){return $globals.ClassProtocolReader||(typeof ClassProtocolReader=="undefined"?nil:ClassProtocolReader)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$3,$1;
+$2=$recv($ClassProtocolReader())._new();
+$recv($2)._class_category_(self,aString);
+$3=$recv($2)._yourself();
+$1=$3;
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"methodsFor:",{aString:aString},$globals.Behavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "methodsFor: aString\x0a\x09^ ClassProtocolReader new\x0a\x09\x09class: self category: aString;\x0a\x09\x09yourself",
+referencedClasses: ["ClassProtocolReader"],
+//>>excludeEnd("ide");
+messageSends: ["class:category:", "new", "yourself"]
+}),
+$globals.Behavior);
+
+$core.addMethod(
+$core.method({
+selector: "methodsFor:stamp:",
+protocol: '*Platform-ImportExport',
+fn: function (aString,aStamp){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._methodsFor_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"methodsFor:stamp:",{aString:aString,aStamp:aStamp},$globals.Behavior)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aStamp"],
+source: "methodsFor: aString stamp: aStamp\x0a\x09\x22Added for file-in compatibility, ignores stamp.\x22\x0a\x09^ self methodsFor: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["methodsFor:"]
+}),
+$globals.Behavior);
+
 $core.addMethod(
 $core.method({
 selector: "commit",
-protocol: '*Kernel-ImportExport',
+protocol: '*Platform-ImportExport',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -3983,7 +4459,7 @@ $globals.Package);
 $core.addMethod(
 $core.method({
 selector: "load",
-protocol: '*Kernel-ImportExport',
+protocol: '*Platform-ImportExport',
 fn: function (){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -4008,7 +4484,7 @@ $globals.Package);
 $core.addMethod(
 $core.method({
 selector: "loadFromNamespace:",
-protocol: '*Kernel-ImportExport',
+protocol: '*Platform-ImportExport',
 fn: function (aString){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -4036,7 +4512,7 @@ $globals.Package);
 $core.addMethod(
 $core.method({
 selector: "load:",
-protocol: '*Kernel-ImportExport',
+protocol: '*Platform-ImportExport',
 fn: function (aPackageName){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -4060,7 +4536,7 @@ $globals.Package.klass);
 $core.addMethod(
 $core.method({
 selector: "load:fromNamespace:",
-protocol: '*Kernel-ImportExport',
+protocol: '*Platform-ImportExport',
 fn: function (aPackageName,aString){
 var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);

+ 156 - 36
bower_components/amber/src/Kernel-ImportExport.st → bower_components/amber/src/Platform-ImportExport.st

@@ -1,7 +1,7 @@
-Smalltalk createPackage: 'Kernel-ImportExport'!
+Smalltalk createPackage: 'Platform-ImportExport'!
 Object subclass: #AbstractExporter
 	instanceVariableNames: ''
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !AbstractExporter commentStamp!
 I am an abstract exporter for Amber source code.
 
@@ -61,7 +61,7 @@ exportPackage: aPackage on: aStream
 
 AbstractExporter subclass: #ChunkExporter
 	instanceVariableNames: ''
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !ChunkExporter commentStamp!
 I am an exporter dedicated to outputting Amber source code in the classic Smalltalk chunk format.
 
@@ -206,7 +206,7 @@ exportPackageImportsOf: aPackage on: aStream
 			nextPutAll: '(Smalltalk packageAt: ''';
 			nextPutAll: aPackage name;
 			nextPutAll: ''') imports: ';
-			nextPutAll: aPackage importsDefinition;
+			nextPutAll: (self chunkEscape: aPackage importsDefinition);
 			nextPutAll: '!!';
 			lf ]
 !
@@ -235,7 +235,7 @@ exportProtocols: aCollection on: aStream
 
 AbstractExporter subclass: #Exporter
 	instanceVariableNames: ''
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !Exporter commentStamp!
 I am responsible for outputting Amber code into a JavaScript string.
 
@@ -403,7 +403,7 @@ exportPackageTransportOf: aPackage on: aStream
 
 Exporter subclass: #AmdExporter
 	instanceVariableNames: 'namespace'
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !AmdExporter commentStamp!
 I am used to export Packages in an AMD (Asynchronous Module Definition) JavaScript format.!
 
@@ -416,25 +416,28 @@ exportPackageEpilogueOf: aPackage on: aStream
 !
 
 exportPackagePrologueOf: aPackage on: aStream
-	| namedImports anonImports importVarNames loadDependencies |
-	namedImports := #().
-	anonImports := #().
-	importVarNames := #().
-	aPackage imports do: [ :each | each isString
-		ifTrue: [ anonImports add: each ]
-		ifFalse: [ namedImports add: each value.
-			importVarNames add: each key ]].
+	| importsForOutput loadDependencies pragmaStart pragmaEnd |
+	pragmaStart := ''.
+	pragmaEnd := ''.
+	importsForOutput := self importsForOutput: aPackage.
 	loadDependencies := self amdNamesOfPackages: aPackage loadDependencies.
+	importsForOutput value ifNotEmpty: [
+		pragmaStart := String lf, '//>>excludeStart("imports", pragmas.excludeImports);', String lf.
+		pragmaEnd := String lf, '//>>excludeEnd("imports");', String lf ].
 	aStream
 		nextPutAll: 'define("';
 		nextPutAll: (self amdNamespaceOfPackage: aPackage);
 		nextPutAll: '/'; 
 		nextPutAll: aPackage name;
 		nextPutAll: '", ';
-		nextPutAll: (#('amber/boot'), namedImports, anonImports, loadDependencies) asJavascript;
+		nextPutAll: (((
+			(#('amber/boot' ':1:'), importsForOutput value, #(':2:'), loadDependencies) asJavascript)
+			replace: ',\s*["'']:1:["'']' with: pragmaStart) replace: ',\s*["'']:2:["'']' with: pragmaEnd);
 		nextPutAll: ', function(';
-		nextPutAll: (#('$boot'), importVarNames join: ',');
-		nextPutAll: '){';
+		nextPutAll: (((
+			(#('$boot' ':1:'), importsForOutput key, #(':2:')) join: ',')
+			replace: ',\s*:1:' with: pragmaStart) replace: ',\s*:2:' with: pragmaEnd);
+		nextPutAll: '){"use strict";';
 		lf;
 		nextPutAll: 'var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;';
 		lf
@@ -452,11 +455,29 @@ amdNamespaceOfPackage: aPackage
 	^ (aPackage transport type = 'amd')
 		ifTrue: [ aPackage transport namespace ]
 		ifFalse: [ nil ]
+!
+
+importsForOutput: aPackage
+	"Returns an association where key is list of import variables
+	and value is list of external dependencies, with ones imported as variables
+	put at the beginning with same order as is in key.
+	
+	For example imports:{'jQuery'->'jquery'. 'bootstrap'} would yield
+	#('jQuery') -> #('jquery' 'bootstrap')"
+	| namedImports anonImports importVarNames |
+	namedImports := #().
+	anonImports := #().
+	importVarNames := #().
+	aPackage imports do: [ :each | each isString
+		ifTrue: [ anonImports add: each ]
+		ifFalse: [ namedImports add: each value.
+			importVarNames add: each key ]].
+	^ importVarNames -> (namedImports, anonImports)
 ! !
 
 Object subclass: #ChunkParser
 	instanceVariableNames: 'stream last'
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !ChunkParser commentStamp!
 I am responsible for parsing aStream contents in the chunk format.
 
@@ -507,9 +528,79 @@ on: aStream
 	^ self new stream: aStream
 ! !
 
+Object subclass: #ClassCommentReader
+	instanceVariableNames: 'class'
+	package: 'Platform-ImportExport'!
+!ClassCommentReader commentStamp!
+I provide a mechanism for retrieving class comments stored on a file.
+
+See also `ClassCategoryReader`.!
+
+!ClassCommentReader methodsFor: 'accessing'!
+
+class: aClass
+	class := aClass
+! !
+
+!ClassCommentReader methodsFor: 'fileIn'!
+
+scanFrom: aChunkParser
+	| chunk |
+	chunk := aChunkParser nextChunk.
+	chunk isEmpty ifFalse: [
+		self setComment: chunk ].
+! !
+
+!ClassCommentReader methodsFor: 'initialization'!
+
+initialize
+	super initialize.
+! !
+
+!ClassCommentReader methodsFor: 'private'!
+
+setComment: aString
+	class comment: aString
+! !
+
+Object subclass: #ClassProtocolReader
+	instanceVariableNames: 'class category'
+	package: 'Platform-ImportExport'!
+!ClassProtocolReader commentStamp!
+I provide a mechanism for retrieving class descriptions stored on a file in the Smalltalk chunk format.!
+
+!ClassProtocolReader methodsFor: 'accessing'!
+
+class: aClass category: aString
+	class := aClass.
+	category := aString
+! !
+
+!ClassProtocolReader methodsFor: 'fileIn'!
+
+scanFrom: aChunkParser
+	| chunk |
+	[ chunk := aChunkParser nextChunk.
+	chunk isEmpty ] whileFalse: [
+		self compileMethod: chunk ].
+	ClassBuilder new setupClass: class
+! !
+
+!ClassProtocolReader methodsFor: 'initialization'!
+
+initialize
+	super initialize.
+! !
+
+!ClassProtocolReader methodsFor: 'private'!
+
+compileMethod: aString
+	Compiler new install: aString forClass: class protocol: category
+! !
+
 Object subclass: #ExportMethodProtocol
 	instanceVariableNames: 'name theClass'
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !ExportMethodProtocol commentStamp!
 I am an abstraction for a method protocol in a class / metaclass.
 
@@ -550,7 +641,7 @@ name: aString theClass: aClass
 
 Object subclass: #Importer
 	instanceVariableNames: 'lastSection lastChunk'
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !Importer commentStamp!
 I can import Amber code from a string in the chunk format.
 
@@ -589,12 +680,18 @@ import: aStream
 									lastEmpty := false.
 									result scanFrom: parser ]] ].
 	lastSection := 'n/a, finished'
-	] on: Error do: [:e | lastChunk := parser last. e signal ].
+	] on: Error do: [:e | lastChunk := parser last. e resignal ].
 ! !
 
+Error subclass: #PackageCommitError
+	instanceVariableNames: ''
+	package: 'Platform-ImportExport'!
+!PackageCommitError commentStamp!
+I get signaled when an attempt to commit a package has failed.!
+
 InterfacingObject subclass: #PackageHandler
 	instanceVariableNames: ''
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !PackageHandler commentStamp!
 I am responsible for handling package loading and committing.
 
@@ -694,20 +791,20 @@ load: aPackage
 !PackageHandler methodsFor: 'private'!
 
 ajaxPutAt: aURL data: aString onSuccess: aBlock onError: anotherBlock
-	self
-		ajax: #{
-			'url' -> aURL.
-			'type' -> 'PUT'.
-			'data' -> aString.
-			'contentType' -> 'text/plain;charset=UTF-8'.
-			'success' -> aBlock.
-			'error' -> anotherBlock
-		}
+	| xhr |
+	xhr := Platform newXhr.
+	xhr open: 'PUT' url: aURL async: true.
+	xhr onreadystatechange: [
+		xhr readyState = 4 ifTrue: [
+			(xhr status >= 200 and: [ xhr status < 300 ])
+				ifTrue: aBlock
+				ifFalse: anotherBlock ]].
+	xhr send: aString
 ! !
 
 PackageHandler subclass: #AmdPackageHandler
 	instanceVariableNames: ''
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !AmdPackageHandler commentStamp!
 I am responsible for handling package loading and committing.
 
@@ -768,7 +865,7 @@ defaultNamespace: aString
 
 Object subclass: #PackageTransport
 	instanceVariableNames: 'package'
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !PackageTransport commentStamp!
 I represent the transport mechanism used to commit a package.
 
@@ -886,7 +983,7 @@ register: aClass
 
 PackageTransport subclass: #AmdPackageTransport
 	instanceVariableNames: 'namespace'
-	package: 'Kernel-ImportExport'!
+	package: 'Platform-ImportExport'!
 !AmdPackageTransport commentStamp!
 I am the default transport for committing packages.
 
@@ -970,7 +1067,30 @@ namespace: aString
 		yourself
 ! !
 
-!Package methodsFor: '*Kernel-ImportExport'!
+!Behavior methodsFor: '*Platform-ImportExport'!
+
+commentStamp
+	^ ClassCommentReader new
+	class: self;
+	yourself
+!
+
+commentStamp: aStamp prior: prior
+		^ self commentStamp
+!
+
+methodsFor: aString
+	^ ClassProtocolReader new
+		class: self category: aString;
+		yourself
+!
+
+methodsFor: aString stamp: aStamp
+	"Added for file-in compatibility, ignores stamp."
+	^ self methodsFor: aString
+! !
+
+!Package methodsFor: '*Platform-ImportExport'!
 
 commit
 	^ self transport commit
@@ -986,7 +1106,7 @@ loadFromNamespace: aString
 		load
 ! !
 
-!Package class methodsFor: '*Kernel-ImportExport'!
+!Package class methodsFor: '*Platform-ImportExport'!
 
 load: aPackageName
 	(self named: aPackageName) load

+ 116 - 0
bower_components/amber/src/Platform-Node.js

@@ -0,0 +1,116 @@
+define("amber_core/Platform-Node", ["amber/boot", "amber_core/Kernel-Objects"], function($boot){"use strict";
+var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+$core.addPackage('Platform-Node');
+$core.packages["Platform-Node"].innerEval = function (expr) { return eval(expr); };
+$core.packages["Platform-Node"].transport = {"type":"amd","amdNamespace":"amber_core"};
+
+$core.addClass('NodePlatform', $globals.Object, [], 'Platform-Node');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.NodePlatform.comment="I am `Platform` service implementation for node-like environment.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "globals",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+var $1;
+$1=global;
+return $1;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "globals\x0a\x09^ global",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.NodePlatform);
+
+$core.addMethod(
+$core.method({
+selector: "newXhr",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $XMLHttpRequest(){return $globals.XMLHttpRequest||(typeof XMLHttpRequest=="undefined"?nil:XMLHttpRequest)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+if(($receiver = $XMLHttpRequest()) == null || $receiver.isNil){
+self._error_("XMLHttpRequest not available.");
+} else {
+$1=$recv($XMLHttpRequest())._new();
+return $1;
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"newXhr",{},$globals.NodePlatform)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "newXhr\x0a\x09XMLHttpRequest\x0a\x09\x09ifNotNil: [ ^ XMLHttpRequest new ]\x0a\x09\x09ifNil: [ self error: 'XMLHttpRequest not available.' ]",
+referencedClasses: ["XMLHttpRequest"],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:ifNil:", "new", "error:"]
+}),
+$globals.NodePlatform);
+
+
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'testing',
+fn: function (){
+var self=this;
+function $Platform(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=self._isFeasible();
+if($core.assert($1)){
+$recv($Platform())._registerIfNone_(self._new());
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.NodePlatform.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09self isFeasible ifTrue: [ Platform registerIfNone: self new ]",
+referencedClasses: ["Platform"],
+//>>excludeEnd("ide");
+messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
+}),
+$globals.NodePlatform.klass);
+
+$core.addMethod(
+$core.method({
+selector: "isFeasible",
+protocol: 'testing',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return typeof global !== "undefined";
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"isFeasible",{},$globals.NodePlatform.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "isFeasible\x0a<return typeof global !== \x22undefined\x22>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.NodePlatform.klass);
+
+});

+ 29 - 0
bower_components/amber/src/Platform-Node.st

@@ -0,0 +1,29 @@
+Smalltalk createPackage: 'Platform-Node'!
+Object subclass: #NodePlatform
+	instanceVariableNames: ''
+	package: 'Platform-Node'!
+!NodePlatform commentStamp!
+I am `Platform` service implementation for node-like environment.!
+
+!NodePlatform methodsFor: 'accessing'!
+
+globals
+	^ global
+!
+
+newXhr
+	XMLHttpRequest
+		ifNotNil: [ ^ XMLHttpRequest new ]
+		ifNil: [ self error: 'XMLHttpRequest not available.' ]
+! !
+
+!NodePlatform class methodsFor: 'testing'!
+
+initialize
+	self isFeasible ifTrue: [ Platform registerIfNone: self new ]
+!
+
+isFeasible
+<return typeof global !!== "undefined">
+! !
+

+ 2729 - 0
bower_components/amber/src/Platform-Services.js

@@ -0,0 +1,2729 @@
+define("amber_core/Platform-Services", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods", "amber_core/Kernel-Infrastructure"], function($boot){"use strict";
+var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
+$core.addPackage('Platform-Services');
+$core.packages["Platform-Services"].innerEval = function (expr) { return eval(expr); };
+$core.packages["Platform-Services"].transport = {"type":"amd","amdNamespace":"amber_core"};
+
+$core.addClass('ConsoleErrorHandler', $globals.Object, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.ConsoleErrorHandler.comment="I am manage Smalltalk errors, displaying the stack in the console.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "handleError:",
+protocol: 'error handling',
+fn: function (anError){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+$1=$recv(anError)._context();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["context"]=1;
+//>>excludeEnd("ctx");
+if(($receiver = $1) == null || $receiver.isNil){
+$1;
+} else {
+self._logErrorContext_($recv(anError)._context());
+};
+self._logError_(anError);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.ConsoleErrorHandler)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anError"],
+source: "handleError: anError\x0a\x09anError context ifNotNil: [ self logErrorContext: anError context ].\x0a\x09self logError: anError",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:", "context", "logErrorContext:", "logError:"]
+}),
+$globals.ConsoleErrorHandler);
+
+$core.addMethod(
+$core.method({
+selector: "log:",
+protocol: 'private',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(console)._log_(aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"log:",{aString:aString},$globals.ConsoleErrorHandler)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "log: aString\x0a\x09console log: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["log:"]
+}),
+$globals.ConsoleErrorHandler);
+
+$core.addMethod(
+$core.method({
+selector: "logContext:",
+protocol: 'private',
+fn: function (aContext){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+$1=$recv(aContext)._home();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["home"]=1;
+//>>excludeEnd("ctx");
+if(($receiver = $1) == null || $receiver.isNil){
+$1;
+} else {
+self._logContext_($recv(aContext)._home());
+};
+self._log_($recv(aContext)._asString());
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"logContext:",{aContext:aContext},$globals.ConsoleErrorHandler)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aContext"],
+source: "logContext: aContext\x0a\x09aContext home ifNotNil: [\x0a\x09\x09self logContext: aContext home ].\x0a\x09self log: aContext asString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:", "home", "logContext:", "log:", "asString"]
+}),
+$globals.ConsoleErrorHandler);
+
+$core.addMethod(
+$core.method({
+selector: "logError:",
+protocol: 'private',
+fn: function (anError){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._log_($recv(anError)._messageText());
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"logError:",{anError:anError},$globals.ConsoleErrorHandler)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anError"],
+source: "logError: anError\x0a\x09self log: anError messageText",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["log:", "messageText"]
+}),
+$globals.ConsoleErrorHandler);
+
+$core.addMethod(
+$core.method({
+selector: "logErrorContext:",
+protocol: 'private',
+fn: function (aContext){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+if(($receiver = aContext) == null || $receiver.isNil){
+aContext;
+} else {
+$1=$recv(aContext)._home();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["home"]=1;
+//>>excludeEnd("ctx");
+if(($receiver = $1) == null || $receiver.isNil){
+$1;
+} else {
+self._logContext_($recv(aContext)._home());
+};
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"logErrorContext:",{aContext:aContext},$globals.ConsoleErrorHandler)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aContext"],
+source: "logErrorContext: aContext\x0a\x09aContext ifNotNil: [\x0a\x09\x09aContext home ifNotNil: [\x0a\x09\x09\x09self logContext: aContext home ]]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:", "home", "logContext:"]
+}),
+$globals.ConsoleErrorHandler);
+
+
+$globals.ConsoleErrorHandler.klass.iVarNames = ['current'];
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($ErrorHandler())._registerIfNone_(self._new());
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ConsoleErrorHandler.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09ErrorHandler registerIfNone: self new",
+referencedClasses: ["ErrorHandler"],
+//>>excludeEnd("ide");
+messageSends: ["registerIfNone:", "new"]
+}),
+$globals.ConsoleErrorHandler.klass);
+
+
+$core.addClass('ConsoleTranscript', $globals.Object, ['textarea'], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.ConsoleTranscript.comment="I am a specific transcript emitting to the JavaScript console.\x0a\x0aIf no other transcript is registered, I am the default.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "clear",
+protocol: 'printing',
+fn: function (){
+var self=this;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "clear\x0a\x09\x22no op\x22",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.ConsoleTranscript);
+
+$core.addMethod(
+$core.method({
+selector: "cr",
+protocol: 'printing',
+fn: function (){
+var self=this;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "cr\x0a\x09\x22no op\x22",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.ConsoleTranscript);
+
+$core.addMethod(
+$core.method({
+selector: "open",
+protocol: 'actions',
+fn: function (){
+var self=this;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "open",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.ConsoleTranscript);
+
+$core.addMethod(
+$core.method({
+selector: "show:",
+protocol: 'printing',
+fn: function (anObject){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+console.log(String($recv(anObject)._asString()));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.ConsoleTranscript)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "show: anObject\x0a\x22Smalltalk objects should have no trouble displaying themselves on the Transcript; Javascript objects don't know how, so must be wrapped in a JSObectProxy.\x22\x0a<console.log(String($recv(anObject)._asString()))>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.ConsoleTranscript);
+
+
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+function $Transcript(){return $globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($Transcript())._registerIfNone_(self._new());
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ConsoleTranscript.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09Transcript registerIfNone: self new",
+referencedClasses: ["Transcript"],
+//>>excludeEnd("ide");
+messageSends: ["registerIfNone:", "new"]
+}),
+$globals.ConsoleTranscript.klass);
+
+
+$core.addClass('InterfacingObject', $globals.Object, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.InterfacingObject.comment="I am superclass of all object that interface with user or environment. `Widget` and a few other classes are subclasses of me. I delegate all of the above APIs to `PlatformInterface`.\x0a\x0a## API\x0a\x0a    self alert: 'Hey, there is a problem'.\x0a    self confirm: 'Affirmative?'.\x0a    self prompt: 'Your name:'.\x0a\x0a    self ajax: #{\x0a        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'\x0a    }.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "ajax:",
+protocol: 'actions',
+fn: function (anObject){
+var self=this;
+function $PlatformInterface(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+self._deprecatedAPI();
+$1=$recv($PlatformInterface())._ajax_(anObject);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},$globals.InterfacingObject)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "ajax: anObject\x0a\x09self deprecatedAPI.\x0a\x09^ PlatformInterface ajax: anObject",
+referencedClasses: ["PlatformInterface"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI", "ajax:"]
+}),
+$globals.InterfacingObject);
+
+$core.addMethod(
+$core.method({
+selector: "alert:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($Terminal())._alert_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.InterfacingObject)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "alert: aString\x0a\x09^ Terminal alert: aString",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["alert:"]
+}),
+$globals.InterfacingObject);
+
+$core.addMethod(
+$core.method({
+selector: "confirm:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($Terminal())._confirm_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.InterfacingObject)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "confirm: aString\x0a\x09^ Terminal confirm: aString",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["confirm:"]
+}),
+$globals.InterfacingObject);
+
+$core.addMethod(
+$core.method({
+selector: "prompt:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($Terminal())._prompt_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.InterfacingObject)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "prompt: aString\x0a\x09^ Terminal prompt: aString",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["prompt:"]
+}),
+$globals.InterfacingObject);
+
+$core.addMethod(
+$core.method({
+selector: "prompt:default:",
+protocol: 'actions',
+fn: function (aString,defaultString){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($Terminal())._prompt_default_(aString,defaultString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.InterfacingObject)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "defaultString"],
+source: "prompt: aString default: defaultString\x0a\x09^ Terminal prompt: aString default: defaultString",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["prompt:default:"]
+}),
+$globals.InterfacingObject);
+
+
+
+$core.addClass('Environment', $globals.InterfacingObject, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Environment.comment="I provide an unified entry point to manipulate Amber packages, classes and methods.\x0a\x0aTypical use cases include IDEs, remote access and restricting browsing.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "addInstVarNamed:to:",
+protocol: 'compiling',
+fn: function (aString,aClass){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$3,$4,$5;
+$1=self._classBuilder();
+$2=$recv(aClass)._superclass();
+$3=$recv(aClass)._name();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["name"]=1;
+//>>excludeEnd("ctx");
+$4=$recv($recv(aClass)._instanceVariableNames())._copy();
+$recv($4)._add_(aString);
+$5=$recv($4)._yourself();
+$recv($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,$recv($recv(aClass)._package())._name());
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:to:",{aString:aString,aClass:aClass},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aClass"],
+source: "addInstVarNamed: aString to: aClass\x0a\x09self classBuilder\x0a\x09\x09addSubclassOf: aClass superclass \x0a\x09\x09named: aClass name \x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "classBuilder", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "allSelectors",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($recv($Smalltalk())._core())._allSelectors();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"allSelectors",{},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "allSelectors\x0a\x09^ Smalltalk core allSelectors",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["allSelectors", "core"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "availableClassNames",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($recv($Smalltalk())._classes())._collect_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(each)._name();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "availableClassNames\x0a\x09^ Smalltalk classes \x0a\x09\x09collect: [ :each | each name ]",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["collect:", "classes", "name"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "availablePackageNames",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($recv($Smalltalk())._packages())._collect_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(each)._name();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "availablePackageNames\x0a\x09^ Smalltalk packages \x0a\x09\x09collect: [ :each | each name ]",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["collect:", "packages", "name"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "availableProtocolsFor:",
+protocol: 'accessing',
+fn: function (aClass){
+var self=this;
+var protocols;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$receiver;
+protocols=$recv(aClass)._protocols();
+$1=$recv(aClass)._superclass();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["superclass"]=1;
+//>>excludeEnd("ctx");
+if(($receiver = $1) == null || $receiver.isNil){
+$1;
+} else {
+$recv(protocols)._addAll_(self._availableProtocolsFor_($recv(aClass)._superclass()));
+};
+$2=$recv($recv($recv(protocols)._asSet())._asArray())._sort();
+return $2;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"availableProtocolsFor:",{aClass:aClass,protocols:protocols},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass"],
+source: "availableProtocolsFor: aClass\x0a\x09| protocols |\x0a\x09\x0a\x09protocols := aClass protocols.\x0a\x09aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].\x0a\x09^ protocols asSet asArray sort",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["protocols", "ifNotNil:", "superclass", "addAll:", "availableProtocolsFor:", "sort", "asArray", "asSet"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "classBuilder",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($ClassBuilder())._new();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"classBuilder",{},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "classBuilder\x0a\x09^ ClassBuilder new",
+referencedClasses: ["ClassBuilder"],
+//>>excludeEnd("ide");
+messageSends: ["new"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "classNamed:",
+protocol: 'accessing',
+fn: function (aString){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$1,$receiver;
+$2=$recv($recv($Smalltalk())._globals())._at_($recv(aString)._asSymbol());
+if(($receiver = $2) == null || $receiver.isNil){
+$1=self._error_("Invalid class name");
+} else {
+$1=$2;
+};
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"classNamed:",{aString:aString},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "classNamed: aString\x0a\x09^ (Smalltalk globals at: aString asSymbol)\x0a\x09\x09ifNil: [ self error: 'Invalid class name' ]",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["ifNil:", "at:", "globals", "asSymbol", "error:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "classes",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($Smalltalk())._classes();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "classes\x0a\x09^ Smalltalk classes",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["classes"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "commitPackage:onSuccess:onError:",
+protocol: 'actions',
+fn: function (aPackage,aBlock,anotherBlock){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($recv(aPackage)._transport())._commitOnSuccess_onError_(aBlock,anotherBlock);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"commitPackage:onSuccess:onError:",{aPackage:aPackage,aBlock:aBlock,anotherBlock:anotherBlock},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aPackage", "aBlock", "anotherBlock"],
+source: "commitPackage: aPackage onSuccess: aBlock onError: anotherBlock\x0a\x09aPackage transport\x0a\x09\x09commitOnSuccess: aBlock\x0a\x09\x09onError: anotherBlock",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["commitOnSuccess:onError:", "transport"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "compileClassComment:for:",
+protocol: 'compiling',
+fn: function (aString,aClass){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(aClass)._comment_(aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"compileClassComment:for:",{aString:aString,aClass:aClass},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aClass"],
+source: "compileClassComment: aString for: aClass\x0a\x09aClass comment: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["comment:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "compileClassDefinition:",
+protocol: 'compiling',
+fn: function (aString){
+var self=this;
+function $DoIt(){return $globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
+function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv((function(){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return self._evaluate_for_(aString,$recv($DoIt())._new());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
+//>>excludeEnd("ctx");
+}))._on_do_($Error(),(function(error){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return self._alert_($recv(error)._messageText());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)});
+//>>excludeEnd("ctx");
+}));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "compileClassDefinition: aString\x0a\x09[ self evaluate: aString for: DoIt new ]\x0a\x09\x09on: Error\x0a\x09\x09do: [ :error | self alert: error messageText ]",
+referencedClasses: ["DoIt", "Error"],
+//>>excludeEnd("ide");
+messageSends: ["on:do:", "evaluate:for:", "new", "alert:", "messageText"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "compileMethod:for:protocol:",
+protocol: 'compiling',
+fn: function (sourceCode,class_,protocol){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(class_)._compile_protocol_(sourceCode,protocol);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"compileMethod:for:protocol:",{sourceCode:sourceCode,class_:class_,protocol:protocol},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["sourceCode", "class", "protocol"],
+source: "compileMethod: sourceCode for: class protocol: protocol\x0a\x09^ class\x0a\x09\x09compile: sourceCode\x0a\x09\x09protocol: protocol",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["compile:protocol:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "copyClass:to:",
+protocol: 'actions',
+fn: function (aClass,aClassName){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$receiver;
+$1=$recv($recv($Smalltalk())._globals())._at_(aClassName);
+if(($receiver = $1) == null || $receiver.isNil){
+$1;
+} else {
+$2=$recv("A class named ".__comma(aClassName)).__comma(" already exists");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx[","]=1;
+//>>excludeEnd("ctx");
+self._error_($2);
+};
+$recv($recv($ClassBuilder())._new())._copyClass_named_(aClass,aClassName);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"copyClass:to:",{aClass:aClass,aClassName:aClassName},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass", "aClassName"],
+source: "copyClass: aClass to: aClassName\x0a\x09(Smalltalk globals at: aClassName)\x0a\x09\x09ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].\x0a\x09\x09\x0a\x09ClassBuilder new copyClass: aClass named: aClassName",
+referencedClasses: ["Smalltalk", "ClassBuilder"],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:", "at:", "globals", "error:", ",", "copyClass:named:", "new"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "doItReceiver",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $DoIt(){return $globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($DoIt())._new();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"doItReceiver",{},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "doItReceiver\x0a\x09^ DoIt new",
+referencedClasses: ["DoIt"],
+//>>excludeEnd("ide");
+messageSends: ["new"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "evaluate:for:",
+protocol: 'evaluating',
+fn: function (aString,anObject){
+var self=this;
+function $Evaluator(){return $globals.Evaluator||(typeof Evaluator=="undefined"?nil:Evaluator)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($Evaluator())._evaluate_for_(aString,anObject);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"evaluate:for:",{aString:aString,anObject:anObject},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "anObject"],
+source: "evaluate: aString for: anObject\x0a\x09^ Evaluator evaluate: aString for: anObject",
+referencedClasses: ["Evaluator"],
+//>>excludeEnd("ide");
+messageSends: ["evaluate:for:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "evaluate:on:do:",
+protocol: 'error handling',
+fn: function (aBlock,anErrorClass,exceptionBlock){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$recv(aBlock)._tryCatch_((function(exception){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+$1=$recv(exception)._isKindOf_(self._classNamed_($recv(anErrorClass)._name()));
+if($core.assert($1)){
+return $recv(exceptionBlock)._value_(exception);
+} else {
+return $recv(exception)._resignal();
+};
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({exception:exception},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"evaluate:on:do:",{aBlock:aBlock,anErrorClass:anErrorClass,exceptionBlock:exceptionBlock},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aBlock", "anErrorClass", "exceptionBlock"],
+source: "evaluate: aBlock on: anErrorClass do: exceptionBlock\x0a\x09\x22Evaluate a block and catch exceptions happening on the environment stack\x22\x0a\x09\x0a\x09aBlock tryCatch: [ :exception | \x0a\x09\x09(exception isKindOf: (self classNamed: anErrorClass name))\x0a\x09\x09\x09ifTrue: [ exceptionBlock value: exception ]\x0a \x09\x09\x09ifFalse: [ exception resignal ] ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["tryCatch:", "ifTrue:ifFalse:", "isKindOf:", "classNamed:", "name", "value:", "resignal"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "inspect:",
+protocol: 'actions',
+fn: function (anObject){
+var self=this;
+function $Inspector(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($Inspector())._inspect_(anObject);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09Inspector inspect: anObject",
+referencedClasses: ["Inspector"],
+//>>excludeEnd("ide");
+messageSends: ["inspect:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "moveClass:toPackage:",
+protocol: 'actions',
+fn: function (aClass,aPackageName){
+var self=this;
+var package_;
+function $Package(){return $globals.Package||(typeof Package=="undefined"?nil:Package)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$receiver;
+package_=$recv($Package())._named_(aPackageName);
+$1=package_;
+if(($receiver = $1) == null || $receiver.isNil){
+self._error_("Invalid package name");
+} else {
+$1;
+};
+$2=$recv(package_).__eq_eq($recv(aClass)._package());
+if($core.assert($2)){
+return self;
+};
+$recv(aClass)._package_(package_);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"moveClass:toPackage:",{aClass:aClass,aPackageName:aPackageName,package_:package_},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass", "aPackageName"],
+source: "moveClass: aClass toPackage: aPackageName\x0a\x09| package |\x0a\x09\x0a\x09package := Package named: aPackageName.\x0a\x09package ifNil: [ self error: 'Invalid package name' ].\x0a\x09package == aClass package ifTrue: [ ^ self ].\x0a\x09\x0a\x09aClass package: package",
+referencedClasses: ["Package"],
+//>>excludeEnd("ide");
+messageSends: ["named:", "ifNil:", "error:", "ifTrue:", "==", "package", "package:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "moveMethod:toClass:",
+protocol: 'actions',
+fn: function (aMethod,aClassName){
+var self=this;
+var destinationClass;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $2,$3,$1,$5,$4;
+destinationClass=self._classNamed_(aClassName);
+$2=destinationClass;
+$3=$recv(aMethod)._methodClass();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["methodClass"]=1;
+//>>excludeEnd("ctx");
+$1=$recv($2).__eq_eq($3);
+if($core.assert($1)){
+return self;
+};
+$5=$recv(aMethod)._methodClass();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["methodClass"]=2;
+//>>excludeEnd("ctx");
+$4=$recv($5)._isMetaclass();
+if($core.assert($4)){
+destinationClass=$recv(destinationClass)._class();
+destinationClass;
+};
+$recv(destinationClass)._compile_protocol_($recv(aMethod)._source(),$recv(aMethod)._protocol());
+$recv($recv(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"moveMethod:toClass:",{aMethod:aMethod,aClassName:aClassName,destinationClass:destinationClass},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aMethod", "aClassName"],
+source: "moveMethod: aMethod toClass: aClassName\x0a\x09| destinationClass |\x0a\x09\x0a\x09destinationClass := self classNamed: aClassName.\x0a\x09destinationClass == aMethod methodClass ifTrue: [ ^ self ].\x0a\x09\x0a\x09aMethod methodClass isMetaclass ifTrue: [ \x0a\x09\x09destinationClass := destinationClass class ].\x0a\x09\x0a\x09destinationClass \x0a\x09\x09compile: aMethod source\x0a\x09\x09protocol: aMethod protocol.\x0a\x09aMethod methodClass \x0a\x09\x09removeCompiledMethod: aMethod",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["classNamed:", "ifTrue:", "==", "methodClass", "isMetaclass", "class", "compile:protocol:", "source", "protocol", "removeCompiledMethod:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "moveMethod:toProtocol:",
+protocol: 'actions',
+fn: function (aMethod,aProtocol){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(aMethod)._protocol_(aProtocol);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"moveMethod:toProtocol:",{aMethod:aMethod,aProtocol:aProtocol},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aMethod", "aProtocol"],
+source: "moveMethod: aMethod toProtocol: aProtocol\x0a\x09aMethod protocol: aProtocol",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["protocol:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "packages",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($Smalltalk())._packages();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"packages",{},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "packages\x0a\x09^ Smalltalk packages",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["packages"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "registerErrorHandler:",
+protocol: 'services',
+fn: function (anErrorHandler){
+var self=this;
+function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($ErrorHandler())._register_(anErrorHandler);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"registerErrorHandler:",{anErrorHandler:anErrorHandler},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anErrorHandler"],
+source: "registerErrorHandler: anErrorHandler\x0a\x09ErrorHandler register: anErrorHandler",
+referencedClasses: ["ErrorHandler"],
+//>>excludeEnd("ide");
+messageSends: ["register:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "registerFinder:",
+protocol: 'services',
+fn: function (aFinder){
+var self=this;
+function $Finder(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($Finder())._register_(aFinder);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"registerFinder:",{aFinder:aFinder},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aFinder"],
+source: "registerFinder: aFinder\x0a\x09Finder register: aFinder",
+referencedClasses: ["Finder"],
+//>>excludeEnd("ide");
+messageSends: ["register:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "registerInspector:",
+protocol: 'services',
+fn: function (anInspector){
+var self=this;
+function $Inspector(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($Inspector())._register_(anInspector);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"registerInspector:",{anInspector:anInspector},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "registerInspector: anInspector\x0a\x09Inspector register: anInspector",
+referencedClasses: ["Inspector"],
+//>>excludeEnd("ide");
+messageSends: ["register:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "registerProgressHandler:",
+protocol: 'services',
+fn: function (aProgressHandler){
+var self=this;
+function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($ProgressHandler())._register_(aProgressHandler);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"registerProgressHandler:",{aProgressHandler:aProgressHandler},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aProgressHandler"],
+source: "registerProgressHandler: aProgressHandler\x0a\x09ProgressHandler register: aProgressHandler",
+referencedClasses: ["ProgressHandler"],
+//>>excludeEnd("ide");
+messageSends: ["register:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "registerTranscript:",
+protocol: 'services',
+fn: function (aTranscript){
+var self=this;
+function $Transcript(){return $globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($Transcript())._register_(aTranscript);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"registerTranscript:",{aTranscript:aTranscript},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aTranscript"],
+source: "registerTranscript: aTranscript\x0a\x09Transcript register: aTranscript",
+referencedClasses: ["Transcript"],
+//>>excludeEnd("ide");
+messageSends: ["register:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "removeClass:",
+protocol: 'actions',
+fn: function (aClass){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($Smalltalk())._removeClass_(aClass);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"removeClass:",{aClass:aClass},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass"],
+source: "removeClass: aClass\x0a\x09Smalltalk removeClass: aClass",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["removeClass:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "removeMethod:",
+protocol: 'actions',
+fn: function (aMethod){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($recv(aMethod)._methodClass())._removeCompiledMethod_(aMethod);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"removeMethod:",{aMethod:aMethod},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aMethod"],
+source: "removeMethod: aMethod\x0a\x09aMethod methodClass removeCompiledMethod: aMethod",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["removeCompiledMethod:", "methodClass"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "removeProtocol:from:",
+protocol: 'actions',
+fn: function (aString,aClass){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($recv(aClass)._methodsInProtocol_(aString))._do_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(aClass)._removeCompiledMethod_(each);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"removeProtocol:from:",{aString:aString,aClass:aClass},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aClass"],
+source: "removeProtocol: aString from: aClass\x0a\x09(aClass methodsInProtocol: aString)\x0a\x09\x09do: [ :each | aClass removeCompiledMethod: each ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["do:", "methodsInProtocol:", "removeCompiledMethod:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "renameClass:to:",
+protocol: 'actions',
+fn: function (aClass,aClassName){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+function $ClassBuilder(){return $globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$receiver;
+$1=$recv($recv($Smalltalk())._globals())._at_(aClassName);
+if(($receiver = $1) == null || $receiver.isNil){
+$1;
+} else {
+$2=$recv("A class named ".__comma(aClassName)).__comma(" already exists");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx[","]=1;
+//>>excludeEnd("ctx");
+self._error_($2);
+};
+$recv($recv($ClassBuilder())._new())._renameClass_to_(aClass,aClassName);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"renameClass:to:",{aClass:aClass,aClassName:aClassName},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass", "aClassName"],
+source: "renameClass: aClass to: aClassName\x0a\x09(Smalltalk globals at: aClassName)\x0a\x09\x09ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].\x0a\x09\x09\x0a\x09ClassBuilder new renameClass: aClass to: aClassName",
+referencedClasses: ["Smalltalk", "ClassBuilder"],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:", "at:", "globals", "error:", ",", "renameClass:to:", "new"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "renamePackage:to:",
+protocol: 'actions',
+fn: function (aPackageName,aNewPackageName){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2,$receiver;
+$1=$recv($recv($Smalltalk())._globals())._at_(aNewPackageName);
+if(($receiver = $1) == null || $receiver.isNil){
+$1;
+} else {
+$2=$recv("A package named ".__comma(aNewPackageName)).__comma(" already exists");
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx[","]=1;
+//>>excludeEnd("ctx");
+self._error_($2);
+};
+$recv($Smalltalk())._renamePackage_to_(aPackageName,aNewPackageName);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"renamePackage:to:",{aPackageName:aPackageName,aNewPackageName:aNewPackageName},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aPackageName", "aNewPackageName"],
+source: "renamePackage: aPackageName to: aNewPackageName\x0a        (Smalltalk globals at: aNewPackageName)\x0a                ifNotNil: [ self error: 'A package named ', aNewPackageName, ' already exists' ].\x0a\x0a        Smalltalk renamePackage: aPackageName to: aNewPackageName",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["ifNotNil:", "at:", "globals", "error:", ",", "renamePackage:to:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "renameProtocol:to:in:",
+protocol: 'actions',
+fn: function (aString,anotherString,aClass){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($recv(aClass)._methodsInProtocol_(aString))._do_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(each)._protocol_(anotherString);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"renameProtocol:to:in:",{aString:aString,anotherString:anotherString,aClass:aClass},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "anotherString", "aClass"],
+source: "renameProtocol: aString to: anotherString in: aClass\x0a\x09(aClass methodsInProtocol: aString)\x0a\x09\x09do: [ :each | each protocol: anotherString ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["do:", "methodsInProtocol:", "protocol:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "setClassCommentOf:to:",
+protocol: 'actions',
+fn: function (aClass,aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(aClass)._comment_(aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"setClassCommentOf:to:",{aClass:aClass,aString:aString},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass", "aString"],
+source: "setClassCommentOf: aClass to: aString\x0a\x09aClass comment: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["comment:"]
+}),
+$globals.Environment);
+
+$core.addMethod(
+$core.method({
+selector: "systemAnnouncer",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $Smalltalk(){return $globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv($recv($recv($Smalltalk())._globals())._at_("SystemAnnouncer"))._current();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},$globals.Environment)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "systemAnnouncer\x0a\x09^ (Smalltalk globals at: #SystemAnnouncer) current",
+referencedClasses: ["Smalltalk"],
+//>>excludeEnd("ide");
+messageSends: ["current", "at:", "globals"]
+}),
+$globals.Environment);
+
+
+
+$core.addClass('NullProgressHandler', $globals.Object, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.NullProgressHandler.comment="I am the default progress handler. I do not display any progress, and simply iterate over the collection.";
+//>>excludeEnd("ide");
+$core.addMethod(
+$core.method({
+selector: "do:on:displaying:",
+protocol: 'progress handling',
+fn: function (aBlock,aCollection,aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(aCollection)._do_(aBlock);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.NullProgressHandler)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aBlock", "aCollection", "aString"],
+source: "do: aBlock on: aCollection displaying: aString\x0a\x09aCollection do: aBlock",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["do:"]
+}),
+$globals.NullProgressHandler);
+
+
+$globals.NullProgressHandler.klass.iVarNames = ['current'];
+$core.addMethod(
+$core.method({
+selector: "initialize",
+protocol: 'initialization',
+fn: function (){
+var self=this;
+function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($ProgressHandler())._registerIfNone_(self._new());
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.NullProgressHandler.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09ProgressHandler registerIfNone: self new",
+referencedClasses: ["ProgressHandler"],
+//>>excludeEnd("ide");
+messageSends: ["registerIfNone:", "new"]
+}),
+$globals.NullProgressHandler.klass);
+
+
+$core.addClass('PlatformInterface', $globals.Object, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.PlatformInterface.comment="Deprecated. Use `Platform` or `Terminal`.";
+//>>excludeEnd("ide");
+
+$core.addMethod(
+$core.method({
+selector: "ajax:",
+protocol: 'actions',
+fn: function (anObject){
+var self=this;
+function $JQuery(){return $globals.JQuery||(typeof JQuery=="undefined"?nil:JQuery)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+self._deprecatedAPI_("Use Platform newXhr or dedicated library.");
+if(($receiver = $JQuery()) == null || $receiver.isNil){
+$1=self._error_("JQuery wrapper not loaded, cannot do AJAX.");
+} else {
+$1=$recv($recv($JQuery())._current())._ajax_(anObject);
+};
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"ajax:",{anObject:anObject},$globals.PlatformInterface.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "ajax: anObject\x0a\x09self deprecatedAPI: 'Use Platform newXhr or dedicated library.'.\x0a\x09^ JQuery\x0a\x09\x09ifNotNil: [ JQuery current ajax: anObject ]\x0a\x09\x09ifNil: [ self error: 'JQuery wrapper not loaded, cannot do AJAX.' ]",
+referencedClasses: ["JQuery"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI:", "ifNotNil:ifNil:", "ajax:", "current", "error:"]
+}),
+$globals.PlatformInterface.klass);
+
+$core.addMethod(
+$core.method({
+selector: "alert:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+self._deprecatedAPI_("Use Terminal alert:");
+$1=$recv($Terminal())._alert_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.PlatformInterface.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "alert: aString\x0a\x09self deprecatedAPI: 'Use Terminal alert:'.\x0a\x09^ Terminal alert: aString",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI:", "alert:"]
+}),
+$globals.PlatformInterface.klass);
+
+$core.addMethod(
+$core.method({
+selector: "confirm:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+self._deprecatedAPI_("Use Terminal confirm:");
+$1=$recv($Terminal())._confirm_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.PlatformInterface.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "confirm: aString\x0a\x09self deprecatedAPI: 'Use Terminal confirm:'.\x0a\x09^ Terminal confirm: aString",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI:", "confirm:"]
+}),
+$globals.PlatformInterface.klass);
+
+$core.addMethod(
+$core.method({
+selector: "existsGlobal:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+function $PlatformInterface(){return $globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+self._deprecatedAPI_("Use Smalltalk existsJsGlobal:");
+$1=$recv($recv($PlatformInterface())._globals())._at_ifPresent_ifAbsent_(aString,(function(){
+return true;
+
+}),(function(){
+return false;
+
+}));
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"existsGlobal:",{aString:aString},$globals.PlatformInterface.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "existsGlobal: aString\x0a\x09self deprecatedAPI: 'Use Smalltalk existsJsGlobal:'.\x0a\x09^ PlatformInterface globals \x0a\x09\x09at: aString \x0a\x09\x09ifPresent: [ true ] \x0a\x09\x09ifAbsent: [ false ]",
+referencedClasses: ["PlatformInterface"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI:", "at:ifPresent:ifAbsent:", "globals"]
+}),
+$globals.PlatformInterface.klass);
+
+$core.addMethod(
+$core.method({
+selector: "globals",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+function $Platform(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+self._deprecatedAPI_("Use Platform globals");
+$1=$recv($Platform())._globals();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"globals",{},$globals.PlatformInterface.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "globals\x0a\x09self deprecatedAPI: 'Use Platform globals'.\x0a\x09^ Platform globals",
+referencedClasses: ["Platform"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI:", "globals"]
+}),
+$globals.PlatformInterface.klass);
+
+$core.addMethod(
+$core.method({
+selector: "newXhr",
+protocol: 'actions',
+fn: function (){
+var self=this;
+function $Platform(){return $globals.Platform||(typeof Platform=="undefined"?nil:Platform)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+self._deprecatedAPI_("Use Platform newXhr");
+$1=$recv($Platform())._newXhr();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"newXhr",{},$globals.PlatformInterface.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "newXhr\x0a\x09self deprecatedAPI: 'Use Platform newXhr'.\x0a\x09^ Platform newXhr",
+referencedClasses: ["Platform"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI:", "newXhr"]
+}),
+$globals.PlatformInterface.klass);
+
+$core.addMethod(
+$core.method({
+selector: "prompt:",
+protocol: 'actions',
+fn: function (aString){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+self._deprecatedAPI_("Use Terminal prompt:");
+$1=$recv($Terminal())._prompt_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.PlatformInterface.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "prompt: aString\x0a\x09self deprecatedAPI: 'Use Terminal prompt:'.\x0a\x09^ Terminal prompt: aString",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI:", "prompt:"]
+}),
+$globals.PlatformInterface.klass);
+
+$core.addMethod(
+$core.method({
+selector: "prompt:default:",
+protocol: 'actions',
+fn: function (aString,defaultString){
+var self=this;
+function $Terminal(){return $globals.Terminal||(typeof Terminal=="undefined"?nil:Terminal)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+self._deprecatedAPI_("Use Terminal prompt:default:");
+$1=$recv($Terminal())._prompt_default_(aString,defaultString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.PlatformInterface.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "defaultString"],
+source: "prompt: aString default: defaultString\x0a\x09self deprecatedAPI: 'Use Terminal prompt:default:'.\x0a\x09^ Terminal prompt: aString default: defaultString",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+messageSends: ["deprecatedAPI:", "prompt:default:"]
+}),
+$globals.PlatformInterface.klass);
+
+
+$core.addClass('Service', $globals.Object, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Service.comment="I implement the basic behavior for class registration to a service.\x0a\x0aSee the `Transcript` class for a concrete service.\x0a\x0a## API\x0a\x0aUse class-side methods `#register:` and `#registerIfNone:` to register classes to a specific service.";
+//>>excludeEnd("ide");
+
+$globals.Service.klass.iVarNames = ['current'];
+$core.addMethod(
+$core.method({
+selector: "current",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+var $1;
+$1=self["@current"];
+return $1;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "current\x0a\x09^ current",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.Service.klass);
+
+$core.addMethod(
+$core.method({
+selector: "new",
+protocol: 'instance creation',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._shouldNotImplement();
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"new",{},$globals.Service.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "new\x0a\x09self shouldNotImplement",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["shouldNotImplement"]
+}),
+$globals.Service.klass);
+
+$core.addMethod(
+$core.method({
+selector: "register:",
+protocol: 'registration',
+fn: function (anObject){
+var self=this;
+self["@current"]=anObject;
+return self;
+
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "register: anObject\x0a\x09current := anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: []
+}),
+$globals.Service.klass);
+
+$core.addMethod(
+$core.method({
+selector: "registerIfNone:",
+protocol: 'registration',
+fn: function (anObject){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$receiver;
+$1=self._current();
+if(($receiver = $1) == null || $receiver.isNil){
+self._register_(anObject);
+} else {
+$1;
+};
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"registerIfNone:",{anObject:anObject},$globals.Service.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "registerIfNone: anObject\x0a\x09self current ifNil: [ self register: anObject ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["ifNil:", "current", "register:"]
+}),
+$globals.Service.klass);
+
+
+$core.addClass('ErrorHandler', $globals.Service, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.ErrorHandler.comment="I am the service used to handle Smalltalk errors.\x0aSee `boot.js` `handleError()` function.\x0a\x0aRegistered service instances must implement `#handleError:` to perform an action on the thrown exception.";
+//>>excludeEnd("ide");
+
+$core.addMethod(
+$core.method({
+selector: "handleError:",
+protocol: 'error handling',
+fn: function (anError){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._handleUnhandledError_(anError);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.ErrorHandler.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anError"],
+source: "handleError: anError\x0a\x09self handleUnhandledError: anError",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["handleUnhandledError:"]
+}),
+$globals.ErrorHandler.klass);
+
+$core.addMethod(
+$core.method({
+selector: "handleUnhandledError:",
+protocol: 'error handling',
+fn: function (anError){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1,$2;
+$1=$recv(anError)._wasHandled();
+if($core.assert($1)){
+return self;
+};
+$2=$recv(self._current())._handleError_(anError);
+return $2;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"handleUnhandledError:",{anError:anError},$globals.ErrorHandler.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anError"],
+source: "handleUnhandledError: anError\x0a\x09anError wasHandled ifTrue: [ ^ self ].\x0a\x09\x0a\x09^ self current handleError: anError",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["ifTrue:", "wasHandled", "handleError:", "current"]
+}),
+$globals.ErrorHandler.klass);
+
+
+$core.addClass('Finder', $globals.Service, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Finder.comment="I am the service responsible for finding classes/methods.\x0a__There is no default finder.__\x0a\x0a## API\x0a\x0aUse `#browse` on an object to find it.";
+//>>excludeEnd("ide");
+
+$core.addMethod(
+$core.method({
+selector: "findClass:",
+protocol: 'finding',
+fn: function (aClass){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._findClass_(aClass);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"findClass:",{aClass:aClass},$globals.Finder.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aClass"],
+source: "findClass: aClass\x0a\x09^ self current findClass: aClass",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["findClass:", "current"]
+}),
+$globals.Finder.klass);
+
+$core.addMethod(
+$core.method({
+selector: "findMethod:",
+protocol: 'finding',
+fn: function (aCompiledMethod){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._findMethod_(aCompiledMethod);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"findMethod:",{aCompiledMethod:aCompiledMethod},$globals.Finder.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aCompiledMethod"],
+source: "findMethod: aCompiledMethod\x0a\x09^ self current findMethod: aCompiledMethod",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["findMethod:", "current"]
+}),
+$globals.Finder.klass);
+
+$core.addMethod(
+$core.method({
+selector: "findString:",
+protocol: 'finding',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._findString_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"findString:",{aString:aString},$globals.Finder.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "findString: aString\x0a\x09^ self current findString: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["findString:", "current"]
+}),
+$globals.Finder.klass);
+
+
+$core.addClass('Inspector', $globals.Service, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Inspector.comment="I am the service responsible for inspecting objects.\x0a\x0aThe default inspector object is the transcript.";
+//>>excludeEnd("ide");
+
+$core.addMethod(
+$core.method({
+selector: "inspect:",
+protocol: 'inspecting',
+fn: function (anObject){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._inspect_(anObject);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Inspector.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09^ self current inspect: anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["inspect:", "current"]
+}),
+$globals.Inspector.klass);
+
+
+$core.addClass('Platform', $globals.Service, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Platform.comment="I am bridge to JS environment.\x0a\x0a## API\x0a\x0a    Platform globals. \x22JS global object\x22\x0a    Platform newXHR \x22new XMLHttpRequest() or its shim\x22";
+//>>excludeEnd("ide");
+
+$core.addMethod(
+$core.method({
+selector: "globals",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._globals();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"globals",{},$globals.Platform.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "globals\x0a\x09^ self current globals",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["globals", "current"]
+}),
+$globals.Platform.klass);
+
+$core.addMethod(
+$core.method({
+selector: "newXhr",
+protocol: 'accessing',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._newXhr();
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"newXhr",{},$globals.Platform.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "newXhr\x0a\x09^ self current newXhr",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["newXhr", "current"]
+}),
+$globals.Platform.klass);
+
+
+$core.addClass('ProgressHandler', $globals.Service, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.ProgressHandler.comment="I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.\x0a\x0aRegistered instances must implement `#do:on:displaying:`.\x0a\x0aThe default behavior is to simply iterate over the collection, using `NullProgressHandler`.";
+//>>excludeEnd("ide");
+
+$core.addMethod(
+$core.method({
+selector: "do:on:displaying:",
+protocol: 'progress handling',
+fn: function (aBlock,aCollection,aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(self._current())._do_on_displaying_(aBlock,aCollection,aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.ProgressHandler.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aBlock", "aCollection", "aString"],
+source: "do: aBlock on: aCollection displaying: aString\x0a\x09self current do: aBlock on: aCollection displaying: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["do:on:displaying:", "current"]
+}),
+$globals.ProgressHandler.klass);
+
+
+$core.addClass('Terminal', $globals.Service, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Terminal.comment="I am UI interface service.\x0a\x0a## API\x0a\x0a    Terminal alert: 'Hey, there is a problem'.\x0a    Terminal confirm: 'Affirmative?'.\x0a    Terminal prompt: 'Your name:'.";
+//>>excludeEnd("ide");
+
+$core.addMethod(
+$core.method({
+selector: "alert:",
+protocol: 'dialogs',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._alert_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString},$globals.Terminal.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "alert: aString\x0a\x09^ self current alert: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["alert:", "current"]
+}),
+$globals.Terminal.klass);
+
+$core.addMethod(
+$core.method({
+selector: "confirm:",
+protocol: 'dialogs',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._confirm_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString},$globals.Terminal.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "confirm: aString\x0a\x09^ self current confirm: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["confirm:", "current"]
+}),
+$globals.Terminal.klass);
+
+$core.addMethod(
+$core.method({
+selector: "prompt:",
+protocol: 'dialogs',
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._prompt_(aString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString},$globals.Terminal.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "prompt: aString\x0a\x09^ self current prompt: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["prompt:", "current"]
+}),
+$globals.Terminal.klass);
+
+$core.addMethod(
+$core.method({
+selector: "prompt:default:",
+protocol: 'dialogs',
+fn: function (aString,defaultString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+$1=$recv(self._current())._prompt_default_(aString,defaultString);
+return $1;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString},$globals.Terminal.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "defaultString"],
+source: "prompt: aString default: defaultString\x0a\x09^ self current prompt: aString default: defaultString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["prompt:default:", "current"]
+}),
+$globals.Terminal.klass);
+
+
+$core.addClass('Transcript', $globals.Service, [], 'Platform-Services');
+//>>excludeStart("ide", pragmas.excludeIdeData);
+$globals.Transcript.comment="I am a facade for Transcript actions.\x0a\x0aI delegate actions to the currently registered transcript.\x0a\x0a## API\x0a\x0a    Transcript \x0a        show: 'hello world';\x0a        cr;\x0a        show: anObject.";
+//>>excludeEnd("ide");
+
+$core.addMethod(
+$core.method({
+selector: "clear",
+protocol: 'printing',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(self._current())._clear();
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.Transcript.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "clear\x0a\x09self current clear",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["clear", "current"]
+}),
+$globals.Transcript.klass);
+
+$core.addMethod(
+$core.method({
+selector: "cr",
+protocol: 'printing',
+fn: function (){
+var self=this;
+function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(self._current())._show_($recv($String())._cr());
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"cr",{},$globals.Transcript.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "cr\x0a\x09self current show: String cr",
+referencedClasses: ["String"],
+//>>excludeEnd("ide");
+messageSends: ["show:", "current", "cr"]
+}),
+$globals.Transcript.klass);
+
+$core.addMethod(
+$core.method({
+selector: "inspect:",
+protocol: 'printing',
+fn: function (anObject){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._show_(anObject);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.Transcript.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "inspect: anObject\x0a\x09self show: anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["show:"]
+}),
+$globals.Transcript.klass);
+
+$core.addMethod(
+$core.method({
+selector: "open",
+protocol: 'instance creation',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(self._current())._open();
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"open",{},$globals.Transcript.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "open\x0a\x09self current open",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["open", "current"]
+}),
+$globals.Transcript.klass);
+
+$core.addMethod(
+$core.method({
+selector: "show:",
+protocol: 'printing',
+fn: function (anObject){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv(self._current())._show_(anObject);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.Transcript.klass)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "show: anObject\x0a\x09self current show: anObject",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["show:", "current"]
+}),
+$globals.Transcript.klass);
+
+$core.addMethod(
+$core.method({
+selector: "inspectOn:",
+protocol: '*Platform-Services',
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+variables=$recv($Dictionary())._new();
+$recv(variables)._at_put_("#self",self);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=1;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#keys",self._keys());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=2;
+//>>excludeEnd("ctx");
+self._keysAndValuesDo_((function(key,value){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(variables)._at_put_(key,value);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+$recv(anInspector)._setLabel_(self._printString());
+$1=$recv(anInspector)._setVariables_(variables);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.AssociativeCollection)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#keys' put: self keys.\x0a\x09self keysAndValuesDo: [ :key :value |\x0a\x09\x09variables at: key put: value ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
+referencedClasses: ["Dictionary"],
+//>>excludeEnd("ide");
+messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"]
+}),
+$globals.AssociativeCollection);
+
+$core.addMethod(
+$core.method({
+selector: "inspectOn:",
+protocol: '*Platform-Services',
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+variables=$recv($Dictionary())._new();
+$recv(variables)._at_put_("#self",self);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=1;
+//>>excludeEnd("ctx");
+self._withIndexDo_((function(each,i){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(variables)._at_put_(i,each);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+$recv(anInspector)._setLabel_(self._printString());
+$1=$recv(anInspector)._setVariables_(variables);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Collection)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self withIndexDo: [ :each :i |\x0a\x09\x09variables at: i put: each ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
+referencedClasses: ["Dictionary"],
+//>>excludeEnd("ide");
+messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]
+}),
+$globals.Collection);
+
+$core.addMethod(
+$core.method({
+selector: "inspectOn:",
+protocol: '*Platform-Services',
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+variables=$recv($Dictionary())._new();
+$recv(variables)._at_put_("#self",self);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=1;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#year",self._year());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=2;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#month",self._month());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=3;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#day",self._day());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=4;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#hours",self._hours());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=5;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#minutes",self._minutes());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=6;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#seconds",self._seconds());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=7;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#milliseconds",self._milliseconds());
+$recv(anInspector)._setLabel_(self._printString());
+$1=$recv(anInspector)._setVariables_(variables);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Date)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#year' put: self year.\x0a\x09variables at: '#month' put: self month.\x0a\x09variables at: '#day' put: self day.\x0a\x09variables at: '#hours' put: self hours.\x0a\x09variables at: '#minutes' put: self minutes.\x0a\x09variables at: '#seconds' put: self seconds.\x0a\x09variables at: '#milliseconds' put: self milliseconds.\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
+referencedClasses: ["Dictionary"],
+//>>excludeEnd("ide");
+messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"]
+}),
+$globals.Date);
+
+$core.addMethod(
+$core.method({
+selector: "inspectOn:",
+protocol: '*Platform-Services',
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+function $JSObjectProxy(){return $globals.JSObjectProxy||(typeof JSObjectProxy=="undefined"?nil:JSObjectProxy)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+variables=$recv($Dictionary())._new();
+$recv(variables)._at_put_("#self",self._jsObject());
+$recv(anInspector)._setLabel_(self._printString());
+$recv($JSObjectProxy())._addObjectVariablesTo_ofProxy_(variables,self);
+$recv(anInspector)._setVariables_(variables);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.JSObjectProxy)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self jsObject.\x0a\x09anInspector setLabel: self printString.\x0a\x09JSObjectProxy addObjectVariablesTo: variables ofProxy: self.\x0a\x09anInspector setVariables: variables",
+referencedClasses: ["Dictionary", "JSObjectProxy"],
+//>>excludeEnd("ide");
+messageSends: ["new", "at:put:", "jsObject", "setLabel:", "printString", "addObjectVariablesTo:ofProxy:", "setVariables:"]
+}),
+$globals.JSObjectProxy);
+
+$core.addMethod(
+$core.method({
+selector: "inspectOn:",
+protocol: '*Platform-Services',
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+variables=$recv($Dictionary())._new();
+$recv(variables)._at_put_("#self",self);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=1;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#home",self._home());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=2;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#receiver",self._receiver());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=3;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#selector",self._selector());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=4;
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_("#locals",self._locals());
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=5;
+//>>excludeEnd("ctx");
+$recv($recv(self._class())._instanceVariableNames())._do_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(variables)._at_put_(each,self._instVarAt_(each));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+$recv(anInspector)._setLabel_(self._printString());
+$1=$recv(anInspector)._setVariables_(variables);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.MethodContext)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#home' put: self home.\x0a\x09variables at: '#receiver' put: self receiver.\x0a\x09variables at: '#selector' put: self selector.\x0a\x09variables at: '#locals' put: self locals.\x0a\x09self class instanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
+referencedClasses: ["Dictionary"],
+//>>excludeEnd("ide");
+messageSends: ["new", "at:put:", "home", "receiver", "selector", "locals", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
+}),
+$globals.MethodContext);
+
+$core.addMethod(
+$core.method({
+selector: "inspectOn:",
+protocol: '*Platform-Services',
+fn: function (anInspector){
+var self=this;
+var variables;
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+variables=$recv($Dictionary())._new();
+$recv(variables)._at_put_("#self",self);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=1;
+//>>excludeEnd("ctx");
+$recv($recv(self._class())._allInstanceVariableNames())._do_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+return $recv(variables)._at_put_(each,self._instVarAt_(each));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+$recv(anInspector)._setLabel_(self._printString());
+$1=$recv(anInspector)._setVariables_(variables);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},$globals.Object)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
+referencedClasses: ["Dictionary"],
+//>>excludeEnd("ide");
+messageSends: ["new", "at:put:", "do:", "allInstanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"]
+}),
+$globals.Object);
+
+$core.addMethod(
+$core.method({
+selector: "do:displayingProgress:",
+protocol: '*Platform-Services',
+fn: function (aBlock,aString){
+var self=this;
+function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+$recv($ProgressHandler())._do_on_displaying_(aBlock,self,aString);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"do:displayingProgress:",{aBlock:aBlock,aString:aString},$globals.SequenceableCollection)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aBlock", "aString"],
+source: "do: aBlock displayingProgress: aString\x0a\x09ProgressHandler \x0a\x09\x09do: aBlock \x0a\x09\x09on: self \x0a\x09\x09displaying: aString",
+referencedClasses: ["ProgressHandler"],
+//>>excludeEnd("ide");
+messageSends: ["do:on:displaying:"]
+}),
+$globals.SequenceableCollection);
+
+$core.addMethod(
+$core.method({
+selector: "inspectOn:",
+protocol: '*Platform-Services',
+fn: function (anInspector){
+var self=this;
+var variables,i;
+function $Dictionary(){return $globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $1;
+variables=$recv($Dictionary())._new();
+$recv(variables)._at_put_("#self",self);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["at:put:"]=1;
+//>>excludeEnd("ctx");
+i=(1);
+self._do_((function(each){
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx2) {
+//>>excludeEnd("ctx");
+$recv(variables)._at_put_(i,each);
+i=$recv(i).__plus((1));
+return i;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
+//>>excludeEnd("ctx");
+}));
+$recv(anInspector)._setLabel_(self._printString());
+$1=$recv(anInspector)._setVariables_(variables);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},$globals.Set)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| variables i |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09i := 1.\x0a\x09self do: [ :each |\x0a\x09\x09variables at: i put: each.\x0a\x09\x09i := i + 1 ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
+referencedClasses: ["Dictionary"],
+//>>excludeEnd("ide");
+messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"]
+}),
+$globals.Set);
+
+$core.addMethod(
+$core.method({
+selector: "inspectOn:",
+protocol: '*Platform-Services',
+fn: function (anInspector){
+var self=this;
+var label;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $3,$2,$1,$5,$4;
+(
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.supercall = true, 
+//>>excludeEnd("ctx");
+$globals.String.superclass.fn.prototype._inspectOn_.apply($recv(self), [anInspector]));
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.supercall = false;
+//>>excludeEnd("ctx");;
+$3=self._printString();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["printString"]=1;
+//>>excludeEnd("ctx");
+$2=$recv($3)._size();
+$1=$recv($2).__gt((30));
+if($core.assert($1)){
+$5=self._printString();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx1.sendIdx["printString"]=2;
+//>>excludeEnd("ctx");
+$4=$recv($5)._copyFrom_to_((1),(30));
+label=$recv($4).__comma("...'");
+label;
+} else {
+label=self._printString();
+label;
+};
+$recv(anInspector)._setLabel_(label);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},$globals.String)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anInspector"],
+source: "inspectOn: anInspector\x0a\x09| label |\x0a\x09super inspectOn: anInspector.\x0a\x09self printString size > 30\x0a\x09\x09ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]\x0a\x09\x09ifFalse: [ label := self printString ].\x0a\x09anInspector setLabel: label",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"]
+}),
+$globals.String);
+
+});

+ 722 - 0
bower_components/amber/src/Platform-Services.st

@@ -0,0 +1,722 @@
+Smalltalk createPackage: 'Platform-Services'!
+Object subclass: #ConsoleErrorHandler
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!ConsoleErrorHandler commentStamp!
+I am manage Smalltalk errors, displaying the stack in the console.!
+
+!ConsoleErrorHandler methodsFor: 'error handling'!
+
+handleError: anError
+	anError context ifNotNil: [ self logErrorContext: anError context ].
+	self logError: anError
+! !
+
+!ConsoleErrorHandler methodsFor: 'private'!
+
+log: aString
+	console log: aString
+!
+
+logContext: aContext
+	aContext home ifNotNil: [
+		self logContext: aContext home ].
+	self log: aContext asString
+!
+
+logError: anError
+	self log: anError messageText
+!
+
+logErrorContext: aContext
+	aContext ifNotNil: [
+		aContext home ifNotNil: [
+			self logContext: aContext home ]]
+! !
+
+ConsoleErrorHandler class instanceVariableNames: 'current'!
+
+!ConsoleErrorHandler class methodsFor: 'initialization'!
+
+initialize
+	ErrorHandler registerIfNone: self new
+! !
+
+Object subclass: #ConsoleTranscript
+	instanceVariableNames: 'textarea'
+	package: 'Platform-Services'!
+!ConsoleTranscript commentStamp!
+I am a specific transcript emitting to the JavaScript console.
+
+If no other transcript is registered, I am the default.!
+
+!ConsoleTranscript methodsFor: 'actions'!
+
+open
+! !
+
+!ConsoleTranscript methodsFor: 'printing'!
+
+clear
+	"no op"
+!
+
+cr
+	"no op"
+!
+
+show: anObject
+"Smalltalk objects should have no trouble displaying themselves on the Transcript; Javascript objects don't know how, so must be wrapped in a JSObectProxy."
+<console.log(String($recv(anObject)._asString()))>
+! !
+
+!ConsoleTranscript class methodsFor: 'initialization'!
+
+initialize
+	Transcript registerIfNone: self new
+! !
+
+Object subclass: #InterfacingObject
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!InterfacingObject commentStamp!
+I am superclass of all object that interface with user or environment. `Widget` and a few other classes are subclasses of me. I delegate all of the above APIs to `PlatformInterface`.
+
+## API
+
+    self alert: 'Hey, there is a problem'.
+    self confirm: 'Affirmative?'.
+    self prompt: 'Your name:'.
+
+    self ajax: #{
+        'url' -> '/patch.js'. 'type' -> 'GET'. dataType->'script'
+    }.!
+
+!InterfacingObject methodsFor: 'actions'!
+
+ajax: anObject
+	self deprecatedAPI.
+	^ PlatformInterface ajax: anObject
+!
+
+alert: aString
+	^ Terminal alert: aString
+!
+
+confirm: aString
+	^ Terminal confirm: aString
+!
+
+prompt: aString
+	^ Terminal prompt: aString
+!
+
+prompt: aString default: defaultString
+	^ Terminal prompt: aString default: defaultString
+! !
+
+InterfacingObject subclass: #Environment
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!Environment commentStamp!
+I provide an unified entry point to manipulate Amber packages, classes and methods.
+
+Typical use cases include IDEs, remote access and restricting browsing.!
+
+!Environment methodsFor: 'accessing'!
+
+allSelectors
+	^ Smalltalk core allSelectors
+!
+
+availableClassNames
+	^ Smalltalk classes 
+		collect: [ :each | each name ]
+!
+
+availablePackageNames
+	^ Smalltalk packages 
+		collect: [ :each | each name ]
+!
+
+availableProtocolsFor: aClass
+	| protocols |
+	
+	protocols := aClass protocols.
+	aClass superclass ifNotNil: [ protocols addAll: (self availableProtocolsFor: aClass superclass) ].
+	^ protocols asSet asArray sort
+!
+
+classBuilder
+	^ ClassBuilder new
+!
+
+classNamed: aString
+	^ (Smalltalk globals at: aString asSymbol)
+		ifNil: [ self error: 'Invalid class name' ]
+!
+
+classes
+	^ Smalltalk classes
+!
+
+doItReceiver
+	^ DoIt new
+!
+
+packages
+	^ Smalltalk packages
+!
+
+systemAnnouncer
+	^ (Smalltalk globals at: #SystemAnnouncer) current
+! !
+
+!Environment methodsFor: 'actions'!
+
+commitPackage: aPackage onSuccess: aBlock onError: anotherBlock
+	aPackage transport
+		commitOnSuccess: aBlock
+		onError: anotherBlock
+!
+
+copyClass: aClass to: aClassName
+	(Smalltalk globals at: aClassName)
+		ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].
+		
+	ClassBuilder new copyClass: aClass named: aClassName
+!
+
+inspect: anObject
+	Inspector inspect: anObject
+!
+
+moveClass: aClass toPackage: aPackageName
+	| package |
+	
+	package := Package named: aPackageName.
+	package ifNil: [ self error: 'Invalid package name' ].
+	package == aClass package ifTrue: [ ^ self ].
+	
+	aClass package: package
+!
+
+moveMethod: aMethod toClass: aClassName
+	| destinationClass |
+	
+	destinationClass := self classNamed: aClassName.
+	destinationClass == aMethod methodClass ifTrue: [ ^ self ].
+	
+	aMethod methodClass isMetaclass ifTrue: [ 
+		destinationClass := destinationClass class ].
+	
+	destinationClass 
+		compile: aMethod source
+		protocol: aMethod protocol.
+	aMethod methodClass 
+		removeCompiledMethod: aMethod
+!
+
+moveMethod: aMethod toProtocol: aProtocol
+	aMethod protocol: aProtocol
+!
+
+removeClass: aClass
+	Smalltalk removeClass: aClass
+!
+
+removeMethod: aMethod
+	aMethod methodClass removeCompiledMethod: aMethod
+!
+
+removeProtocol: aString from: aClass
+	(aClass methodsInProtocol: aString)
+		do: [ :each | aClass removeCompiledMethod: each ]
+!
+
+renameClass: aClass to: aClassName
+	(Smalltalk globals at: aClassName)
+		ifNotNil: [ self error: 'A class named ', aClassName, ' already exists' ].
+		
+	ClassBuilder new renameClass: aClass to: aClassName
+!
+
+renamePackage: aPackageName to: aNewPackageName
+        (Smalltalk globals at: aNewPackageName)
+                ifNotNil: [ self error: 'A package named ', aNewPackageName, ' already exists' ].
+
+        Smalltalk renamePackage: aPackageName to: aNewPackageName
+!
+
+renameProtocol: aString to: anotherString in: aClass
+	(aClass methodsInProtocol: aString)
+		do: [ :each | each protocol: anotherString ]
+!
+
+setClassCommentOf: aClass to: aString
+	aClass comment: aString
+! !
+
+!Environment methodsFor: 'compiling'!
+
+addInstVarNamed: aString to: aClass
+	self classBuilder
+		addSubclassOf: aClass superclass 
+		named: aClass name 
+		instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)
+		package: aClass package name
+!
+
+compileClassComment: aString for: aClass
+	aClass comment: aString
+!
+
+compileClassDefinition: aString
+	[ self evaluate: aString for: DoIt new ]
+		on: Error
+		do: [ :error | self alert: error messageText ]
+!
+
+compileMethod: sourceCode for: class protocol: protocol
+	^ class
+		compile: sourceCode
+		protocol: protocol
+! !
+
+!Environment methodsFor: 'error handling'!
+
+evaluate: aBlock on: anErrorClass do: exceptionBlock
+	"Evaluate a block and catch exceptions happening on the environment stack"
+	
+	aBlock tryCatch: [ :exception | 
+		(exception isKindOf: (self classNamed: anErrorClass name))
+			ifTrue: [ exceptionBlock value: exception ]
+ 			ifFalse: [ exception resignal ] ]
+! !
+
+!Environment methodsFor: 'evaluating'!
+
+evaluate: aString for: anObject
+	^ Evaluator evaluate: aString for: anObject
+! !
+
+!Environment methodsFor: 'services'!
+
+registerErrorHandler: anErrorHandler
+	ErrorHandler register: anErrorHandler
+!
+
+registerFinder: aFinder
+	Finder register: aFinder
+!
+
+registerInspector: anInspector
+	Inspector register: anInspector
+!
+
+registerProgressHandler: aProgressHandler
+	ProgressHandler register: aProgressHandler
+!
+
+registerTranscript: aTranscript
+	Transcript register: aTranscript
+! !
+
+Object subclass: #NullProgressHandler
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!NullProgressHandler commentStamp!
+I am the default progress handler. I do not display any progress, and simply iterate over the collection.!
+
+!NullProgressHandler methodsFor: 'progress handling'!
+
+do: aBlock on: aCollection displaying: aString
+	aCollection do: aBlock
+! !
+
+NullProgressHandler class instanceVariableNames: 'current'!
+
+!NullProgressHandler class methodsFor: 'initialization'!
+
+initialize
+	ProgressHandler registerIfNone: self new
+! !
+
+Object subclass: #PlatformInterface
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!PlatformInterface commentStamp!
+Deprecated. Use `Platform` or `Terminal`.!
+
+!PlatformInterface class methodsFor: 'accessing'!
+
+globals
+	self deprecatedAPI: 'Use Platform globals'.
+	^ Platform globals
+! !
+
+!PlatformInterface class methodsFor: 'actions'!
+
+ajax: anObject
+	self deprecatedAPI: 'Use Platform newXhr or dedicated library.'.
+	^ JQuery
+		ifNotNil: [ JQuery current ajax: anObject ]
+		ifNil: [ self error: 'JQuery wrapper not loaded, cannot do AJAX.' ]
+!
+
+alert: aString
+	self deprecatedAPI: 'Use Terminal alert:'.
+	^ Terminal alert: aString
+!
+
+confirm: aString
+	self deprecatedAPI: 'Use Terminal confirm:'.
+	^ Terminal confirm: aString
+!
+
+existsGlobal: aString
+	self deprecatedAPI: 'Use Smalltalk existsJsGlobal:'.
+	^ PlatformInterface globals 
+		at: aString 
+		ifPresent: [ true ] 
+		ifAbsent: [ false ]
+!
+
+newXhr
+	self deprecatedAPI: 'Use Platform newXhr'.
+	^ Platform newXhr
+!
+
+prompt: aString
+	self deprecatedAPI: 'Use Terminal prompt:'.
+	^ Terminal prompt: aString
+!
+
+prompt: aString default: defaultString
+	self deprecatedAPI: 'Use Terminal prompt:default:'.
+	^ Terminal prompt: aString default: defaultString
+! !
+
+Object subclass: #Service
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!Service commentStamp!
+I implement the basic behavior for class registration to a service.
+
+See the `Transcript` class for a concrete service.
+
+## API
+
+Use class-side methods `#register:` and `#registerIfNone:` to register classes to a specific service.!
+
+Service class instanceVariableNames: 'current'!
+
+!Service class methodsFor: 'accessing'!
+
+current
+	^ current
+! !
+
+!Service class methodsFor: 'instance creation'!
+
+new
+	self shouldNotImplement
+! !
+
+!Service class methodsFor: 'registration'!
+
+register: anObject
+	current := anObject
+!
+
+registerIfNone: anObject
+	self current ifNil: [ self register: anObject ]
+! !
+
+Service subclass: #ErrorHandler
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!ErrorHandler commentStamp!
+I am the service used to handle Smalltalk errors.
+See `boot.js` `handleError()` function.
+
+Registered service instances must implement `#handleError:` to perform an action on the thrown exception.!
+
+!ErrorHandler class methodsFor: 'error handling'!
+
+handleError: anError
+	self handleUnhandledError: anError
+!
+
+handleUnhandledError: anError
+	anError wasHandled ifTrue: [ ^ self ].
+	
+	^ self current handleError: anError
+! !
+
+Service subclass: #Finder
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!Finder commentStamp!
+I am the service responsible for finding classes/methods.
+__There is no default finder.__
+
+## API
+
+Use `#browse` on an object to find it.!
+
+!Finder class methodsFor: 'finding'!
+
+findClass: aClass
+	^ self current findClass: aClass
+!
+
+findMethod: aCompiledMethod
+	^ self current findMethod: aCompiledMethod
+!
+
+findString: aString
+	^ self current findString: aString
+! !
+
+Service subclass: #Inspector
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!Inspector commentStamp!
+I am the service responsible for inspecting objects.
+
+The default inspector object is the transcript.!
+
+!Inspector class methodsFor: 'inspecting'!
+
+inspect: anObject
+	^ self current inspect: anObject
+! !
+
+Service subclass: #Platform
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!Platform commentStamp!
+I am bridge to JS environment.
+
+## API
+
+    Platform globals. "JS global object"
+    Platform newXHR "new XMLHttpRequest() or its shim"!
+
+!Platform class methodsFor: 'accessing'!
+
+globals
+	^ self current globals
+!
+
+newXhr
+	^ self current newXhr
+! !
+
+Service subclass: #ProgressHandler
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!ProgressHandler commentStamp!
+I am used to manage progress in collection iterations, see `SequenceableCollection >> #do:displayingProgress:`.
+
+Registered instances must implement `#do:on:displaying:`.
+
+The default behavior is to simply iterate over the collection, using `NullProgressHandler`.!
+
+!ProgressHandler class methodsFor: 'progress handling'!
+
+do: aBlock on: aCollection displaying: aString
+	self current do: aBlock on: aCollection displaying: aString
+! !
+
+Service subclass: #Terminal
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!Terminal commentStamp!
+I am UI interface service.
+
+## API
+
+    Terminal alert: 'Hey, there is a problem'.
+    Terminal confirm: 'Affirmative?'.
+    Terminal prompt: 'Your name:'.!
+
+!Terminal class methodsFor: 'dialogs'!
+
+alert: aString
+	^ self current alert: aString
+!
+
+confirm: aString
+	^ self current confirm: aString
+!
+
+prompt: aString
+	^ self current prompt: aString
+!
+
+prompt: aString default: defaultString
+	^ self current prompt: aString default: defaultString
+! !
+
+Service subclass: #Transcript
+	instanceVariableNames: ''
+	package: 'Platform-Services'!
+!Transcript commentStamp!
+I am a facade for Transcript actions.
+
+I delegate actions to the currently registered transcript.
+
+## API
+
+    Transcript 
+        show: 'hello world';
+        cr;
+        show: anObject.!
+
+!Transcript class methodsFor: 'instance creation'!
+
+open
+	self current open
+! !
+
+!Transcript class methodsFor: 'printing'!
+
+clear
+	self current clear
+!
+
+cr
+	self current show: String cr
+!
+
+inspect: anObject
+	self show: anObject
+!
+
+show: anObject
+	self current show: anObject
+! !
+
+!AssociativeCollection methodsFor: '*Platform-Services'!
+
+inspectOn: anInspector
+	| variables |
+	variables := Dictionary new.
+	variables at: '#self' put: self.
+	variables at: '#keys' put: self keys.
+	self keysAndValuesDo: [ :key :value |
+		variables at: key put: value ].
+	anInspector
+		setLabel: self printString;
+		setVariables: variables
+! !
+
+!Collection methodsFor: '*Platform-Services'!
+
+inspectOn: anInspector
+	| variables |
+	variables := Dictionary new.
+	variables at: '#self' put: self.
+	self withIndexDo: [ :each :i |
+		variables at: i put: each ].
+	anInspector
+		setLabel: self printString;
+		setVariables: variables
+! !
+
+!Date methodsFor: '*Platform-Services'!
+
+inspectOn: anInspector
+	| variables |
+	variables := Dictionary new.
+	variables at: '#self' put: self.
+	variables at: '#year' put: self year.
+	variables at: '#month' put: self month.
+	variables at: '#day' put: self day.
+	variables at: '#hours' put: self hours.
+	variables at: '#minutes' put: self minutes.
+	variables at: '#seconds' put: self seconds.
+	variables at: '#milliseconds' put: self milliseconds.
+	anInspector
+		setLabel: self printString;
+		setVariables: variables
+! !
+
+!JSObjectProxy methodsFor: '*Platform-Services'!
+
+inspectOn: anInspector
+	| variables |
+	variables := Dictionary new.
+	variables at: '#self' put: self jsObject.
+	anInspector setLabel: self printString.
+	JSObjectProxy addObjectVariablesTo: variables ofProxy: self.
+	anInspector setVariables: variables
+! !
+
+!MethodContext methodsFor: '*Platform-Services'!
+
+inspectOn: anInspector
+	| variables |
+	variables := Dictionary new.
+	variables at: '#self' put: self.
+	variables at: '#home' put: self home.
+	variables at: '#receiver' put: self receiver.
+	variables at: '#selector' put: self selector.
+	variables at: '#locals' put: self locals.
+	self class instanceVariableNames do: [ :each |
+		variables at: each put: (self instVarAt: each) ].
+	anInspector
+		setLabel: self printString;
+		setVariables: variables
+! !
+
+!Object methodsFor: '*Platform-Services'!
+
+inspectOn: anInspector
+	| variables |
+	variables := Dictionary new.
+	variables at: '#self' put: self.
+	self class allInstanceVariableNames do: [ :each |
+		variables at: each put: (self instVarAt: each) ].
+	anInspector
+		setLabel: self printString;
+		setVariables: variables
+! !
+
+!SequenceableCollection methodsFor: '*Platform-Services'!
+
+do: aBlock displayingProgress: aString
+	ProgressHandler 
+		do: aBlock 
+		on: self 
+		displaying: aString
+! !
+
+!Set methodsFor: '*Platform-Services'!
+
+inspectOn: anInspector
+	| variables i |
+	variables := Dictionary new.
+	variables at: '#self' put: self.
+	i := 1.
+	self do: [ :each |
+		variables at: i put: each.
+		i := i + 1 ].
+	anInspector
+		setLabel: self printString;
+		setVariables: variables
+! !
+
+!String methodsFor: '*Platform-Services'!
+
+inspectOn: anInspector
+	| label |
+	super inspectOn: anInspector.
+	self printString size > 30
+		ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]
+		ifFalse: [ label := self printString ].
+	anInspector setLabel: label
+! !
+

+ 1 - 1
bower_components/amber/src/SUnit-Tests.js

@@ -1,4 +1,4 @@
-define("amber_core/SUnit-Tests", ["amber/boot", "amber_core/SUnit"], function($boot){
+define("amber_core/SUnit-Tests", ["amber/boot", "amber_core/SUnit"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('SUnit-Tests');
 $core.packages["SUnit-Tests"].innerEval = function (expr) { return eval(expr); };

+ 1 - 1
bower_components/amber/src/SUnit.js

@@ -1,4 +1,4 @@
-define("amber_core/SUnit", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Classes"], function($boot){
+define("amber_core/SUnit", ["amber/boot", "amber_core/Kernel-Objects", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Classes"], function($boot){"use strict";
 var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
 $core.addPackage('SUnit');
 $core.packages["SUnit"].innerEval = function (expr) { return eval(expr); };

+ 58 - 73
bower_components/amber/support/boot.js

@@ -194,11 +194,9 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 		this.selectors = [];
 		this.jsSelectors = [];
 
-		this.get = function (stSelector) {
+		this.make = function (stSelector, targetClasses) {
 			var method = methodDict[stSelector];
-			if(method) {
-				return method;
-			}
+			if(method) return;
 			var jsSelector = st.st2js(stSelector);
 			this.selectors.push(stSelector);
 			this.jsSelectors.push(jsSelector);
@@ -206,6 +204,9 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 			methodDict[stSelector] = method;
 			methods.push(method);
 			manip.installMethod(method, rootAsClass);
+			targetClasses.forEach(function (target) {
+				manip.installMethod(method, target);
+			});
 			return method;
 		};
 
@@ -244,37 +245,33 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 		function copySuperclass(klass) {
 			var superclass = klass.superclass,
 				localMethods = klass.methods,
-				protectedJsSelectors = {};
+				localMethodsByJsSelector = {};
 			Object.keys(localMethods).forEach(function (each) {
-				protectedJsSelectors[localMethods[each].jsSelector] = true;
+				var localMethod = localMethods[each];
+                localMethodsByJsSelector[localMethod.jsSelector] = localMethod;
 			});
-			var superproto = superclass.fn.prototype;
+			var myproto = klass.fn.prototype,
+				superproto = superclass.fn.prototype;
 			dnu.jsSelectors.forEach(function (selector) {
-				if (!protectedJsSelectors[selector]) {
+				if (!localMethodsByJsSelector[selector]) {
 					manip.installMethod({
 						jsSelector: selector,
 						fn: superproto[selector]
 					}, klass);
+				} else if (!myproto[selector]) {
+					manip.installMethod(localMethodsByJsSelector[selector], klass);
 				}
 			});
 		}
 	}
 
 	function ManipulationBrik(brikz, st) {
-
-		this.installMethodIfAbsent = function (handler, klass) {
-			if(!klass.fn.prototype[handler.jsSelector]) {
-				installMethod(handler, klass);
-			}
-		};
-
-		function installMethod (method, klass) {
+		this.installMethod = function (method, klass) {
 			Object.defineProperty(klass.fn.prototype, method.jsSelector, {
 				value: method.fn,
 				enumerable: false, configurable: true, writable: true
 			});
-		}
-		this.installMethod = installMethod;
+		};
 	}
 
 
@@ -575,13 +572,6 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 			return that;
 		};
 
-		function installNewDnuHandler(newHandler) {
-			var wrappedClasses = st.wrappedClasses();
-			for(var i = 0; i < wrappedClasses.length; i++) {
-				manip.installMethodIfAbsent(newHandler, wrappedClasses[i]);
-			}
-		}
-
 		function ensureJsSelector(method) {
 			if (!(method.jsSelector)) {
 				method.jsSelector = st.st2js(method.selector);
@@ -602,19 +592,13 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 
 			propagateMethodChange(klass, method);
 
-			var usedSelectors = method.messageSends;
-			var dnuHandlers = [];
+			var usedSelectors = method.messageSends,
+				targetClasses = stInit.initialized() ? st.wrappedClasses() : [];
 
-			dnuHandlers.push(dnu.get(method.selector));
+			dnu.make(method.selector, targetClasses);
 
 			for(var i=0; i<usedSelectors.length; i++) {
-				dnuHandlers.push(dnu.get(usedSelectors[i]));
-			}
-
-			if(stInit.initialized()) {
-				dnuHandlers.forEach(function(each) {
-					installNewDnuHandler(each);
-				});
+				dnu.make(usedSelectors[i], targetClasses);
 			}
 		};
 
@@ -771,12 +755,12 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 
 		/* Boolean assertion */
 		st.assert = function(shouldBeBoolean) {
-			// jshint -W041
-			if (undefined !== shouldBeBoolean && shouldBeBoolean.klass === globals.Boolean) {
-				return shouldBeBoolean == true;
-			} else {
-				globals.NonBooleanReceiver._new()._object_(shouldBeBoolean)._signal();
+			if (typeof shouldBeBoolean === "boolean") return shouldBeBoolean;
+			else if (shouldBeBoolean != null && typeof shouldBeBoolean === "object") {
+				shouldBeBoolean = shouldBeBoolean.valueOf();
+				if (typeof shouldBeBoolean === "boolean") return shouldBeBoolean;
 			}
+			globals.NonBooleanReceiver._new()._object_(shouldBeBoolean)._signal();
 		};
 
 		/* List of all reserved words in JavaScript. They may not be used as variables
@@ -798,7 +782,7 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 							'implements', 'interface', 'let', 'package', 'private', 'protected',
 							'public', 'static', 'yield'];
 
-		st.globalJsVariables = ['jQuery', 'window', 'document', 'process', 'global'];
+		st.globalJsVariables = ['window', 'document', 'process', 'global'];
 
 	}
 
@@ -869,28 +853,33 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 		 Use smalltalk.getThisContext() instead which will answer a safe copy of
 		 the current context */
 
-		st.thisContext = undefined;
+		var thisContext = null;
 
 		st.withContext = function(worker, setup) {
-			if(st.thisContext) {
+			if(thisContext) {
 				return inContext(worker, setup);
 			} else {
-				try {
-					return inContext(worker, setup);
-				} catch(error) {
-					handleError(error);
-					st.thisContext = null;
-					// Rethrow the error in any case.
-					error.amberHandled = true;
-					throw error;
-				}
+				return inContextWithErrorHandling(worker, setup);
 			}
 		};
 
+		function inContextWithErrorHandling(worker, setup) {
+			try {
+				return inContext(worker, setup);
+			} catch (error) {
+				handleError(error);
+				thisContext = null;
+				// Rethrow the error in any case.
+				error.amberHandled = true;
+				throw error;
+			}
+		}
+
 		function inContext(worker, setup) {
-			var context = pushContext(setup);
-			var result = worker(context);
-			popContext(context);
+			var oldContext = thisContext;
+			thisContext = new SmalltalkMethodContext(thisContext, setup);
+			var result = worker(thisContext);
+			thisContext = oldContext;
 			return result;
 		}
 
@@ -943,23 +932,13 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 		/* Handle thisContext pseudo variable */
 
 		st.getThisContext = function() {
-			if(st.thisContext) {
-				st.thisContext.init();
-				return st.thisContext;
+			if(thisContext) {
+				thisContext.init();
+				return thisContext;
 			} else {
 				return nil;
 			}
 		};
-
-		function pushContext(setup) {
-			var newContext = st.thisContext = new SmalltalkMethodContext(st.thisContext, setup);
-			return newContext;
-		}
-
-		function popContext(context) {
-			st.thisContext = context.homeContext;
-		}
-
 	}
 
 	function MessageSendBrik(brikz, st) {
@@ -972,7 +951,7 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 
 		st.send = function(receiver, jsSelector, args, klass) {
 			var method;
-			if(receiver === null) {
+			if(receiver == null) {
 				receiver = nil;
 			}
 			method = klass ? klass.fn.prototype[jsSelector] : receiver.klass && receiver[jsSelector];
@@ -995,7 +974,7 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 		 if the receiver has no klass, we consider it a JS object (outside of the
 		 Amber system). Else assume that the receiver understands #doesNotUnderstand: */
 		function messageNotUnderstood(receiver, stSelector, args) {
-			if (receiver.klass !== undefined && !receiver.allowJavaScriptCalls) {
+			if (receiver.klass != null && !receiver.allowJavaScriptCalls) {
 				return invokeDnuMethod(receiver, stSelector, args);
 			}
 			/* Call a method of a JS object, or answer a property if it exists.
@@ -1118,9 +1097,15 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 		 * otherwise unchanged
 		 */
 		this.asReceiver = function (o) {
-			if (o == null) { return nil; }
-			if (o.klass) { return o; }
-			return globals.JSObjectProxy._on_(o);
+			if (o == null) return nil;
+			if (typeof o === "object" || typeof o === "function") {
+				return o.klass != null ? o : globals.JSObjectProxy._on_(o);
+			}
+			// IMPORTANT: This optimization (return o if typeof !== "object")
+			// assumes all primitive types are wrapped by some Smalltalk class
+			// so they can be returned as-is, without boxing and looking for .klass.
+			// KEEP THE primitives-are-wrapped INVARIANT!
+			return o;
 		};
 	}
 

+ 2 - 3
bower_components/amber/support/deploy.js

@@ -1,6 +1,5 @@
 define([
     './helpers',
-    'jquery',
     // --- packages of the core Amber begin here ---
     'amber_core/Kernel-Objects',
     'amber_core/Kernel-Classes',
@@ -8,8 +7,8 @@ define([
     'amber_core/Kernel-Collections',
     'amber_core/Kernel-Infrastructure',
     'amber_core/Kernel-Exceptions',
-    'amber_core/Kernel-Transcript',
     'amber_core/Kernel-Announcements',
-    'amber_core/Web'
+    'amber_core/Platform-Services',
+    'amber_core/Platform-Browser'
     // --- packages of the core Amber end here ---
 ], function (amber) { return amber; });

+ 1 - 1
bower_components/amber/support/lang.js

@@ -3,7 +3,7 @@ define([
 	'./deploy',
 	'./parser',
 	// --- packages for the Amber reflection begin here ---
-	'amber_core/Kernel-ImportExport',
+	'amber_core/Platform-ImportExport',
 	'amber_core/Compiler-Exceptions',
 	'amber_core/Compiler-Core',
 	'amber_core/Compiler-AST',

+ 4 - 4
bower_components/codemirror/.bower.json

@@ -1,6 +1,6 @@
 {
   "name": "codemirror",
-  "version": "4.12.0",
+  "version": "4.13.0",
   "main": [
     "lib/codemirror.js",
     "lib/codemirror.css"
@@ -17,11 +17,11 @@
     "package.json"
   ],
   "homepage": "https://github.com/marijnh/CodeMirror",
-  "_release": "4.12.0",
+  "_release": "4.13.0",
   "_resolution": {
     "type": "version",
-    "tag": "4.12.0",
-    "commit": "bed3de39aa62616393db2bab4b5fec6ee2238747"
+    "tag": "4.13.0",
+    "commit": "3e2218192c41814d17965198532320aefd25447e"
   },
   "_source": "git://github.com/marijnh/CodeMirror.git",
   "_target": "^4.7.0",

+ 9 - 0
bower_components/codemirror/AUTHORS

@@ -24,6 +24,7 @@ Alexander Solovyov
 Alexandre Bique
 alexey-k
 Alex Piggott
+Aliaksei Chapyzhenka
 Amsul
 amuntean
 Amy
@@ -82,6 +83,7 @@ Chris Granger
 Chris Houseknecht
 Chris Morgan
 Christian Oyarzun
+Christian Petrov
 Christopher Brown
 ciaranj
 CodeAnimal
@@ -111,6 +113,7 @@ Deep Thought
 Devon Carew
 dignifiedquire
 Dimage Sapelkin
+Dmitry Kiselyov
 domagoj412
 Dominator008
 Domizio Demichelis
@@ -149,6 +152,7 @@ Gautam Mehta
 gekkoe
 Gerard Braad
 Gergely Hegykozi
+Giovanni Calò
 Glenn Jorde
 Glenn Ruehle
 Golevka
@@ -235,6 +239,7 @@ Konstantin Lopuhin
 koops
 ks-ifware
 kubelsmieci
+KwanEsq
 Lanfei
 Lanny
 Laszlo Vidacs
@@ -289,6 +294,7 @@ Michael Lehenbauer
 Michael Zhou
 Mighty Guava
 Miguel Castillo
+mihailik
 Mike
 Mike Brevoort
 Mike Diaz
@@ -306,6 +312,7 @@ Nathan Williams
 ndr
 nerbert
 nextrevision
+ngn
 nguillaumin
 Ng Zhi An
 Nicholas Bollweg
@@ -344,6 +351,7 @@ Randall Mason
 Randy Burden
 Randy Edmunds
 Rasmus Erik Voel Jensen
+Ray Ratchup
 Richard van der Meer
 Richard Z.H. Wang
 Robert Crossfield
@@ -423,5 +431,6 @@ YNH Webdev
 Yunchi Luo
 Yuvi Panda
 Zachary Dremann
+Zhang Hao
 zziuni
 魏鹏刚

+ 2 - 1
bower_components/codemirror/README.md

@@ -1,6 +1,7 @@
 # CodeMirror
 [![Build Status](https://travis-ci.org/codemirror/CodeMirror.svg)](https://travis-ci.org/codemirror/CodeMirror)
-[![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror)
+[![NPM version](https://img.shields.io/npm/v/codemirror.svg)](https://www.npmjs.org/package/codemirror)  
+[Funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png)](https://marijnhaverbeke.nl/fund/)
 
 CodeMirror is a JavaScript component that provides a code editor in
 the browser. When a mode is available for the language you are coding

+ 6 - 4
bower_components/codemirror/addon/edit/closebrackets.js

@@ -10,6 +10,7 @@
     mod(CodeMirror);
 })(function(CodeMirror) {
   var DEFAULT_BRACKETS = "()[]{}''\"\"";
+  var DEFAULT_TRIPLES = "'\"";
   var DEFAULT_EXPLODE_ON_ENTER = "[]{}";
   var SPACE_CHAR_REGEX = /\s/;
 
@@ -19,13 +20,14 @@
     if (old != CodeMirror.Init && old)
       cm.removeKeyMap("autoCloseBrackets");
     if (!val) return;
-    var pairs = DEFAULT_BRACKETS, explode = DEFAULT_EXPLODE_ON_ENTER;
+    var pairs = DEFAULT_BRACKETS, triples = DEFAULT_TRIPLES, explode = DEFAULT_EXPLODE_ON_ENTER;
     if (typeof val == "string") pairs = val;
     else if (typeof val == "object") {
       if (val.pairs != null) pairs = val.pairs;
+      if (val.triples != null) triples = val.triples;
       if (val.explode != null) explode = val.explode;
     }
-    var map = buildKeymap(pairs);
+    var map = buildKeymap(pairs, triples);
     if (explode) map.Enter = buildExplodeHandler(explode);
     cm.addKeyMap(map);
   });
@@ -52,7 +54,7 @@
     }
   }
 
-  function buildKeymap(pairs) {
+  function buildKeymap(pairs, triples) {
     var map = {
       name : "autoCloseBrackets",
       Backspace: function(cm) {
@@ -85,7 +87,7 @@
               curType = "skipThree";
             else
               curType = "skip";
-          } else if (left == right && cur.ch > 1 &&
+          } else if (left == right && cur.ch > 1 && triples.indexOf(left) >= 0 &&
                      cm.getRange(Pos(cur.line, cur.ch - 2), cur) == left + left &&
                      (cur.ch <= 2 || cm.getRange(Pos(cur.line, cur.ch - 3), Pos(cur.line, cur.ch - 2)) != left)) {
             curType = "addFour";

+ 1 - 1
bower_components/codemirror/addon/edit/closetag.js

@@ -131,7 +131,7 @@
 
   function autoCloseSlash(cm) {
     if (cm.getOption("disableInput")) return CodeMirror.Pass;
-    autoCloseCurrent(cm, true);
+    return autoCloseCurrent(cm, true);
   }
 
   CodeMirror.commands.closeTag = function(cm) { return autoCloseCurrent(cm); };

+ 12 - 4
bower_components/codemirror/addon/fold/foldgutter.js

@@ -94,20 +94,26 @@
   }
 
   function onGutterClick(cm, line, gutter) {
-    var opts = cm.state.foldGutter.options;
+    var state = cm.state.foldGutter;
+    if (!state) return;
+    var opts = state.options;
     if (gutter != opts.gutter) return;
     cm.foldCode(Pos(line, 0), opts.rangeFinder);
   }
 
   function onChange(cm) {
-    var state = cm.state.foldGutter, opts = cm.state.foldGutter.options;
+    var state = cm.state.foldGutter;
+    if (!state) return;
+    var opts = state.options;
     state.from = state.to = 0;
     clearTimeout(state.changeUpdate);
     state.changeUpdate = setTimeout(function() { updateInViewport(cm); }, opts.foldOnChangeTimeSpan || 600);
   }
 
   function onViewportChange(cm) {
-    var state = cm.state.foldGutter, opts = cm.state.foldGutter.options;
+    var state = cm.state.foldGutter;
+    if (!state) return;
+    var opts = state.options;
     clearTimeout(state.changeUpdate);
     state.changeUpdate = setTimeout(function() {
       var vp = cm.getViewport();
@@ -129,7 +135,9 @@
   }
 
   function onFold(cm, from) {
-    var state = cm.state.foldGutter, line = from.line;
+    var state = cm.state.foldGutter;
+    if (!state) return;
+    var line = from.line;
     if (line >= state.from && line < state.to)
       updateFoldInfo(cm, line, line + 1);
   }

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