Browse Source

Merge branch 'master' into dag

Herbert Vojčík 7 years ago
parent
commit
1d94fd95a4

+ 8 - 0
API-CHANGES.txt

@@ -1,3 +1,11 @@
+0.18.0:
+
+* Remove class RethrowErrorHandler (hack for cli before 0.12.3).
+
+- Object >>
+  - throw:
+
+
 0.17.0:
 
 * Remove classes InterfacingObject, PlatformInterface.

+ 14 - 1
CHANGELOG

@@ -1,4 +1,17 @@
-?? October 2016 - Release 0.17.0
+?? October 2016 - Release 0.18.0
+===================================
+
+* Remove some old internal pieces.
+* Allow new syntax for inline JS method body: <inlineJS: '...js code...'>
+  * If used in libraries / reused modules, breaks fw compat.
+  * Old syntax is deprecated, but retained in libraries for some grace period.
+
+May break bw compat because of removed internal pieces.
+
+Commits: https://lolg.it/amber/amber/commits/0.18.0.
+
+
+19 October 2016 - Release 0.17.0
 ===================================
 
 * Remove some deprecated classes and methods.

+ 1 - 1
bower.json

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

+ 3 - 3
external/amber-cli/src/AmberCli.js

@@ -377,7 +377,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "dirname\x0a\x09<return __dirname>",
+source: "dirname\x0a\x09<inlineJS: 'return __dirname'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -553,7 +553,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return (new Buffer(aString, 'base64').toString());
+return (new Buffer(aString, "base64").toString());
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"base64Decode:",{aString:aString},$globals.FileServer)});
@@ -561,7 +561,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "base64Decode: aString\x0a\x09<return (new Buffer(aString, 'base64').toString())>",
+source: "base64Decode: aString\x0a\x09<inlineJS: 'return (new Buffer(aString, \x22base64\x22).toString())'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 2 - 2
external/amber-cli/src/AmberCli.st

@@ -113,7 +113,7 @@ initialize
 !BaseFileManipulator methodsFor: 'private'!
 
 dirname
-	<return __dirname>
+	<inlineJS: 'return __dirname'>
 !
 
 rootDirname
@@ -245,7 +245,7 @@ initialize
 !FileServer methodsFor: 'private'!
 
 base64Decode: aString
-	<return (new Buffer(aString, 'base64').toString())>
+	<inlineJS: 'return (new Buffer(aString, "base64").toString())'>
 !
 
 isAuthenticated: aRequest

File diff suppressed because it is too large
+ 224 - 484
external/amber-cli/support/amber-cli.js


+ 0 - 2
external/amber-dev/lib/amberc.js

@@ -217,8 +217,6 @@ function create_compiler(configuration) {
         .then(function () {
             console.log('Compiler loaded');
 
-            configuration.globals.ErrorHandler._register_(configuration.globals.RethrowErrorHandler._new());
-
             if (0 !== configuration.jsGlobals.length) {
                 var jsGlobalVariables = configuration.core.globalJsVariables;
                 jsGlobalVariables.push.apply(jsGlobalVariables, configuration.jsGlobals);

+ 1 - 1
external/amber-dev/package.json

@@ -1,6 +1,6 @@
 {
   "name": "amber-dev",
-  "version": "0.8.6",
+  "version": "0.8.7",
   "description": "Development goodies for Amber Smalltalk",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "amber",
-  "version": "0.17.0-pre",
+  "version": "0.18.0-pre",
   "description": "An implementation of the Smalltalk language that runs on top of the JS runtime.",
   "homepage": "http://amber-lang.net",
   "keywords": [

+ 2 - 2
src/Compiler-Core.js

@@ -551,7 +551,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "eval: aString\x0a\x09<return eval(aString)>",
+source: "eval: aString\x0a\x09<inlineJS: 'return eval(aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -577,7 +577,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aPackage"],
-source: "eval: aString forPackage: aPackage\x0a\x09<return aPackage && aPackage.innerEval\x0a\x09\x09? aPackage.innerEval(aString)\x0a\x09\x09: eval(aString)>",
+source: "eval: aString forPackage: aPackage\x0a\x09<inlineJS: 'return aPackage && aPackage.innerEval\x0a\x09\x09? aPackage.innerEval(aString)\x0a\x09\x09: eval(aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 3 - 3
src/Compiler-Core.st

@@ -165,13 +165,13 @@ compileNode: aNode forClass: aClass package: aPackage
 !
 
 eval: aString
-	<return eval(aString)>
+	<inlineJS: 'return eval(aString)'>
 !
 
 eval: aString forPackage: aPackage
-	<return aPackage && aPackage.innerEval
+	<inlineJS: 'return aPackage && aPackage.innerEval
 		? aPackage.innerEval(aString)
-		: eval(aString)>
+		: eval(aString)'>
 !
 
 evaluateExpression: aString

+ 9 - 4
src/Compiler-Inlining.js

@@ -592,12 +592,17 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-var $1;
+var $3,$2,$1;
 $1=$recv($recv($recv(anIRReturn)._isInlined())._not())._and_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx2) {
 //>>excludeEnd("ctx");
-return $recv($recv($recv($recv(anIRReturn)._instructions())._single())._isSend())._and_((function(){
+$3=$recv(anIRReturn)._expression();
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+$ctx2.sendIdx["expression"]=1;
+//>>excludeEnd("ctx");
+$2=$recv($3)._isSend();
+return $recv($2)._and_((function(){
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx3) {
 //>>excludeEnd("ctx");
@@ -620,10 +625,10 @@ return $1;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIRReturn"],
-source: "shouldInlineReturn: anIRReturn\x0a\x09^ anIRReturn isInlined not and: [\x0a\x09\x09anIRReturn instructions single isSend and: [\x0a\x09\x09\x09self shouldInlineSend: anIRReturn expression ]]",
+source: "shouldInlineReturn: anIRReturn\x0a\x09^ anIRReturn isInlined not and: [\x0a\x09\x09anIRReturn expression isSend and: [\x0a\x09\x09\x09self shouldInlineSend: anIRReturn expression ]]",
 referencedClasses: [],
 //>>excludeEnd("ide");
-messageSends: ["and:", "not", "isInlined", "isSend", "single", "instructions", "shouldInlineSend:", "expression"]
+messageSends: ["and:", "not", "isInlined", "isSend", "expression", "shouldInlineSend:"]
 }),
 $globals.IRInliner);
 

+ 1 - 1
src/Compiler-Inlining.st

@@ -200,7 +200,7 @@ shouldInlineAssignment: anIRAssignment
 
 shouldInlineReturn: anIRReturn
 	^ anIRReturn isInlined not and: [
-		anIRReturn instructions single isSend and: [
+		anIRReturn expression isSend and: [
 			self shouldInlineSend: anIRReturn expression ]]
 !
 

+ 57 - 33
src/Compiler-Tests.js

@@ -158,7 +158,7 @@ var ast,visitor;
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 var $3,$2,$1;
-ast=self._parse_forClass_("foo <consolee.log(1)>",$globals.Object);
+ast=self._parse_forClass_("foo <inlineJS: 'consolee.log(1)'>",$globals.Object);
 $3=self._astPCNodeVisitor();
 $recv($3)._visit_(ast);
 $2=$recv($3)._currentNode();
@@ -171,7 +171,38 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "testJSStatementNode\x0a\x09| ast visitor |\x0a\x09\x0a\x09ast := self parse: 'foo <consolee.log(1)>' forClass: Object.\x0a\x09self assert: (self astPCNodeVisitor\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) isJSStatementNode",
+source: "testJSStatementNode\x0a\x09| ast visitor |\x0a\x09\x0a\x09ast := self parse: 'foo <inlineJS: ''consolee.log(1)''>' forClass: Object.\x0a\x09self assert: (self astPCNodeVisitor\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) isJSStatementNode",
+referencedClasses: ["Object"],
+//>>excludeEnd("ide");
+messageSends: ["parse:forClass:", "assert:", "isJSStatementNode", "visit:", "astPCNodeVisitor", "currentNode"]
+}),
+$globals.ASTPCNodeVisitorTest);
+
+$core.addMethod(
+$core.method({
+selector: "testLegacyJSStatementNode",
+protocol: 'tests',
+fn: function (){
+var self=this;
+var ast,visitor;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+var $3,$2,$1;
+ast=self._parse_forClass_("foo <consolee.log(1)>",$globals.Object);
+$3=self._astPCNodeVisitor();
+$recv($3)._visit_(ast);
+$2=$recv($3)._currentNode();
+$1=$recv($2)._isJSStatementNode();
+self._assert_($1);
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"testLegacyJSStatementNode",{ast:ast,visitor:visitor},$globals.ASTPCNodeVisitorTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testLegacyJSStatementNode\x0a\x09| ast visitor |\x0a\x09\x0a\x09ast := self parse: 'foo <consolee.log(1)>' forClass: Object.\x0a\x09self assert: (self astPCNodeVisitor\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) isJSStatementNode",
 referencedClasses: ["Object"],
 //>>excludeEnd("ide");
 messageSends: ["parse:forClass:", "assert:", "isJSStatementNode", "visit:", "astPCNodeVisitor", "currentNode"]
@@ -327,37 +358,6 @@ messageSends: ["parse:forClass:", "assert:", "isNil", "visit:", "astPCNodeVisito
 }),
 $globals.ASTPCNodeVisitorTest);
 
-$core.addMethod(
-$core.method({
-selector: "testPC",
-protocol: 'tests',
-fn: function (){
-var self=this;
-var ast,visitor;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-var $3,$2,$1;
-ast=self._parse_forClass_("foo <console.log(1)>",$globals.Object);
-$3=self._astPCNodeVisitor();
-$recv($3)._visit_(ast);
-$2=$recv($3)._currentNode();
-$1=$recv($2)._isJSStatementNode();
-self._assert_($1);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"testPC",{ast:ast,visitor:visitor},$globals.ASTPCNodeVisitorTest)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "testPC\x0a\x09| ast visitor |\x0a\x09\x0a\x09ast := self parse: 'foo <console.log(1)>' forClass: Object.\x0a\x09self assert: (self astPCNodeVisitor\x0a\x09\x09visit: ast;\x0a\x09\x09currentNode) isJSStatementNode",
-referencedClasses: ["Object"],
-//>>excludeEnd("ide");
-messageSends: ["parse:forClass:", "assert:", "isJSStatementNode", "visit:", "astPCNodeVisitor", "currentNode"]
-}),
-$globals.ASTPCNodeVisitorTest);
-
 
 
 $core.addClass('ASTPositionTest', $globals.ASTParsingTest, [], 'Compiler-Tests');
@@ -1413,6 +1413,30 @@ messageSends: ["should:return:", "at:", "globals"]
 }),
 $globals.CodeGeneratorTest);
 
+$core.addMethod(
+$core.method({
+selector: "testPragmaJSStatement",
+protocol: 'tests',
+fn: function (){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+self._should_return_("foo < inlineJS: 'return 2+3' >",(5));
+return self;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"testPragmaJSStatement",{},$globals.CodeGeneratorTest)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testPragmaJSStatement\x0a\x09self should: 'foo < inlineJS: ''return 2+3'' >' return: 5",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["should:return:"]
+}),
+$globals.CodeGeneratorTest);
+
 $core.addMethod(
 $core.method({
 selector: "testRootSuperSend",

+ 13 - 9
src/Compiler-Tests.st

@@ -46,6 +46,15 @@ astPCNodeVisitorForSelector: aString
 testJSStatementNode
 	| ast visitor |
 	
+	ast := self parse: 'foo <inlineJS: ''consolee.log(1)''>' forClass: Object.
+	self assert: (self astPCNodeVisitor
+		visit: ast;
+		currentNode) isJSStatementNode
+!
+
+testLegacyJSStatementNode
+	| ast visitor |
+	
 	ast := self parse: 'foo <consolee.log(1)>' forClass: Object.
 	self assert: (self astPCNodeVisitor
 		visit: ast;
@@ -91,15 +100,6 @@ testNoMessageSend
 	self assert: (self astPCNodeVisitor
 		visit: ast;
 		currentNode) isNil
-!
-
-testPC
-	| ast visitor |
-	
-	ast := self parse: 'foo <console.log(1)>' forClass: Object.
-	self assert: (self astPCNodeVisitor
-		visit: ast;
-		currentNode) isJSStatementNode
 ! !
 
 ASTParsingTest subclass: #ASTPositionTest
@@ -369,6 +369,10 @@ testPascalCaseGlobal
 	self should: 'foo ^NonExistent' return: nil
 !
 
+testPragmaJSStatement
+	self should: 'foo < inlineJS: ''return 2+3'' >' return: 5
+!
+
 testRootSuperSend
 	self 
 		should: 'foo ^ super class' 

+ 19 - 19
src/Kernel-Classes.js

@@ -236,7 +236,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "allSubclassesDo: aBlock\x0a\x09\x22Evaluate the argument, aBlock, for each of the receiver's subclasses.\x22\x0a\x0a<$core.traverseClassTree(self, function(subclass) {\x0a\x09if (subclass !== self) aBlock._value_(subclass);\x0a})>",
+source: "allSubclassesDo: aBlock\x0a\x09\x22Evaluate the argument, aBlock, for each of the receiver's subclasses.\x22\x0a\x0a<inlineJS: '$core.traverseClassTree(self, function(subclass) {\x0a\x09if (subclass !== self) aBlock._value_(subclass);\x0a})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -299,7 +299,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aMethod"],
-source: "basicAddCompiledMethod: aMethod\x0a\x09<$core.addMethod(aMethod, self)>",
+source: "basicAddCompiledMethod: aMethod\x0a\x09<inlineJS: '$core.addMethod(aMethod, self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -323,7 +323,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "basicNew\x0a\x09<return new self.fn()>",
+source: "basicNew\x0a\x09<inlineJS: 'return new self.fn()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -347,7 +347,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aMethod"],
-source: "basicRemoveCompiledMethod: aMethod\x0a\x09<$core.removeMethod(aMethod,self)>",
+source: "basicRemoveCompiledMethod: aMethod\x0a\x09<inlineJS: '$core.removeMethod(aMethod,self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -616,7 +616,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "instanceVariableNames\x0a\x09<return self.iVarNames>",
+source: "instanceVariableNames\x0a\x09<inlineJS: 'return self.iVarNames'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -658,7 +658,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "javascriptConstructor\x0a\x09\x22Answer the JS constructor used to instantiate. See boot.js\x22\x0a\x09\x0a\x09<return self.fn>",
+source: "javascriptConstructor\x0a\x09\x22Answer the JS constructor used to instantiate. See boot.js\x22\x0a\x09\x0a\x09<inlineJS: 'return self.fn'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -682,7 +682,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aJavaScriptFunction"],
-source: "javascriptConstructor: aJavaScriptFunction\x0a\x09\x22Set the JS constructor used to instantiate.\x0a\x09See the JS counter-part in boot.js `$core.setClassConstructor'\x22\x0a\x09\x0a\x09<$core.setClassConstructor(self, aJavaScriptFunction);>",
+source: "javascriptConstructor: aJavaScriptFunction\x0a\x09\x22Set the JS constructor used to instantiate.\x0a\x09See the JS counter-part in boot.js `$core.setClassConstructor'\x22\x0a\x09\x0a\x09<inlineJS: '$core.setClassConstructor(self, aJavaScriptFunction);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -788,7 +788,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "methodDictionary\x0a\x09<var dict = $globals.HashedCollection._new();\x0a\x09var methods = self.methods;\x0a\x09Object.keys(methods).forEach(function(i) {\x0a\x09\x09if(methods[i].selector) {\x0a\x09\x09\x09dict._at_put_(methods[i].selector, methods[i]);\x0a\x09\x09}\x0a\x09});\x0a\x09return dict>",
+source: "methodDictionary\x0a\x09<inlineJS: 'var dict = $globals.HashedCollection._new();\x0a\x09var methods = self.methods;\x0a\x09Object.keys(methods).forEach(function(i) {\x0a\x09\x09if(methods[i].selector) {\x0a\x09\x09\x09dict._at_put_(methods[i].selector, methods[i]);\x0a\x09\x09}\x0a\x09});\x0a\x09return dict'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -954,7 +954,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "name\x0a\x09<return self.className || nil>",
+source: "name\x0a\x09<inlineJS: 'return self.className || nil'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1207,7 +1207,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "prototype\x0a\x09<return self.fn.prototype>",
+source: "prototype\x0a\x09<inlineJS: 'return self.fn.prototype'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1372,7 +1372,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "superclass\x0a\x09<return self.superclass>",
+source: "superclass\x0a\x09<inlineJS: 'return self.superclass'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1905,7 +1905,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "subclasses\x0a\x09<return self.subclasses._copy()>",
+source: "subclasses\x0a\x09<inlineJS: 'return self.subclasses._copy()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2068,7 +2068,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "instanceClass\x0a\x09<return self.instanceClass>",
+source: "instanceClass\x0a\x09<inlineJS: 'return self.instanceClass'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2185,7 +2185,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "subclasses\x0a\x09<return $core.metaSubclasses(self)>",
+source: "subclasses\x0a\x09<inlineJS: 'return $core.metaSubclasses(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2295,7 +2295,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aString", "aCollection", "packageName"],
-source: "basicAddSubclassOf: aClass named: aString instanceVariableNames: aCollection package: packageName\x0a\x09<\x0a\x09\x09return $core.addClass(aString, aClass, aCollection, packageName);\x0a\x09>",
+source: "basicAddSubclassOf: aClass named: aString instanceVariableNames: aCollection package: packageName\x0a\x09<inlineJS: '\x0a\x09\x09return $core.addClass(aString, aClass, aCollection, packageName);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2372,7 +2372,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass"],
-source: "basicRemoveClass: aClass\x0a\x09<$core.removeClass(aClass)>",
+source: "basicRemoveClass: aClass\x0a\x09<inlineJS: '$core.removeClass(aClass)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2400,7 +2400,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aString"],
-source: "basicRenameClass: aClass to: aString\x0a\x09<\x0a\x09\x09$globals[aString] = aClass;\x0a\x09\x09delete $globals[aClass.className];\x0a\x09\x09aClass.className = aString;\x0a\x09>",
+source: "basicRenameClass: aClass to: aString\x0a\x09<inlineJS: '\x0a\x09\x09$globals[aString] = aClass;\x0a\x09\x09delete $globals[aClass.className];\x0a\x09\x09aClass.className = aString;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2428,7 +2428,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "anotherClass"],
-source: "basicSwapClassNames: aClass with: anotherClass\x0a\x09<\x0a\x09\x09var tmp = aClass.className;\x0a\x09\x09aClass.className = anotherClass.className;\x0a\x09\x09anotherClass.className = tmp;\x0a\x09>",
+source: "basicSwapClassNames: aClass with: anotherClass\x0a\x09<inlineJS: '\x0a\x09\x09var tmp = aClass.className;\x0a\x09\x09aClass.className = anotherClass.className;\x0a\x09\x09anotherClass.className = tmp;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2756,7 +2756,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aString"],
-source: "rawRenameClass: aClass to: aString\x0a\x09<\x0a\x09\x09$globals[aString] = aClass;\x0a\x09>",
+source: "rawRenameClass: aClass to: aString\x0a\x09<inlineJS: '\x0a\x09\x09$globals[aString] = aClass;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 25 - 25
src/Kernel-Classes.st

@@ -64,20 +64,20 @@ definition
 !
 
 instanceVariableNames
-	<return self.iVarNames>
+	<inlineJS: 'return self.iVarNames'>
 !
 
 javascriptConstructor
 	"Answer the JS constructor used to instantiate. See boot.js"
 	
-	<return self.fn>
+	<inlineJS: 'return self.fn'>
 !
 
 javascriptConstructor: aJavaScriptFunction
 	"Set the JS constructor used to instantiate.
 	See the JS counter-part in boot.js `$core.setClassConstructor'"
 	
-	<$core.setClassConstructor(self, aJavaScriptFunction);>
+	<inlineJS: '$core.setClassConstructor(self, aJavaScriptFunction);'>
 !
 
 lookupSelector: selector
@@ -101,14 +101,14 @@ methodAt: aString
 !
 
 methodDictionary
-	<var dict = $globals.HashedCollection._new();
+	<inlineJS: 'var dict = $globals.HashedCollection._new();
 	var methods = self.methods;
 	Object.keys(methods).forEach(function(i) {
 		if(methods[i].selector) {
 			dict._at_put_(methods[i].selector, methods[i]);
 		}
 	});
-	return dict>
+	return dict'>
 !
 
 methodTemplate
@@ -132,7 +132,7 @@ methodsInProtocol: aString
 !
 
 name
-	<return self.className || nil>
+	<inlineJS: 'return self.className || nil'>
 !
 
 organization
@@ -173,7 +173,7 @@ protocols
 !
 
 prototype
-	<return self.fn.prototype>
+	<inlineJS: 'return self.fn.prototype'>
 !
 
 removeProtocolIfEmpty: aString
@@ -191,7 +191,7 @@ subclasses
 !
 
 superclass
-	<return self.superclass>
+	<inlineJS: 'return self.superclass'>
 !
 
 theMetaClass
@@ -266,9 +266,9 @@ removeCompiledMethod: aMethod
 allSubclassesDo: aBlock
 	"Evaluate the argument, aBlock, for each of the receiver's subclasses."
 
-<$core.traverseClassTree(self, function(subclass) {
+<inlineJS: '$core.traverseClassTree(self, function(subclass) {
 	if (subclass !!== self) aBlock._value_(subclass);
-})>
+})'>
 !
 
 protocolsDo: aBlock
@@ -287,7 +287,7 @@ protocolsDo: aBlock
 !Behavior methodsFor: 'instance creation'!
 
 basicNew
-	<return new self.fn()>
+	<inlineJS: 'return new self.fn()'>
 !
 
 new
@@ -297,11 +297,11 @@ new
 !Behavior methodsFor: 'private'!
 
 basicAddCompiledMethod: aMethod
-	<$core.addMethod(aMethod, self)>
+	<inlineJS: '$core.addMethod(aMethod, self)'>
 !
 
 basicRemoveCompiledMethod: aMethod
-	<$core.removeMethod(aMethod,self)>
+	<inlineJS: '$core.removeMethod(aMethod,self)'>
 ! !
 
 !Behavior methodsFor: 'testing'!
@@ -398,7 +398,7 @@ rename: aString
 !
 
 subclasses
-	<return self.subclasses._copy()>
+	<inlineJS: 'return self.subclasses._copy()'>
 !
 
 theMetaClass
@@ -477,7 +477,7 @@ definition
 !
 
 instanceClass
-	<return self.instanceClass>
+	<inlineJS: 'return self.instanceClass'>
 !
 
 instanceVariableNames: aCollection
@@ -490,7 +490,7 @@ package
 !
 
 subclasses
-	<return $core.metaSubclasses(self)>
+	<inlineJS: 'return $core.metaSubclasses(self)'>
 !
 
 theMetaClass
@@ -693,9 +693,9 @@ installMethod: aCompiledMethod forClass: aBehavior protocol: aString
 !ClassBuilder methodsFor: 'private'!
 
 basicAddSubclassOf: aClass named: aString instanceVariableNames: aCollection package: packageName
-	<
+	<inlineJS: '
 		return $core.addClass(aString, aClass, aCollection, packageName);
-	>
+	'>
 !
 
 basicClass: aClass instanceVariableNames: aString
@@ -709,29 +709,29 @@ basicClass: aClass instanceVariables: aCollection
 !
 
 basicRemoveClass: aClass
-	<$core.removeClass(aClass)>
+	<inlineJS: '$core.removeClass(aClass)'>
 !
 
 basicRenameClass: aClass to: aString
-	<
+	<inlineJS: '
 		$globals[aString] = aClass;
 		delete $globals[aClass.className];
 		aClass.className = aString;
-	>
+	'>
 !
 
 basicSwapClassNames: aClass with: anotherClass
-	<
+	<inlineJS: '
 		var tmp = aClass.className;
 		aClass.className = anotherClass.className;
 		anotherClass.className = tmp;
-	>
+	'>
 !
 
 rawRenameClass: aClass to: aString
-	<
+	<inlineJS: '
 		$globals[aString] = aClass;
-	>
+	'>
 ! !
 
 !ClassBuilder methodsFor: 'public'!

+ 101 - 101
src/Kernel-Collections.js

@@ -234,7 +234,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "bucketOfElement: anObject\x0a\x09<\x0a\x09\x09var hash = self['@hashBlock'](anObject);\x0a\x09\x09if (!hash) return null;\x0a\x09\x09var buckets = self['@buckets'],\x0a\x09\x09\x09bucket = buckets[hash];\x0a\x09\x09if (!bucket) { bucket = buckets[hash] = self._newBucket(); }\x0a\x09\x09return bucket;\x0a\x09>",
+source: "bucketOfElement: anObject\x0a\x09<inlineJS: '\x0a\x09\x09var hash = self[''@hashBlock''](anObject);\x0a\x09\x09if (!hash) return null;\x0a\x09\x09var buckets = self[''@buckets''],\x0a\x09\x09\x09bucket = buckets[hash];\x0a\x09\x09if (!bucket) { bucket = buckets[hash] = self._newBucket(); }\x0a\x09\x09return bucket;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -262,7 +262,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "do: aBlock\x0a\x09<\x0a\x09\x09var buckets = self['@buckets'];\x0a\x09\x09var keys = Object.keys(buckets);\x0a\x09\x09for (var i = 0; i < keys.length; ++i) { buckets[keys[i]]._do_(aBlock); }\x0a\x09>",
+source: "do: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09var buckets = self[''@buckets''];\x0a\x09\x09var keys = Object.keys(buckets);\x0a\x09\x09for (var i = 0; i < keys.length; ++i) { buckets[keys[i]]._do_(aBlock); }\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -361,7 +361,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "removeAll\x0a\x09<self['@buckets'] = Object.create(null);>",
+source: "removeAll\x0a\x09<inlineJS: 'self[''@buckets''] = Object.create(null);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3205,7 +3205,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aKey", "aBlock"],
-source: "at: aKey ifAbsent: aBlock\x0a\x09<\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09return index >>=0 ? self['@values'][index] : aBlock._value();\x0a\x09>",
+source: "at: aKey ifAbsent: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09return index >=0 ? self[''@values''][index] : aBlock._value();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3238,7 +3238,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aKey", "aValue"],
-source: "at: aKey put: aValue\x0a\x09<\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09if(index === -1) {\x0a\x09\x09\x09var keys = self['@keys'];\x0a\x09\x09\x09index = keys.length;\x0a\x09\x09\x09keys.push(aKey);\x0a\x09\x09}\x0a\x0a\x09\x09return self['@values'][index] = aValue;\x0a\x09>",
+source: "at: aKey put: aValue\x0a\x09<inlineJS: '\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09if(index === -1) {\x0a\x09\x09\x09var keys = self[''@keys''];\x0a\x09\x09\x09index = keys.length;\x0a\x09\x09\x09keys.push(aKey);\x0a\x09\x09}\x0a\x0a\x09\x09return self[''@values''][index] = aValue;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3254,7 +3254,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
- return self._positionOfKey_(aKey) >= 0; ;
+return self._positionOfKey_(aKey) >= 0;;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"includesKey:",{aKey:aKey},$globals.Dictionary)});
@@ -3262,7 +3262,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aKey"],
-source: "includesKey: aKey\x0a\x09< return self._positionOfKey_(aKey) >>= 0; >",
+source: "includesKey: aKey\x0a\x09<inlineJS: 'return self._positionOfKey_(aKey) >= 0;'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3428,7 +3428,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "positionOfKey: anObject\x0a\x09<\x0a\x09\x09var keys = self['@keys'];\x0a\x09\x09for(var i=0;i<keys.length;i++){\x0a\x09\x09\x09if(keys[i].__eq(anObject)) { return i;}\x0a\x09\x09}\x0a\x09\x09return -1;\x0a\x09>",
+source: "positionOfKey: anObject\x0a\x09<inlineJS: '\x0a\x09\x09var keys = self[''@keys''];\x0a\x09\x09for(var i=0;i<keys.length;i++){\x0a\x09\x09\x09if(keys[i].__eq(anObject)) { return i;}\x0a\x09\x09}\x0a\x09\x09return -1;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3493,7 +3493,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aKey", "aBlock"],
-source: "removeKey: aKey ifAbsent: aBlock\x0a\x09<\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09if(index === -1) {\x0a\x09\x09\x09return aBlock._value()\x0a\x09\x09} else {\x0a\x09\x09\x09var keys = self['@keys'], values = self['@values'];\x0a\x09\x09\x09var value = values[index], l = keys.length;\x0a\x09\x09\x09keys[index] = keys[l-1];\x0a\x09\x09\x09keys.pop();\x0a\x09\x09\x09values[index] = values[l-1];\x0a\x09\x09\x09values.pop();\x0a\x09\x09\x09return value;\x0a\x09\x09}\x0a\x09>",
+source: "removeKey: aKey ifAbsent: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09var index = self._positionOfKey_(aKey);\x0a\x09\x09if(index === -1) {\x0a\x09\x09\x09return aBlock._value()\x0a\x09\x09} else {\x0a\x09\x09\x09var keys = self[''@keys''], values = self[''@values''];\x0a\x09\x09\x09var value = values[index], l = keys.length;\x0a\x09\x09\x09keys[index] = keys[l-1];\x0a\x09\x09\x09keys.pop();\x0a\x09\x09\x09values[index] = values[l-1];\x0a\x09\x09\x09values.pop();\x0a\x09\x09\x09return value;\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3616,7 +3616,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aKey"],
-source: "includesKey: aKey\x0a\x09<return self.hasOwnProperty(aKey)>",
+source: "includesKey: aKey\x0a\x09<inlineJS: 'return self.hasOwnProperty(aKey)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3640,7 +3640,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "keys\x0a\x09<return Object.keys(self)>",
+source: "keys\x0a\x09<inlineJS: 'return Object.keys(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3732,7 +3732,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "values\x0a\x09<\x0a\x09\x09return self._keys().map(function(key){\x0a\x09\x09\x09return self._at_(key);\x0a\x09\x09});\x0a\x09>",
+source: "values\x0a\x09<inlineJS: '\x0a\x09\x09return self._keys().map(function(key){\x0a\x09\x09\x09return self._at_(key);\x0a\x09\x09});\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4035,7 +4035,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock", "anotherBlock"],
-source: "detect: aBlock ifNone: anotherBlock\x0a\x09<\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i = 0; i < self.length; i++)\x0a\x09\x09\x09if(aBlock._value_(self[i]))\x0a\x09\x09\x09\x09return self[i];\x0a\x09\x09return anotherBlock._value();\x0a\x09>",
+source: "detect: aBlock ifNone: anotherBlock\x0a\x09<inlineJS: '\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i = 0; i < self.length; i++)\x0a\x09\x09\x09if(aBlock._value_(self[i]))\x0a\x09\x09\x09\x09return self[i];\x0a\x09\x09return anotherBlock._value();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4064,7 +4064,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "do: aBlock\x0a\x09<\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i=0; i < self.length; i++) {\x0a\x09\x09\x09aBlock._value_(self[i]);\x0a\x09\x09}\x0a\x09>",
+source: "do: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i=0; i < self.length; i++) {\x0a\x09\x09\x09aBlock._value_(self[i]);\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4230,7 +4230,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject", "aBlock"],
-source: "indexOf: anObject ifAbsent: aBlock\x0a\x09<\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i=0; i < self.length; i++) {\x0a\x09\x09\x09if($recv(self[i]).__eq(anObject)) {return i+1}\x0a\x09\x09};\x0a\x09\x09return aBlock._value();\x0a\x09>",
+source: "indexOf: anObject ifAbsent: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i=0; i < self.length; i++) {\x0a\x09\x09\x09if($recv(self[i]).__eq(anObject)) {return i+1}\x0a\x09\x09};\x0a\x09\x09return aBlock._value();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4286,7 +4286,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject", "start", "aBlock"],
-source: "indexOf: anObject startingAt: start ifAbsent: aBlock\x0a\x09<\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i=start - 1; i < self.length; i++){\x0a\x09\x09\x09if($recv(self[i]).__eq(anObject)) {return i+1}\x0a\x09\x09}\x0a\x09\x09return aBlock._value();\x0a\x09>",
+source: "indexOf: anObject startingAt: start ifAbsent: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i=start - 1; i < self.length; i++){\x0a\x09\x09\x09if($recv(self[i]).__eq(anObject)) {return i+1}\x0a\x09\x09}\x0a\x09\x09return aBlock._value();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4514,7 +4514,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "single\x0a<\x0a\x09if (self.length == 0) throw new Error(\x22Collection is empty\x22);\x0a\x09if (self.length >> 1) throw new Error(\x22Collection holds more than one element.\x22);\x0a\x09return self[0];\x0a>",
+source: "single\x0a<inlineJS: '\x0a\x09if (self.length == 0) throw new Error(\x22Collection is empty\x22);\x0a\x09if (self.length > 1) throw new Error(\x22Collection holds more than one element.\x22);\x0a\x09return self[0];\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4613,7 +4613,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anotherCollection", "aBlock"],
-source: "with: anotherCollection do: aBlock\x0a\x09<\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09anotherCollection = anotherCollection._numericallyIndexable();\x0a\x09\x09for(var i=0; i<self.length; i++) {\x0a\x09\x09\x09aBlock._value_value_(self[i], anotherCollection[i]);\x0a\x09\x09}\x0a\x09>",
+source: "with: anotherCollection do: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09anotherCollection = anotherCollection._numericallyIndexable();\x0a\x09\x09for(var i=0; i<self.length; i++) {\x0a\x09\x09\x09aBlock._value_value_(self[i], anotherCollection[i]);\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4642,7 +4642,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "withIndexDo: aBlock\x0a\x09<\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i=0; i < self.length; i++) {\x0a\x09\x09\x09aBlock._value_value_(self[i], i+1);\x0a\x09\x09}\x0a\x09>",
+source: "withIndexDo: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09self = self._numericallyIndexable();\x0a\x09\x09for(var i=0; i < self.length; i++) {\x0a\x09\x09\x09aBlock._value_value_(self[i], i+1);\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4739,7 +4739,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "add: anObject\x0a\x09<self.push(anObject); return anObject;>",
+source: "add: anObject\x0a\x09<inlineJS: 'self.push(anObject); return anObject;'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4766,7 +4766,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aCollection"],
-source: "addAll: aCollection\x0a<\x0a\x09if (Array.isArray(aCollection) && aCollection.length < 65000) self.push.apply(self, aCollection);\x0a\x09else $globals.Array.superclass.fn.prototype._addAll_.call(self, aCollection);\x0a\x09return aCollection;\x0a>",
+source: "addAll: aCollection\x0a<inlineJS: '\x0a\x09if (Array.isArray(aCollection) && aCollection.length < 65000) self.push.apply(self, aCollection);\x0a\x09else $globals.Array.superclass.fn.prototype._addAll_.call(self, aCollection);\x0a\x09return aCollection;\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4790,7 +4790,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "addFirst: anObject\x0a\x09<self.unshift(anObject); return anObject;>",
+source: "addFirst: anObject\x0a\x09<inlineJS: 'self.unshift(anObject); return anObject;'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4854,7 +4854,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIndex", "aBlock"],
-source: "at: anIndex ifAbsent: aBlock\x0a\x09<\x0a\x09\x09return anIndex >>= 1 && anIndex <= self.length\x0a\x09\x09\x09? self[anIndex - 1]\x0a\x09\x09\x09: aBlock._value()\x0a\x09>",
+source: "at: anIndex ifAbsent: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09return anIndex >= 1 && anIndex <= self.length\x0a\x09\x09\x09? self[anIndex - 1]\x0a\x09\x09\x09: aBlock._value()\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4882,7 +4882,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIndex", "aBlock", "anotherBlock"],
-source: "at: anIndex ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09<\x0a\x09\x09return anIndex >>= 1 && anIndex <= self.length\x0a\x09\x09\x09? aBlock._value_(self[anIndex - 1])\x0a\x09\x09\x09: anotherBlock._value()\x0a\x09>",
+source: "at: anIndex ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09<inlineJS: '\x0a\x09\x09return anIndex >= 1 && anIndex <= self.length\x0a\x09\x09\x09? aBlock._value_(self[anIndex - 1])\x0a\x09\x09\x09: anotherBlock._value()\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4906,7 +4906,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIndex", "anObject"],
-source: "at: anIndex put: anObject\x0a\x09<return self[anIndex - 1] = anObject>",
+source: "at: anIndex put: anObject\x0a\x09<inlineJS: 'return self[anIndex - 1] = anObject'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4930,7 +4930,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "collect: aBlock\x0a\x09\x22Optimized version\x22\x0a\x09\x0a\x09<return self.map(function(each) {return aBlock._value_(each)})>",
+source: "collect: aBlock\x0a\x09\x22Optimized version\x22\x0a\x09\x0a\x09<inlineJS: 'return self.map(function(each) {return aBlock._value_(each)})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4961,7 +4961,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIndex", "anotherIndex"],
-source: "copyFrom: anIndex to: anotherIndex\x0a<\x0a\x09if (anIndex >>= 1 && anotherIndex <= self.length) {\x0a\x09\x09return self.slice(anIndex - 1, anotherIndex);\x0a\x09} else {\x0a\x09\x09self._at_(anIndex);\x0a\x09\x09self._at_(self.length + 1);\x0a\x09\x09throw new Error(\x22Incorrect indexes in #copyFrom:to: not caught by #at:\x22);\x0a\x09}\x0a>",
+source: "copyFrom: anIndex to: anotherIndex\x0a<inlineJS: '\x0a\x09if (anIndex >= 1 && anotherIndex <= self.length) {\x0a\x09\x09return self.slice(anIndex - 1, anotherIndex);\x0a\x09} else {\x0a\x09\x09self._at_(anIndex);\x0a\x09\x09self._at_(self.length + 1);\x0a\x09\x09throw new Error(\x22Incorrect indexes in #copyFrom:to: not caught by #at:\x22);\x0a\x09}\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4985,7 +4985,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "join: aString\x0a\x09<return self.join(aString)>",
+source: "join: aString\x0a\x09<inlineJS: 'return self.join(aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5121,7 +5121,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "removeAll\x0a\x09<self.length = 0>",
+source: "removeAll\x0a\x09<inlineJS: 'self.length = 0'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5145,7 +5145,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber", "anotherNumber"],
-source: "removeFrom: aNumber to: anotherNumber\x0a\x09<self.splice(aNumber -1, anotherNumber - aNumber + 1)>",
+source: "removeFrom: aNumber to: anotherNumber\x0a\x09<inlineJS: 'self.splice(aNumber -1, anotherNumber - aNumber + 1)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5169,7 +5169,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anInteger"],
-source: "removeIndex: anInteger\x0a\x09<self.splice(anInteger - 1, 1)>",
+source: "removeIndex: anInteger\x0a\x09<inlineJS: 'self.splice(anInteger - 1, 1)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5193,7 +5193,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "removeLast\x0a\x09<return self.pop();>",
+source: "removeLast\x0a\x09<inlineJS: 'return self.pop();'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5217,7 +5217,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "reversed\x0a\x09<return self.slice().reverse()>",
+source: "reversed\x0a\x09<inlineJS: 'return self.slice().reverse()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5241,7 +5241,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "select: aBlock\x0a\x09\x22Optimized version\x22\x0a\x09\x0a\x09<return self.filter(function(each) {return aBlock._value_(each)})>",
+source: "select: aBlock\x0a\x09\x22Optimized version\x22\x0a\x09\x0a\x09<inlineJS: 'return self.filter(function(each) {return aBlock._value_(each)})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5265,7 +5265,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "shallowCopy\x0a\x09<return self.slice()>",
+source: "shallowCopy\x0a\x09<inlineJS: 'return self.slice()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5289,7 +5289,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "size\x0a\x09<return self.length>",
+source: "size\x0a\x09<inlineJS: 'return self.length'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5348,7 +5348,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "sort: aBlock\x0a\x09<\x0a\x09\x09return self.sort(function(a, b) {\x0a\x09\x09\x09if(aBlock._value_value_(a,b)) {return -1} else {return 1}\x0a\x09\x09})\x0a\x09>",
+source: "sort: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09return self.sort(function(a, b) {\x0a\x09\x09\x09if(aBlock._value_value_(a,b)) {return -1} else {return 1}\x0a\x09\x09})\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5419,7 +5419,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anInteger"],
-source: "new: anInteger\x0a\x09<return new Array(anInteger)>",
+source: "new: anInteger\x0a\x09<inlineJS: 'return new Array(anInteger)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5892,7 +5892,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: ", aString\x0a\x09<return String(self) + aString>",
+source: ", aString\x0a\x09<inlineJS: 'return String(self) + aString'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5916,7 +5916,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "< aString\x0a\x09<return String(self) < aString._asString()>",
+source: "< aString\x0a\x09<inlineJS: 'return String(self) < aString._asString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5940,7 +5940,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "<= aString\x0a\x09<return String(self) <= aString._asString()>",
+source: "<= aString\x0a\x09<inlineJS: 'return String(self) <= aString._asString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5964,7 +5964,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "= aString\x0a<return aString != null && String(self) === (typeof aString === \x22string\x22 ? aString : aString.valueOf())>",
+source: "= aString\x0a<inlineJS:\x0a\x09'return aString != null && String(self) === (typeof aString === \x22string\x22 ? aString : aString.valueOf())'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5991,7 +5991,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "== aString\x0a<\x0a\x09if (typeof aString === \x22string\x22) return String(self) === aString;\x0a\x09else if (aString != null && typeof aString === \x22object\x22) return String(self) === aString.valueOf();\x0a\x09else return false;\x0a>",
+source: "== aString\x0a<inlineJS: '\x0a\x09if (typeof aString === \x22string\x22) return String(self) === aString;\x0a\x09else if (aString != null && typeof aString === \x22object\x22) return String(self) === aString.valueOf();\x0a\x09else return false;\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6015,7 +6015,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "> aString\x0a\x09<return String(self) >> aString._asString()>",
+source: "> aString\x0a\x09<inlineJS: 'return String(self) > aString._asString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6039,7 +6039,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: ">= aString\x0a\x09<return String(self) >>= aString._asString()>",
+source: ">= aString\x0a\x09<inlineJS: 'return String(self) >= aString._asString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6081,7 +6081,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asJavaScriptMethodName\x0a\x09<return $core.st2js(self)>",
+source: "asJavaScriptMethodName\x0a\x09<inlineJS: 'return $core.st2js(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6110,7 +6110,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asJavascript\x0a\x09<\x0a\x09\x09if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)\x0a\x09\x09\x09return \x22\x5c\x22\x22 + self.replace(/[\x5cx00-\x5cx1f\x22\x5c\x5c\x5cx7f-\x5cx9f]/g, function(ch){var c=ch.charCodeAt(0);return \x22\x5c\x5cx\x22+(\x220\x22+c.toString(16)).slice(-2)}) + \x22\x5c\x22\x22;\x0a\x09\x09else\x0a\x09\x09\x09return \x22\x5c\x22\x22 + self + \x22\x5c\x22\x22;\x0a\x09>",
+source: "asJavascript\x0a\x09<inlineJS: '\x0a\x09\x09if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)\x0a\x09\x09\x09return \x22\x5c\x22\x22 + self.replace(/[\x5cx00-\x5cx1f\x22\x5c\x5c\x5cx7f-\x5cx9f]/g, function(ch){var c=ch.charCodeAt(0);return \x22\x5c\x5cx\x22+(\x220\x22+c.toString(16)).slice(-2)}) + \x22\x5c\x22\x22;\x0a\x09\x09else\x0a\x09\x09\x09return \x22\x5c\x22\x22 + self + \x22\x5c\x22\x22;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6134,7 +6134,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asLowercase\x0a\x09<return self.toLowerCase()>",
+source: "asLowercase\x0a\x09<inlineJS: 'return self.toLowerCase()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6186,7 +6186,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asNumber\x0a\x09<return Number(self)>",
+source: "asNumber\x0a\x09<inlineJS: 'return Number(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6269,7 +6269,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asUppercase\x0a\x09<return self.toUpperCase()>",
+source: "asUppercase\x0a\x09<inlineJS: 'return self.toUpperCase()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6293,7 +6293,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asciiValue\x0a\x09<return self.charCodeAt(0);>",
+source: "asciiValue\x0a\x09<inlineJS: 'return self.charCodeAt(0);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6317,7 +6317,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIndex", "aBlock"],
-source: "at: anIndex ifAbsent: aBlock\x0a\x09<return String(self)[anIndex - 1] || aBlock._value()>",
+source: "at: anIndex ifAbsent: aBlock\x0a\x09<inlineJS: 'return String(self)[anIndex - 1] || aBlock._value()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6344,7 +6344,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIndex", "aBlock", "anotherBlock"],
-source: "at: anIndex ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09<\x0a\x09\x09var result = String(self)[anIndex - 1];\x0a\x09\x09return result ? aBlock._value_(result) : anotherBlock._value();\x0a\x09>",
+source: "at: anIndex ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09<inlineJS: '\x0a\x09\x09var result = String(self)[anIndex - 1];\x0a\x09\x09return result ? aBlock._value_(result) : anotherBlock._value();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6399,7 +6399,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anInteger"],
-source: "charCodeAt: anInteger\x0a\x09<return self.charCodeAt(anInteger - 1)>",
+source: "charCodeAt: anInteger\x0a\x09<inlineJS: 'return self.charCodeAt(anInteger - 1)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6423,7 +6423,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anIndex", "anotherIndex"],
-source: "copyFrom: anIndex to: anotherIndex\x0a\x09<return self.substring(anIndex - 1, anotherIndex)>",
+source: "copyFrom: anIndex to: anotherIndex\x0a\x09<inlineJS: 'return self.substring(anIndex - 1, anotherIndex)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6493,7 +6493,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "escaped\x0a\x09<return escape(self)>",
+source: "escaped\x0a\x09<inlineJS: 'return escape(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6517,7 +6517,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["subString"],
-source: "includesSubString: subString\x0a\x09<return self.indexOf(subString) != -1>",
+source: "includesSubString: subString\x0a\x09<inlineJS: 'return self.indexOf(subString) != -1'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6901,7 +6901,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "lines\x0a\x09\x22Answer an array of lines composing this receiver without the line ending delimiters.\x22\x0a<\x0a\x09var result = self.split(/\x5cr\x5cn|\x5cr|\x5cn/);\x0a\x09if (!result[result.length-1]) result.pop();\x0a\x09return result;\x0a>",
+source: "lines\x0a\x09\x22Answer an array of lines composing this receiver without the line ending delimiters.\x22\x0a<inlineJS: '\x0a\x09var result = self.split(/\x5cr\x5cn|\x5cr|\x5cn/);\x0a\x09if (!result[result.length-1]) result.pop();\x0a\x09return result;\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6949,7 +6949,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aRegexp"],
-source: "match: aRegexp\x0a\x09<return self.search(aRegexp) != -1>",
+source: "match: aRegexp\x0a\x09<inlineJS: 'return self.search(aRegexp) != -1'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6973,7 +6973,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aRegularExpression"],
-source: "matchesOf: aRegularExpression\x0a\x09<return self.match(aRegularExpression)>",
+source: "matchesOf: aRegularExpression\x0a\x09<inlineJS: 'return self.match(aRegularExpression)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -6997,7 +6997,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "numericallyIndexable\x0a\x09<return String(self)>",
+source: "numericallyIndexable\x0a\x09<inlineJS: 'return String(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7021,7 +7021,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "printNl\x0a\x09<console.log(self)>",
+source: "printNl\x0a\x09<inlineJS: 'console.log(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7100,7 +7100,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aRegexp", "aString"],
-source: "replaceRegexp: aRegexp with: aString\x0a\x09<return self.replace(aRegexp, aString)>",
+source: "replaceRegexp: aRegexp with: aString\x0a\x09<inlineJS: 'return self.replace(aRegexp, aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7124,7 +7124,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "reversed\x0a\x09<return self.split(\x22\x22).reverse().join(\x22\x22)>",
+source: "reversed\x0a\x09<inlineJS: 'return self.split(\x22\x22).reverse().join(\x22\x22)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7166,7 +7166,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "size\x0a\x09<return self.length>",
+source: "size\x0a\x09<inlineJS: 'return self.length'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7213,7 +7213,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "tokenize: aString\x0a\x09<return self.split(aString)>",
+source: "tokenize: aString\x0a\x09<inlineJS: 'return self.split(aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7387,7 +7387,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "unescaped\x0a\x09<return unescape(self)>",
+source: "unescaped\x0a\x09<inlineJS: 'return unescape(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7411,7 +7411,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "uriComponentDecoded\x0a\x09<return decodeURIComponent(self)>",
+source: "uriComponentDecoded\x0a\x09<inlineJS: 'return decodeURIComponent(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7435,7 +7435,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "uriComponentEncoded\x0a\x09<return encodeURIComponent(self)>",
+source: "uriComponentEncoded\x0a\x09<inlineJS: 'return encodeURIComponent(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7459,7 +7459,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "uriDecoded\x0a\x09<return decodeURI(self)>",
+source: "uriDecoded\x0a\x09<inlineJS: 'return decodeURI(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7483,7 +7483,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "uriEncoded\x0a\x09<return encodeURI(self)>",
+source: "uriEncoded\x0a\x09<inlineJS: 'return encodeURI(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7523,7 +7523,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return '\r';
+return "\r";
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"cr",{},$globals.String.klass)});
@@ -7531,7 +7531,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "cr\x0a\x09<return '\x5cr'>",
+source: "cr\x0a\x09<inlineJS: 'return \x22\x5cr\x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7547,7 +7547,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return '\r\n';
+return "\r\n";
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"crlf",{},$globals.String.klass)});
@@ -7555,7 +7555,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "crlf\x0a\x09<return '\x5cr\x5cn'>",
+source: "crlf\x0a\x09<inlineJS: 'return \x22\x5cr\x5cn\x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7602,7 +7602,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anInteger"],
-source: "fromCharCode: anInteger\x0a\x09<return String.fromCharCode(anInteger)>",
+source: "fromCharCode: anInteger\x0a\x09<inlineJS: 'return String.fromCharCode(anInteger)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7626,7 +7626,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "fromString: aString\x0a\x09\x09<return String(aString)>",
+source: "fromString: aString\x0a\x09\x09<inlineJS: 'return String(aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7642,7 +7642,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return '\n';
+return "\n";
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"lf",{},$globals.String.klass)});
@@ -7650,7 +7650,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "lf\x0a\x09<return '\x5cn'>",
+source: "lf\x0a\x09<inlineJS: 'return \x22\x5cn\x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7674,7 +7674,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "random\x0a\x09\x22Returns random alphanumeric string beginning with letter\x22\x0a\x09<return (Math.random()*(22/32)+(10/32)).toString(32).slice(2);>",
+source: "random\x0a\x09\x22Returns random alphanumeric string beginning with letter\x22\x0a\x09<inlineJS: 'return (Math.random()*(22/32)+(10/32)).toString(32).slice(2);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7725,7 +7725,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return ' ';
+return " ";
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"space",{},$globals.String.klass)});
@@ -7733,7 +7733,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "space\x0a\x09<return ' '>",
+source: "space\x0a\x09<inlineJS: 'return \x22 \x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7767,7 +7767,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return '\t';
+return "\t";
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"tab",{},$globals.String.klass)});
@@ -7775,7 +7775,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "tab\x0a\x09<return '\x5ct'>",
+source: "tab\x0a\x09<inlineJS: 'return \x22\x5ct\x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7799,7 +7799,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aUTFCharCode"],
-source: "value: aUTFCharCode\x0a\x0a\x09<return String.fromCharCode(aUTFCharCode);>",
+source: "value: aUTFCharCode\x0a\x0a\x09<inlineJS: 'return String.fromCharCode(aUTFCharCode);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7944,7 +7944,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject", "anotherObject"],
-source: "add: anObject in: anotherObject\x0a\x09<\x0a\x09\x09if (anObject in anotherObject.store) { return false; }\x0a\x09\x09self['@size']++;\x0a\x09\x09anotherObject.store[anObject] = true;\x0a\x09\x09return anObject;\x0a\x09>",
+source: "add: anObject in: anotherObject\x0a\x09<inlineJS: '\x0a\x09\x09if (anObject in anotherObject.store) { return false; }\x0a\x09\x09self[''@size'']++;\x0a\x09\x09anotherObject.store[anObject] = true;\x0a\x09\x09return anObject;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -7961,7 +7961,7 @@ var self=this;
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 
-		// include nil to well-known objects under 'boolean' fastBucket
+		// include nil to well-known objects under "boolean" fastBucket
 		if (anObject == null || anObject.isNil) return [ null, self['@fastBuckets'].boolean ];
 		
 		var prim = anObject.valueOf();
@@ -7981,7 +7981,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "bucketsOfElement: anObject\x0a\x09\x22Find the appropriate bucket for `anObject`.\x0a\x09For optimization purposes, directly answer an array with: \x0a\x09- the object to be store\x0a\x09- the primitive bucket\x0a\x09- the slow bucket\x22\x0a\x09\x0a\x09<\x0a\x09\x09// include nil to well-known objects under 'boolean' fastBucket\x0a\x09\x09if (anObject == null || anObject.isNil) return [ null, self['@fastBuckets'].boolean ];\x0a\x09\x09\x0a\x09\x09var prim = anObject.valueOf();\x0a\x09\x09if (typeof prim === \x22object\x22 || typeof prim === \x22function\x22 || !self['@fastBuckets'][typeof prim]) {\x0a\x09\x09\x09var bucket = null;\x0a\x09\x09\x09self['@slowBucketStores'].some(function (store) {\x0a\x09\x09\x09\x09return bucket = store._bucketOfElement_(anObject);\x0a\x09\x09\x09});\x0a\x09\x09\x09return [ anObject, null, bucket || self['@defaultBucket'] ];\x0a\x09\x09}\x0a\x09\x09return [ prim, self['@fastBuckets'][typeof prim] ];\x0a\x09>",
+source: "bucketsOfElement: anObject\x0a\x09\x22Find the appropriate bucket for `anObject`.\x0a\x09For optimization purposes, directly answer an array with: \x0a\x09- the object to be store\x0a\x09- the primitive bucket\x0a\x09- the slow bucket\x22\x0a\x09\x0a\x09<inlineJS: '\x0a\x09\x09// include nil to well-known objects under \x22boolean\x22 fastBucket\x0a\x09\x09if (anObject == null || anObject.isNil) return [ null, self[''@fastBuckets''].boolean ];\x0a\x09\x09\x0a\x09\x09var prim = anObject.valueOf();\x0a\x09\x09if (typeof prim === \x22object\x22 || typeof prim === \x22function\x22 || !self[''@fastBuckets''][typeof prim]) {\x0a\x09\x09\x09var bucket = null;\x0a\x09\x09\x09self[''@slowBucketStores''].some(function (store) {\x0a\x09\x09\x09\x09return bucket = store._bucketOfElement_(anObject);\x0a\x09\x09\x09});\x0a\x09\x09\x09return [ anObject, null, bucket || self[''@defaultBucket''] ];\x0a\x09\x09}\x0a\x09\x09return [ prim, self[''@fastBuckets''][typeof prim] ];\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -8005,7 +8005,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 != null && 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<inlineJS: 'return anObject.klass != null && anObject.klass.className'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -8115,7 +8115,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "do: aBlock\x0a\x09<\x0a\x09\x09var el, keys, i;\x0a\x09\x09el = self['@fastBuckets'];\x0a\x09\x09keys = Object.keys(el);\x0a\x09\x09for (i = 0; i < keys.length; ++i) {\x0a\x09\x09\x09var fastBucket = el[keys[i]], fn = fastBucket.fn, store = Object.keys(fastBucket.store);\x0a\x09\x09\x09if (fn) { for (var j = 0; j < store.length; ++j) { aBlock._value_(fn(store[j])); } }\x0a\x09\x09\x09else { store._do_(aBlock); }\x0a\x09\x09}\x0a\x09\x09el = self['@slowBucketStores'];\x0a\x09\x09for (i = 0; i < el.length; ++i) { el[i]._do_(aBlock); }\x0a\x09\x09self['@defaultBucket']._do_(aBlock);\x0a\x09>",
+source: "do: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09var el, keys, i;\x0a\x09\x09el = self[''@fastBuckets''];\x0a\x09\x09keys = Object.keys(el);\x0a\x09\x09for (i = 0; i < keys.length; ++i) {\x0a\x09\x09\x09var fastBucket = el[keys[i]], fn = fastBucket.fn, store = Object.keys(fastBucket.store);\x0a\x09\x09\x09if (fn) { for (var j = 0; j < store.length; ++j) { aBlock._value_(fn(store[j])); } }\x0a\x09\x09\x09else { store._do_(aBlock); }\x0a\x09\x09}\x0a\x09\x09el = self[''@slowBucketStores''];\x0a\x09\x09for (i = 0; i < el.length; ++i) { el[i]._do_(aBlock); }\x0a\x09\x09self[''@defaultBucket'']._do_(aBlock);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -8177,7 +8177,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject", "anotherObject"],
-source: "includes: anObject in: anotherObject\x0a\x09<return anObject in anotherObject.store>",
+source: "includes: anObject in: anotherObject\x0a\x09<inlineJS: 'return anObject in anotherObject.store'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -8280,7 +8280,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "jsConstructorNameOf: anObject\x0a\x09<return anObject.constructor && anObject.constructor.name>",
+source: "jsConstructorNameOf: anObject\x0a\x09<inlineJS: 'return anObject.constructor && anObject.constructor.name'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -8415,7 +8415,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject", "anotherObject"],
-source: "remove: anObject in: anotherObject\x0a\x09<if (delete anotherObject.store[anObject]) self['@size']-->",
+source: "remove: anObject in: anotherObject\x0a\x09<inlineJS: 'if (delete anotherObject.store[anObject]) self[''@size'']--'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -8433,9 +8433,9 @@ return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 
 		self['@fastBuckets'] = {
-			'boolean': { store: Object.create(null), fn: function (x) { return {'true': true, 'false': false, 'null': null}[x]; } },
-			'number': { store: Object.create(null), fn: Number },
-			'string': { store: Object.create(null) }
+			"boolean": { store: Object.create(null), fn: function (x) { return {"true": true, "false": false, "null": null}[x]; } },
+			"number": { store: Object.create(null), fn: Number },
+			"string": { store: Object.create(null) }
 		};
 		self['@slowBucketStores'].forEach(function (x) { x._removeAll(); });
 		self['@defaultBucket']._removeAll();
@@ -8448,7 +8448,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "removeAll\x0a\x09<\x0a\x09\x09self['@fastBuckets'] = {\x0a\x09\x09\x09'boolean': { store: Object.create(null), fn: function (x) { return {'true': true, 'false': false, 'null': null}[x]; } },\x0a\x09\x09\x09'number': { store: Object.create(null), fn: Number },\x0a\x09\x09\x09'string': { store: Object.create(null) }\x0a\x09\x09};\x0a\x09\x09self['@slowBucketStores'].forEach(function (x) { x._removeAll(); });\x0a\x09\x09self['@defaultBucket']._removeAll();\x0a\x09\x09self['@size'] = 0;\x0a\x09>",
+source: "removeAll\x0a\x09<inlineJS: '\x0a\x09\x09self[''@fastBuckets''] = {\x0a\x09\x09\x09\x22boolean\x22: { store: Object.create(null), fn: function (x) { return {\x22true\x22: true, \x22false\x22: false, \x22null\x22: null}[x]; } },\x0a\x09\x09\x09\x22number\x22: { store: Object.create(null), fn: Number },\x0a\x09\x09\x09\x22string\x22: { store: Object.create(null) }\x0a\x09\x09};\x0a\x09\x09self[''@slowBucketStores''].forEach(function (x) { x._removeAll(); });\x0a\x09\x09self[''@defaultBucket'']._removeAll();\x0a\x09\x09self[''@size''] = 0;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -10018,7 +10018,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "compile: aString\x0a\x09<return self.compile(aString)>",
+source: "compile: aString\x0a\x09<inlineJS: 'return self.compile(aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -10042,7 +10042,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "exec: aString\x0a\x09<return self.exec(aString) || nil>",
+source: "exec: aString\x0a\x09<inlineJS: 'return self.exec(aString) || nil'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -10066,7 +10066,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "test: aString\x0a\x09<return self.test(aString)>",
+source: "test: aString\x0a\x09<inlineJS: 'return self.test(aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -10114,7 +10114,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anotherString"],
-source: "fromString: aString flag: anotherString\x0a\x09<return new RegExp(aString, anotherString)>",
+source: "fromString: aString flag: anotherString\x0a\x09<inlineJS: 'return new RegExp(aString, anotherString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 148 - 147
src/Kernel-Collections.st

@@ -75,14 +75,14 @@ Types of buckets are the responsibility of subclasses via `#newBucket`.!
 !BucketStore methodsFor: 'accessing'!
 
 bucketOfElement: anObject
-	<
-		var hash = self['@hashBlock'](anObject);
+	<inlineJS: '
+		var hash = self[''@hashBlock''](anObject);
 		if (!!hash) return null;
-		var buckets = self['@buckets'],
+		var buckets = self[''@buckets''],
 			bucket = buckets[hash];
 		if (!!bucket) { bucket = buckets[hash] = self._newBucket(); }
 		return bucket;
-	>
+	'>
 !
 
 hashBlock: aBlock
@@ -92,17 +92,17 @@ hashBlock: aBlock
 !BucketStore methodsFor: 'adding/removing'!
 
 removeAll
-	<self['@buckets'] = Object.create(null);>
+	<inlineJS: 'self[''@buckets''] = Object.create(null);'>
 ! !
 
 !BucketStore methodsFor: 'enumerating'!
 
 do: aBlock
-	<
-		var buckets = self['@buckets'];
+	<inlineJS: '
+		var buckets = self[''@buckets''];
 		var keys = Object.keys(buckets);
 		for (var i = 0; i < keys.length; ++i) { buckets[keys[i]]._do_(aBlock); }
-	>
+	'>
 ! !
 
 !BucketStore methodsFor: 'initialization'!
@@ -773,23 +773,23 @@ The external name is referred to as the key.!
 !Dictionary methodsFor: 'accessing'!
 
 at: aKey ifAbsent: aBlock
-	<
+	<inlineJS: '
 		var index = self._positionOfKey_(aKey);
-		return index >>=0 ? self['@values'][index] : aBlock._value();
-	>
+		return index >=0 ? self[''@values''][index] : aBlock._value();
+	'>
 !
 
 at: aKey put: aValue
-	<
+	<inlineJS: '
 		var index = self._positionOfKey_(aKey);
 		if(index === -1) {
-			var keys = self['@keys'];
+			var keys = self[''@keys''];
 			index = keys.length;
 			keys.push(aKey);
 		}
 
-		return self['@values'][index] = aValue;
-	>
+		return self[''@values''][index] = aValue;
+	'>
 !
 
 indexOf: anObject ifAbsent: aBlock
@@ -818,12 +818,12 @@ removeAll
 !
 
 removeKey: aKey ifAbsent: aBlock
-	<
+	<inlineJS: '
 		var index = self._positionOfKey_(aKey);
 		if(index === -1) {
 			return aBlock._value()
 		} else {
-			var keys = self['@keys'], values = self['@values'];
+			var keys = self[''@keys''], values = self[''@values''];
 			var value = values[index], l = keys.length;
 			keys[index] = keys[l-1];
 			keys.pop();
@@ -831,7 +831,7 @@ removeKey: aKey ifAbsent: aBlock
 			values.pop();
 			return value;
 		}
-	>
+	'>
 ! !
 
 !Dictionary methodsFor: 'enumerating'!
@@ -859,19 +859,19 @@ initialize
 !Dictionary methodsFor: 'private'!
 
 positionOfKey: anObject
-	<
-		var keys = self['@keys'];
+	<inlineJS: '
+		var keys = self[''@keys''];
 		for(var i=0;i<keys.length;i++){
 			if(keys[i].__eq(anObject)) { return i;}
 		}
 		return -1;
-	>
+	'>
 ! !
 
 !Dictionary methodsFor: 'testing'!
 
 includesKey: aKey
-	< return self._positionOfKey_(aKey) >>= 0; >
+	<inlineJS: 'return self._positionOfKey_(aKey) >= 0;'>
 ! !
 
 AssociativeCollection subclass: #HashedCollection
@@ -895,15 +895,15 @@ at: aKey put: aValue
 !
 
 keys
-	<return Object.keys(self)>
+	<inlineJS: 'return Object.keys(self)'>
 !
 
 values
-	<
+	<inlineJS: '
 		return self._keys().map(function(key){
 			return self._at_(key);
 		});
-	>
+	'>
 ! !
 
 !HashedCollection methodsFor: 'adding/removing'!
@@ -928,7 +928,7 @@ valuesDo: aBlock
 !HashedCollection methodsFor: 'testing'!
 
 includesKey: aKey
-	<return self.hasOwnProperty(aKey)>
+	<inlineJS: 'return self.hasOwnProperty(aKey)'>
 ! !
 
 IndexableCollection subclass: #SequenceableCollection
@@ -974,13 +974,13 @@ fourth
 !
 
 indexOf: anObject ifAbsent: aBlock
-	<
+	<inlineJS: '
 		self = self._numericallyIndexable();
 		for(var i=0; i < self.length; i++) {
 			if($recv(self[i]).__eq(anObject)) {return i+1}
 		};
 		return aBlock._value();
-	>
+	'>
 !
 
 indexOf: anObject startingAt: start
@@ -991,13 +991,13 @@ indexOf: anObject startingAt: start
 !
 
 indexOf: anObject startingAt: start ifAbsent: aBlock
-	<
+	<inlineJS: '
 		self = self._numericallyIndexable();
 		for(var i=start - 1; i < self.length; i++){
 			if($recv(self[i]).__eq(anObject)) {return i+1}
 		}
 		return aBlock._value();
-	>
+	'>
 !
 
 last
@@ -1018,11 +1018,11 @@ second
 !
 
 single
-<
+<inlineJS: '
 	if (self.length == 0) throw new Error("Collection is empty");
-	if (self.length >> 1) throw new Error("Collection holds more than one element.");
+	if (self.length > 1) throw new Error("Collection holds more than one element.");
 	return self[0];
->
+'>
 !
 
 third
@@ -1064,41 +1064,41 @@ copyFrom: anIndex to: anotherIndex
 !SequenceableCollection methodsFor: 'enumerating'!
 
 detect: aBlock ifNone: anotherBlock
-	<
+	<inlineJS: '
 		self = self._numericallyIndexable();
 		for(var i = 0; i < self.length; i++)
 			if(aBlock._value_(self[i]))
 				return self[i];
 		return anotherBlock._value();
-	>
+	'>
 !
 
 do: aBlock
-	<
+	<inlineJS: '
 		self = self._numericallyIndexable();
 		for(var i=0; i < self.length; i++) {
 			aBlock._value_(self[i]);
 		}
-	>
+	'>
 !
 
 with: anotherCollection do: aBlock
-	<
+	<inlineJS: '
 		self = self._numericallyIndexable();
 		anotherCollection = anotherCollection._numericallyIndexable();
 		for(var i=0; i<self.length; i++) {
 			aBlock._value_value_(self[i], anotherCollection[i]);
 		}
-	>
+	'>
 !
 
 withIndexDo: aBlock
-	<
+	<inlineJS: '
 		self = self._numericallyIndexable();
 		for(var i=0; i < self.length; i++) {
 			aBlock._value_value_(self[i], i+1);
 		}
-	>
+	'>
 ! !
 
 !SequenceableCollection methodsFor: 'private'!
@@ -1185,45 +1185,45 @@ I am directly mapped to JavaScript Number.
 !Array methodsFor: 'accessing'!
 
 at: anIndex ifAbsent: aBlock
-	<
-		return anIndex >>= 1 && anIndex <= self.length
+	<inlineJS: '
+		return anIndex >= 1 && anIndex <= self.length
 			? self[anIndex - 1]
 			: aBlock._value()
-	>
+	'>
 !
 
 at: anIndex ifPresent: aBlock ifAbsent: anotherBlock
-	<
-		return anIndex >>= 1 && anIndex <= self.length
+	<inlineJS: '
+		return anIndex >= 1 && anIndex <= self.length
 			? aBlock._value_(self[anIndex - 1])
 			: anotherBlock._value()
-	>
+	'>
 !
 
 at: anIndex put: anObject
-	<return self[anIndex - 1] = anObject>
+	<inlineJS: 'return self[anIndex - 1] = anObject'>
 !
 
 size
-	<return self.length>
+	<inlineJS: 'return self.length'>
 ! !
 
 !Array methodsFor: 'adding/removing'!
 
 add: anObject
-	<self.push(anObject); return anObject;>
+	<inlineJS: 'self.push(anObject); return anObject;'>
 !
 
 addAll: aCollection
-<
+<inlineJS: '
 	if (Array.isArray(aCollection) && aCollection.length < 65000) self.push.apply(self, aCollection);
 	else $globals.Array.superclass.fn.prototype._addAll_.call(self, aCollection);
 	return aCollection;
->
+'>
 !
 
 addFirst: anObject
-	<self.unshift(anObject); return anObject;>
+	<inlineJS: 'self.unshift(anObject); return anObject;'>
 !
 
 remove: anObject ifAbsent: aBlock
@@ -1235,19 +1235,19 @@ remove: anObject ifAbsent: aBlock
 !
 
 removeAll
-	<self.length = 0>
+	<inlineJS: 'self.length = 0'>
 !
 
 removeFrom: aNumber to: anotherNumber
-	<self.splice(aNumber -1, anotherNumber - aNumber + 1)>
+	<inlineJS: 'self.splice(aNumber -1, anotherNumber - aNumber + 1)'>
 !
 
 removeIndex: anInteger
-	<self.splice(anInteger - 1, 1)>
+	<inlineJS: 'self.splice(anInteger - 1, 1)'>
 !
 
 removeLast
-	<return self.pop();>
+	<inlineJS: 'return self.pop();'>
 ! !
 
 !Array methodsFor: 'converting'!
@@ -1257,25 +1257,25 @@ asJavascript
 !
 
 reversed
-	<return self.slice().reverse()>
+	<inlineJS: 'return self.slice().reverse()'>
 ! !
 
 !Array methodsFor: 'copying'!
 
 copyFrom: anIndex to: anotherIndex
-<
-	if (anIndex >>= 1 && anotherIndex <= self.length) {
+<inlineJS: '
+	if (anIndex >= 1 && anotherIndex <= self.length) {
 		return self.slice(anIndex - 1, anotherIndex);
 	} else {
 		self._at_(anIndex);
 		self._at_(self.length + 1);
 		throw new Error("Incorrect indexes in #copyFrom:to: not caught by #at:");
 	}
->
+'>
 !
 
 shallowCopy
-	<return self.slice()>
+	<inlineJS: 'return self.slice()'>
 ! !
 
 !Array methodsFor: 'enumerating'!
@@ -1283,17 +1283,17 @@ shallowCopy
 collect: aBlock
 	"Optimized version"
 	
-	<return self.map(function(each) {return aBlock._value_(each)})>
+	<inlineJS: 'return self.map(function(each) {return aBlock._value_(each)})'>
 !
 
 join: aString
-	<return self.join(aString)>
+	<inlineJS: 'return self.join(aString)'>
 !
 
 select: aBlock
 	"Optimized version"
 	
-	<return self.filter(function(each) {return aBlock._value_(each)})>
+	<inlineJS: 'return self.filter(function(each) {return aBlock._value_(each)})'>
 !
 
 sort
@@ -1301,11 +1301,11 @@ sort
 !
 
 sort: aBlock
-	<
+	<inlineJS: '
 		return self.sort(function(a, b) {
 			if(aBlock._value_value_(a,b)) {return -1} else {return 1}
 		})
-	>
+	'>
 !
 
 sorted
@@ -1337,7 +1337,7 @@ numericallyIndexable
 !Array class methodsFor: 'instance creation'!
 
 new: anInteger
-	<return new Array(anInteger)>
+	<inlineJS: 'return new Array(anInteger)'>
 !
 
 with: anObject
@@ -1457,56 +1457,57 @@ String inherits many useful methods from its hierarchy, such as
 !String methodsFor: 'accessing'!
 
 asciiValue
-	<return self.charCodeAt(0);>
+	<inlineJS: 'return self.charCodeAt(0);'>
 !
 
 at: anIndex ifAbsent: aBlock
-	<return String(self)[anIndex - 1] || aBlock._value()>
+	<inlineJS: 'return String(self)[anIndex - 1] || aBlock._value()'>
 !
 
 at: anIndex ifPresent: aBlock ifAbsent: anotherBlock
-	<
+	<inlineJS: '
 		var result = String(self)[anIndex - 1];
 		return result ? aBlock._value_(result) : anotherBlock._value();
-	>
+	'>
 !
 
 charCodeAt: anInteger
-	<return self.charCodeAt(anInteger - 1)>
+	<inlineJS: 'return self.charCodeAt(anInteger - 1)'>
 !
 
 size
-	<return self.length>
+	<inlineJS: 'return self.length'>
 ! !
 
 !String methodsFor: 'comparing'!
 
 < aString
-	<return String(self) < aString._asString()>
+	<inlineJS: 'return String(self) < aString._asString()'>
 !
 
 <= aString
-	<return String(self) <= aString._asString()>
+	<inlineJS: 'return String(self) <= aString._asString()'>
 !
 
 = aString
-<return aString !!= null && String(self) === (typeof aString === "string" ? aString : aString.valueOf())>
+<inlineJS:
+	'return aString !!= null && String(self) === (typeof aString === "string" ? aString : aString.valueOf())'>
 !
 
 == aString
-<
+<inlineJS: '
 	if (typeof aString === "string") return String(self) === aString;
 	else if (aString !!= null && typeof aString === "object") return String(self) === aString.valueOf();
 	else return false;
->
+'>
 !
 
 > aString
-	<return String(self) >> aString._asString()>
+	<inlineJS: 'return String(self) > aString._asString()'>
 !
 
 >= aString
-	<return String(self) >>= aString._asString()>
+	<inlineJS: 'return String(self) >= aString._asString()'>
 ! !
 
 !String methodsFor: 'converting'!
@@ -1516,20 +1517,20 @@ asJSON
 !
 
 asJavaScriptMethodName
-	<return $core.st2js(self)>
+	<inlineJS: 'return $core.st2js(self)'>
 !
 
 asJavascript
-	<
+	<inlineJS: '
 		if(self.search(/^[a-zA-Z0-9_:.$ ]*$/) == -1)
 			return "\"" + self.replace(/[\x00-\x1f"\\\x7f-\x9f]/g, function(ch){var c=ch.charCodeAt(0);return "\\x"+("0"+c.toString(16)).slice(-2)}) + "\"";
 		else
 			return "\"" + self + "\"";
-	>
+	'>
 !
 
 asLowercase
-	<return self.toLowerCase()>
+	<inlineJS: 'return self.toLowerCase()'>
 !
 
 asMutator
@@ -1541,7 +1542,7 @@ asMutator
 !
 
 asNumber
-	<return Number(self)>
+	<inlineJS: 'return Number(self)'>
 !
 
 asRegexp
@@ -1557,7 +1558,7 @@ asSymbol
 !
 
 asUppercase
-	<return self.toUpperCase()>
+	<inlineJS: 'return self.toUpperCase()'>
 !
 
 capitalized
@@ -1569,41 +1570,41 @@ crlfSanitized
 !
 
 escaped
-	<return escape(self)>
+	<inlineJS: 'return escape(self)'>
 !
 
 reversed
-	<return self.split("").reverse().join("")>
+	<inlineJS: 'return self.split("").reverse().join("")'>
 !
 
 unescaped
-	<return unescape(self)>
+	<inlineJS: 'return unescape(self)'>
 !
 
 uriComponentDecoded
-	<return decodeURIComponent(self)>
+	<inlineJS: 'return decodeURIComponent(self)'>
 !
 
 uriComponentEncoded
-	<return encodeURIComponent(self)>
+	<inlineJS: 'return encodeURIComponent(self)'>
 !
 
 uriDecoded
-	<return decodeURI(self)>
+	<inlineJS: 'return decodeURI(self)'>
 !
 
 uriEncoded
-	<return encodeURI(self)>
+	<inlineJS: 'return encodeURI(self)'>
 ! !
 
 !String methodsFor: 'copying'!
 
 , aString
-	<return String(self) + aString>
+	<inlineJS: 'return String(self) + aString'>
 !
 
 copyFrom: anIndex to: anotherIndex
-	<return self.substring(anIndex - 1, anotherIndex)>
+	<inlineJS: 'return self.substring(anIndex - 1, anotherIndex)'>
 !
 
 deepCopy
@@ -1623,7 +1624,7 @@ value: anObject
 !String methodsFor: 'printing'!
 
 printNl
-	<console.log(self)>
+	<inlineJS: 'console.log(self)'>
 !
 
 printOn: aStream
@@ -1636,17 +1637,17 @@ printOn: aStream
 !String methodsFor: 'private'!
 
 numericallyIndexable
-	<return String(self)>
+	<inlineJS: 'return String(self)'>
 ! !
 
 !String methodsFor: 'regular expressions'!
 
 match: aRegexp
-	<return self.search(aRegexp) !!= -1>
+	<inlineJS: 'return self.search(aRegexp) !!= -1'>
 !
 
 matchesOf: aRegularExpression
-	<return self.match(aRegularExpression)>
+	<inlineJS: 'return self.match(aRegularExpression)'>
 !
 
 replace: aString with: anotherString
@@ -1654,7 +1655,7 @@ replace: aString with: anotherString
 !
 
 replaceRegexp: aRegexp with: aString
-	<return self.replace(aRegexp, aString)>
+	<inlineJS: 'return self.replace(aRegexp, aString)'>
 !
 
 trimBoth
@@ -1737,11 +1738,11 @@ lineNumber: anIndex
 
 lines
 	"Answer an array of lines composing this receiver without the line ending delimiters."
-<
+<inlineJS: '
 	var result = self.split(/\r\n|\r|\n/);
 	if (!!result[result.length-1]) result.pop();
 	return result;
->
+'>
 !
 
 linesDo: aBlock
@@ -1756,13 +1757,13 @@ subStrings: aString
 !
 
 tokenize: aString
-	<return self.split(aString)>
+	<inlineJS: 'return self.split(aString)'>
 ! !
 
 !String methodsFor: 'testing'!
 
 includesSubString: subString
-	<return self.indexOf(subString) !!= -1>
+	<inlineJS: 'return self.indexOf(subString) !!= -1'>
 !
 
 isCapitalized
@@ -1786,11 +1787,11 @@ isVowel
 !String class methodsFor: 'accessing'!
 
 cr
-	<return '\r'>
+	<inlineJS: 'return "\r"'>
 !
 
 crlf
-	<return '\r\n'>
+	<inlineJS: 'return "\r\n"'>
 !
 
 esc
@@ -1798,11 +1799,11 @@ esc
 !
 
 lf
-	<return '\n'>
+	<inlineJS: 'return "\n"'>
 !
 
 space
-	<return ' '>
+	<inlineJS: 'return " "'>
 !
 
 streamClass
@@ -1810,29 +1811,29 @@ streamClass
 !
 
 tab
-	<return '\t'>
+	<inlineJS: 'return "\t"'>
 ! !
 
 !String class methodsFor: 'instance creation'!
 
 fromCharCode: anInteger
-	<return String.fromCharCode(anInteger)>
+	<inlineJS: 'return String.fromCharCode(anInteger)'>
 !
 
 fromString: aString
-		<return String(aString)>
+		<inlineJS: 'return String(aString)'>
 !
 
 value: aUTFCharCode
 
-	<return String.fromCharCode(aUTFCharCode);>
+	<inlineJS: 'return String.fromCharCode(aUTFCharCode);'>
 ! !
 
 !String class methodsFor: 'random'!
 
 random
 	"Returns random alphanumeric string beginning with letter"
-	<return (Math.random()*(22/32)+(10/32)).toString(32).slice(2);>
+	<inlineJS: 'return (Math.random()*(22/32)+(10/32)).toString(32).slice(2);'>
 !
 
 randomNotIn: aString
@@ -1900,16 +1901,16 @@ remove: anObject ifAbsent: aBlock
 !
 
 removeAll
-	<
-		self['@fastBuckets'] = {
-			'boolean': { store: Object.create(null), fn: function (x) { return {'true': true, 'false': false, 'null': null}[x]; } },
-			'number': { store: Object.create(null), fn: Number },
-			'string': { store: Object.create(null) }
+	<inlineJS: '
+		self[''@fastBuckets''] = {
+			"boolean": { store: Object.create(null), fn: function (x) { return {"true": true, "false": false, "null": null}[x]; } },
+			"number": { store: Object.create(null), fn: Number },
+			"string": { store: Object.create(null) }
 		};
-		self['@slowBucketStores'].forEach(function (x) { x._removeAll(); });
-		self['@defaultBucket']._removeAll();
-		self['@size'] = 0;
-	>
+		self[''@slowBucketStores''].forEach(function (x) { x._removeAll(); });
+		self[''@defaultBucket'']._removeAll();
+		self[''@size''] = 0;
+	'>
 ! !
 
 !Set methodsFor: 'comparing'!
@@ -1936,19 +1937,19 @@ detect: aBlock ifNone: anotherBlock
 !
 
 do: aBlock
-	<
+	<inlineJS: '
 		var el, keys, i;
-		el = self['@fastBuckets'];
+		el = self[''@fastBuckets''];
 		keys = Object.keys(el);
 		for (i = 0; i < keys.length; ++i) {
 			var fastBucket = el[keys[i]], fn = fastBucket.fn, store = Object.keys(fastBucket.store);
 			if (fn) { for (var j = 0; j < store.length; ++j) { aBlock._value_(fn(store[j])); } }
 			else { store._do_(aBlock); }
 		}
-		el = self['@slowBucketStores'];
+		el = self[''@slowBucketStores''];
 		for (i = 0; i < el.length; ++i) { el[i]._do_(aBlock); }
-		self['@defaultBucket']._do_(aBlock);
-	>
+		self[''@defaultBucket'']._do_(aBlock);
+	'>
 !
 
 select: aBlock
@@ -1993,12 +1994,12 @@ printOn: aStream
 !Set methodsFor: 'private'!
 
 add: anObject in: anotherObject
-	<
+	<inlineJS: '
 		if (anObject in anotherObject.store) { return false; }
-		self['@size']++;
+		self[''@size'']++;
 		anotherObject.store[anObject] = true;
 		return anObject;
-	>
+	'>
 !
 
 bucketsOfElement: anObject
@@ -2008,39 +2009,39 @@ bucketsOfElement: anObject
 	- the primitive bucket
 	- the slow bucket"
 	
-	<
-		// include nil to well-known objects under 'boolean' fastBucket
-		if (anObject == null || anObject.isNil) return [ null, self['@fastBuckets'].boolean ];
+	<inlineJS: '
+		// include nil to well-known objects under "boolean" fastBucket
+		if (anObject == null || anObject.isNil) return [ null, self[''@fastBuckets''].boolean ];
 		
 		var prim = anObject.valueOf();
-		if (typeof prim === "object" || typeof prim === "function" || !!self['@fastBuckets'][typeof prim]) {
+		if (typeof prim === "object" || typeof prim === "function" || !!self[''@fastBuckets''][typeof prim]) {
 			var bucket = null;
-			self['@slowBucketStores'].some(function (store) {
+			self[''@slowBucketStores''].some(function (store) {
 				return bucket = store._bucketOfElement_(anObject);
 			});
-			return [ anObject, null, bucket || self['@defaultBucket'] ];
+			return [ anObject, null, bucket || self[''@defaultBucket''] ];
 		}
-		return [ prim, self['@fastBuckets'][typeof prim] ];
-	>
+		return [ prim, self[''@fastBuckets''][typeof prim] ];
+	'>
 !
 
 classNameOf: anObject
 	"Answer the class name of `anObject`, or `undefined` 
 	if `anObject` is not an Smalltalk object"
 	
-	<return anObject.klass !!= null && anObject.klass.className>
+	<inlineJS: 'return anObject.klass !!= null && anObject.klass.className'>
 !
 
 includes: anObject in: anotherObject
-	<return anObject in anotherObject.store>
+	<inlineJS: 'return anObject in anotherObject.store'>
 !
 
 jsConstructorNameOf: anObject
-	<return anObject.constructor && anObject.constructor.name>
+	<inlineJS: 'return anObject.constructor && anObject.constructor.name'>
 !
 
 remove: anObject in: anotherObject
-	<if (delete anotherObject.store[anObject]) self['@size']-->
+	<inlineJS: 'if (delete anotherObject.store[anObject]) self[''@size'']--'>
 ! !
 
 !Set methodsFor: 'testing'!
@@ -2403,15 +2404,15 @@ I represent a regular expression object. My instances are JavaScript `RegExp` ob
 !RegularExpression methodsFor: 'evaluating'!
 
 compile: aString
-	<return self.compile(aString)>
+	<inlineJS: 'return self.compile(aString)'>
 !
 
 exec: aString
-	<return self.exec(aString) || nil>
+	<inlineJS: 'return self.exec(aString) || nil'>
 !
 
 test: aString
-	<return self.test(aString)>
+	<inlineJS: 'return self.test(aString)'>
 ! !
 
 !RegularExpression class methodsFor: 'instance creation'!
@@ -2421,6 +2422,6 @@ fromString: aString
 !
 
 fromString: aString flag: anotherString
-	<return new RegExp(aString, anotherString)>
+	<inlineJS: 'return new RegExp(aString, anotherString)'>
 ! !
 

+ 11 - 11
src/Kernel-Exceptions.js

@@ -27,7 +27,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "beHandled\x0a\x09<self.amberHandled = true>",
+source: "beHandled\x0a\x09<inlineJS: 'self.amberHandled = true'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -51,7 +51,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "beUnhandled\x0a\x09<self.amberHandled = false>",
+source: "beUnhandled\x0a\x09<inlineJS: 'self.amberHandled = false'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -75,7 +75,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "context\x0a\x09<return self.context>",
+source: "context\x0a\x09<inlineJS: 'return self.context'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -123,7 +123,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "isSmalltalkError\x0a\x09<return self.smalltalkError === true>",
+source: "isSmalltalkError\x0a\x09<inlineJS: 'return self.smalltalkError === true'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -147,7 +147,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "jsStack\x0a\x09<return self.stack>",
+source: "jsStack\x0a\x09<inlineJS: 'return self.stack'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -211,7 +211,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "resignal\x0a\x09\x22Resignal the receiver without changing its exception context\x22\x0a\x09\x0a\x09<\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09throw(self);\x0a\x09>",
+source: "resignal\x0a\x09\x22Resignal the receiver without changing its exception context\x22\x0a\x09\x0a\x09<inlineJS: '\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09throw(self);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -240,7 +240,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "signal\x0a\x09<\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09self.context = $core.getThisContext(); \x0a\x09\x09self.smalltalkError = true;\x0a\x09\x09throw self;\x0a\x09>",
+source: "signal\x0a\x09<inlineJS: '\x0a\x09\x09self.amberHandled = false;\x0a\x09\x09self.context = $core.getThisContext(); \x0a\x09\x09self.smalltalkError = true;\x0a\x09\x09throw self;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -361,7 +361,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "wasHandled\x0a\x09<return self.amberHandled || false>",
+source: "wasHandled\x0a\x09<inlineJS: 'return self.amberHandled || false'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -539,7 +539,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aMethodContext"],
-source: "context: aMethodContext\x0a\x09\x22Set the context from the outside.\x0a\x09See boot.js `inContext()` exception handling\x22\x0a\x09\x0a\x09<self.context = aMethodContext>",
+source: "context: aMethodContext\x0a\x09\x22Set the context from the outside.\x0a\x09See boot.js `inContext()` exception handling\x22\x0a\x09\x0a\x09<inlineJS: 'self.context = aMethodContext'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -592,7 +592,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return 'JavaScript exception: ' + self["@exception"].toString();
+return "JavaScript exception: " + self["@exception"].toString();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"messageText",{},$globals.JavaScriptException)});
@@ -600,7 +600,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "messageText\x0a\x09<return 'JavaScript exception: ' + self[\x22@exception\x22].toString()>",
+source: "messageText\x0a\x09<inlineJS: 'return \x22JavaScript exception: \x22 + self[\x22@exception\x22].toString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 12 - 12
src/Kernel-Exceptions.st

@@ -13,19 +13,19 @@ As `Error` is explicitly specified to be subclassable, conforming implementation
 !Error methodsFor: 'accessing'!
 
 beHandled
-	<self.amberHandled = true>
+	<inlineJS: 'self.amberHandled = true'>
 !
 
 beUnhandled
-	<self.amberHandled = false>
+	<inlineJS: 'self.amberHandled = false'>
 !
 
 context
-	<return self.context>
+	<inlineJS: 'return self.context'>
 !
 
 jsStack
-	<return self.stack>
+	<inlineJS: 'return self.stack'>
 !
 
 messageText
@@ -62,19 +62,19 @@ initialize
 resignal
 	"Resignal the receiver without changing its exception context"
 	
-	<
+	<inlineJS: '
 		self.amberHandled = false;
 		throw(self);
-	>
+	'>
 !
 
 signal
-	<
+	<inlineJS: '
 		self.amberHandled = false;
 		self.context = $core.getThisContext(); 
 		self.smalltalkError = true;
 		throw self;
-	>
+	'>
 !
 
 signal: aString
@@ -85,11 +85,11 @@ signal: aString
 !Error methodsFor: 'testing'!
 
 isSmalltalkError
-	<return self.smalltalkError === true>
+	<inlineJS: 'return self.smalltalkError === true'>
 !
 
 wasHandled
-	<return self.amberHandled || false>
+	<inlineJS: 'return self.amberHandled || false'>
 ! !
 
 !Error class methodsFor: 'accessing'!
@@ -149,7 +149,7 @@ context: aMethodContext
 	"Set the context from the outside.
 	See boot.js `inContext()` exception handling"
 	
-	<self.context = aMethodContext>
+	<inlineJS: 'self.context = aMethodContext'>
 !
 
 exception
@@ -161,7 +161,7 @@ exception: anException
 !
 
 messageText
-	<return 'JavaScript exception: ' + self["@exception"].toString()>
+	<inlineJS: 'return "JavaScript exception: " + self["@exception"].toString()'>
 ! !
 
 !JavaScriptException class methodsFor: 'instance creation'!

+ 39 - 93
src/Kernel-Infrastructure.js

@@ -77,7 +77,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "at: aString\x0a\x09<return self['@jsObject'][aString]>",
+source: "at: aString\x0a\x09<inlineJS: 'return self[''@jsObject''][aString]'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -104,7 +104,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aBlock"],
-source: "at: aString ifAbsent: aBlock\x0a\x09\x22return the aString property or evaluate aBlock if the property is not defined on the object\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? obj[aString] : aBlock._value();\x0a\x09>",
+source: "at: aString ifAbsent: aBlock\x0a\x09\x22return the aString property or evaluate aBlock if the property is not defined on the object\x22\x0a\x09<inlineJS: '\x0a\x09\x09var obj = self[''@jsObject''];\x0a\x09\x09return aString in obj ? obj[aString] : aBlock._value();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -131,7 +131,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aBlock"],
-source: "at: aString ifPresent: aBlock\x0a\x09\x22return the evaluation of aBlock with the value if the property is defined or return nil\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? aBlock._value_(obj[aString]) : nil;\x0a\x09>",
+source: "at: aString ifPresent: aBlock\x0a\x09\x22return the evaluation of aBlock with the value if the property is defined or return nil\x22\x0a\x09<inlineJS: '\x0a\x09\x09var obj = self[''@jsObject''];\x0a\x09\x09return aString in obj ? aBlock._value_(obj[aString]) : nil;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -158,7 +158,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aBlock", "anotherBlock"],
-source: "at: aString ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09\x22return the evaluation of aBlock with the value if the property is defined\x0a\x09or return value of anotherBlock\x22\x0a\x09<\x0a\x09\x09var obj = self['@jsObject'];\x0a\x09\x09return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();\x0a\x09>",
+source: "at: aString ifPresent: aBlock ifAbsent: anotherBlock\x0a\x09\x22return the evaluation of aBlock with the value if the property is defined\x0a\x09or return value of anotherBlock\x22\x0a\x09<inlineJS: '\x0a\x09\x09var obj = self[''@jsObject''];\x0a\x09\x09return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -182,7 +182,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject"],
-source: "at: aString put: anObject\x0a\x09<return self['@jsObject'][aString] = anObject>",
+source: "at: aString put: anObject\x0a\x09<inlineJS: 'return self[''@jsObject''][aString] = anObject'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -290,7 +290,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "keysAndValuesDo: aBlock\x0a\x09<\x0a\x09\x09var o = self['@jsObject'];\x0a\x09\x09for(var i in o) {\x0a\x09\x09\x09aBlock._value_value_(i, o[i]);\x0a\x09\x09}\x0a\x09>",
+source: "keysAndValuesDo: aBlock\x0a\x09<inlineJS: '\x0a\x09\x09var o = self[''@jsObject''];\x0a\x09\x09for(var i in o) {\x0a\x09\x09\x09aBlock._value_value_(i, o[i]);\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -343,7 +343,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "printString\x0a\x09<\x0a\x09\x09var js = self['@jsObject'];\x0a\x09\x09return js.toString\x0a\x09\x09\x09? js.toString()\x0a\x09\x09\x09: Object.prototype.toString.call(js)\x0a\x09>",
+source: "printString\x0a\x09<inlineJS: '\x0a\x09\x09var js = self[''@jsObject''];\x0a\x09\x09return js.toString\x0a\x09\x09\x09? js.toString()\x0a\x09\x09\x09: Object.prototype.toString.call(js)\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -397,7 +397,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aDictionary", "aProxy"],
-source: "addObjectVariablesTo: aDictionary ofProxy: aProxy\x0a\x09<\x0a\x09\x09var jsObject = aProxy['@jsObject'];\x0a\x09\x09for(var i in jsObject) {\x0a\x09\x09\x09aDictionary._at_put_(i, jsObject[i]);\x0a\x09\x09}\x0a\x09>",
+source: "addObjectVariablesTo: aDictionary ofProxy: aProxy\x0a\x09<inlineJS: '\x0a\x09\x09var jsObject = aProxy[''@jsObject''];\x0a\x09\x09for(var i in jsObject) {\x0a\x09\x09\x09aDictionary._at_put_(i, jsObject[i]);\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -423,7 +423,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aProxy", "anotherProxy"],
-source: "compareJSObjectOfProxy: aProxy withProxy: anotherProxy\x0a<\x0a\x09var anotherJSObject = anotherProxy.klass ? anotherProxy[\x22@jsObject\x22] : anotherProxy;\x0a\x09return aProxy[\x22@jsObject\x22] === anotherJSObject\x0a>",
+source: "compareJSObjectOfProxy: aProxy withProxy: anotherProxy\x0a<inlineJS: '\x0a\x09var anotherJSObject = anotherProxy.klass ? anotherProxy[\x22@jsObject\x22] : anotherProxy;\x0a\x09return aProxy[\x22@jsObject\x22] === anotherJSObject\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -449,7 +449,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anArray", "aProxy"],
-source: "forwardMessage: aString withArguments: anArray ofProxy: aProxy\x0a\x09<\x0a\x09\x09return $core.accessJavaScript(aProxy._jsObject(), aString, anArray);\x0a\x09>",
+source: "forwardMessage: aString withArguments: anArray ofProxy: aProxy\x0a\x09<inlineJS: '\x0a\x09\x09return $core.accessJavaScript(aProxy._jsObject(), aString, anArray);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -473,7 +473,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aJSObject", "aProxy"],
-source: "jsObject: aJSObject ofProxy: aProxy\x0a\x09<aProxy['@jsObject'] = aJSObject>",
+source: "jsObject: aJSObject ofProxy: aProxy\x0a\x09<inlineJS: 'aProxy[''@jsObject''] = aJSObject'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -497,7 +497,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aProxy"],
-source: "lookupProperty: aString ofProxy: aProxy\x0a\x09\x22Looks up a property in JS object.\x0a\x09Answer the property if it is present, or nil if it is not present.\x22\x0a\x09\x0a\x09<return aString in aProxy._jsObject() ? aString : nil>",
+source: "lookupProperty: aString ofProxy: aProxy\x0a\x09\x22Looks up a property in JS object.\x0a\x09Answer the property if it is present, or nil if it is not present.\x22\x0a\x09\x0a\x09<inlineJS: 'return aString in aProxy._jsObject() ? aString : nil'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -552,7 +552,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "addElement: anObject\x0a\x09<self.elements.addElement(anObject)>",
+source: "addElement: anObject\x0a\x09<inlineJS: 'self.elements.addElement(anObject)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -599,7 +599,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "removeElement: anObject\x0a\x09<self.elements.removeElement(anObject)>",
+source: "removeElement: anObject\x0a\x09<inlineJS: 'self.elements.removeElement(anObject)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -697,7 +697,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
- return self.theClass ;
+return self.theClass;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"theClass",{},$globals.ClassOrganizer)});
@@ -705,7 +705,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "theClass\x0a\x09< return self.theClass >",
+source: "theClass\x0a\x09<inlineJS: 'return self.theClass'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -741,7 +741,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "basicImports\x0a\x09\x22Answer the imports literal JavaScript object as setup in the JavaScript file, if any\x22\x0a\x09\x0a\x09<return self.imports || []>",
+source: "basicImports\x0a\x09\x22Answer the imports literal JavaScript object as setup in the JavaScript file, if any\x22\x0a\x09\x0a\x09<inlineJS: 'return self.imports || []'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -765,7 +765,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "basicName: aString\x0a\x09<self.pkgName = aString>",
+source: "basicName: aString\x0a\x09<inlineJS: 'self.pkgName = aString'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -789,7 +789,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "basicTransport\x0a\x09\x22Answer the transport literal JavaScript object as setup in the JavaScript file, if any\x22\x0a\x09\x0a\x09<return self.transport>",
+source: "basicTransport\x0a\x09\x22Answer the transport literal JavaScript object as setup in the JavaScript file, if any\x22\x0a\x09\x0a\x09<inlineJS: 'return self.transport'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1425,7 +1425,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "name\x0a\x09<return self.pkgName>",
+source: "name\x0a\x09<inlineJS: 'return self.pkgName'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2218,60 +2218,6 @@ $globals.ParseError.comment="Instance of ParseError are signaled on any parsing
 //>>excludeEnd("ide");
 
 
-$core.addClass('RethrowErrorHandler', $globals.Object, [], 'Kernel-Infrastructure');
-//>>excludeStart("ide", pragmas.excludeIdeData);
-$globals.RethrowErrorHandler.comment="This class is used in the commandline version of the compiler.\x0aIt uses the handleError: message of ErrorHandler for printing the stacktrace and throws the error again as JS exception.\x0aAs a result Smalltalk errors are not swallowd by the Amber runtime and compilation can be aborted.";
-//>>excludeEnd("ide");
-$core.addMethod(
-$core.method({
-selector: "basicSignal:",
-protocol: 'error handling',
-fn: function (anError){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-throw anError;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"basicSignal:",{anError:anError},$globals.RethrowErrorHandler)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anError"],
-source: "basicSignal: anError\x0a        <throw anError>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.RethrowErrorHandler);
-
-$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._basicSignal_(anError);
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.RethrowErrorHandler)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anError"],
-source: "handleError: anError\x0a        self basicSignal: anError",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["basicSignal:"]
-}),
-$globals.RethrowErrorHandler);
-
-
-
 $core.addClass('Setting', $globals.Object, ['key', 'value', 'defaultValue'], 'Kernel-Infrastructure');
 //>>excludeStart("ide", pragmas.excludeIdeData);
 $globals.Setting.comment="I represent a setting **stored** at `Smalltalk settings`. \x0aIn the current implementation, `Smalltalk settings` is an object persisted in the localStorage.\x0a\x0a## API\x0a\x0aA `Setting` value can be read using `value` and set using `value:`.\x0a\x0aSettings are accessed with `'key' asSetting` or `'key' asSettingIfAbsent: aDefaultValue`.\x0a\x0aTo read the value of a setting you can also use the convenience:\x0a\x0a`theValueSet :=  'any.characteristic' settingValue` \x0a\x0aor with a default using:\x0a\x0a `theEnsuredValueSet := 'any.characteristic' settingValueIfAbsent: true`";
@@ -2569,7 +2515,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["packageName"],
-source: "basicCreatePackage: packageName\x0a\x09\x22Create and bind a new bare package with given name and return it.\x22\x0a\x09<return $core.addPackage(packageName)>",
+source: "basicCreatePackage: packageName\x0a\x09\x22Create and bind a new bare package with given name and return it.\x22\x0a\x09<inlineJS: 'return $core.addPackage(packageName)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2616,7 +2562,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aPackage"],
-source: "basicRegisterPackage: aPackage\x0a\x09\x22Put aPackage in $core.packages object.\x22\x0a\x09<$core.packages[aPackage.pkgName]=aPackage>",
+source: "basicRegisterPackage: aPackage\x0a\x09\x22Put aPackage in $core.packages object.\x22\x0a\x09<inlineJS: '$core.packages[aPackage.pkgName]=aPackage'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2640,7 +2586,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "cancelOptOut: anObject\x0a\x09\x22A Smalltalk object has a 'klass' property.\x0a\x09If this property is shadowed for anObject by optOut:,\x0a\x09the object is treated as plain JS object.\x0a\x09This removes the shadow and anObject is Smalltalk object\x0a\x09again if it was before.\x22\x0a\x09\x0a\x09<delete anObject.klass>",
+source: "cancelOptOut: anObject\x0a\x09\x22A Smalltalk object has a 'klass' property.\x0a\x09If this property is shadowed for anObject by optOut:,\x0a\x09the object is treated as plain JS object.\x0a\x09This removes the shadow and anObject is Smalltalk object\x0a\x09again if it was before.\x22\x0a\x09\x0a\x09<inlineJS: 'delete anObject.klass'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2664,7 +2610,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "classes\x0a\x09<return $core.classes()>",
+source: "classes\x0a\x09<inlineJS: 'return $core.classes()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2688,7 +2634,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "core\x0a\x09<return $core>",
+source: "core\x0a\x09<inlineJS: 'return $core'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2789,7 +2735,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass"],
-source: "deleteClass: aClass\x0a\x09\x22Deletes a class by deleting its binding only. Use #removeClass instead\x22\x0a\x09\x0a\x09<$core.removeClass(aClass)>",
+source: "deleteClass: aClass\x0a\x09\x22Deletes a class by deleting its binding only. Use #removeClass instead\x22\x0a\x09\x0a\x09<inlineJS: '$core.removeClass(aClass)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2839,7 +2785,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["packageName"],
-source: "deletePackage: packageName\x0a\x09\x22Deletes a package by deleting its binding, but does not check if it contains classes etc.\x0a\x09To remove a package, use #removePackage instead.\x22\x0a\x0a\x09<delete $core.packages[packageName]>",
+source: "deletePackage: packageName\x0a\x09\x22Deletes a package by deleting its binding, but does not check if it contains classes etc.\x0a\x09To remove a package, use #removePackage instead.\x22\x0a\x0a\x09<inlineJS: 'delete $core.packages[packageName]'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2892,7 +2838,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "globalJsVariables\x0a\x09\x22Array of global JavaScript variables\x22\x0a\x09<return $core.globalJsVariables>",
+source: "globalJsVariables\x0a\x09\x22Array of global JavaScript variables\x22\x0a\x09<inlineJS: 'return $core.globalJsVariables'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2916,7 +2862,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "globals\x0a\x09<return $globals>",
+source: "globals\x0a\x09<inlineJS: 'return $globals'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2940,7 +2886,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aKey"],
-source: "includesKey: aKey\x0a\x09<return $core.hasOwnProperty(aKey)>",
+source: "includesKey: aKey\x0a\x09<inlineJS: 'return $core.hasOwnProperty(aKey)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2964,7 +2910,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "isSmalltalkObject: anObject\x0a\x09\x22Consider anObject a Smalltalk object if it has a 'klass' property.\x0a\x09Note that this may be unaccurate\x22\x0a\x09\x0a\x09<return anObject.klass != null>",
+source: "isSmalltalkObject: anObject\x0a\x09\x22Consider anObject a Smalltalk object if it has a 'klass' property.\x0a\x09Note that this may be unaccurate\x22\x0a\x09\x0a\x09<inlineJS: 'return anObject.klass != null'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2988,7 +2934,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "optOut: anObject\x0a\x09\x22A Smalltalk object has a 'klass' property.\x0a\x09This shadows the property for anObject.\x0a\x09The object is treated as plain JS object following this.\x22\x0a\x09\x0a\x09<anObject.klass = null>",
+source: "optOut: anObject\x0a\x09\x22A Smalltalk object has a 'klass' property.\x0a\x09This shadows the property for anObject.\x0a\x09The object is treated as plain JS object following this.\x22\x0a\x09\x0a\x09<inlineJS: 'anObject.klass = null'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3012,7 +2958,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["packageName"],
-source: "packageAt: packageName\x0a\x09<return $core.packages[packageName]>",
+source: "packageAt: packageName\x0a\x09<inlineJS: 'return $core.packages[packageName]'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3065,7 +3011,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "packages\x0a\x09\x22Return all Package instances in the system.\x22\x0a\x0a\x09<\x0a\x09\x09return Object.keys($core.packages).map(function(k) {\x0a\x09\x09\x09return $core.packages[k];\x0a\x09\x09})\x0a\x09>",
+source: "packages\x0a\x09\x22Return all Package instances in the system.\x22\x0a\x0a\x09<inlineJS: '\x0a\x09\x09return Object.keys($core.packages).map(function(k) {\x0a\x09\x09\x09return $core.packages[k];\x0a\x09\x09})\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3202,7 +3148,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "readJSObject: anObject\x0a\x09<return $core.readJSObject(anObject)>",
+source: "readJSObject: anObject\x0a\x09<inlineJS: 'return $core.readJSObject(anObject)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3353,7 +3299,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "reservedWords\x0a\x09\x22JavaScript reserved words\x22\x0a\x09<return $core.reservedWords>",
+source: "reservedWords\x0a\x09\x22JavaScript reserved words\x22\x0a\x09<inlineJS: 'return $core.reservedWords'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3384,12 +3330,12 @@ selector: "version",
 protocol: 'accessing',
 fn: function (){
 var self=this;
-return "0.17.0-pre";
+return "0.18.0-pre";
 
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "version\x0a\x09\x22Answer the version string of Amber\x22\x0a\x09\x0a\x09^ '0.17.0-pre'",
+source: "version\x0a\x09\x22Answer the version string of Amber\x22\x0a\x09\x0a\x09^ '0.18.0-pre'",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3536,7 +3482,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asJavaScriptPropertyName\x0a<return $core.st2prop(self)>",
+source: "asJavaScriptPropertyName\x0a<inlineJS: 'return $core.st2prop(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 52 - 70
src/Kernel-Infrastructure.st

@@ -30,36 +30,36 @@ __Note:__ For keyword-based messages, only the first keyword is kept: `window fo
 !JSObjectProxy methodsFor: 'accessing'!
 
 at: aString
-	<return self['@jsObject'][aString]>
+	<inlineJS: 'return self[''@jsObject''][aString]'>
 !
 
 at: aString ifAbsent: aBlock
 	"return the aString property or evaluate aBlock if the property is not defined on the object"
-	<
-		var obj = self['@jsObject'];
+	<inlineJS: '
+		var obj = self[''@jsObject''];
 		return aString in obj ? obj[aString] : aBlock._value();
-	>
+	'>
 !
 
 at: aString ifPresent: aBlock
 	"return the evaluation of aBlock with the value if the property is defined or return nil"
-	<
-		var obj = self['@jsObject'];
+	<inlineJS: '
+		var obj = self[''@jsObject''];
 		return aString in obj ? aBlock._value_(obj[aString]) : nil;
-	>
+	'>
 !
 
 at: aString ifPresent: aBlock ifAbsent: anotherBlock
 	"return the evaluation of aBlock with the value if the property is defined
 	or return value of anotherBlock"
-	<
-		var obj = self['@jsObject'];
+	<inlineJS: '
+		var obj = self[''@jsObject''];
 		return aString in obj ? aBlock._value_(obj[aString]) : anotherBlock._value();
-	>
+	'>
 !
 
 at: aString put: anObject
-	<return self['@jsObject'][aString] = anObject>
+	<inlineJS: 'return self[''@jsObject''][aString] = anObject'>
 !
 
 in: aValuable
@@ -86,12 +86,12 @@ asJSON
 !
 
 keysAndValuesDo: aBlock
-	<
-		var o = self['@jsObject'];
+	<inlineJS: '
+		var o = self[''@jsObject''];
 		for(var i in o) {
 			aBlock._value_value_(i, o[i]);
 		}
-	>
+	'>
 ! !
 
 !JSObjectProxy methodsFor: 'printing'!
@@ -101,12 +101,12 @@ printOn: aStream
 !
 
 printString
-	<
-		var js = self['@jsObject'];
+	<inlineJS: '
+		var js = self[''@jsObject''];
 		return js.toString
 			? js.toString()
 			: Object.prototype.toString.call(js)
-	>
+	'>
 ! !
 
 !JSObjectProxy methodsFor: 'proxy'!
@@ -139,36 +139,36 @@ on: aJSObject
 !JSObjectProxy class methodsFor: 'proxy'!
 
 addObjectVariablesTo: aDictionary ofProxy: aProxy
-	<
-		var jsObject = aProxy['@jsObject'];
+	<inlineJS: '
+		var jsObject = aProxy[''@jsObject''];
 		for(var i in jsObject) {
 			aDictionary._at_put_(i, jsObject[i]);
 		}
-	>
+	'>
 !
 
 compareJSObjectOfProxy: aProxy withProxy: anotherProxy
-<
+<inlineJS: '
 	var anotherJSObject = anotherProxy.klass ? anotherProxy["@jsObject"] : anotherProxy;
 	return aProxy["@jsObject"] === anotherJSObject
->
+'>
 !
 
 forwardMessage: aString withArguments: anArray ofProxy: aProxy
-	<
+	<inlineJS: '
 		return $core.accessJavaScript(aProxy._jsObject(), aString, anArray);
-	>
+	'>
 !
 
 jsObject: aJSObject ofProxy: aProxy
-	<aProxy['@jsObject'] = aJSObject>
+	<inlineJS: 'aProxy[''@jsObject''] = aJSObject'>
 !
 
 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>
+	<inlineJS: 'return aString in aProxy._jsObject() ? aString : nil'>
 ! !
 
 Object subclass: #Organizer
@@ -184,7 +184,7 @@ Use `#addElement:` and `#removeElement:` to manipulate instances.!
 !Organizer methodsFor: 'accessing'!
 
 addElement: anObject
-	<self.elements.addElement(anObject)>
+	<inlineJS: 'self.elements.addElement(anObject)'>
 !
 
 elements
@@ -192,7 +192,7 @@ elements
 !
 
 removeElement: anObject
-	<self.elements.removeElement(anObject)>
+	<inlineJS: 'self.elements.removeElement(anObject)'>
 ! !
 
 Organizer subclass: #ClassOrganizer
@@ -222,7 +222,7 @@ removeElement: aString
 !
 
 theClass
-	< return self.theClass >
+	<inlineJS: 'return self.theClass'>
 ! !
 
 Organizer subclass: #PackageOrganizer
@@ -322,7 +322,7 @@ importsDefinition
 !
 
 name
-	<return self.pkgName>
+	<inlineJS: 'return self.pkgName'>
 !
 
 name: aString
@@ -428,17 +428,17 @@ printOn: aStream
 basicImports
 	"Answer the imports literal JavaScript object as setup in the JavaScript file, if any"
 	
-	<return self.imports || []>
+	<inlineJS: 'return self.imports || []'>
 !
 
 basicName: aString
-	<self.pkgName = aString>
+	<inlineJS: 'self.pkgName = aString'>
 !
 
 basicTransport
 	"Answer the transport literal JavaScript object as setup in the JavaScript file, if any"
 	
-	<return self.transport>
+	<inlineJS: 'return self.transport'>
 !
 
 sortedImportsAsArray
@@ -603,24 +603,6 @@ Error subclass: #ParseError
 Instance of ParseError are signaled on any parsing error.
 See `Smalltalk >> #parse:`!
 
-Object subclass: #RethrowErrorHandler
-	instanceVariableNames: ''
-	package: 'Kernel-Infrastructure'!
-!RethrowErrorHandler commentStamp!
-This class is used in the commandline version of the compiler.
-It uses the handleError: message of ErrorHandler for printing the stacktrace and throws the error again as JS exception.
-As a result Smalltalk errors are not swallowd by the Amber runtime and compilation can be aborted.!
-
-!RethrowErrorHandler methodsFor: 'error handling'!
-
-basicSignal: anError
-        <throw anError>
-!
-
-handleError: anError
-        self basicSignal: anError
-! !
-
 Object subclass: #Setting
 	instanceVariableNames: 'key value defaultValue'
 	package: 'Kernel-Infrastructure'!
@@ -721,19 +703,19 @@ cancelOptOut: anObject
 	This removes the shadow and anObject is Smalltalk object
 	again if it was before."
 	
-	<delete anObject.klass>
+	<inlineJS: 'delete anObject.klass'>
 !
 
 core
-	<return $core>
+	<inlineJS: 'return $core'>
 !
 
 globals
-	<return $globals>
+	<inlineJS: 'return $globals'>
 !
 
 includesKey: aKey
-	<return $core.hasOwnProperty(aKey)>
+	<inlineJS: 'return $core.hasOwnProperty(aKey)'>
 !
 
 optOut: anObject
@@ -741,7 +723,7 @@ optOut: anObject
 	This shadows the property for anObject.
 	The object is treated as plain JS object following this."
 	
-	<anObject.klass = null>
+	<inlineJS: 'anObject.klass = null'>
 !
 
 parse: aString
@@ -760,12 +742,12 @@ pseudoVariableNames
 !
 
 readJSObject: anObject
-	<return $core.readJSObject(anObject)>
+	<inlineJS: 'return $core.readJSObject(anObject)'>
 !
 
 reservedWords
 	"JavaScript reserved words"
-	<return $core.reservedWords>
+	<inlineJS: 'return $core.reservedWords'>
 !
 
 settings
@@ -775,7 +757,7 @@ settings
 version
 	"Answer the version string of Amber"
 	
-	^ '0.17.0-pre'
+	^ '0.18.0-pre'
 ! !
 
 !SmalltalkImage methodsFor: 'accessing amd'!
@@ -795,7 +777,7 @@ defaultAmdNamespace: aString
 !SmalltalkImage methodsFor: 'classes'!
 
 classes
-	<return $core.classes()>
+	<inlineJS: 'return $core.classes()'>
 !
 
 removeClass: aClass
@@ -836,7 +818,7 @@ deleteGlobalJsVariable: aString
 
 globalJsVariables
 	"Array of global JavaScript variables"
-	<return $core.globalJsVariables>
+	<inlineJS: 'return $core.globalJsVariables'>
 ! !
 
 !SmalltalkImage methodsFor: 'packages'!
@@ -856,7 +838,7 @@ createPackage: packageName
 !
 
 packageAt: packageName
-	<return $core.packages[packageName]>
+	<inlineJS: 'return $core.packages[packageName]'>
 !
 
 packageAt: packageName ifAbsent: aBlock
@@ -866,11 +848,11 @@ packageAt: packageName ifAbsent: aBlock
 packages
 	"Return all Package instances in the system."
 
-	<
+	<inlineJS: '
 		return Object.keys($core.packages).map(function(k) {
 			return $core.packages[k];
 		})
-	>
+	'>
 !
 
 removePackage: packageName
@@ -898,7 +880,7 @@ renamePackage: packageName to: newName
 
 basicCreatePackage: packageName
 	"Create and bind a new bare package with given name and return it."
-	<return $core.addPackage(packageName)>
+	<inlineJS: 'return $core.addPackage(packageName)'>
 !
 
 basicParse: aString
@@ -907,20 +889,20 @@ basicParse: aString
 
 basicRegisterPackage: aPackage
 	"Put aPackage in $core.packages object."
-	<$core.packages[aPackage.pkgName]=aPackage>
+	<inlineJS: '$core.packages[aPackage.pkgName]=aPackage'>
 !
 
 deleteClass: aClass
 	"Deletes a class by deleting its binding only. Use #removeClass instead"
 	
-	<$core.removeClass(aClass)>
+	<inlineJS: '$core.removeClass(aClass)'>
 !
 
 deletePackage: packageName
 	"Deletes a package by deleting its binding, but does not check if it contains classes etc.
 	To remove a package, use #removePackage instead."
 
-	<delete $core.packages[packageName]>
+	<inlineJS: 'delete $core.packages[packageName]'>
 ! !
 
 !SmalltalkImage methodsFor: 'testing'!
@@ -936,7 +918,7 @@ isSmalltalkObject: anObject
 	"Consider anObject a Smalltalk object if it has a 'klass' property.
 	Note that this may be unaccurate"
 	
-	<return anObject.klass !!= null>
+	<inlineJS: 'return anObject.klass !!= null'>
 ! !
 
 SmalltalkImage class instanceVariableNames: 'current'!
@@ -971,7 +953,7 @@ importsString
 !String methodsFor: '*Kernel-Infrastructure'!
 
 asJavaScriptPropertyName
-<return $core.st2prop(self)>
+<inlineJS: 'return $core.st2prop(self)'>
 !
 
 asSetting

+ 54 - 54
src/Kernel-Methods.js

@@ -27,7 +27,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject", "aCollection"],
-source: "applyTo: anObject arguments: aCollection\x0a\x09<return self.apply(anObject, aCollection)>",
+source: "applyTo: anObject arguments: aCollection\x0a\x09<inlineJS: 'return self.apply(anObject, aCollection)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -51,7 +51,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "asCompiledMethod: aString\x0a\x09<return $core.method({selector:aString, fn:self});>",
+source: "asCompiledMethod: aString\x0a\x09<inlineJS: 'return $core.method({selector:aString, fn:self});'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -75,7 +75,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "compiledSource\x0a\x09<return self.toString()>",
+source: "compiledSource\x0a\x09<inlineJS: 'return self.toString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -105,7 +105,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "currySelf\x0a\x09\x22Transforms [ :selfarg :x :y | stcode ] block\x0a\x09which represents JS function (selfarg, x, y, ...) {jscode}\x0a\x09into function (x, y, ...) {jscode} that takes selfarg from 'this'.\x0a\x09IOW, it is usable as JS method and first arg takes the receiver.\x22\x0a\x09\x0a\x09<\x0a\x09\x09return function () {\x0a\x09\x09\x09var args = [ this ];\x0a\x09\x09\x09args.push.apply(args, arguments);\x0a\x09\x09\x09return self.apply(null, args);\x0a\x09\x09}\x0a\x09>",
+source: "currySelf\x0a\x09\x22Transforms [ :selfarg :x :y | stcode ] block\x0a\x09which represents JS function (selfarg, x, y, ...) {jscode}\x0a\x09into function (x, y, ...) {jscode} that takes selfarg from 'this'.\x0a\x09IOW, it is usable as JS method and first arg takes the receiver.\x22\x0a\x09\x0a\x09<inlineJS: '\x0a\x09\x09return function () {\x0a\x09\x09\x09var args = [ this ];\x0a\x09\x09\x09args.push.apply(args, arguments);\x0a\x09\x09\x09return self.apply(null, args);\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -129,7 +129,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "ensure: aBlock\x0a\x09<try{return self._value()}finally{aBlock._value()}>",
+source: "ensure: aBlock\x0a\x09<inlineJS: 'try{return self._value()}finally{aBlock._value()}'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -177,7 +177,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "new\x0a\x09\x22Use the receiver as a JS constructor.\x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<return new self()>",
+source: "new\x0a\x09\x22Use the receiver as a JS constructor.\x0a\x09*Do not* use this method to instanciate Smalltalk objects!\x22\x0a\x09<inlineJS: 'return new self()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -274,7 +274,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aCollection"],
-source: "newWithValues: aCollection\x0a\x09\x22Simulates JS new operator by combination of Object.create and .apply\x22\x0a\x09<\x0a\x09\x09var object = Object.create(self.prototype);\x0a\x09\x09var result = self.apply(object, aCollection);\x0a\x09\x09return typeof result === \x22object\x22 ? result : object;\x0a\x09>",
+source: "newWithValues: aCollection\x0a\x09\x22Simulates JS new operator by combination of Object.create and .apply\x22\x0a\x09<inlineJS: '\x0a\x09\x09var object = Object.create(self.prototype);\x0a\x09\x09var result = self.apply(object, aCollection);\x0a\x09\x09return typeof result === \x22object\x22 ? result : object;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -298,7 +298,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "numArgs\x0a\x09<return self.length>",
+source: "numArgs\x0a\x09<inlineJS: 'return self.length'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -411,7 +411,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\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>",
+source: "tryCatch: aBlock\x0a\x09<inlineJS: '\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: []
@@ -435,7 +435,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "value\x0a\x09<return self();>",
+source: "value\x0a\x09<inlineJS: 'return self();'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -459,7 +459,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anArg"],
-source: "value: anArg\x0a\x09<return self(anArg);>",
+source: "value: anArg\x0a\x09<inlineJS: 'return self(anArg);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -483,7 +483,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["firstArg", "secondArg"],
-source: "value: firstArg value: secondArg\x0a\x09<return self(firstArg, secondArg);>",
+source: "value: firstArg value: secondArg\x0a\x09<inlineJS: 'return self(firstArg, secondArg);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -507,7 +507,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["firstArg", "secondArg", "thirdArg"],
-source: "value: firstArg value: secondArg value: thirdArg\x0a\x09<return self(firstArg, secondArg, thirdArg);>",
+source: "value: firstArg value: secondArg value: thirdArg\x0a\x09<inlineJS: 'return self(firstArg, secondArg, thirdArg);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -534,7 +534,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "valueWithInterval: aNumber\x0a\x09<\x0a\x09\x09var interval = setInterval(self, aNumber);\x0a\x09\x09return $globals.Timeout._on_(interval);\x0a\x09>",
+source: "valueWithInterval: aNumber\x0a\x09<inlineJS: '\x0a\x09\x09var interval = setInterval(self, aNumber);\x0a\x09\x09return $globals.Timeout._on_(interval);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -558,7 +558,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aCollection"],
-source: "valueWithPossibleArguments: aCollection\x0a\x09<return self.apply(null, aCollection);>",
+source: "valueWithPossibleArguments: aCollection\x0a\x09<inlineJS: 'return self.apply(null, aCollection);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -585,7 +585,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "valueWithTimeout: aNumber\x0a\x09<\x0a\x09\x09var timeout = setTimeout(self, aNumber);\x0a\x09\x09return $globals.Timeout._on_(timeout);\x0a\x09>",
+source: "valueWithTimeout: aNumber\x0a\x09<inlineJS: '\x0a\x09\x09var timeout = setTimeout(self, aNumber);\x0a\x09\x09return $globals.Timeout._on_(timeout);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -635,7 +635,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "whileFalse: aBlock\x0a\x09<while(!$core.assert(self._value())) {aBlock._value()}>",
+source: "whileFalse: aBlock\x0a\x09<inlineJS: 'while(!$core.assert(self._value())) {aBlock._value()}'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -685,7 +685,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "whileTrue: aBlock\x0a\x09<while($core.assert(self._value())) {aBlock._value()}>",
+source: "whileTrue: aBlock\x0a\x09<inlineJS: 'while($core.assert(self._value())) {aBlock._value()}'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -715,7 +715,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "arguments\x0a\x09<return self.args || []>",
+source: "arguments\x0a\x09<inlineJS: 'return self.args || []'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2149,7 +2149,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "basicReceiver\x0a\x09<return self.receiver>",
+source: "basicReceiver\x0a\x09<inlineJS: 'return self.receiver'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2173,7 +2173,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "evaluatedSelector\x0a\x09<return self.evaluatedSelector>",
+source: "evaluatedSelector\x0a\x09<inlineJS: 'return self.evaluatedSelector'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2249,7 +2249,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "home\x0a\x09<return self.homeContext>",
+source: "home\x0a\x09<inlineJS: 'return self.homeContext'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2273,7 +2273,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "index\x0a\x09<return self.index || 0>",
+source: "index\x0a\x09<inlineJS: 'return self.index || 0'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2320,7 +2320,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "locals\x0a\x09<return self.locals || {}>",
+source: "locals\x0a\x09<inlineJS: 'return self.locals || {}'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2445,7 +2445,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "outerContext\x0a\x09<return self.outerContext || self.homeContext>",
+source: "outerContext\x0a\x09<inlineJS: 'return self.outerContext || self.homeContext'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2556,7 +2556,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "selector\x0a\x09<\x0a\x09\x09if(self.selector) {\x0a\x09\x09\x09return $core.js2st(self.selector);\x0a\x09\x09} else {\x0a\x09\x09\x09return nil;\x0a\x09\x09}\x0a\x09>",
+source: "selector\x0a\x09<inlineJS: '\x0a\x09\x09if(self.selector) {\x0a\x09\x09\x09return $core.js2st(self.selector);\x0a\x09\x09} else {\x0a\x09\x09\x09return nil;\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2580,7 +2580,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aSelector"],
-source: "sendIndexAt: aSelector\x0a\x09<return self.sendIdx[aSelector] || 0>",
+source: "sendIndexAt: aSelector\x0a\x09<inlineJS: 'return self.sendIdx[aSelector] || 0'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2604,7 +2604,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "sendIndexes\x0a\x09<return self.sendIdx>",
+source: "sendIndexes\x0a\x09<inlineJS: 'return self.sendIdx'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2628,7 +2628,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "supercall\x0a\x09<return self.supercall == true>",
+source: "supercall\x0a\x09<inlineJS: 'return self.supercall == true'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2662,7 +2662,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "constructorNamed: aString\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return new nativeFunc();\x0a\x09>",
+source: "constructorNamed: aString\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return new nativeFunc();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2689,7 +2689,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject"],
-source: "constructorNamed: aString value: anObject\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return new nativeFunc(anObject);\x0a\x09>",
+source: "constructorNamed: aString value: anObject\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return new nativeFunc(anObject);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2716,7 +2716,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject", "anObject2"],
-source: "constructorNamed: aString value: anObject value: anObject2\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return new nativeFunc(anObject,anObject2);\x0a\x09>",
+source: "constructorNamed: aString value: anObject value: anObject2\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return new nativeFunc(anObject,anObject2);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2743,7 +2743,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject", "anObject2", "anObject3"],
-source: "constructorNamed: aString value: anObject value: anObject2 value: anObject3\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return new nativeFunc(anObject,anObject2, anObject3);\x0a\x09>",
+source: "constructorNamed: aString value: anObject value: anObject2 value: anObject3\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return new nativeFunc(anObject,anObject2, anObject3);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2769,7 +2769,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc"],
-source: "constructorOf: nativeFunc\x0a\x09<\x0a\x09\x09return new nativeFunc();\x0a\x09>",
+source: "constructorOf: nativeFunc\x0a\x09<inlineJS: '\x0a\x09\x09return new nativeFunc();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2795,7 +2795,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "anObject"],
-source: "constructorOf: nativeFunc value: anObject\x0a\x09<\x0a\x09\x09return new nativeFunc(anObject);\x0a\x09>",
+source: "constructorOf: nativeFunc value: anObject\x0a\x09<inlineJS: '\x0a\x09\x09return new nativeFunc(anObject);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2821,7 +2821,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "anObject", "anObject2"],
-source: "constructorOf: nativeFunc value: anObject value: anObject2\x0a\x09<\x0a\x09\x09return new nativeFunc(anObject,anObject2);\x0a\x09>",
+source: "constructorOf: nativeFunc value: anObject value: anObject2\x0a\x09<inlineJS: '\x0a\x09\x09return new nativeFunc(anObject,anObject2);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2847,7 +2847,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "anObject", "anObject2", "anObject3"],
-source: "constructorOf: nativeFunc value: anObject value: anObject2 value: anObject3\x0a\x09<\x0a\x09\x09return new nativeFunc(anObject,anObject2, anObject3);\x0a\x09>",
+source: "constructorOf: nativeFunc value: anObject value: anObject2 value: anObject3\x0a\x09<inlineJS: '\x0a\x09\x09return new nativeFunc(anObject,anObject2, anObject3);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2897,7 +2897,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "functionNamed: aString\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return nativeFunc();\x0a\x09>",
+source: "functionNamed: aString\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return nativeFunc();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2924,7 +2924,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject"],
-source: "functionNamed: aString value: anObject\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return nativeFunc(anObject);\x0a\x09>",
+source: "functionNamed: aString value: anObject\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return nativeFunc(anObject);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2951,7 +2951,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject", "anObject2"],
-source: "functionNamed: aString value: anObject value: anObject2\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return nativeFunc(anObject,anObject2);\x0a\x09>",
+source: "functionNamed: aString value: anObject value: anObject2\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return nativeFunc(anObject,anObject2);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2978,7 +2978,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject", "anObject2", "anObject3"],
-source: "functionNamed: aString value: anObject value: anObject2 value: anObject3\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return nativeFunc(anObject,anObject2, anObject3);\x0a\x09>",
+source: "functionNamed: aString value: anObject value: anObject2 value: anObject3\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return nativeFunc(anObject,anObject2, anObject3);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3005,7 +3005,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "args"],
-source: "functionNamed: aString valueWithArgs: args\x0a\x09<\x0a\x09\x09var nativeFunc=(new Function('return this'))()[aString];\x0a\x09\x09return Function.prototype.apply.call(nativeFunc, null, args);\x0a\x09>",
+source: "functionNamed: aString valueWithArgs: args\x0a\x09<inlineJS: '\x0a\x09\x09var nativeFunc=(new Function(''return this''))()[aString];\x0a\x09\x09return Function.prototype.apply.call(nativeFunc, null, args);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3031,7 +3031,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc"],
-source: "functionOf: nativeFunc\x0a\x09<\x0a\x09\x09return nativeFunc();\x0a\x09>",
+source: "functionOf: nativeFunc\x0a\x09<inlineJS: '\x0a\x09\x09return nativeFunc();\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3057,7 +3057,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "anObject"],
-source: "functionOf: nativeFunc value: anObject\x0a\x09<\x0a\x09\x09return nativeFunc(anObject);\x0a\x09>",
+source: "functionOf: nativeFunc value: anObject\x0a\x09<inlineJS: '\x0a\x09\x09return nativeFunc(anObject);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3083,7 +3083,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "anObject", "anObject2"],
-source: "functionOf: nativeFunc value: anObject value: anObject2\x0a\x09<\x0a\x09\x09return nativeFunc(anObject,anObject2);\x0a\x09>",
+source: "functionOf: nativeFunc value: anObject value: anObject2\x0a\x09<inlineJS: '\x0a\x09\x09return nativeFunc(anObject,anObject2);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3109,7 +3109,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "anObject", "anObject2", "anObject3"],
-source: "functionOf: nativeFunc value: anObject value: anObject2 value: anObject3\x0a\x09<\x0a\x09\x09return nativeFunc(anObject,anObject2, anObject3);\x0a\x09>",
+source: "functionOf: nativeFunc value: anObject value: anObject2 value: anObject3\x0a\x09<inlineJS: '\x0a\x09\x09return nativeFunc(anObject,anObject2, anObject3);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3135,7 +3135,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "args"],
-source: "functionOf: nativeFunc valueWithArgs: args\x0a\x09<\x0a\x09\x09return Function.prototype.apply.call(nativeFunc, null, args);\x0a\x09>",
+source: "functionOf: nativeFunc valueWithArgs: args\x0a\x09<inlineJS: '\x0a\x09\x09return Function.prototype.apply.call(nativeFunc, null, args);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3161,7 +3161,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "thisObject"],
-source: "methodOf: nativeFunc this: thisObject\x0a\x09<\x0a\x09\x09return Function.prototype.call.call(nativeFunc, thisObject);\x0a\x09>",
+source: "methodOf: nativeFunc this: thisObject\x0a\x09<inlineJS: '\x0a\x09\x09return Function.prototype.call.call(nativeFunc, thisObject);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3187,7 +3187,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "thisObject", "anObject"],
-source: "methodOf: nativeFunc this: thisObject value: anObject\x0a\x09<\x0a\x09\x09return Function.prototype.call.call(nativeFunc, thisObject, anObject);\x0a\x09>",
+source: "methodOf: nativeFunc this: thisObject value: anObject\x0a\x09<inlineJS: '\x0a\x09\x09return Function.prototype.call.call(nativeFunc, thisObject, anObject);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3213,7 +3213,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "thisObject", "anObject", "anObject2"],
-source: "methodOf: nativeFunc this: thisObject value: anObject value: anObject2\x0a\x09<\x0a\x09\x09return Function.prototype.call.call(nativeFunc, thisObject,anObject,anObject2);\x0a\x09>",
+source: "methodOf: nativeFunc this: thisObject value: anObject value: anObject2\x0a\x09<inlineJS: '\x0a\x09\x09return Function.prototype.call.call(nativeFunc, thisObject,anObject,anObject2);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3239,7 +3239,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "thisObject", "anObject", "anObject2", "anObject3"],
-source: "methodOf: nativeFunc this: thisObject value: anObject value: anObject2 value: anObject3\x0a\x09<\x0a\x09\x09return Function.prototype.call.call(nativeFunc, thisObject,anObject,anObject2, anObject3);\x0a\x09>",
+source: "methodOf: nativeFunc this: thisObject value: anObject value: anObject2 value: anObject3\x0a\x09<inlineJS: '\x0a\x09\x09return Function.prototype.call.call(nativeFunc, thisObject,anObject,anObject2, anObject3);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3265,7 +3265,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["nativeFunc", "thisObject", "args"],
-source: "methodOf: nativeFunc this: thisObject valueWithArgs: args\x0a\x09<\x0a\x09\x09return Function.prototype.apply.call(nativeFunc, thisObject, args);\x0a\x09>",
+source: "methodOf: nativeFunc this: thisObject valueWithArgs: args\x0a\x09<inlineJS: '\x0a\x09\x09return Function.prototype.apply.call(nativeFunc, thisObject, args);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3297,7 +3297,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "clearInterval\x0a\x09<\x0a\x09\x09var interval = self[\x22@rawTimeout\x22];\x0a\x09\x09clearInterval(interval);\x0a\x09>",
+source: "clearInterval\x0a\x09<inlineJS: '\x0a\x09\x09var interval = self[\x22@rawTimeout\x22];\x0a\x09\x09clearInterval(interval);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3324,7 +3324,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "clearTimeout\x0a\x09<\x0a\x09\x09var timeout = self[\x22@rawTimeout\x22];\x0a\x09\x09clearTimeout(timeout);\x0a\x09>",
+source: "clearTimeout\x0a\x09<inlineJS: '\x0a\x09\x09var timeout = self[\x22@rawTimeout\x22];\x0a\x09\x09clearTimeout(timeout);\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 94 - 94
src/Kernel-Methods.st

@@ -29,11 +29,11 @@ I am is directly mapped to JavaScript Function.
 !BlockClosure methodsFor: 'accessing'!
 
 compiledSource
-	<return self.toString()>
+	<inlineJS: 'return self.toString()'>
 !
 
 numArgs
-	<return self.length>
+	<inlineJS: 'return self.length'>
 !
 
 receiver
@@ -47,7 +47,7 @@ whileFalse
 !
 
 whileFalse: aBlock
-	<while(!!$core.assert(self._value())) {aBlock._value()}>
+	<inlineJS: 'while(!!$core.assert(self._value())) {aBlock._value()}'>
 !
 
 whileTrue
@@ -55,13 +55,13 @@ whileTrue
 !
 
 whileTrue: aBlock
-	<while($core.assert(self._value())) {aBlock._value()}>
+	<inlineJS: 'while($core.assert(self._value())) {aBlock._value()}'>
 ! !
 
 !BlockClosure methodsFor: 'converting'!
 
 asCompiledMethod: aString
-	<return $core.method({selector:aString, fn:self});>
+	<inlineJS: 'return $core.method({selector:aString, fn:self});'>
 !
 
 currySelf
@@ -70,13 +70,13 @@ currySelf
 	into function (x, y, ...) {jscode} that takes selfarg from 'this'.
 	IOW, it is usable as JS method and first arg takes the receiver."
 	
-	<
+	<inlineJS: '
 		return function () {
 			var args = [ this ];
 			args.push.apply(args, arguments);
 			return self.apply(null, args);
 		}
-	>
+	'>
 ! !
 
 !BlockClosure methodsFor: 'error handling'!
@@ -93,7 +93,7 @@ on: anErrorClass do: aBlock
 !
 
 tryCatch: aBlock
-	<
+	<inlineJS: '
 		try {
 			return self._value();
 		} catch(error) {
@@ -101,23 +101,23 @@ tryCatch: aBlock
 			if (Array.isArray(error) && error.length === 1) throw error;
 			return aBlock._value_(error);
 		}
-	>
+	'>
 ! !
 
 !BlockClosure methodsFor: 'evaluating'!
 
 applyTo: anObject arguments: aCollection
-	<return self.apply(anObject, aCollection)>
+	<inlineJS: 'return self.apply(anObject, aCollection)'>
 !
 
 ensure: aBlock
-	<try{return self._value()}finally{aBlock._value()}>
+	<inlineJS: 'try{return self._value()}finally{aBlock._value()}'>
 !
 
 new
 	"Use the receiver as a JS constructor.
 	*Do not* use this method to instanciate Smalltalk objects!!"
-	<return new self()>
+	<inlineJS: 'return new self()'>
 !
 
 newValue: anObject
@@ -134,11 +134,11 @@ newValue: anObject value: anObject2 value: anObject3
 
 newWithValues: aCollection
 	"Simulates JS new operator by combination of Object.create and .apply"
-	<
+	<inlineJS: '
 		var object = Object.create(self.prototype);
 		var result = self.apply(object, aCollection);
 		return typeof result === "object" ? result : object;
-	>
+	'>
 !
 
 timeToRun
@@ -148,23 +148,23 @@ timeToRun
 !
 
 value
-	<return self();>
+	<inlineJS: 'return self();'>
 !
 
 value: anArg
-	<return self(anArg);>
+	<inlineJS: 'return self(anArg);'>
 !
 
 value: firstArg value: secondArg
-	<return self(firstArg, secondArg);>
+	<inlineJS: 'return self(firstArg, secondArg);'>
 !
 
 value: firstArg value: secondArg value: thirdArg
-	<return self(firstArg, secondArg, thirdArg);>
+	<inlineJS: 'return self(firstArg, secondArg, thirdArg);'>
 !
 
 valueWithPossibleArguments: aCollection
-	<return self.apply(null, aCollection);>
+	<inlineJS: 'return self.apply(null, aCollection);'>
 ! !
 
 !BlockClosure methodsFor: 'timeout/interval'!
@@ -174,17 +174,17 @@ fork
 !
 
 valueWithInterval: aNumber
-	<
+	<inlineJS: '
 		var interval = setInterval(self, aNumber);
 		return $globals.Timeout._on_(interval);
-	>
+	'>
 !
 
 valueWithTimeout: aNumber
-	<
+	<inlineJS: '
 		var timeout = setTimeout(self, aNumber);
 		return $globals.Timeout._on_(timeout);
-	>
+	'>
 ! !
 
 Object subclass: #CompiledMethod
@@ -213,7 +213,7 @@ Messages sent from an instance:
 !CompiledMethod methodsFor: 'accessing'!
 
 arguments
-	<return self.args || []>
+	<inlineJS: 'return self.args || []'>
 !
 
 category
@@ -558,11 +558,11 @@ My instances are JavaScript `SmalltalkMethodContext` objects defined in `boot.js
 !MethodContext methodsFor: 'accessing'!
 
 basicReceiver
-	<return self.receiver>
+	<inlineJS: 'return self.receiver'>
 !
 
 evaluatedSelector
-	<return self.evaluatedSelector>
+	<inlineJS: 'return self.evaluatedSelector'>
 !
 
 findContextSuchThat: testBlock
@@ -581,15 +581,15 @@ findContextSuchThat: testBlock
 !
 
 home
-	<return self.homeContext>
+	<inlineJS: 'return self.homeContext'>
 !
 
 index
-	<return self.index || 0>
+	<inlineJS: 'return self.index || 0'>
 !
 
 locals
-	<return self.locals || {}>
+	<inlineJS: 'return self.locals || {}'>
 !
 
 method
@@ -616,7 +616,7 @@ methodContext
 !
 
 outerContext
-	<return self.outerContext || self.homeContext>
+	<inlineJS: 'return self.outerContext || self.homeContext'>
 !
 
 receiver
@@ -626,25 +626,25 @@ receiver
 !
 
 selector
-	<
+	<inlineJS: '
 		if(self.selector) {
 			return $core.js2st(self.selector);
 		} else {
 			return nil;
 		}
-	>
+	'>
 !
 
 sendIndexAt: aSelector
-	<return self.sendIdx[aSelector] || 0>
+	<inlineJS: 'return self.sendIdx[aSelector] || 0'>
 !
 
 sendIndexes
-	<return self.sendIdx>
+	<inlineJS: 'return self.sendIdx'>
 !
 
 supercall
-	<return self.supercall == true>
+	<inlineJS: 'return self.supercall == true'>
 ! !
 
 !MethodContext methodsFor: 'converting'!
@@ -700,154 +700,154 @@ Created instances will most probably be instance of `JSObjectProxy`.
 !NativeFunction class methodsFor: 'function calling'!
 
 functionNamed: aString
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return nativeFunc();
-	>
+	'>
 !
 
 functionNamed: aString value: anObject
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return nativeFunc(anObject);
-	>
+	'>
 !
 
 functionNamed: aString value: anObject value: anObject2
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return nativeFunc(anObject,anObject2);
-	>
+	'>
 !
 
 functionNamed: aString value: anObject value: anObject2 value: anObject3
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return nativeFunc(anObject,anObject2, anObject3);
-	>
+	'>
 !
 
 functionNamed: aString valueWithArgs: args
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return Function.prototype.apply.call(nativeFunc, null, args);
-	>
+	'>
 !
 
 functionOf: nativeFunc
-	<
+	<inlineJS: '
 		return nativeFunc();
-	>
+	'>
 !
 
 functionOf: nativeFunc value: anObject
-	<
+	<inlineJS: '
 		return nativeFunc(anObject);
-	>
+	'>
 !
 
 functionOf: nativeFunc value: anObject value: anObject2
-	<
+	<inlineJS: '
 		return nativeFunc(anObject,anObject2);
-	>
+	'>
 !
 
 functionOf: nativeFunc value: anObject value: anObject2 value: anObject3
-	<
+	<inlineJS: '
 		return nativeFunc(anObject,anObject2, anObject3);
-	>
+	'>
 !
 
 functionOf: nativeFunc valueWithArgs: args
-	<
+	<inlineJS: '
 		return Function.prototype.apply.call(nativeFunc, null, args);
-	>
+	'>
 ! !
 
 !NativeFunction class methodsFor: 'instance creation'!
 
 constructorNamed: aString
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return new nativeFunc();
-	>
+	'>
 !
 
 constructorNamed: aString value: anObject
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return new nativeFunc(anObject);
-	>
+	'>
 !
 
 constructorNamed: aString value: anObject value: anObject2
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return new nativeFunc(anObject,anObject2);
-	>
+	'>
 !
 
 constructorNamed: aString value: anObject value: anObject2 value: anObject3
-	<
-		var nativeFunc=(new Function('return this'))()[aString];
+	<inlineJS: '
+		var nativeFunc=(new Function(''return this''))()[aString];
 		return new nativeFunc(anObject,anObject2, anObject3);
-	>
+	'>
 !
 
 constructorOf: nativeFunc
-	<
+	<inlineJS: '
 		return new nativeFunc();
-	>
+	'>
 !
 
 constructorOf: nativeFunc value: anObject
-	<
+	<inlineJS: '
 		return new nativeFunc(anObject);
-	>
+	'>
 !
 
 constructorOf: nativeFunc value: anObject value: anObject2
-	<
+	<inlineJS: '
 		return new nativeFunc(anObject,anObject2);
-	>
+	'>
 !
 
 constructorOf: nativeFunc value: anObject value: anObject2 value: anObject3
-	<
+	<inlineJS: '
 		return new nativeFunc(anObject,anObject2, anObject3);
-	>
+	'>
 ! !
 
 !NativeFunction class methodsFor: 'method calling'!
 
 methodOf: nativeFunc this: thisObject
-	<
+	<inlineJS: '
 		return Function.prototype.call.call(nativeFunc, thisObject);
-	>
+	'>
 !
 
 methodOf: nativeFunc this: thisObject value: anObject
-	<
+	<inlineJS: '
 		return Function.prototype.call.call(nativeFunc, thisObject, anObject);
-	>
+	'>
 !
 
 methodOf: nativeFunc this: thisObject value: anObject value: anObject2
-	<
+	<inlineJS: '
 		return Function.prototype.call.call(nativeFunc, thisObject,anObject,anObject2);
-	>
+	'>
 !
 
 methodOf: nativeFunc this: thisObject value: anObject value: anObject2 value: anObject3
-	<
+	<inlineJS: '
 		return Function.prototype.call.call(nativeFunc, thisObject,anObject,anObject2, anObject3);
-	>
+	'>
 !
 
 methodOf: nativeFunc this: thisObject valueWithArgs: args
-	<
+	<inlineJS: '
 		return Function.prototype.apply.call(nativeFunc, thisObject, args);
-	>
+	'>
 ! !
 
 !NativeFunction class methodsFor: 'testing'!
@@ -875,17 +875,17 @@ rawTimeout: anObject
 !Timeout methodsFor: 'timeout/interval'!
 
 clearInterval
-	<
+	<inlineJS: '
 		var interval = self["@rawTimeout"];
 		clearInterval(interval);
-	>
+	'>
 !
 
 clearTimeout
-	<
+	<inlineJS: '
 		var timeout = self["@rawTimeout"];
 		clearTimeout(timeout);
-	>
+	'>
 ! !
 
 !Timeout class methodsFor: 'instance creation'!

+ 86 - 110
src/Kernel-Objects.js

@@ -50,7 +50,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "== anObject\x0a<return self._class() === $recv(anObject)._class() && self._isSameInstanceAs_(anObject)>",
+source: "== anObject\x0a<inlineJS:\x0a\x09'return self._class() === $recv(anObject)._class() && self._isSameInstanceAs_(anObject)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -97,7 +97,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "class\x0a\x09<return self.klass>",
+source: "class\x0a\x09<inlineJS: 'return self.klass'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -178,7 +178,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "identityHash\x0a\x09<\x0a\x09\x09var hash=self.identityHash;\x0a\x09\x09if (hash) return hash;\x0a\x09\x09hash=$core.nextId();\x0a\x09\x09Object.defineProperty(self, 'identityHash', {value:hash});\x0a\x09\x09return hash;\x0a\x09>",
+source: "identityHash\x0a\x09<inlineJS: '\x0a\x09\x09var hash=self.identityHash;\x0a\x09\x09if (hash) return hash;\x0a\x09\x09hash=$core.nextId();\x0a\x09\x09Object.defineProperty(self, ''identityHash'', {value:hash});\x0a\x09\x09return hash;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -341,7 +341,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
- return self['@'+aString] ;
+return self['@'+aString];
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"instVarAt:",{aString:aString},$globals.ProtoObject)});
@@ -349,7 +349,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "instVarAt: aString\x0a\x09< return self['@'+aString] >",
+source: "instVarAt: aString\x0a\x09<inlineJS: 'return self[''@''+aString]'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -365,7 +365,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
- self['@' + aString] = anObject ;
+self['@' + aString] = anObject;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"instVarAt:put:",{aString:aString,anObject:anObject},$globals.ProtoObject)});
@@ -373,7 +373,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject"],
-source: "instVarAt: aString put: anObject\x0a\x09< self['@' + aString] = anObject >",
+source: "instVarAt: aString put: anObject\x0a\x09<inlineJS: 'self[''@'' + aString] = anObject'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -518,7 +518,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aCollection"],
-source: "perform: aString withArguments: aCollection\x0a\x09<return $core.send2(self, aString, aCollection)>",
+source: "perform: aString withArguments: aCollection\x0a\x09<inlineJS: 'return $core.send2(self, aString, aCollection)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -813,7 +813,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "basicAt: aString\x0a\x09<return self[aString]>",
+source: "basicAt: aString\x0a\x09<inlineJS: 'return self[aString]'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -837,7 +837,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "anObject"],
-source: "basicAt: aString put: anObject\x0a\x09<return self[aString] = anObject>",
+source: "basicAt: aString put: anObject\x0a\x09<inlineJS: 'return self[aString] = anObject'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -861,7 +861,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString"],
-source: "basicDelete: aString\x0a\x09<delete self[aString]; return aString>",
+source: "basicDelete: aString\x0a\x09<inlineJS: 'delete self[aString]; return aString'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -908,7 +908,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aString", "aCollection"],
-source: "basicPerform: aString withArguments: aCollection\x0a\x09<return self[aString].apply(self, aCollection);>",
+source: "basicPerform: aString withArguments: aCollection\x0a\x09<inlineJS: 'return self[aString].apply(self, aCollection);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -987,7 +987,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "deepCopy\x0a\x09<\x0a\x09\x09var copy = self.klass._new();\x0a\x09\x09Object.keys(self).forEach(function (i) {\x0a\x09\x09if(/^@.+/.test(i)) {\x0a\x09\x09\x09copy[i] = self[i]._deepCopy();\x0a\x09\x09}\x0a\x09\x09});\x0a\x09\x09return copy;\x0a\x09>",
+source: "deepCopy\x0a\x09<inlineJS: '\x0a\x09\x09var copy = self.klass._new();\x0a\x09\x09Object.keys(self).forEach(function (i) {\x0a\x09\x09if(/^@.+/.test(i)) {\x0a\x09\x09\x09copy[i] = self[i]._deepCopy();\x0a\x09\x09}\x0a\x09\x09});\x0a\x09\x09return copy;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1476,7 +1476,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "shallowCopy\x0a\x09<\x0a\x09\x09var copy = self.klass._new();\x0a\x09\x09Object.keys(self).forEach(function(i) {\x0a\x09\x09if(/^@.+/.test(i)) {\x0a\x09\x09\x09copy[i] = self[i];\x0a\x09\x09}\x0a\x09\x09});\x0a\x09\x09return copy;\x0a\x09>",
+source: "shallowCopy\x0a\x09<inlineJS: '\x0a\x09\x09var copy = self.klass._new();\x0a\x09\x09Object.keys(self).forEach(function(i) {\x0a\x09\x09if(/^@.+/.test(i)) {\x0a\x09\x09\x09copy[i] = self[i];\x0a\x09\x09}\x0a\x09\x09});\x0a\x09\x09return copy;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1555,30 +1555,6 @@ messageSends: ["error:"]
 }),
 $globals.Object);
 
-$core.addMethod(
-$core.method({
-selector: "throw:",
-protocol: 'error handling',
-fn: function (anObject){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
- throw anObject ;
-return self;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"throw:",{anObject:anObject},$globals.Object)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "throw: anObject\x0a\x09< throw anObject >",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: []
-}),
-$globals.Object);
-
 $core.addMethod(
 $core.method({
 selector: "value",
@@ -1596,7 +1572,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "value\x0a\x09<return self.valueOf()>",
+source: "value\x0a\x09<inlineJS: 'return self.valueOf()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1746,7 +1722,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBoolean"],
-source: "& aBoolean\x0a\x09<\x0a\x09\x09if(self == true) {\x0a\x09\x09return aBoolean;\x0a\x09\x09} else {\x0a\x09\x09return false;\x0a\x09\x09}\x0a\x09>",
+source: "& aBoolean\x0a\x09<inlineJS: '\x0a\x09\x09if(self == true) {\x0a\x09\x09return aBoolean;\x0a\x09\x09} else {\x0a\x09\x09return false;\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1773,7 +1749,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBoolean"],
-source: "== aBoolean\x0a<\x0a\x09if (typeof aBoolean === \x22boolean\x22) return self.valueOf() === aBoolean;\x0a\x09else if (aBoolean != null && typeof aBoolean === \x22object\x22) return self.valueOf() === aBoolean.valueOf();\x0a\x09else return false;\x0a>",
+source: "== aBoolean\x0a<inlineJS: '\x0a\x09if (typeof aBoolean === \x22boolean\x22) return self.valueOf() === aBoolean;\x0a\x09else if (aBoolean != null && typeof aBoolean === \x22object\x22) return self.valueOf() === aBoolean.valueOf();\x0a\x09else return false;\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1862,7 +1838,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
- return self.toString() ;
+return self.toString();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"asString",{},$globals.Boolean)});
@@ -1870,7 +1846,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asString\x0a\x09< return self.toString() >",
+source: "asString\x0a\x09<inlineJS: 'return self.toString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -1991,7 +1967,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock", "anotherBlock"],
-source: "ifTrue: aBlock ifFalse: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<\x0a\x09\x09if(self == true) {\x0a\x09\x09return aBlock._value();\x0a\x09\x09} else {\x0a\x09\x09return anotherBlock._value();\x0a\x09\x09}\x0a\x09>",
+source: "ifTrue: aBlock ifFalse: anotherBlock\x0a\x09\x22inlined in the Compiler\x22\x0a\x09<inlineJS: '\x0a\x09\x09if(self == true) {\x0a\x09\x09return aBlock._value();\x0a\x09\x09} else {\x0a\x09\x09return anotherBlock._value();\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2150,7 +2126,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBoolean"],
-source: "| aBoolean\x0a\x09<\x0a\x09\x09if(self == true) {\x0a\x09\x09return true;\x0a\x09\x09} else {\x0a\x09\x09return aBoolean;\x0a\x09\x09}\x0a\x09>",
+source: "| aBoolean\x0a\x09<inlineJS: '\x0a\x09\x09if(self == true) {\x0a\x09\x09return true;\x0a\x09\x09} else {\x0a\x09\x09return aBoolean;\x0a\x09\x09}\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2180,7 +2156,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aDate"],
-source: "+ aDate\x0a\x09<return self + aDate>",
+source: "+ aDate\x0a\x09<inlineJS: 'return self + aDate'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2204,7 +2180,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aDate"],
-source: "- aDate\x0a\x09<return self - aDate>",
+source: "- aDate\x0a\x09<inlineJS: 'return self - aDate'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2228,7 +2204,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aDate"],
-source: "< aDate\x0a\x09<return self < aDate>",
+source: "< aDate\x0a\x09<inlineJS: 'return self < aDate'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2252,7 +2228,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aDate"],
-source: "<= aDate\x0a\x09<return self <= aDate>",
+source: "<= aDate\x0a\x09<inlineJS: 'return self <= aDate'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2320,7 +2296,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aDate"],
-source: "> aDate\x0a\x09<return self >> aDate>",
+source: "> aDate\x0a\x09<inlineJS: 'return self > aDate'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2344,7 +2320,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aDate"],
-source: ">= aDate\x0a\x09<return self >>= aDate>",
+source: ">= aDate\x0a\x09<inlineJS: 'return self >= aDate'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2368,7 +2344,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asDateString\x0a\x09<return self.toDateString()>",
+source: "asDateString\x0a\x09<inlineJS: 'return self.toDateString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2392,7 +2368,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asLocaleString\x0a\x09<return self.toLocaleString()>",
+source: "asLocaleString\x0a\x09<inlineJS: 'return self.toLocaleString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2462,7 +2438,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asString\x0a\x09<return self.toString()>",
+source: "asString\x0a\x09<inlineJS: 'return self.toString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2486,7 +2462,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asTimeString\x0a\x09<return self.toTimeString()>",
+source: "asTimeString\x0a\x09<inlineJS: 'return self.toTimeString()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2557,7 +2533,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "dayOfMonth\x0a\x09<return self.getDate()>",
+source: "dayOfMonth\x0a\x09<inlineJS: 'return self.getDate()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2581,7 +2557,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "dayOfMonth: aNumber\x0a\x09<self.setDate(aNumber)>",
+source: "dayOfMonth: aNumber\x0a\x09<inlineJS: 'self.setDate(aNumber)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2605,7 +2581,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "dayOfWeek\x0a\x09<return self.getDay() + 1>",
+source: "dayOfWeek\x0a\x09<inlineJS: 'return self.getDay() + 1'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2629,7 +2605,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "dayOfWeek: aNumber\x0a\x09<return self.setDay(aNumber - 1)>",
+source: "dayOfWeek: aNumber\x0a\x09<inlineJS: 'return self.setDay(aNumber - 1)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2653,7 +2629,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "hours\x0a\x09<return self.getHours()>",
+source: "hours\x0a\x09<inlineJS: 'return self.getHours()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2677,7 +2653,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "hours: aNumber\x0a\x09<self.setHours(aNumber)>",
+source: "hours: aNumber\x0a\x09<inlineJS: 'self.setHours(aNumber)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2701,7 +2677,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "milliseconds\x0a\x09<return self.getMilliseconds()>",
+source: "milliseconds\x0a\x09<inlineJS: 'return self.getMilliseconds()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2725,7 +2701,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "milliseconds: aNumber\x0a\x09<self.setMilliseconds(aNumber)>",
+source: "milliseconds: aNumber\x0a\x09<inlineJS: 'self.setMilliseconds(aNumber)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2749,7 +2725,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "minutes\x0a\x09<return self.getMinutes()>",
+source: "minutes\x0a\x09<inlineJS: 'return self.getMinutes()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2773,7 +2749,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "minutes: aNumber\x0a\x09<self.setMinutes(aNumber)>",
+source: "minutes: aNumber\x0a\x09<inlineJS: 'self.setMinutes(aNumber)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2797,7 +2773,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "month\x0a\x09<return self.getMonth() + 1>",
+source: "month\x0a\x09<inlineJS: 'return self.getMonth() + 1'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2821,7 +2797,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "month: aNumber\x0a\x09<self.setMonth(aNumber - 1)>",
+source: "month: aNumber\x0a\x09<inlineJS: 'self.setMonth(aNumber - 1)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2869,7 +2845,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "seconds\x0a\x09<return self.getSeconds()>",
+source: "seconds\x0a\x09<inlineJS: 'return self.getSeconds()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2893,7 +2869,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "seconds: aNumber\x0a\x09<self.setSeconds(aNumber)>",
+source: "seconds: aNumber\x0a\x09<inlineJS: 'self.setSeconds(aNumber)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2917,7 +2893,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "time\x0a\x09<return self.getTime()>",
+source: "time\x0a\x09<inlineJS: 'return self.getTime()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2941,7 +2917,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "time: aNumber\x0a\x09<self.setTime(aNumber)>",
+source: "time: aNumber\x0a\x09<inlineJS: 'self.setTime(aNumber)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2965,7 +2941,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "year\x0a\x09<return self.getFullYear()>",
+source: "year\x0a\x09<inlineJS: 'return self.getFullYear()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2989,7 +2965,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "year: aNumber\x0a\x09<self.setFullYear(aNumber)>",
+source: "year: aNumber\x0a\x09<inlineJS: 'self.setFullYear(aNumber)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3130,7 +3106,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "new: anObject\x0a\x09<return new Date(anObject)>",
+source: "new: anObject\x0a\x09<inlineJS: 'return new Date(anObject)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3205,7 +3181,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "& aNumber\x0a\x09<return self & aNumber>",
+source: "& aNumber\x0a\x09<inlineJS: 'return self & aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3229,7 +3205,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "* aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self * aNumber>",
+source: "* aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<inlineJS: 'return self * aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3276,7 +3252,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "+ aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self + aNumber>",
+source: "+ aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<inlineJS: 'return self + aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3300,7 +3276,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "- aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self - aNumber>",
+source: "- aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<inlineJS: 'return self - aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3324,7 +3300,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "/ aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self / aNumber>",
+source: "/ aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<inlineJS: 'return self / aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3371,7 +3347,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "< aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self < aNumber>",
+source: "< aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<inlineJS: 'return self < aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3395,7 +3371,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "<= aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self <= aNumber>",
+source: "<= aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<inlineJS: 'return self <= aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3422,7 +3398,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "== aNumber\x0a<\x0a\x09if (typeof aNumber === \x22number\x22) return Number(self) === aNumber;\x0a\x09else if (aNumber != null && typeof aNumber === \x22object\x22) return Number(self) === aNumber.valueOf();\x0a\x09else return false;\x0a>",
+source: "== aNumber\x0a<inlineJS: '\x0a\x09if (typeof aNumber === \x22number\x22) return Number(self) === aNumber;\x0a\x09else if (aNumber != null && typeof aNumber === \x22object\x22) return Number(self) === aNumber.valueOf();\x0a\x09else return false;\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3446,7 +3422,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "> aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self >> aNumber>",
+source: "> aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<inlineJS: 'return self > aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3470,7 +3446,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: ">= aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<return self >>= aNumber>",
+source: ">= aNumber\x0a\x09\x22Inlined in the Compiler\x22\x0a\x09<inlineJS: 'return self >= aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3517,7 +3493,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "\x5c\x5c aNumber\x0a\x09<return self % aNumber>",
+source: "\x5c\x5c aNumber\x0a\x09<inlineJS: 'return self % aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3541,7 +3517,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "abs\x0a\x09<return Math.abs(self);>",
+source: "abs\x0a\x09<inlineJS: 'return Math.abs(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3565,7 +3541,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "arcCos\x0a\x09<return Math.acos(self);>",
+source: "arcCos\x0a\x09<inlineJS: 'return Math.acos(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3589,7 +3565,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "arcSin\x0a\x09<return Math.asin(self);>",
+source: "arcSin\x0a\x09<inlineJS: 'return Math.asin(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3613,7 +3589,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "arcTan\x0a\x09<return Math.atan(self);>",
+source: "arcTan\x0a\x09<inlineJS: 'return Math.atan(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3716,7 +3692,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
- return String(self) ;
+return String(self);
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"asString",{},$globals.Number)});
@@ -3724,7 +3700,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "asString\x0a\x09< return String(self) >",
+source: "asString\x0a\x09<inlineJS: 'return String(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3771,7 +3747,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "ceiling\x0a\x09<return Math.ceil(self);>",
+source: "ceiling\x0a\x09<inlineJS: 'return Math.ceil(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3813,7 +3789,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "cos\x0a\x09<return Math.cos(self);>",
+source: "cos\x0a\x09<inlineJS: 'return Math.cos(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3883,7 +3859,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "floor\x0a\x09<return Math.floor(self);>",
+source: "floor\x0a\x09<inlineJS: 'return Math.floor(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3966,7 +3942,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "ln\x0a\x09<return Math.log(self);>",
+source: "ln\x0a\x09<inlineJS: 'return Math.log(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -3990,7 +3966,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "log\x0a\x09<return Math.log(self) / Math.LN10;>",
+source: "log\x0a\x09<inlineJS: 'return Math.log(self) / Math.LN10;'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4014,7 +3990,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "log: aNumber\x0a\x09<return Math.log(self) / Math.log(aNumber);>",
+source: "log: aNumber\x0a\x09<inlineJS: 'return Math.log(self) / Math.log(aNumber);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4038,7 +4014,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "max: aNumber\x0a\x09<return Math.max(self, aNumber);>",
+source: "max: aNumber\x0a\x09<inlineJS: 'return Math.max(self, aNumber);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4062,7 +4038,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "min: aNumber\x0a\x09<return Math.min(self, aNumber);>",
+source: "min: aNumber\x0a\x09<inlineJS: 'return Math.min(self, aNumber);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4202,7 +4178,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["placesDesired"],
-source: "printShowingDecimalPlaces: placesDesired\x0a\x09<return self.toFixed(placesDesired)>",
+source: "printShowingDecimalPlaces: placesDesired\x0a\x09<inlineJS: 'return self.toFixed(placesDesired)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4226,7 +4202,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["exponent"],
-source: "raisedTo: exponent\x0a\x09<return Math.pow(self, exponent);>",
+source: "raisedTo: exponent\x0a\x09<inlineJS: 'return Math.pow(self, exponent);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4250,7 +4226,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "rounded\x0a\x09<return Math.round(self);>",
+source: "rounded\x0a\x09<inlineJS: 'return Math.round(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4308,7 +4284,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "sin\x0a\x09<return Math.sin(self);>",
+source: "sin\x0a\x09<inlineJS: 'return Math.sin(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4332,7 +4308,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "sqrt\x0a\x09<return Math.sqrt(self)>",
+source: "sqrt\x0a\x09<inlineJS: 'return Math.sqrt(self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4379,7 +4355,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "tan\x0a\x09<return Math.tan(self);>",
+source: "tan\x0a\x09<inlineJS: 'return Math.tan(self);'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4721,7 +4697,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "truncated\x0a\x09<\x0a\x09\x09if(self >>= 0) {\x0a\x09\x09\x09return Math.floor(self);\x0a\x09\x09} else {\x0a\x09\x09\x09return Math.floor(self * (-1)) * (-1);\x0a\x09\x09};\x0a\x09>",
+source: "truncated\x0a\x09<inlineJS: '\x0a\x09\x09if(self >= 0) {\x0a\x09\x09\x09return Math.floor(self);\x0a\x09\x09} else {\x0a\x09\x09\x09return Math.floor(self * (-1)) * (-1);\x0a\x09\x09};\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4745,7 +4721,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aNumber"],
-source: "| aNumber\x0a\x09<return self | aNumber>",
+source: "| aNumber\x0a\x09<inlineJS: 'return self | aNumber'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4788,7 +4764,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "e\x0a\x09<return Math.E;>",
+source: "e\x0a\x09<inlineJS: 'return Math.E;'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -4812,7 +4788,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "pi\x0a\x09<return Math.PI>",
+source: "pi\x0a\x09<inlineJS: 'return Math.PI'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -5486,7 +5462,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "next\x0a\x09<return Math.random()>",
+source: "next\x0a\x09<inlineJS: 'return Math.random()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 94 - 97
src/Kernel-Objects.st

@@ -10,25 +10,25 @@ In most cases, subclassing `ProtoObject` is wrong and `Object` should be used in
 !ProtoObject methodsFor: 'accessing'!
 
 class
-	<return self.klass>
+	<inlineJS: 'return self.klass'>
 !
 
 identityHash
-	<
+	<inlineJS: '
 		var hash=self.identityHash;
 		if (hash) return hash;
 		hash=$core.nextId();
-		Object.defineProperty(self, 'identityHash', {value:hash});
+		Object.defineProperty(self, ''identityHash'', {value:hash});
 		return hash;
-	>
+	'>
 !
 
 instVarAt: aString
-	< return self['@'+aString] >
+	<inlineJS: 'return self[''@''+aString]'>
 !
 
 instVarAt: aString put: anObject
-	< self['@' + aString] = anObject >
+	<inlineJS: 'self[''@'' + aString] = anObject'>
 !
 
 yourself
@@ -42,7 +42,8 @@ yourself
 !
 
 == anObject
-<return self._class() === $recv(anObject)._class() && self._isSameInstanceAs_(anObject)>
+<inlineJS:
+	'return self._class() === $recv(anObject)._class() && self._isSameInstanceAs_(anObject)'>
 !
 
 isSameInstanceAs: anObject
@@ -99,7 +100,7 @@ perform: aString
 !
 
 perform: aString withArguments: aCollection
-	<return $core.send2(self, aString, aCollection)>
+	<inlineJS: 'return $core.send2(self, aString, aCollection)'>
 ! !
 
 !ProtoObject methodsFor: 'printing'!
@@ -200,15 +201,15 @@ I understand equality `#=` and identity `#==` comparison.
 !Object methodsFor: 'accessing'!
 
 basicAt: aString
-	<return self[aString]>
+	<inlineJS: 'return self[aString]'>
 !
 
 basicAt: aString put: anObject
-	<return self[aString] = anObject>
+	<inlineJS: 'return self[aString] = anObject'>
 !
 
 basicDelete: aString
-	<delete self[aString]; return aString>
+	<inlineJS: 'delete self[aString]; return aString'>
 !
 
 size
@@ -250,7 +251,7 @@ copy
 !
 
 deepCopy
-	<
+	<inlineJS: '
 		var copy = self.klass._new();
 		Object.keys(self).forEach(function (i) {
 		if(/^@.+/.test(i)) {
@@ -258,14 +259,14 @@ deepCopy
 		}
 		});
 		return copy;
-	>
+	'>
 !
 
 postCopy
 !
 
 shallowCopy
-	<
+	<inlineJS: '
 		var copy = self.klass._new();
 		Object.keys(self).forEach(function(i) {
 		if(/^@.+/.test(i)) {
@@ -273,7 +274,7 @@ shallowCopy
 		}
 		});
 		return copy;
-	>
+	'>
 ! !
 
 !Object methodsFor: 'error handling'!
@@ -307,10 +308,6 @@ shouldNotImplement
 
 subclassResponsibility
 	self error: 'This method is a responsibility of a subclass'
-!
-
-throw: anObject
-	< throw anObject >
 ! !
 
 !Object methodsFor: 'evaluating'!
@@ -320,7 +317,7 @@ in: aValuable
 !
 
 value
-	<return self.valueOf()>
+	<inlineJS: 'return self.valueOf()'>
 ! !
 
 !Object methodsFor: 'message handling'!
@@ -330,7 +327,7 @@ basicPerform: aString
 !
 
 basicPerform: aString withArguments: aCollection
-	<return self[aString].apply(self, aCollection);>
+	<inlineJS: 'return self[aString].apply(self, aCollection);'>
 ! !
 
 !Object methodsFor: 'streaming'!
@@ -434,23 +431,23 @@ I am directly mapped to JavaScript Boolean. The `true` and `false` objects are t
 !Boolean methodsFor: 'comparing'!
 
 == aBoolean
-<
+<inlineJS: '
 	if (typeof aBoolean === "boolean") return self.valueOf() === aBoolean;
 	else if (aBoolean !!= null && typeof aBoolean === "object") return self.valueOf() === aBoolean.valueOf();
 	else return false;
->
+'>
 ! !
 
 !Boolean methodsFor: 'controlling'!
 
 & aBoolean
-	<
+	<inlineJS: '
 		if(self == true) {
 		return aBoolean;
 		} else {
 		return false;
 		}
-	>
+	'>
 !
 
 and: aBlock
@@ -476,13 +473,13 @@ ifTrue: aBlock
 
 ifTrue: aBlock ifFalse: anotherBlock
 	"inlined in the Compiler"
-	<
+	<inlineJS: '
 		if(self == true) {
 		return aBlock._value();
 		} else {
 		return anotherBlock._value();
 		}
-	>
+	'>
 !
 
 not
@@ -496,13 +493,13 @@ or: aBlock
 !
 
 | aBoolean
-	<
+	<inlineJS: '
 		if(self == true) {
 		return true;
 		} else {
 		return aBoolean;
 		}
-	>
+	'>
 ! !
 
 !Boolean methodsFor: 'converting'!
@@ -516,7 +513,7 @@ asJSON
 !
 
 asString
-	< return self.toString() >
+	<inlineJS: 'return self.toString()'>
 ! !
 
 !Boolean methodsFor: 'copying'!
@@ -573,95 +570,95 @@ day: aNumber
 !
 
 dayOfMonth
-	<return self.getDate()>
+	<inlineJS: 'return self.getDate()'>
 !
 
 dayOfMonth: aNumber
-	<self.setDate(aNumber)>
+	<inlineJS: 'self.setDate(aNumber)'>
 !
 
 dayOfWeek
-	<return self.getDay() + 1>
+	<inlineJS: 'return self.getDay() + 1'>
 !
 
 dayOfWeek: aNumber
-	<return self.setDay(aNumber - 1)>
+	<inlineJS: 'return self.setDay(aNumber - 1)'>
 !
 
 hours
-	<return self.getHours()>
+	<inlineJS: 'return self.getHours()'>
 !
 
 hours: aNumber
-	<self.setHours(aNumber)>
+	<inlineJS: 'self.setHours(aNumber)'>
 !
 
 milliseconds
-	<return self.getMilliseconds()>
+	<inlineJS: 'return self.getMilliseconds()'>
 !
 
 milliseconds: aNumber
-	<self.setMilliseconds(aNumber)>
+	<inlineJS: 'self.setMilliseconds(aNumber)'>
 !
 
 minutes
-	<return self.getMinutes()>
+	<inlineJS: 'return self.getMinutes()'>
 !
 
 minutes: aNumber
-	<self.setMinutes(aNumber)>
+	<inlineJS: 'self.setMinutes(aNumber)'>
 !
 
 month
-	<return self.getMonth() + 1>
+	<inlineJS: 'return self.getMonth() + 1'>
 !
 
 month: aNumber
-	<self.setMonth(aNumber - 1)>
+	<inlineJS: 'self.setMonth(aNumber - 1)'>
 !
 
 seconds
-	<return self.getSeconds()>
+	<inlineJS: 'return self.getSeconds()'>
 !
 
 seconds: aNumber
-	<self.setSeconds(aNumber)>
+	<inlineJS: 'self.setSeconds(aNumber)'>
 !
 
 time
-	<return self.getTime()>
+	<inlineJS: 'return self.getTime()'>
 !
 
 time: aNumber
-	<self.setTime(aNumber)>
+	<inlineJS: 'self.setTime(aNumber)'>
 !
 
 year
-	<return self.getFullYear()>
+	<inlineJS: 'return self.getFullYear()'>
 !
 
 year: aNumber
-	<self.setFullYear(aNumber)>
+	<inlineJS: 'self.setFullYear(aNumber)'>
 ! !
 
 !Date methodsFor: 'arithmetic'!
 
 + aDate
-	<return self + aDate>
+	<inlineJS: 'return self + aDate'>
 !
 
 - aDate
-	<return self - aDate>
+	<inlineJS: 'return self - aDate'>
 ! !
 
 !Date methodsFor: 'comparing'!
 
 < aDate
-	<return self < aDate>
+	<inlineJS: 'return self < aDate'>
 !
 
 <= aDate
-	<return self <= aDate>
+	<inlineJS: 'return self <= aDate'>
 !
 
 = aDate
@@ -669,21 +666,21 @@ year: aNumber
 !
 
 > aDate
-	<return self >> aDate>
+	<inlineJS: 'return self > aDate'>
 !
 
 >= aDate
-	<return self >>= aDate>
+	<inlineJS: 'return self >= aDate'>
 ! !
 
 !Date methodsFor: 'converting'!
 
 asDateString
-	<return self.toDateString()>
+	<inlineJS: 'return self.toDateString()'>
 !
 
 asLocaleString
-	<return self.toLocaleString()>
+	<inlineJS: 'return self.toLocaleString()'>
 !
 
 asMilliseconds
@@ -695,11 +692,11 @@ asNumber
 !
 
 asString
-	<return self.toString()>
+	<inlineJS: 'return self.toString()'>
 !
 
 asTimeString
-	<return self.toTimeString()>
+	<inlineJS: 'return self.toTimeString()'>
 ! !
 
 !Date methodsFor: 'printing'!
@@ -741,7 +738,7 @@ millisecondsToRun: aBlock
 !
 
 new: anObject
-	<return new Date(anObject)>
+	<inlineJS: 'return new Date(anObject)'>
 !
 
 now
@@ -775,22 +772,22 @@ My instances can also be used to evaluate a block a fixed number of times:
 
 * aNumber
 	"Inlined in the Compiler"
-	<return self * aNumber>
+	<inlineJS: 'return self * aNumber'>
 !
 
 + aNumber
 	"Inlined in the Compiler"
-	<return self + aNumber>
+	<inlineJS: 'return self + aNumber'>
 !
 
 - aNumber
 	"Inlined in the Compiler"
-	<return self - aNumber>
+	<inlineJS: 'return self - aNumber'>
 !
 
 / aNumber
 	"Inlined in the Compiler"
-	<return self / aNumber>
+	<inlineJS: 'return self / aNumber'>
 !
 
 // aNumber
@@ -798,19 +795,19 @@ My instances can also be used to evaluate a block a fixed number of times:
 !
 
 \\ aNumber
-	<return self % aNumber>
+	<inlineJS: 'return self % aNumber'>
 !
 
 abs
-	<return Math.abs(self);>
+	<inlineJS: 'return Math.abs(self);'>
 !
 
 max: aNumber
-	<return Math.max(self, aNumber);>
+	<inlineJS: 'return Math.max(self, aNumber);'>
 !
 
 min: aNumber
-	<return Math.min(self, aNumber);>
+	<inlineJS: 'return Math.min(self, aNumber);'>
 !
 
 negated
@@ -821,36 +818,36 @@ negated
 
 < aNumber
 	"Inlined in the Compiler"
-	<return self < aNumber>
+	<inlineJS: 'return self < aNumber'>
 !
 
 <= aNumber
 	"Inlined in the Compiler"
-	<return self <= aNumber>
+	<inlineJS: 'return self <= aNumber'>
 !
 
 == aNumber
-<
+<inlineJS: '
 	if (typeof aNumber === "number") return Number(self) === aNumber;
 	else if (aNumber !!= null && typeof aNumber === "object") return Number(self) === aNumber.valueOf();
 	else return false;
->
+'>
 !
 
 > aNumber
 	"Inlined in the Compiler"
-	<return self >> aNumber>
+	<inlineJS: 'return self > aNumber'>
 !
 
 >= aNumber
 	"Inlined in the Compiler"
-	<return self >>= aNumber>
+	<inlineJS: 'return self >= aNumber'>
 ! !
 
 !Number methodsFor: 'converting'!
 
 & aNumber
-	<return self & aNumber>
+	<inlineJS: 'return self & aNumber'>
 !
 
 @ aNumber
@@ -874,7 +871,7 @@ asPoint
 !
 
 asString
-	< return String(self) >
+	<inlineJS: 'return String(self)'>
 !
 
 atRandom
@@ -882,15 +879,15 @@ atRandom
 !
 
 ceiling
-	<return Math.ceil(self);>
+	<inlineJS: 'return Math.ceil(self);'>
 !
 
 floor
-	<return Math.floor(self);>
+	<inlineJS: 'return Math.floor(self);'>
 !
 
 rounded
-	<return Math.round(self);>
+	<inlineJS: 'return Math.round(self);'>
 !
 
 to: aNumber
@@ -925,17 +922,17 @@ to: stop by: step
 !
 
 truncated
-	<
-		if(self >>= 0) {
+	<inlineJS: '
+		if(self >= 0) {
 			return Math.floor(self);
 		} else {
 			return Math.floor(self * (-1)) * (-1);
 		};
-	>
+	'>
 !
 
 | aNumber
-	<return self | aNumber>
+	<inlineJS: 'return self | aNumber'>
 ! !
 
 !Number methodsFor: 'copying'!
@@ -988,35 +985,35 @@ to: stop do: aBlock
 !
 
 arcCos
-	<return Math.acos(self);>
+	<inlineJS: 'return Math.acos(self);'>
 !
 
 arcSin
-	<return Math.asin(self);>
+	<inlineJS: 'return Math.asin(self);'>
 !
 
 arcTan
-	<return Math.atan(self);>
+	<inlineJS: 'return Math.atan(self);'>
 !
 
 cos
-	<return Math.cos(self);>
+	<inlineJS: 'return Math.cos(self);'>
 !
 
 ln
-	<return Math.log(self);>
+	<inlineJS: 'return Math.log(self);'>
 !
 
 log
-	<return Math.log(self) / Math.LN10;>
+	<inlineJS: 'return Math.log(self) / Math.LN10;'>
 !
 
 log: aNumber
-	<return Math.log(self) / Math.log(aNumber);>
+	<inlineJS: 'return Math.log(self) / Math.log(aNumber);'>
 !
 
 raisedTo: exponent
-	<return Math.pow(self, exponent);>
+	<inlineJS: 'return Math.pow(self, exponent);'>
 !
 
 sign
@@ -1028,11 +1025,11 @@ sign
 !
 
 sin
-	<return Math.sin(self);>
+	<inlineJS: 'return Math.sin(self);'>
 !
 
 sqrt
-	<return Math.sqrt(self)>
+	<inlineJS: 'return Math.sqrt(self)'>
 !
 
 squared
@@ -1040,7 +1037,7 @@ squared
 !
 
 tan
-	<return Math.tan(self);>
+	<inlineJS: 'return Math.tan(self);'>
 ! !
 
 !Number methodsFor: 'printing'!
@@ -1050,7 +1047,7 @@ printOn: aStream
 !
 
 printShowingDecimalPlaces: placesDesired
-	<return self.toFixed(placesDesired)>
+	<inlineJS: 'return self.toFixed(placesDesired)'>
 ! !
 
 !Number methodsFor: 'testing'!
@@ -1100,11 +1097,11 @@ classTag
 !Number class methodsFor: 'instance creation'!
 
 e
-	<return Math.E;>
+	<inlineJS: 'return Math.E;'>
 !
 
 pi
-	<return Math.PI>
+	<inlineJS: 'return Math.PI'>
 ! !
 
 Object subclass: #Point
@@ -1286,7 +1283,7 @@ Since Amber does not have Characters this will return a `String` of length 1 lik
 !Random methodsFor: 'accessing'!
 
 next
-	<return Math.random()>
+	<inlineJS: 'return Math.random()'>
 !
 
 next: anInteger

+ 17 - 17
src/Kernel-Promises.js

@@ -29,7 +29,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "catch: aBlock\x0a<return self.then(null, function (err) {return $core.seamless(function () {\x0a    return aBlock._value_(err);\x0a})})>",
+source: "catch: aBlock\x0a<inlineJS: 'return self.then(null, function (err) {return $core.seamless(function () {\x0a    return aBlock._value_(err);\x0a})})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -56,7 +56,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aBlock"],
-source: "on: aClass do: aBlock\x0a<return self.then(null, function (err) {return $core.seamless(function () {\x0a    if (err._isKindOf_(aClass)) return aBlock._value_(err);\x0a    else throw err;\x0a})})>",
+source: "on: aClass do: aBlock\x0a<inlineJS: 'return self.then(null, function (err) {return $core.seamless(function () {\x0a    if (err._isKindOf_(aClass)) return aBlock._value_(err);\x0a    else throw err;\x0a})})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -83,7 +83,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aBlock", "anotherBlock"],
-source: "on: aClass do: aBlock catch: anotherBlock\x0a<return self.then(null, function (err) {return $core.seamless(function () {\x0a    try { if (err._isKindOf_(aClass)) return aBlock._value_(err); } catch (e) { err = e; }\x0a    return anotherBlock._value_(err);\x0a})})>",
+source: "on: aClass do: aBlock catch: anotherBlock\x0a<inlineJS: 'return self.then(null, function (err) {return $core.seamless(function () {\x0a    try { if (err._isKindOf_(aClass)) return aBlock._value_(err); } catch (e) { err = e; }\x0a    return anotherBlock._value_(err);\x0a})})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -122,7 +122,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray"],
-source: "then: aBlockOrArray\x0a\x22Accepts a block or array of blocks.\x0aEach of blocks in the array or the singleton one is\x0aused in .then call to a promise, to accept a result\x0aand transform it to the result for the next one.\x0aIn case a block has more than one argument\x0aand result is an array, first n-1 elements of the array\x0aare put into additional arguments beyond the first.\x0aThe first argument always contains the result as-is.\x22\x0a<\x0avar array = Array.isArray(aBlockOrArray) ? aBlockOrArray : [aBlockOrArray];\x0areturn array.reduce(function (soFar, aBlock) {\x0a    return soFar.then(typeof aBlock === \x22function\x22 && aBlock.length >> 1 ?\x0a        function (result) {return $core.seamless(function () {\x0a            if (Array.isArray(result)) {\x0a                return aBlock._valueWithPossibleArguments_([result].concat(result.slice(0, aBlock.length-1)));\x0a            } else {\x0a                return aBlock._value_(result);\x0a            }\x0a        })} :\x0a        function (result) {return $core.seamless(function () {\x0a            return aBlock._value_(result);\x0a        })}\x0a    );\x0a}, self)>",
+source: "then: aBlockOrArray\x0a\x22Accepts a block or array of blocks.\x0aEach of blocks in the array or the singleton one is\x0aused in .then call to a promise, to accept a result\x0aand transform it to the result for the next one.\x0aIn case a block has more than one argument\x0aand result is an array, first n-1 elements of the array\x0aare put into additional arguments beyond the first.\x0aThe first argument always contains the result as-is.\x22\x0a<inlineJS: '\x0avar array = Array.isArray(aBlockOrArray) ? aBlockOrArray : [aBlockOrArray];\x0areturn array.reduce(function (soFar, aBlock) {\x0a    return soFar.then(typeof aBlock === \x22function\x22 && aBlock.length > 1 ?\x0a        function (result) {return $core.seamless(function () {\x0a            if (Array.isArray(result)) {\x0a                return aBlock._valueWithPossibleArguments_([result].concat(result.slice(0, aBlock.length-1)));\x0a            } else {\x0a                return aBlock._value_(result);\x0a            }\x0a        })} :\x0a        function (result) {return $core.seamless(function () {\x0a            return aBlock._value_(result);\x0a        })}\x0a    );\x0a}, self)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -219,7 +219,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aCollection"],
-source: "all: aCollection\x0a\x22Returns a Promise resolved with results of sub-promises.\x22\x0a<return Promise.all($recv(aCollection)._asArray())>",
+source: "all: aCollection\x0a\x22Returns a Promise resolved with results of sub-promises.\x22\x0a<inlineJS: 'return Promise.all($recv(aCollection)._asArray())'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -243,7 +243,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aCollection"],
-source: "any: aCollection\x0a\x22Returns a Promise resolved with first result of sub-promises.\x22\x0a<return Promise.race($recv(aCollection)._asArray())>",
+source: "any: aCollection\x0a\x22Returns a Promise resolved with first result of sub-promises.\x22\x0a<inlineJS: 'return Promise.race($recv(aCollection)._asArray())'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -290,7 +290,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "new\x0a\x22Returns a dumb Promise resolved with nil.\x22\x0a<return Promise.resolve()>",
+source: "new\x0a\x22Returns a dumb Promise resolved with nil.\x22\x0a<inlineJS: 'return Promise.resolve()'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -317,7 +317,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "new: aBlock\x0a\x22Returns a Promise that is eventually resolved or rejected.\x0aPass a block that is called with one argument, model.\x0aYou should call model value: ... to resolve the promise\x0aand model signal: ... to reject the promise.\x0aIf error happens during run of the block,\x0apromise is rejected with that error as well.\x22\x0a<return new Promise(function (resolve, reject) {\x0a    var model = {value: resolve, signal: reject}; // TODO make faster\x0a    aBlock._value_(model);\x0a})>",
+source: "new: aBlock\x0a\x22Returns a Promise that is eventually resolved or rejected.\x0aPass a block that is called with one argument, model.\x0aYou should call model value: ... to resolve the promise\x0aand model signal: ... to reject the promise.\x0aIf error happens during run of the block,\x0apromise is rejected with that error as well.\x22\x0a<inlineJS: 'return new Promise(function (resolve, reject) {\x0a    var model = {value: resolve, signal: reject}; // TODO make faster\x0a    aBlock._value_(model);\x0a})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -341,7 +341,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "signal: anObject\x0a\x22Returns a Promise rejected with anObject.\x22\x0a<return $recv(anObject)._in_(function (x) {return Promise.reject(x)})>",
+source: "signal: anObject\x0a\x22Returns a Promise rejected with anObject.\x22\x0a<inlineJS: 'return $recv(anObject)._in_(function (x) {return Promise.reject(x)})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -365,7 +365,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["anObject"],
-source: "value: anObject\x0a\x22Returns a Promise resolved with anObject.\x22\x0a<return $recv(anObject)._in_(function (x) {return Promise.resolve(x)})>",
+source: "value: anObject\x0a\x22Returns a Promise resolved with anObject.\x22\x0a<inlineJS: 'return $recv(anObject)._in_(function (x) {return Promise.resolve(x)})'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -397,7 +397,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlock"],
-source: "catch: aBlock\x0a<var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._catch_.call(js, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22catch:\x22)\x0a            ._arguments_([aBlock])\x0a    )>",
+source: "catch: aBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._catch_.call(js, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22catch:\x22)\x0a            ._arguments_([aBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -429,7 +429,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aBlock"],
-source: "on: aClass do: aBlock\x0a<var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._on_do_.call(js, aClass, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22on:do:\x22)\x0a            ._arguments_([aClass, aBlock])\x0a    )>",
+source: "on: aClass do: aBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._on_do_.call(js, aClass, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22on:do:\x22)\x0a            ._arguments_([aClass, aBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -461,7 +461,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aClass", "aBlock", "anotherBlock"],
-source: "on: aClass do: aBlock catch: anotherBlock\x0a<var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._on_do_catch_.call(js, aClass, aBlock, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22on:do:catch:\x22)\x0a            ._arguments_([aClass, aBlock, anotherBlock])\x0a    )>",
+source: "on: aClass do: aBlock catch: anotherBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._on_do_catch_.call(js, aClass, aBlock, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22on:do:catch:\x22)\x0a            ._arguments_([aClass, aBlock, anotherBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -493,7 +493,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray"],
-source: "then: aBlockOrArray\x0a<var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_.call(js, aBlockOrArray);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:\x22)\x0a            ._arguments_([aBlockOrArray])\x0a    )>",
+source: "then: aBlockOrArray\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_.call(js, aBlockOrArray);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:\x22)\x0a            ._arguments_([aBlockOrArray])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -525,7 +525,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray", "anotherBlock"],
-source: "then: aBlockOrArray catch: anotherBlock\x0a<var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_catch_.call(js, aBlockOrArray, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:catch:\x22)\x0a            ._arguments_([aBlockOrArray, anotherBlock])\x0a    )>",
+source: "then: aBlockOrArray catch: anotherBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_catch_.call(js, aBlockOrArray, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:catch:\x22)\x0a            ._arguments_([aBlockOrArray, anotherBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -557,7 +557,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray", "aClass", "aBlock"],
-source: "then: aBlockOrArray on: aClass do: aBlock\x0a<var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_on_do_.call(js, aBlockOrArray, aClass, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:on:do:\x22)\x0a            ._arguments_([aBlockOrArray, aClass, aBlock])\x0a    )>",
+source: "then: aBlockOrArray on: aClass do: aBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_on_do_.call(js, aBlockOrArray, aClass, aBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:on:do:\x22)\x0a            ._arguments_([aBlockOrArray, aClass, aBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -589,7 +589,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aBlockOrArray", "aClass", "aBlock", "anotherBlock"],
-source: "then: aBlockOrArray on: aClass do: aBlock catch: anotherBlock\x0a<var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_on_do_catch_.call(js, aBlockOrArray, aClass, aBlock, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:on:do:catch:\x22)\x0a            ._arguments_([aBlockOrArray, aClass, aBlock, anotherBlock])\x0a    )>",
+source: "then: aBlockOrArray on: aClass do: aBlock catch: anotherBlock\x0a<inlineJS: 'var js = self[\x22@jsObject\x22];\x0aif (typeof js.then === \x22function\x22)\x0a    return $globals.Thenable.fn.prototype._then_on_do_catch_.call(js, aBlockOrArray, aClass, aBlock, anotherBlock);\x0aelse\x0a    return self._doesNotUnderstand_(\x0a        $globals.Message._new()\x0a            ._selector_(\x22then:on:do:catch:\x22)\x0a            ._arguments_([aBlockOrArray, aClass, aBlock, anotherBlock])\x0a    )'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 30 - 30
src/Kernel-Promises.st

@@ -12,23 +12,23 @@ I contain methods that wrap Promises/A+ `.then` behaviour.!
 !Thenable methodsFor: 'promises'!
 
 catch: aBlock
-<return self.then(null, function (err) {return $core.seamless(function () {
+<inlineJS: 'return self.then(null, function (err) {return $core.seamless(function () {
     return aBlock._value_(err);
-})})>
+})})'>
 !
 
 on: aClass do: aBlock
-<return self.then(null, function (err) {return $core.seamless(function () {
+<inlineJS: 'return self.then(null, function (err) {return $core.seamless(function () {
     if (err._isKindOf_(aClass)) return aBlock._value_(err);
     else throw err;
-})})>
+})})'>
 !
 
 on: aClass do: aBlock catch: anotherBlock
-<return self.then(null, function (err) {return $core.seamless(function () {
+<inlineJS: 'return self.then(null, function (err) {return $core.seamless(function () {
     try { if (err._isKindOf_(aClass)) return aBlock._value_(err); } catch (e) { err = e; }
     return anotherBlock._value_(err);
-})})>
+})})'>
 !
 
 then: aBlockOrArray
@@ -40,10 +40,10 @@ In case a block has more than one argument
 and result is an array, first n-1 elements of the array
 are put into additional arguments beyond the first.
 The first argument always contains the result as-is."
-<
+<inlineJS: '
 var array = Array.isArray(aBlockOrArray) ? aBlockOrArray : [aBlockOrArray];
 return array.reduce(function (soFar, aBlock) {
-    return soFar.then(typeof aBlock === "function" && aBlock.length >> 1 ?
+    return soFar.then(typeof aBlock === "function" && aBlock.length > 1 ?
         function (result) {return $core.seamless(function () {
             if (Array.isArray(result)) {
                 return aBlock._valueWithPossibleArguments_([result].concat(result.slice(0, aBlock.length-1)));
@@ -55,7 +55,7 @@ return array.reduce(function (soFar, aBlock) {
             return aBlock._value_(result);
         })}
     );
-}, self)>
+}, self)'>
 !
 
 then: aBlockOrArray catch: anotherBlock
@@ -78,12 +78,12 @@ Thenable subclass: #Promise
 
 all: aCollection
 "Returns a Promise resolved with results of sub-promises."
-<return Promise.all($recv(aCollection)._asArray())>
+<inlineJS: 'return Promise.all($recv(aCollection)._asArray())'>
 !
 
 any: aCollection
 "Returns a Promise resolved with first result of sub-promises."
-<return Promise.race($recv(aCollection)._asArray())>
+<inlineJS: 'return Promise.race($recv(aCollection)._asArray())'>
 ! !
 
 !Promise class methodsFor: 'instance creation'!
@@ -96,7 +96,7 @@ and rejected if error happens while evaluating aBlock."
 
 new
 "Returns a dumb Promise resolved with nil."
-<return Promise.resolve()>
+<inlineJS: 'return Promise.resolve()'>
 !
 
 new: aBlock
@@ -106,26 +106,26 @@ You should call model value: ... to resolve the promise
 and model signal: ... to reject the promise.
 If error happens during run of the block,
 promise is rejected with that error as well."
-<return new Promise(function (resolve, reject) {
+<inlineJS: 'return new Promise(function (resolve, reject) {
     var model = {value: resolve, signal: reject}; // TODO make faster
     aBlock._value_(model);
-})>
+})'>
 !
 
 signal: anObject
 "Returns a Promise rejected with anObject."
-<return $recv(anObject)._in_(function (x) {return Promise.reject(x)})>
+<inlineJS: 'return $recv(anObject)._in_(function (x) {return Promise.reject(x)})'>
 !
 
 value: anObject
 "Returns a Promise resolved with anObject."
-<return $recv(anObject)._in_(function (x) {return Promise.resolve(x)})>
+<inlineJS: 'return $recv(anObject)._in_(function (x) {return Promise.resolve(x)})'>
 ! !
 
 !JSObjectProxy methodsFor: '*Kernel-Promises'!
 
 catch: aBlock
-<var js = self["@jsObject"];
+<inlineJS: 'var js = self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._catch_.call(js, aBlock);
 else
@@ -133,11 +133,11 @@ else
         $globals.Message._new()
             ._selector_("catch:")
             ._arguments_([aBlock])
-    )>
+    )'>
 !
 
 on: aClass do: aBlock
-<var js = self["@jsObject"];
+<inlineJS: 'var js = self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._on_do_.call(js, aClass, aBlock);
 else
@@ -145,11 +145,11 @@ else
         $globals.Message._new()
             ._selector_("on:do:")
             ._arguments_([aClass, aBlock])
-    )>
+    )'>
 !
 
 on: aClass do: aBlock catch: anotherBlock
-<var js = self["@jsObject"];
+<inlineJS: 'var js = self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._on_do_catch_.call(js, aClass, aBlock, anotherBlock);
 else
@@ -157,11 +157,11 @@ else
         $globals.Message._new()
             ._selector_("on:do:catch:")
             ._arguments_([aClass, aBlock, anotherBlock])
-    )>
+    )'>
 !
 
 then: aBlockOrArray
-<var js = self["@jsObject"];
+<inlineJS: 'var js = self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_.call(js, aBlockOrArray);
 else
@@ -169,11 +169,11 @@ else
         $globals.Message._new()
             ._selector_("then:")
             ._arguments_([aBlockOrArray])
-    )>
+    )'>
 !
 
 then: aBlockOrArray catch: anotherBlock
-<var js = self["@jsObject"];
+<inlineJS: 'var js = self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_catch_.call(js, aBlockOrArray, anotherBlock);
 else
@@ -181,11 +181,11 @@ else
         $globals.Message._new()
             ._selector_("then:catch:")
             ._arguments_([aBlockOrArray, anotherBlock])
-    )>
+    )'>
 !
 
 then: aBlockOrArray on: aClass do: aBlock
-<var js = self["@jsObject"];
+<inlineJS: 'var js = self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_on_do_.call(js, aBlockOrArray, aClass, aBlock);
 else
@@ -193,11 +193,11 @@ else
         $globals.Message._new()
             ._selector_("then:on:do:")
             ._arguments_([aBlockOrArray, aClass, aBlock])
-    )>
+    )'>
 !
 
 then: aBlockOrArray on: aClass do: aBlock catch: anotherBlock
-<var js = self["@jsObject"];
+<inlineJS: 'var js = self["@jsObject"];
 if (typeof js.then === "function")
     return $globals.Thenable.fn.prototype._then_on_do_catch_.call(js, aBlockOrArray, aClass, aBlock, anotherBlock);
 else
@@ -205,6 +205,6 @@ else
         $globals.Message._new()
             ._selector_("then:on:do:catch:")
             ._arguments_([aBlockOrArray, aClass, aBlock, anotherBlock])
-    )>
+    )'>
 ! !
 

+ 15 - 15
src/Kernel-Tests.js

@@ -728,15 +728,15 @@ return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 
 	function TestConstructor(arg1, arg2, arg3) {}
-	TestConstructor.prototype.name = 'theTestPrototype';
+	TestConstructor.prototype.name = "theTestPrototype";
 
 	var wrappedConstructor = $recv(TestConstructor);
-	var result = wrappedConstructor._newWithValues_([1, 2, 3 ]);
+	var result = wrappedConstructor._newWithValues_([1, 2, 3]);
 	self._assert_(result instanceof TestConstructor);
-	self._assert_equals_(result.name, 'theTestPrototype');
+	self._assert_equals_(result.name, "theTestPrototype");
 
-	"newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made."
-	self._should_raise_(function () {wrappedConstructor._newWithValues_('single argument');}, $globals.Error);;
+	/* newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made. */
+	self._should_raise_(function () {wrappedConstructor._newWithValues_("single argument");}, $globals.Error);;
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testNewWithValues",{},$globals.BlockClosureTest)});
@@ -744,7 +744,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "testNewWithValues\x0a<\x0a\x09function TestConstructor(arg1, arg2, arg3) {}\x0a\x09TestConstructor.prototype.name = 'theTestPrototype';\x0a\x0a\x09var wrappedConstructor = $recv(TestConstructor);\x0a\x09var result = wrappedConstructor._newWithValues_([1, 2, 3 ]);\x0a\x09self._assert_(result instanceof TestConstructor);\x0a\x09self._assert_equals_(result.name, 'theTestPrototype');\x0a\x0a\x09\x22newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made.\x22\x0a\x09self._should_raise_(function () {wrappedConstructor._newWithValues_('single argument');}, $globals.Error);\x0a>",
+source: "testNewWithValues\x0a<inlineJS: '\x0a\x09function TestConstructor(arg1, arg2, arg3) {}\x0a\x09TestConstructor.prototype.name = \x22theTestPrototype\x22;\x0a\x0a\x09var wrappedConstructor = $recv(TestConstructor);\x0a\x09var result = wrappedConstructor._newWithValues_([1, 2, 3]);\x0a\x09self._assert_(result instanceof TestConstructor);\x0a\x09self._assert_equals_(result.name, \x22theTestPrototype\x22);\x0a\x0a\x09/* newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made. */\x0a\x09self._should_raise_(function () {wrappedConstructor._newWithValues_(\x22single argument\x22);}, $globals.Error);\x0a'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2263,7 +2263,7 @@ return self;
 },
 //>>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>",
+source: "jsConstructor\x0a\x09<inlineJS: '\x0a\x09\x09function Foo(){}\x0a\x09\x09Foo.prototype.valueOf = function () {return 4;};\x0a\x09\x09return Foo;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -2640,7 +2640,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "trickyJsConstructor\x0a\x09<\x0a\x09\x09function Foo(){}\x0a\x09\x09Foo.prototype.valueOf = function () {return 4;};\x0a\x09\x09Foo.prototype._foo = function () {return \x22bar\x22;};\x0a\x09\x09return Foo;\x0a\x09>",
+source: "trickyJsConstructor\x0a\x09<inlineJS: '\x0a\x09\x09function Foo(){}\x0a\x09\x09Foo.prototype.valueOf = function () {return 4;};\x0a\x09\x09Foo.prototype._foo = function () {return \x22bar\x22;};\x0a\x09\x09return Foo;\x0a\x09'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -10154,7 +10154,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "jsNull\x0a\x09<return null>",
+source: "jsNull\x0a\x09<inlineJS: 'return null'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -10170,7 +10170,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-return {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: '', 'e': null, 'f': void 0};
+return {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: "", "e": null, "f": void 0};
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"jsObject",{},$globals.JSObjectProxyTest)});
@@ -10178,7 +10178,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "jsObject\x0a\x09<return {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: '', 'e': null, 'f': void 0}>",
+source: "jsObject\x0a\x09<inlineJS: \x0a\x09\x09'return {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: \x22\x22, \x22e\x22: null, \x22f\x22: void 0}'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -10202,7 +10202,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "jsUndefined\x0a\x09<return>",
+source: "jsUndefined\x0a\x09<inlineJS: 'return'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -11184,7 +11184,7 @@ var self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
-throw 'test';
+throw "test";
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"throwException",{},$globals.JavaScriptExceptionTest)});
@@ -11192,7 +11192,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "throwException\x0a\x09<throw 'test'>",
+source: "throwException\x0a\x09<inlineJS: 'throw \x22test\x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -13723,7 +13723,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "notDefined\x0a\x09<return void 0;>",
+source: "notDefined\x0a\x09<inlineJS: 'return void 0;'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 17 - 16
src/Kernel-Tests.st

@@ -157,18 +157,18 @@ testLocalReturnOnDoMiss
 !
 
 testNewWithValues
-<
+<inlineJS: '
 	function TestConstructor(arg1, arg2, arg3) {}
-	TestConstructor.prototype.name = 'theTestPrototype';
+	TestConstructor.prototype.name = "theTestPrototype";
 
 	var wrappedConstructor = $recv(TestConstructor);
-	var result = wrappedConstructor._newWithValues_([1, 2, 3 ]);
+	var result = wrappedConstructor._newWithValues_([1, 2, 3]);
 	self._assert_(result instanceof TestConstructor);
-	self._assert_equals_(result.name, 'theTestPrototype');
+	self._assert_equals_(result.name, "theTestPrototype");
 
-	"newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made."
-	self._should_raise_(function () {wrappedConstructor._newWithValues_('single argument');}, $globals.Error);
->
+	/* newWithValues: cannot help if the argument list is wrong, and should warn that a mistake was made. */
+	self._should_raise_(function () {wrappedConstructor._newWithValues_("single argument");}, $globals.Error);
+'>
 !
 
 testNumArgs
@@ -434,11 +434,11 @@ TestCase subclass: #ClassTest
 !ClassTest methodsFor: 'running'!
 
 jsConstructor
-	<
+	<inlineJS: '
 		function Foo(){}
 		Foo.prototype.valueOf = function () {return 4;};
 		return Foo;
-	>
+	'>
 !
 
 setUp
@@ -450,12 +450,12 @@ tearDown
 !
 
 trickyJsConstructor
-	<
+	<inlineJS: '
 		function Foo(){}
 		Foo.prototype.valueOf = function () {return 4;};
 		Foo.prototype._foo = function () {return "bar";};
 		return Foo;
-	>
+	'>
 ! !
 
 !ClassTest methodsFor: 'tests'!
@@ -1870,15 +1870,16 @@ TestCase subclass: #JSObjectProxyTest
 !JSObjectProxyTest methodsFor: 'accessing'!
 
 jsNull
-	<return null>
+	<inlineJS: 'return null'>
 !
 
 jsObject
-	<return {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: '', 'e': null, 'f': void 0}>
+	<inlineJS: 
+		'return {a: 1, b: function() {return 2;}, c: function(object) {return object;}, d: "", "e": null, "f": void 0}'>
 !
 
 jsUndefined
-	<return>
+	<inlineJS: 'return'>
 ! !
 
 !JSObjectProxyTest methodsFor: 'tests'!
@@ -2042,7 +2043,7 @@ TestCase subclass: #JavaScriptExceptionTest
 !JavaScriptExceptionTest methodsFor: 'helpers'!
 
 throwException
-	<throw 'test'>
+	<inlineJS: 'throw "test"'>
 ! !
 
 !JavaScriptExceptionTest methodsFor: 'tests'!
@@ -2501,7 +2502,7 @@ TestCase subclass: #ObjectTest
 !ObjectTest methodsFor: 'tests'!
 
 notDefined
-	<return void 0;>
+	<inlineJS: 'return void 0;'>
 !
 
 testBasicAccess

+ 3 - 3
src/Platform-Browser.js

@@ -103,7 +103,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "isFeasible\x0a<return typeof window !== \x22undefined\x22>",
+source: "isFeasible\x0a<inlineJS: 'return typeof window !== \x22undefined\x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -253,7 +253,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "isFeasible\x0a<return typeof window !== \x22undefined\x22>",
+source: "isFeasible\x0a<inlineJS: 'return typeof window !== \x22undefined\x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []
@@ -300,7 +300,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: ["aFrame", "aString"],
-source: "postMessageTo: aFrame origin: aString\x0a<return aFrame.postMessage(self, aString)>",
+source: "postMessageTo: aFrame origin: aString\x0a<inlineJS: 'return aFrame.postMessage(self, aString)'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 3 - 3
src/Platform-Browser.st

@@ -24,7 +24,7 @@ initialize
 !
 
 isFeasible
-<return typeof window !!== "undefined">
+<inlineJS: 'return typeof window !!== "undefined"'>
 ! !
 
 Object subclass: #BrowserTerminal
@@ -58,7 +58,7 @@ initialize
 !
 
 isFeasible
-<return typeof window !!== "undefined">
+<inlineJS: 'return typeof window !!== "undefined"'>
 ! !
 
 !Object methodsFor: '*Platform-Browser'!
@@ -68,6 +68,6 @@ postMessageTo: aFrame
 !
 
 postMessageTo: aFrame origin: aString
-<return aFrame.postMessage(self, aString)>
+<inlineJS: 'return aFrame.postMessage(self, aString)'>
 ! !
 

+ 1 - 1
src/Platform-Node.js

@@ -103,7 +103,7 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "isFeasible\x0a<return typeof global !== \x22undefined\x22>",
+source: "isFeasible\x0a<inlineJS: 'return typeof global !== \x22undefined\x22'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 1 - 1
src/Platform-Node.st

@@ -24,6 +24,6 @@ initialize
 !
 
 isFeasible
-<return typeof global !!== "undefined">
+<inlineJS: 'return typeof global !!== "undefined"'>
 ! !
 

+ 1 - 1
src/Platform-Services.js

@@ -265,7 +265,7 @@ return self;
 },
 //>>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()))>",
+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<inlineJS: 'console.log(String($recv(anObject)._asString()))'>",
 referencedClasses: [],
 //>>excludeEnd("ide");
 messageSends: []

+ 1 - 1
src/Platform-Services.st

@@ -67,7 +67,7 @@ cr
 
 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()))>
+<inlineJS: 'console.log(String($recv(anObject)._asString()))'>
 ! !
 
 !ConsoleTranscript class methodsFor: 'initialization'!

+ 17 - 19
support/boot.js

@@ -64,8 +64,10 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
     function RootBrik(brikz, st) {
         /* Smalltalk foundational objects */
 
-        /* SmalltalkRoot is the hidden root of the Amber hierarchy.
-         All objects including `Object` inherit from SmalltalkRoot */
+        /* SmalltalkRoot is the hidden root of the normal Amber hierarchy.
+          All objects including `ProtoObject` inherit from SmalltalkRoot.
+          Detached roots (eg. wrapped JS classes like Number or Date)
+          do not directly inherit from SmalltalkRoot, but employ a workaround.*/
         function SmalltalkRoot() {
         }
 
@@ -95,7 +97,7 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
             enumerable: false, configurable: false, writable: false
         });
 
-        // Hidden root class of the system.
+        // Fake root class of the system.
         // Effective superclass of all classes created with `nil subclass: ...`.
         this.nilAsClass = {fn: SmalltalkRoot};
 
@@ -173,8 +175,6 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
             return pair;
         };
 
-        /* Answer all method selectors based on dnu handlers */
-
         st.allSelectors = function () {
             return selectors;
         };
@@ -210,8 +210,8 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
             return that;
         }
 
-        /* Add a package to the smalltalk.packages object, creating a new one if needed.
-         If pkgName is null or empty we return nil, which is an allowed package for a class.
+        /* Add a package to the system, creating a new one if needed.
+         If pkgName is null or empty we return nil.
          If package already exists we still update the properties of it. */
 
         st.addPackage = function (pkgName, properties) {
@@ -281,8 +281,8 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
 
         /* Smalltalk class creation. A class is an instance of an automatically
          created metaclass object. Newly created classes (not their metaclass)
-         should be added to the smalltalk object, see smalltalk.addClass().
-         Superclass linking is *not* handled here, see smalltalk.init()  */
+         should be added to the system, see smalltalk.addClass().
+         Superclass linking is *not* handled here, see api.initialize()  */
 
         function klass(spec) {
             var setSuperClass = spec.superclass;
@@ -339,8 +339,8 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
 
         this.wireKlass = wireKlass;
 
-        /* Add a class to the smalltalk object, creating a new one if needed.
-         A Package is lazily created if it does not exist with given name. */
+        /* Add a class to the system, creating a new one if needed.
+         A Package is lazily created if one with given name does not exist. */
 
         st.addClass = function (className, superclass, iVarNames, pkgName) {
             // While subclassing nil is allowed, it might be an error, so
@@ -407,7 +407,7 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
         }
 
         /* Create a new class coupling with a JavaScript constructor,
-         and add it to the global smalltalk object.*/
+         and add it to the system.*/
 
         this.addCoupledClass = function (className, superclass, pkgName, fn) {
             return rawAddClass(pkgName, className, superclass, null, fn);
@@ -469,7 +469,7 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
         this.__init__.once = true;
 
         /* Smalltalk method object. To add a method to a class,
-         use smalltalk.addMethod() */
+         use api.addMethod() */
 
         st.method = function (spec) {
             var that = new SmalltalkMethod();
@@ -569,8 +569,6 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
 
                 configureWithRuntime(brikz);
 
-                /* Alias definitions */
-
                 st.alias(globals.Array, "OrderedCollection");
                 st.alias(globals.Date, "Time");
 
@@ -642,7 +640,7 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
         };
     }
 
-    /* Adds AMD and requirejs related methods to the smalltalk object */
+    /* Adds AMD and requirejs related methods to the api */
     function AMDBrik(brikz, st) {
         st.amdRequire = require;
         st.defaultTransportType = st.defaultTransportType || "amd";
@@ -661,9 +659,9 @@ define(['require', './brikz', './compatibility'], function (require, Brikz) {
          * It takes any value (JavaScript or Smalltalk)
          * and returns a proper Amber Smalltalk receiver.
          *
-         * null or undefined -> nil,
-         * plain JS object -> wrapped JS object,
-         * otherwise unchanged
+         * null or undefined -> nilAsReceiver,
+         * object having Smalltalk signature -> unchanged,
+         * otherwise wrapped foreign (JS) object
          */
         this.asReceiver = function (o) {
             if (o == null) return nilAsReceiver;

+ 16 - 14
support/kernel-runtime.js

@@ -60,9 +60,6 @@ define(function () {
         var installMethod = brikz.manipulation.installMethod;
         var installJSMethod = brikz.manipulation.installJSMethod;
 
-        /* Initialize a class in its class hierarchy. Handle both classes and
-         metaclasses. */
-
         var detachedRootClasses = [];
 
         function markClassDetachedRoot(klass) {
@@ -74,6 +71,9 @@ define(function () {
             return detachedRootClasses;
         };
 
+        /* Initialize a class in its class hierarchy. Handle both classes and
+         metaclasses. */
+
         function initClassAndMetaclass(klass) {
             initClass(klass);
             if (klass.klass && !klass.meta) {
@@ -295,9 +295,10 @@ define(function () {
 
         setClassConstructor(globals.MethodContext, SmalltalkMethodContext);
 
-        /* This is the current call context object. While it is publicly available,
-         Use smalltalk.getThisContext() instead which will answer a safe copy of
-         the current context */
+        /* This is the current call context object.
+         In Smalltalk code, it is accessible just by using 'thisContext' variable.
+         In JS code, use api.getThisContext() (see below).
+         */
 
         var thisContext = null;
 
@@ -409,8 +410,7 @@ define(function () {
         var globals = brikz.smalltalkGlobals.globals;
         var nilAsReceiver = brikz.root.nilAsReceiver;
 
-        /* Handles unhandled errors during message sends */
-        // simply send the message and handle #dnu:
+        /* Send message programmatically. Used to implement #perform: & Co. */
 
         st.send2 = function (receiver, selector, args, klass) {
             var method, jsSelector = st.st2js(selector);
@@ -441,6 +441,13 @@ define(function () {
                 return invokeDnuMethod(receiver, stSelector, args);
             }
             /* Call a method of a JS object, or answer a property if it exists.
+
+             Converts keyword-based selectors by using the first
+             keyword only, but keeping all message arguments.
+
+             Example:
+             "self do: aBlock with: anObject" -> "self.do(aBlock, anObject)"
+
              Else try wrapping a JSObjectProxy around the receiver. */
             var propertyName = st.st2prop(stSelector);
             if (!(propertyName in receiver)) {
@@ -452,12 +459,7 @@ define(function () {
         /* If the object property is a function, then call it, except if it starts with
          an uppercase character (we probably want to answer the function itself in this
          case and send it #new from Amber).
-
-         Converts keyword-based selectors by using the first
-         keyword only, but keeping all message arguments.
-
-         Example:
-         "self do: aBlock with: anObject" -> "self.do(aBlock, anObject)" */
+         */
         function accessJavaScript(receiver, propertyName, args) {
             var propertyValue = receiver[propertyName];
             if (typeof propertyValue === "function" && !/^[A-Z]/.test(propertyName)) {

+ 181 - 69
support/parser.js

@@ -304,11 +304,19 @@ $globals.SmalltalkParser = (function() {
         peg$c129 = ">",
         peg$c130 = { type: "literal", value: ">", description: "\">\"" },
         peg$c131 = function(val) {
+                             console.warn("Use of <...js code...> is deprecated, in:\n" + val.join(""));
                              return $globals.JSStatementNode._new()
                                     ._location_(location())
                                     ._source_(val.join(""))
                          },
-        peg$c132 = function(pattern, sequence) {
+        peg$c132 = "inlineJS:",
+        peg$c133 = { type: "literal", value: "inlineJS:", description: "\"inlineJS:\"" },
+        peg$c134 = function(val) {
+                             return $globals.JSStatementNode._new()
+                                    ._location_(location())
+                                    ._source_(val._value())
+                         },
+        peg$c135 = function(pattern, sequence) {
                               return $globals.MethodNode._new()
                                      ._location_(location())
                                      ._source_(text())
@@ -316,9 +324,9 @@ $globals.SmalltalkParser = (function() {
                                      ._arguments_(pattern[1])
                                      ._dagChildren_([sequence]);
                          },
-        peg$c133 = function(send) { return send._isSendNode() && send._selector() === "->" },
-        peg$c134 = function(send) { return [send._receiver(), send._arguments()[0]]; },
-        peg$c135 = function(first, others) { return first.concat.apply(first, others); },
+        peg$c136 = function(send) { return send._isSendNode() && send._selector() === "->" },
+        peg$c137 = function(send) { return [send._receiver(), send._arguments()[0]]; },
+        peg$c138 = function(first, others) { return first.concat.apply(first, others); },
 
         peg$currPos          = 0,
         peg$savedPos         = 0,
@@ -510,7 +518,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsestart() {
       var s0;
 
-      var key    = peg$currPos * 61 + 0,
+      var key    = peg$currPos * 63 + 0,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -529,7 +537,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseseparator() {
       var s0, s1;
 
-      var key    = peg$currPos * 61 + 1,
+      var key    = peg$currPos * 63 + 1,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -569,7 +577,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsecomments() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 2,
+      var key    = peg$currPos * 63 + 2,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -695,7 +703,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsews() {
       var s0, s1;
 
-      var key    = peg$currPos * 61 + 3,
+      var key    = peg$currPos * 63 + 3,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -725,7 +733,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsemaybeDotsWs() {
       var s0, s1;
 
-      var key    = peg$currPos * 61 + 4,
+      var key    = peg$currPos * 63 + 4,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -773,7 +781,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseidentifier() {
       var s0, s1, s2, s3;
 
-      var key    = peg$currPos * 61 + 5,
+      var key    = peg$currPos * 63 + 5,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -830,7 +838,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsekeyword() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 6,
+      var key    = peg$currPos * 63 + 6,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -870,7 +878,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseselector() {
       var s0, s1, s2, s3;
 
-      var key    = peg$currPos * 61 + 7,
+      var key    = peg$currPos * 63 + 7,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -927,7 +935,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseclassName() {
       var s0, s1, s2, s3;
 
-      var key    = peg$currPos * 61 + 8,
+      var key    = peg$currPos * 63 + 8,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -984,7 +992,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsestring() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 9,
+      var key    = peg$currPos * 63 + 9,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1083,7 +1091,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsecharacter() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 10,
+      var key    = peg$currPos * 63 + 10,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1129,7 +1137,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsesymbol() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 11,
+      var key    = peg$currPos * 63 + 11,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1169,7 +1177,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsebareSymbol() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 12,
+      var key    = peg$currPos * 63 + 12,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1206,7 +1214,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsenumber() {
       var s0, s1;
 
-      var key    = peg$currPos * 61 + 13,
+      var key    = peg$currPos * 63 + 13,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1240,7 +1248,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsenumberExp() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 14,
+      var key    = peg$currPos * 63 + 14,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1294,7 +1302,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsehex() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 15,
+      var key    = peg$currPos * 63 + 15,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1370,7 +1378,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsefloat() {
       var s0, s1, s2, s3, s4, s5;
 
-      var key    = peg$currPos * 61 + 16,
+      var key    = peg$currPos * 63 + 16,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1473,7 +1481,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseinteger() {
       var s0, s1, s2, s3;
 
-      var key    = peg$currPos * 61 + 17,
+      var key    = peg$currPos * 63 + 17,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1537,7 +1545,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseliteralArray() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 18,
+      var key    = peg$currPos * 63 + 18,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1595,7 +1603,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsebareLiteralArray() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 19,
+      var key    = peg$currPos * 63 + 19,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1653,7 +1661,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseliteralArrayElement() {
       var s0;
 
-      var key    = peg$currPos * 61 + 20,
+      var key    = peg$currPos * 63 + 20,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1678,7 +1686,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsLiteralArrayContents() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 21,
+      var key    = peg$currPos * 63 + 21,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1738,7 +1746,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsedynamicArray() {
       var s0, s1, s2, s3, s4, s5;
 
-      var key    = peg$currPos * 61 + 22,
+      var key    = peg$currPos * 63 + 22,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1805,7 +1813,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsedynamicDictionary() {
       var s0, s1, s2, s3, s4, s5;
 
-      var key    = peg$currPos * 61 + 23,
+      var key    = peg$currPos * 63 + 23,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1872,7 +1880,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsepseudoVariable() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 24,
+      var key    = peg$currPos * 63 + 24,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1939,7 +1947,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseparseTimeLiteral() {
       var s0;
 
-      var key    = peg$currPos * 61 + 25,
+      var key    = peg$currPos * 63 + 25,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1973,7 +1981,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseruntimeLiteral() {
       var s0;
 
-      var key    = peg$currPos * 61 + 26,
+      var key    = peg$currPos * 63 + 26,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -1998,7 +2006,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseliteral() {
       var s0;
 
-      var key    = peg$currPos * 61 + 27,
+      var key    = peg$currPos * 63 + 27,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2020,7 +2028,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsevariable() {
       var s0, s1;
 
-      var key    = peg$currPos * 61 + 28,
+      var key    = peg$currPos * 63 + 28,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2045,7 +2053,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsebinarySelector() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 29,
+      var key    = peg$currPos * 63 + 29,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2091,7 +2099,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsKeywordPattern() {
       var s0, s1, s2, s3, s4, s5, s6;
 
-      var key    = peg$currPos * 61 + 30,
+      var key    = peg$currPos * 63 + 30,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2179,7 +2187,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsBinaryPattern() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 31,
+      var key    = peg$currPos * 63 + 31,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2225,7 +2233,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsUnaryPattern() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 32,
+      var key    = peg$currPos * 63 + 32,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2259,7 +2267,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseexpression() {
       var s0;
 
-      var key    = peg$currPos * 61 + 33,
+      var key    = peg$currPos * 63 + 33,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2284,7 +2292,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsExpressionsRest() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 34,
+      var key    = peg$currPos * 63 + 34,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2336,7 +2344,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseexpressions() {
       var s0, s1, s2, s3;
 
-      var key    = peg$currPos * 61 + 35,
+      var key    = peg$currPos * 63 + 35,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2375,7 +2383,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseassignment() {
       var s0, s1, s2, s3, s4, s5;
 
-      var key    = peg$currPos * 61 + 36,
+      var key    = peg$currPos * 63 + 36,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2433,7 +2441,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseret() {
       var s0, s1, s2, s3;
 
-      var key    = peg$currPos * 61 + 37,
+      var key    = peg$currPos * 63 + 37,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2479,7 +2487,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsetemps() {
       var s0, s1, s2, s3, s4, s5;
 
-      var key    = peg$currPos * 61 + 38,
+      var key    = peg$currPos * 63 + 38,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2572,7 +2580,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsBlockParamList() {
       var s0, s1, s2, s3, s4, s5, s6;
 
-      var key    = peg$currPos * 61 + 39,
+      var key    = peg$currPos * 63 + 39,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2693,7 +2701,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsesubexpression() {
       var s0, s1, s2, s3, s4, s5;
 
-      var key    = peg$currPos * 61 + 40,
+      var key    = peg$currPos * 63 + 40,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2757,7 +2765,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsestatementsWs() {
       var s0, s1, s2, s3, s4, s5, s6;
 
-      var key    = peg$currPos * 61 + 41,
+      var key    = peg$currPos * 63 + 41,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2860,7 +2868,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsSequenceWs() {
       var s0, s1, s2, s3;
 
-      var key    = peg$currPos * 61 + 42,
+      var key    = peg$currPos * 63 + 42,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2903,7 +2911,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsStSequenceWs() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 43,
+      var key    = peg$currPos * 63 + 43,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -2955,7 +2963,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseblock() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 44,
+      var key    = peg$currPos * 63 + 44,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3019,7 +3027,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseoperand() {
       var s0;
 
-      var key    = peg$currPos * 61 + 45,
+      var key    = peg$currPos * 63 + 45,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3044,7 +3052,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsUnaryMessage() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 46,
+      var key    = peg$currPos * 63 + 46,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3099,7 +3107,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsUnaryTail() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 47,
+      var key    = peg$currPos * 63 + 47,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3136,7 +3144,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseunarySend() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 48,
+      var key    = peg$currPos * 63 + 48,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3173,7 +3181,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsBinaryMessage() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 49,
+      var key    = peg$currPos * 63 + 49,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3219,7 +3227,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsBinaryTail() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 50,
+      var key    = peg$currPos * 63 + 50,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3256,7 +3264,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsebinarySend() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 51,
+      var key    = peg$currPos * 63 + 51,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3293,7 +3301,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsKeywordMessage() {
       var s0, s1, s2, s3, s4, s5, s6;
 
-      var key    = peg$currPos * 61 + 52,
+      var key    = peg$currPos * 63 + 52,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3381,7 +3389,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsekeywordSend() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 53,
+      var key    = peg$currPos * 63 + 53,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3418,7 +3426,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsMessage() {
       var s0;
 
-      var key    = peg$currPos * 61 + 54,
+      var key    = peg$currPos * 63 + 54,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3443,7 +3451,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsecascade() {
       var s0, s1, s2, s3, s4, s5, s6, s7;
 
-      var key    = peg$currPos * 61 + 55,
+      var key    = peg$currPos * 63 + 55,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3550,9 +3558,31 @@ $globals.SmalltalkParser = (function() {
     }
 
     function peg$parsejsStatement() {
+      var s0;
+
+      var key    = peg$currPos * 63 + 56,
+          cached = peg$resultsCache[key];
+
+      if (cached) {
+        peg$currPos = cached.nextPos;
+
+        return cached.result;
+      }
+
+      s0 = peg$parsepragmaJsStatement();
+      if (s0 === peg$FAILED) {
+        s0 = peg$parselegacyJsStatement();
+      }
+
+      peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
+
+      return s0;
+    }
+
+    function peg$parselegacyJsStatement() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 56,
+      var key    = peg$currPos * 63 + 57,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3648,10 +3678,92 @@ $globals.SmalltalkParser = (function() {
       return s0;
     }
 
+    function peg$parsepragmaJsStatement() {
+      var s0, s1, s2, s3, s4, s5, s6, s7;
+
+      var key    = peg$currPos * 63 + 58,
+          cached = peg$resultsCache[key];
+
+      if (cached) {
+        peg$currPos = cached.nextPos;
+
+        return cached.result;
+      }
+
+      s0 = peg$currPos;
+      if (input.charCodeAt(peg$currPos) === 60) {
+        s1 = peg$c122;
+        peg$currPos++;
+      } else {
+        s1 = peg$FAILED;
+        if (peg$silentFails === 0) { peg$fail(peg$c123); }
+      }
+      if (s1 !== peg$FAILED) {
+        s2 = peg$parsews();
+        if (s2 !== peg$FAILED) {
+          if (input.substr(peg$currPos, 9) === peg$c132) {
+            s3 = peg$c132;
+            peg$currPos += 9;
+          } else {
+            s3 = peg$FAILED;
+            if (peg$silentFails === 0) { peg$fail(peg$c133); }
+          }
+          if (s3 !== peg$FAILED) {
+            s4 = peg$parsews();
+            if (s4 !== peg$FAILED) {
+              s5 = peg$parsestring();
+              if (s5 !== peg$FAILED) {
+                s6 = peg$parsews();
+                if (s6 !== peg$FAILED) {
+                  if (input.charCodeAt(peg$currPos) === 62) {
+                    s7 = peg$c129;
+                    peg$currPos++;
+                  } else {
+                    s7 = peg$FAILED;
+                    if (peg$silentFails === 0) { peg$fail(peg$c130); }
+                  }
+                  if (s7 !== peg$FAILED) {
+                    peg$savedPos = s0;
+                    s1 = peg$c134(s5);
+                    s0 = s1;
+                  } else {
+                    peg$currPos = s0;
+                    s0 = peg$FAILED;
+                  }
+                } else {
+                  peg$currPos = s0;
+                  s0 = peg$FAILED;
+                }
+              } else {
+                peg$currPos = s0;
+                s0 = peg$FAILED;
+              }
+            } else {
+              peg$currPos = s0;
+              s0 = peg$FAILED;
+            }
+          } else {
+            peg$currPos = s0;
+            s0 = peg$FAILED;
+          }
+        } else {
+          peg$currPos = s0;
+          s0 = peg$FAILED;
+        }
+      } else {
+        peg$currPos = s0;
+        s0 = peg$FAILED;
+      }
+
+      peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 };
+
+      return s0;
+    }
+
     function peg$parsemethod() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 57,
+      var key    = peg$currPos * 63 + 59,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3675,7 +3787,7 @@ $globals.SmalltalkParser = (function() {
         }
         if (s2 !== peg$FAILED) {
           peg$savedPos = s0;
-          s1 = peg$c132(s1, s2);
+          s1 = peg$c135(s1, s2);
           s0 = s1;
         } else {
           peg$currPos = s0;
@@ -3694,7 +3806,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseassociationSend() {
       var s0, s1, s2;
 
-      var key    = peg$currPos * 61 + 58,
+      var key    = peg$currPos * 63 + 60,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3707,7 +3819,7 @@ $globals.SmalltalkParser = (function() {
       s1 = peg$parsebinarySend();
       if (s1 !== peg$FAILED) {
         peg$savedPos = peg$currPos;
-        s2 = peg$c133(s1);
+        s2 = peg$c136(s1);
         if (s2) {
           s2 = void 0;
         } else {
@@ -3715,7 +3827,7 @@ $globals.SmalltalkParser = (function() {
         }
         if (s2 !== peg$FAILED) {
           peg$savedPos = s0;
-          s1 = peg$c134(s1);
+          s1 = peg$c137(s1);
           s0 = s1;
         } else {
           peg$currPos = s0;
@@ -3734,7 +3846,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parsewsAssociationsRest() {
       var s0, s1, s2, s3, s4;
 
-      var key    = peg$currPos * 61 + 59,
+      var key    = peg$currPos * 63 + 61,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3786,7 +3898,7 @@ $globals.SmalltalkParser = (function() {
     function peg$parseassociations() {
       var s0, s1, s2, s3;
 
-      var key    = peg$currPos * 61 + 60,
+      var key    = peg$currPos * 63 + 62,
           cached = peg$resultsCache[key];
 
       if (cached) {
@@ -3806,7 +3918,7 @@ $globals.SmalltalkParser = (function() {
         }
         if (s2 !== peg$FAILED) {
           peg$savedPos = s0;
-          s1 = peg$c135(s1, s2);
+          s1 = peg$c138(s1, s2);
           s0 = s1;
         } else {
           peg$currPos = s0;

+ 10 - 1
support/parser.pegjs

@@ -251,12 +251,21 @@ cascade        = send:keywordSend & { return send._isSendNode(); } messages:(ws
                             ._dagChildren_(messages);
                  }
 
-jsStatement    = "<" val:((">>" {return ">";} / [^>])*) ">" {
+jsStatement    = pragmaJsStatement / legacyJsStatement
+
+legacyJsStatement = "<" val:((">>" {return ">";} / [^>])*) ">" {
+                     console.warn("Use of <...js code...> is deprecated, in:\n" + val.join(""));
                      return $globals.JSStatementNode._new()
                             ._location_(location())
                             ._source_(val.join(""))
                  }
 
+pragmaJsStatement = "<" ws "inlineJS:" ws val:string ws ">" {
+                     return $globals.JSStatementNode._new()
+                            ._location_(location())
+                            ._source_(val._value())
+                 }
+
 
 method         = pattern:(wsKeywordPattern / wsBinaryPattern / wsUnaryPattern) sequence:wsSequenceWs? {
                       return $globals.MethodNode._new()

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