Browse Source

Use new inline JS notation in core.

Herbert Vojčík 7 years ago
parent
commit
834344a4e7

+ 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

+ 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

+ 11 - 11
src/Kernel-Classes.js

@@ -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: []
@@ -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: []
@@ -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: []

+ 13 - 13
src/Kernel-Classes.st

@@ -64,13 +64,13 @@ 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
@@ -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
@@ -287,7 +287,7 @@ protocolsDo: aBlock
 !Behavior methodsFor: 'instance creation'!
 
 basicNew
-	<return new self.fn()>
+	<inlineJS: 'return new self.fn()'>
 !
 
 new
@@ -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

+ 90 - 90
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: []
@@ -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: []
@@ -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: []
@@ -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: []
@@ -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: []
@@ -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: []
@@ -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: []
@@ -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: []

+ 128 - 127
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
@@ -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,13 +1064,13 @@ 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
@@ -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
@@ -1247,7 +1247,7 @@ removeIndex: anInteger
 !
 
 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
@@ -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'!
@@ -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,35 +2009,35 @@ 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
@@ -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)'>
 ! !
 

+ 6 - 6
src/Kernel-Exceptions.js

@@ -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: []
@@ -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: []
@@ -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: []

+ 5 - 5
src/Kernel-Exceptions.st

@@ -21,11 +21,11 @@ beUnhandled
 !
 
 context
-	<return self.context>
+	<inlineJS: 'return self.context'>
 !
 
 jsStack
-	<return self.stack>
+	<inlineJS: 'return self.stack'>
 !
 
 messageText
@@ -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'!
@@ -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'!

+ 26 - 26
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: []
@@ -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: []
@@ -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: []
@@ -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: []
@@ -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: []
@@ -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: []
@@ -2569,7 +2569,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: []
@@ -2664,7 +2664,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 +2688,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: []
@@ -2892,7 +2892,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 +2916,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 +2940,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 +2964,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: []
@@ -3012,7 +3012,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 +3065,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 +3202,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 +3353,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: []
@@ -3536,7 +3536,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: []

+ 36 - 36
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
@@ -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'!
@@ -148,16 +148,16 @@ addObjectVariablesTo: aDictionary ofProxy: aProxy
 !
 
 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
@@ -168,7 +168,7 @@ 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
@@ -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,7 +428,7 @@ 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
@@ -438,7 +438,7 @@ basicName: aString
 basicTransport
 	"Answer the transport literal JavaScript object as setup in the JavaScript file, if any"
 	
-	<return self.transport>
+	<inlineJS: 'return self.transport'>
 !
 
 sortedImportsAsArray
@@ -725,15 +725,15 @@ cancelOptOut: anObject
 !
 
 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
@@ -760,12 +760,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
@@ -795,7 +795,7 @@ defaultAmdNamespace: aString
 !SmalltalkImage methodsFor: 'classes'!
 
 classes
-	<return $core.classes()>
+	<inlineJS: 'return $core.classes()'>
 !
 
 removeClass: aClass
@@ -836,7 +836,7 @@ deleteGlobalJsVariable: aString
 
 globalJsVariables
 	"Array of global JavaScript variables"
-	<return $core.globalJsVariables>
+	<inlineJS: 'return $core.globalJsVariables'>
 ! !
 
 !SmalltalkImage methodsFor: 'packages'!
@@ -856,7 +856,7 @@ createPackage: packageName
 !
 
 packageAt: packageName
-	<return $core.packages[packageName]>
+	<inlineJS: 'return $core.packages[packageName]'>
 !
 
 packageAt: packageName ifAbsent: aBlock
@@ -866,11 +866,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 +898,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
@@ -936,7 +936,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 +971,7 @@ importsString
 !String methodsFor: '*Kernel-Infrastructure'!
 
 asJavaScriptPropertyName
-<return $core.st2prop(self)>
+<inlineJS: 'return $core.st2prop(self)'>
 !
 
 asSetting

+ 50 - 50
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: []
@@ -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: []

+ 88 - 88
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
@@ -61,7 +61,7 @@ whileTrue: aBlock
 !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'!

+ 76 - 76
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: []
@@ -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: []
@@ -1596,7 +1596,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 +1746,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 +1773,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 +1862,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 +1870,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 +1991,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 +2150,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 +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: []
@@ -2204,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: []
@@ -2228,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: []
@@ -2252,7 +2252,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 +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: []
@@ -2344,7 +2344,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 +2368,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 +2392,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 +2462,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 +2486,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 +2557,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: []
@@ -2605,7 +2605,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 +2629,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 +2653,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: []
@@ -2701,7 +2701,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: []
@@ -2749,7 +2749,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: []
@@ -2797,7 +2797,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: []
@@ -2869,7 +2869,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: []
@@ -2917,7 +2917,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: []
@@ -2965,7 +2965,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: []
@@ -3130,7 +3130,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 +3205,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 +3229,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 +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: []
@@ -3300,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: []
@@ -3324,7 +3324,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 +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: []
@@ -3395,7 +3395,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 +3422,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 +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: []
@@ -3470,7 +3470,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 +3517,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 +3541,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 +3565,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 +3589,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 +3613,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 +3716,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 +3724,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 +3771,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 +3813,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 +3883,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 +3966,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 +3990,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 +4014,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 +4038,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 +4062,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 +4202,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 +4226,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 +4250,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 +4308,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 +4332,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 +4379,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 +4721,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 +4745,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 +4788,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 +4812,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 +5486,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: []

+ 85 - 84
src/Kernel-Objects.st

@@ -10,21 +10,21 @@ 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
@@ -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'!
@@ -320,7 +321,7 @@ in: aValuable
 !
 
 value
-	<return self.valueOf()>
+	<inlineJS: 'return self.valueOf()'>
 ! !
 
 !Object methodsFor: 'message handling'!
@@ -330,7 +331,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 +435,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 +477,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 +497,13 @@ or: aBlock
 !
 
 | aBoolean
-	<
+	<inlineJS: '
 		if(self == true) {
 		return true;
 		} else {
 		return aBoolean;
 		}
-	>
+	'>
 ! !
 
 !Boolean methodsFor: 'converting'!
@@ -516,7 +517,7 @@ asJSON
 !
 
 asString
-	< return self.toString() >
+	<inlineJS: 'return self.toString()'>
 ! !
 
 !Boolean methodsFor: 'copying'!
@@ -573,7 +574,7 @@ day: aNumber
 !
 
 dayOfMonth
-	<return self.getDate()>
+	<inlineJS: 'return self.getDate()'>
 !
 
 dayOfMonth: aNumber
@@ -581,15 +582,15 @@ dayOfMonth: 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
@@ -597,7 +598,7 @@ hours: aNumber
 !
 
 milliseconds
-	<return self.getMilliseconds()>
+	<inlineJS: 'return self.getMilliseconds()'>
 !
 
 milliseconds: aNumber
@@ -605,7 +606,7 @@ milliseconds: aNumber
 !
 
 minutes
-	<return self.getMinutes()>
+	<inlineJS: 'return self.getMinutes()'>
 !
 
 minutes: aNumber
@@ -613,7 +614,7 @@ minutes: aNumber
 !
 
 month
-	<return self.getMonth() + 1>
+	<inlineJS: 'return self.getMonth() + 1'>
 !
 
 month: aNumber
@@ -621,7 +622,7 @@ month: aNumber
 !
 
 seconds
-	<return self.getSeconds()>
+	<inlineJS: 'return self.getSeconds()'>
 !
 
 seconds: aNumber
@@ -629,7 +630,7 @@ seconds: aNumber
 !
 
 time
-	<return self.getTime()>
+	<inlineJS: 'return self.getTime()'>
 !
 
 time: aNumber
@@ -637,7 +638,7 @@ time: aNumber
 !
 
 year
-	<return self.getFullYear()>
+	<inlineJS: 'return self.getFullYear()'>
 !
 
 year: aNumber
@@ -647,21 +648,21 @@ year: 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 +670,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 +696,11 @@ asNumber
 !
 
 asString
-	<return self.toString()>
+	<inlineJS: 'return self.toString()'>
 !
 
 asTimeString
-	<return self.toTimeString()>
+	<inlineJS: 'return self.toTimeString()'>
 ! !
 
 !Date methodsFor: 'printing'!
@@ -741,7 +742,7 @@ millisecondsToRun: aBlock
 !
 
 new: anObject
-	<return new Date(anObject)>
+	<inlineJS: 'return new Date(anObject)'>
 !
 
 now
@@ -775,22 +776,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 +799,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 +822,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 +875,7 @@ asPoint
 !
 
 asString
-	< return String(self) >
+	<inlineJS: 'return String(self)'>
 !
 
 atRandom
@@ -882,15 +883,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 +926,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 +989,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 +1029,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 +1041,7 @@ squared
 !
 
 tan
-	<return Math.tan(self);>
+	<inlineJS: 'return Math.tan(self);'>
 ! !
 
 !Number methodsFor: 'printing'!
@@ -1050,7 +1051,7 @@ printOn: aStream
 !
 
 printShowingDecimalPlaces: placesDesired
-	<return self.toFixed(placesDesired)>
+	<inlineJS: 'return self.toFixed(placesDesired)'>
 ! !
 
 !Number methodsFor: 'testing'!
@@ -1100,11 +1101,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 +1287,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])
-    )>
+    )'>
 ! !
 

+ 7 - 7
src/Kernel-Tests.js

@@ -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: []
@@ -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: []

+ 9 - 8
src/Kernel-Tests.st

@@ -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'!
@@ -2501,7 +2502,7 @@ TestCase subclass: #ObjectTest
 !ObjectTest methodsFor: 'tests'!
 
 notDefined
-	<return void 0;>
+	<inlineJS: 'return void 0;'>
 !
 
 testBasicAccess

+ 1 - 1
src/Platform-Browser.js

@@ -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: []

+ 1 - 1
src/Platform-Browser.st

@@ -68,6 +68,6 @@ postMessageTo: aFrame
 !
 
 postMessageTo: aFrame origin: aString
-<return aFrame.postMessage(self, aString)>
+<inlineJS: 'return aFrame.postMessage(self, aString)'>
 ! !