Browse Source

Compiler compiling instantiateFn.

Herby Vojčík 2 months ago
parent
commit
1f6c1cc281

File diff suppressed because it is too large
+ 791 - 885
cli/src/AmberCli.js


File diff suppressed because it is too large
+ 975 - 1113
lang/src/Compiler-AST.js


File diff suppressed because it is too large
+ 442 - 460
lang/src/Compiler-Core.js


+ 9 - 5
lang/src/Compiler-Core.st

@@ -168,14 +168,18 @@ ast: aString forClass: aClass protocol: anotherString
 !
 
 compile: aString forClass: aClass protocol: anotherString
-	| compilationResult result pragmas closure |
+	| compilationResult result pragmas closure closureFactory |
 	compilationResult :=
 		self compileSource: aString forClass: aClass protocol: anotherString.
-	pragmas := compilationResult at: #pragmas.
-	closure := self eval: (compilationResult at: #fn) forPackage: self currentPackage.
-	compilationResult removeKey: #fn; removeKey: #pragmas.
+	pragmas := compilationResult removeKey: #pragmas.
+	closure := (compilationResult removeKey: #fn ifAbsent: [])
+		ifNotNil: [ :js | self eval: js forPackage: self currentPackage ].
+	closureFactory := (compilationResult removeKey: #instantiateFn ifAbsent: [])
+		ifNotNil: [ :js | self eval: js forPackage: self currentPackage ].
 	result := Smalltalk core method: compilationResult.
-	result protocol: anotherString; pragmas: pragmas; fn: closure.
+	result protocol: anotherString; pragmas: pragmas.
+	closure ifNotNil: [ result fn: closure ].
+	closureFactory ifNotNil: [ result instantiateFn: closureFactory ].
 	^ result
 !
 

File diff suppressed because it is too large
+ 1518 - 1691
lang/src/Compiler-IR.js


+ 7 - 4
lang/src/Compiler-IR.st

@@ -918,11 +918,12 @@ stream: aStream
 !IRJSTranslator methodsFor: 'building'!
 
 buildMethodDeclaration: aMethod with: aBlock
+	aBlock value.
 	^ #{
 		#selector -> aMethod selector.
 		#source -> aMethod source.
 		#pragmas -> aMethod pragmas.
-		#fn -> [ aBlock value. self contents ] value.
+		#instantiateFn -> self contents.
 		#messageSends -> aMethod messageSends asArray.
 		#args -> (aMethod arguments collect: [ :each | each value ]) asArray.
 		#referencedClasses -> aMethod classReferences asArray.
@@ -972,6 +973,7 @@ visitIRMethod: anIRMethod
 	^ self
 		buildMethodDeclaration: anIRMethod
 		with: [ self stream
+			nextPutAll: '(function ($class, $globals){ return ';
 			nextPutFunctionWith: [
 				self stream nextPutVars: (anIRMethod tempDeclarations collect: [ :each |
 					each name asVariableName ]).
@@ -984,7 +986,8 @@ visitIRMethod: anIRMethod
 						self stream nextPutNonLocalReturnHandlingWith: [
 							super visitIRMethod: anIRMethod ] ]
 					ifFalse: [ super visitIRMethod: anIRMethod ] ]]
-			arguments: anIRMethod arguments ]
+			arguments: anIRMethod arguments;
+			nextPutAll: '; })' ]
 !
 
 visitIRNonLocalReturn: anIRNonLocalReturn
@@ -1208,14 +1211,14 @@ nextPutContextFor: aMethod during: aBlock
 !
 
 nextPutFunctionWith: aBlock arguments: anArray
-	stream nextPutAll: '(function ('.
+	stream nextPutAll: 'function ('.
 	anArray
 		do: [ :each | stream nextPutAll: each asVariableName ]
 		separatedBy: [ stream nextPut: ',' ].
 	stream nextPutAll: '){'; lf.
 	stream nextPutAll: 'var self=this,$self=this;'; lf.
 	aBlock value.
-	stream lf; nextPutAll: '})'
+	stream lf; nextPutAll: '}'
 !
 
 nextPutIf: aBlock then: anotherBlock

File diff suppressed because it is too large
+ 527 - 591
lang/src/Compiler-Inlining.js


File diff suppressed because it is too large
+ 1090 - 1229
lang/src/Compiler-Interpreter.js


File diff suppressed because it is too large
+ 786 - 892
lang/src/Compiler-Semantic.js


File diff suppressed because it is too large
+ 790 - 878
lang/src/Compiler-Tests.js


File diff suppressed because it is too large
+ 286 - 328
lang/src/Kernel-Announcements.js


File diff suppressed because it is too large
+ 1159 - 1301
lang/src/Kernel-Classes.js


File diff suppressed because it is too large
+ 3097 - 3449
lang/src/Kernel-Collections.js


File diff suppressed because it is too large
+ 179 - 201
lang/src/Kernel-Dag.js


File diff suppressed because it is too large
+ 288 - 327
lang/src/Kernel-Exceptions.js


+ 171 - 190
lang/src/Kernel-Helpers.js

@@ -9,7 +9,14 @@ $core.addMethod(
 $core.method({
 selector: "canProcessPragma:",
 protocol: "pragma processing",
-fn: function (aMessage){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aMessage"],
+source: "canProcessPragma: aMessage\x0a\x09| selector |\x0a\x09selector := aMessage selector.\x0a\x09^ (self respondsTo: selector) and: [\x0a\x09\x09(self class superclass canUnderstand: selector) not]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["selector", "and:", "respondsTo:", "not", "canUnderstand:", "superclass", "class"]
+}, function ($class, $globals){ return function (aMessage){
 var self=this,$self=this;
 var selector;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -28,22 +35,21 @@ return $recv($recv($recv($self._class())._superclass())._canUnderstand_(selector
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"canProcessPragma:",{aMessage:aMessage,selector:selector})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aMessage"],
-source: "canProcessPragma: aMessage\x0a\x09| selector |\x0a\x09selector := aMessage selector.\x0a\x09^ (self respondsTo: selector) and: [\x0a\x09\x09(self class superclass canUnderstand: selector) not]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["selector", "and:", "respondsTo:", "not", "canUnderstand:", "superclass", "class"]
-}),
+}; }),
 $globals.TPragmator);
 
 $core.addMethod(
 $core.method({
 selector: "processPragma:",
 protocol: "pragma processing",
-fn: function (aMessage){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aMessage"],
+source: "processPragma: aMessage\x0a\x09(self canProcessPragma: aMessage) ifTrue: [\x0a\x09\x09^ aMessage sendTo: self ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifTrue:", "canProcessPragma:", "sendTo:"]
+}, function ($class, $globals){ return function (aMessage){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -57,22 +63,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"processPragma:",{aMessage:aMessage})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aMessage"],
-source: "processPragma: aMessage\x0a\x09(self canProcessPragma: aMessage) ifTrue: [\x0a\x09\x09^ aMessage sendTo: self ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifTrue:", "canProcessPragma:", "sendTo:"]
-}),
+}; }),
 $globals.TPragmator);
 
 $core.addMethod(
 $core.method({
 selector: "processPragmas:",
 protocol: "pragma processing",
-fn: function (aCollection){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aCollection"],
+source: "processPragmas: aCollection\x0a\x09aCollection do: [ :each | self processPragma: each ]",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["do:", "processPragma:"]
+}, function ($class, $globals){ return function (aCollection){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -90,15 +95,7 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"processPragmas:",{aCollection:aCollection})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aCollection"],
-source: "processPragmas: aCollection\x0a\x09aCollection do: [ :each | self processPragma: each ]",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["do:", "processPragma:"]
-}),
+}; }),
 $globals.TPragmator);
 
 
@@ -107,7 +104,14 @@ $core.addMethod(
 $core.method({
 selector: "subclass:",
 protocol: "class creation",
-fn: function (aString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "subclass: aString \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: #() package: nil",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:slots:package:"]
+}, function ($class, $globals){ return function (aString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -116,22 +120,21 @@ return $self._subclass_slots_package_(aString,[],nil);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:",{aString:aString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "subclass: aString \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: #() package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:slots:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:instanceVariableNames:",
 protocol: "class creation",
-fn: function (aString,anotherString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "anotherString"],
+source: "subclass: aString instanceVariableNames: anotherString\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: anotherString package: nil",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:instanceVariableNames:package:"]
+}, function ($class, $globals){ return function (aString,anotherString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -140,22 +143,21 @@ return $self._subclass_instanceVariableNames_package_(aString,anotherString,nil)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "anotherString"],
-source: "subclass: aString instanceVariableNames: anotherString\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: anotherString package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:instanceVariableNames:category:",
 protocol: "class creation",
-fn: function (aString,aString2,aString3){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aString2", "aString3"],
+source: "subclass: aString instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:instanceVariableNames:package:"]
+}, function ($class, $globals){ return function (aString,aString2,aString3){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -164,22 +166,21 @@ return $self._subclass_instanceVariableNames_package_(aString,aString2,aString3)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:category:",{aString:aString,aString2:aString2,aString3:aString3})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aString2", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
 protocol: "class creation",
-fn: function (aString,aString2,classVars,pools,aString3){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aString2", "classVars", "pools", "aString3"],
+source: "subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:instanceVariableNames:package:"]
+}, function ($class, $globals){ return function (aString,aString2,classVars,pools,aString3){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -188,22 +189,21 @@ return $self._subclass_instanceVariableNames_package_(aString,aString2,aString3)
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",{aString:aString,aString2:aString2,classVars:classVars,pools:pools,aString3:aString3})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aString2", "classVars", "pools", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ self subclass: aString instanceVariableNames: aString2 package: aString3",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:instanceVariableNames:package:",
 protocol: "class creation",
-fn: function (aString,aString2,aString3){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aString2", "aString3"],
+source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: aString2 instanceVariablesStringAsSlotList package: aString3",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:slots:package:", "instanceVariablesStringAsSlotList"]
+}, function ($class, $globals){ return function (aString,aString2,aString3){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -212,22 +212,21 @@ return $self._subclass_slots_package_(aString,$recv(aString2)._instanceVariables
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aString2", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: aString2 instanceVariablesStringAsSlotList package: aString3",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:slots:package:", "instanceVariablesStringAsSlotList"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:slots:",
 protocol: "class creation",
-fn: function (aString,aCollection){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aCollection"],
+source: "subclass: aString slots: aCollection\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: aCollection package: nil",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:slots:package:"]
+}, function ($class, $globals){ return function (aString,aCollection){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -236,22 +235,21 @@ return $self._subclass_slots_package_(aString,aCollection,nil);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:slots:",{aString:aString,aCollection:aCollection})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aCollection"],
-source: "subclass: aString slots: aCollection\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString slots: aCollection package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:slots:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:slots:classVariables:package:",
 protocol: "class creation",
-fn: function (aString,aCollection,anObject,anotherString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aCollection", "anObject", "anotherString"],
+source: "subclass: aString slots: aCollection classVariables: anObject package: anotherString\x0a\x09\x22Kept for file-in compatibility. ignores class variables.\x22\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
+referencedClasses: ["ClassBuilder"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["superclass:subclass:slots:package:", "new"]
+}, function ($class, $globals){ return function (aString,aCollection,anObject,anotherString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -260,22 +258,21 @@ return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_slots_pac
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:slots:classVariables:package:",{aString:aString,aCollection:aCollection,anObject:anObject,anotherString:anotherString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aCollection", "anObject", "anotherString"],
-source: "subclass: aString slots: aCollection classVariables: anObject package: anotherString\x0a\x09\x22Kept for file-in compatibility. ignores class variables.\x22\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
-referencedClasses: ["ClassBuilder"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["superclass:subclass:slots:package:", "new"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:slots:classVariables:poolDictionaries:package:",
 protocol: "class creation",
-fn: function (aString,aCollection,anObject,anotherObject,anotherString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aCollection", "anObject", "anotherObject", "anotherString"],
+source: "subclass: aString slots: aCollection classVariables: anObject poolDictionaries: anotherObject package: anotherString\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
+referencedClasses: ["ClassBuilder"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["superclass:subclass:slots:package:", "new"]
+}, function ($class, $globals){ return function (aString,aCollection,anObject,anotherObject,anotherString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -284,22 +281,21 @@ return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_slots_pac
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:slots:classVariables:poolDictionaries:package:",{aString:aString,aCollection:aCollection,anObject:anObject,anotherObject:anotherObject,anotherString:anotherString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aCollection", "anObject", "anotherObject", "anotherString"],
-source: "subclass: aString slots: aCollection classVariables: anObject poolDictionaries: anotherObject package: anotherString\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
-referencedClasses: ["ClassBuilder"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["superclass:subclass:slots:package:", "new"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:slots:package:",
 protocol: "class creation",
-fn: function (aString,aCollection,anotherString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aCollection", "anotherString"],
+source: "subclass: aString slots: aCollection package: anotherString\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
+referencedClasses: ["ClassBuilder"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["superclass:subclass:slots:package:", "new"]
+}, function ($class, $globals){ return function (aString,aCollection,anotherString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -308,22 +304,21 @@ return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_slots_pac
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:slots:package:",{aString:aString,aCollection:aCollection,anotherString:anotherString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aCollection", "anotherString"],
-source: "subclass: aString slots: aCollection package: anotherString\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString slots: aCollection package: anotherString",
-referencedClasses: ["ClassBuilder"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["superclass:subclass:slots:package:", "new"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:uses:",
 protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aTraitCompositionDescription"],
+source: "subclass: aString uses: aTraitCompositionDescription \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: #() package: nil",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:uses:slots:package:"]
+}, function ($class, $globals){ return function (aString,aTraitCompositionDescription){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -332,22 +327,21 @@ return $self._subclass_uses_slots_package_(aString,aTraitCompositionDescription,
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:uses:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription"],
-source: "subclass: aString uses: aTraitCompositionDescription \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: #() package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:uses:slots:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:uses:instanceVariableNames:",
 protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,anotherString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aTraitCompositionDescription", "anotherString"],
+source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString package: nil",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:uses:instanceVariableNames:package:"]
+}, function ($class, $globals){ return function (aString,aTraitCompositionDescription,anotherString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -356,22 +350,21 @@ return $self._subclass_uses_instanceVariableNames_package_(aString,aTraitComposi
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,anotherString:anotherString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription", "anotherString"],
-source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:uses:instanceVariableNames:category:",
 protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,aString2,aString3){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
+source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:uses:instanceVariableNames:package:"]
+}, function ($class, $globals){ return function (aString,aTraitCompositionDescription,aString2,aString3){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -380,22 +373,21 @@ return $self._subclass_uses_instanceVariableNames_package_(aString,aTraitComposi
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:category:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
-source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 category: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category:",
 protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,aString2,classVars,pools,aString3){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aTraitCompositionDescription", "aString2", "classVars", "pools", "aString3"],
+source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:uses:instanceVariableNames:package:"]
+}, function ($class, $globals){ return function (aString,aTraitCompositionDescription,aString2,classVars,pools,aString3){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -404,22 +396,21 @@ return $self._subclass_uses_instanceVariableNames_package_(aString,aTraitComposi
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,classVars:classVars,pools:pools,aString3:aString3})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription", "aString2", "classVars", "pools", "aString3"],
-source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3\x0a\x09\x22Kept for file-in compatibility. ignores class variables and pools.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:uses:instanceVariableNames:package:",
 protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,aString2,aString3){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
+source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: aString2 instanceVariablesStringAsSlotList package: aString3",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:uses:slots:package:", "instanceVariablesStringAsSlotList"]
+}, function ($class, $globals){ return function (aString,aTraitCompositionDescription,aString2,aString3){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -428,22 +419,21 @@ return $self._subclass_uses_slots_package_(aString,aTraitCompositionDescription,
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:package:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
-source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: aString2 instanceVariablesStringAsSlotList package: aString3",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:uses:slots:package:", "instanceVariablesStringAsSlotList"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:uses:slots:",
 protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,aCollection){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aTraitCompositionDescription", "aCollection"],
+source: "subclass: aString uses: aTraitCompositionDescription slots: aCollection\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: aCollection package: nil",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:uses:slots:package:"]
+}, function ($class, $globals){ return function (aString,aTraitCompositionDescription,aCollection){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -452,22 +442,21 @@ return $self._subclass_uses_slots_package_(aString,aTraitCompositionDescription,
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:uses:slots:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aCollection:aCollection})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription", "aCollection"],
-source: "subclass: aString uses: aTraitCompositionDescription slots: aCollection\x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString uses: aTraitCompositionDescription slots: aCollection package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:uses:slots:package:"]
-}),
+}; }),
 $globals.TSubclassable);
 
 $core.addMethod(
 $core.method({
 selector: "subclass:uses:slots:package:",
 protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,aCollection,aString3){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aTraitCompositionDescription", "aCollection", "aString3"],
+source: "subclass: aString uses: aTraitCompositionDescription slots: aCollection package: aString3\x0a\x09| cls |\x0a\x09cls := self subclass: aString slots: aCollection package: aString3.\x0a\x09cls setTraitComposition: aTraitCompositionDescription asTraitComposition.\x0a\x09^ cls",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["subclass:slots:package:", "setTraitComposition:", "asTraitComposition"]
+}, function ($class, $globals){ return function (aString,aTraitCompositionDescription,aCollection,aString3){
 var self=this,$self=this;
 var cls;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -479,15 +468,7 @@ return cls;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"subclass:uses:slots:package:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aCollection:aCollection,aString3:aString3,cls:cls})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription", "aCollection", "aString3"],
-source: "subclass: aString uses: aTraitCompositionDescription slots: aCollection package: aString3\x0a\x09| cls |\x0a\x09cls := self subclass: aString slots: aCollection package: aString3.\x0a\x09cls setTraitComposition: aTraitCompositionDescription asTraitComposition.\x0a\x09^ cls",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["subclass:slots:package:", "setTraitComposition:", "asTraitComposition"]
-}),
+}; }),
 $globals.TSubclassable);
 
 });

File diff suppressed because it is too large
+ 1193 - 1334
lang/src/Kernel-Infrastructure.js


File diff suppressed because it is too large
+ 1183 - 1326
lang/src/Kernel-Methods.js


File diff suppressed because it is too large
+ 2133 - 2389
lang/src/Kernel-Objects.js


File diff suppressed because it is too large
+ 126 - 140
lang/src/Kernel-Promises.js


File diff suppressed because it is too large
+ 3152 - 3521
lang/src/Kernel-Tests.js


+ 104 - 116
lang/src/Platform-Browser.js

@@ -16,11 +16,6 @@ $core.addMethod(
 $core.method({
 selector: "globals",
 protocol: "accessing",
-fn: function (){
-var self=this,$self=this;
-return window;
-
-},
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
 source: "globals\x0a\x09^ window",
@@ -28,14 +23,25 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
 messageSends: []
-}),
+}, function ($class, $globals){ return function (){
+var self=this,$self=this;
+return window;
+
+}; }),
 $globals.BrowserPlatform);
 
 $core.addMethod(
 $core.method({
 selector: "newXhr",
 protocol: "accessing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "newXhr\x0a\x09XMLHttpRequest\x0a\x09\x09ifNotNil: [ ^ NativeFunction constructorOf: XMLHttpRequest ]\x0a\x09\x09ifNil: [ self error: 'XMLHttpRequest not available.' ]",
+referencedClasses: ["XMLHttpRequest", "NativeFunction"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifNotNil:ifNil:", "constructorOf:", "error:"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -50,15 +56,7 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"newXhr",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "newXhr\x0a\x09XMLHttpRequest\x0a\x09\x09ifNotNil: [ ^ NativeFunction constructorOf: XMLHttpRequest ]\x0a\x09\x09ifNil: [ self error: 'XMLHttpRequest not available.' ]",
-referencedClasses: ["XMLHttpRequest", "NativeFunction"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifNotNil:ifNil:", "constructorOf:", "error:"]
-}),
+}; }),
 $globals.BrowserPlatform);
 
 
@@ -66,7 +64,14 @@ $core.addMethod(
 $core.method({
 selector: "initialize",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09self isFeasible ifTrue: [ Platform registerIfNone: self new ]",
+referencedClasses: ["Platform"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -80,22 +85,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"initialize",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "initialize\x0a\x09self isFeasible ifTrue: [ Platform registerIfNone: self new ]",
-referencedClasses: ["Platform"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
-}),
+}; }),
 $globals.BrowserPlatform.a$cls);
 
 $core.addMethod(
 $core.method({
 selector: "isFeasible",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "isFeasible\x0a<inlineJS: 'return typeof window !== \x22undefined\x22'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["return typeof window !== \x22undefined\x22"]]],
+messageSends: []
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -105,15 +109,7 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"isFeasible",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "isFeasible\x0a<inlineJS: 'return typeof window !== \x22undefined\x22'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["return typeof window !== \x22undefined\x22"]]],
-messageSends: []
-}),
+}; }),
 $globals.BrowserPlatform.a$cls);
 
 
@@ -125,7 +121,14 @@ $core.addMethod(
 $core.method({
 selector: "alert:",
 protocol: "actions",
-fn: function (aString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "alert: aString\x0a\x09^ window alert: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["alert:"]
+}, function ($class, $globals){ return function (aString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -134,22 +137,21 @@ return $recv(window)._alert_(aString);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"alert:",{aString:aString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "alert: aString\x0a\x09^ window alert: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["alert:"]
-}),
+}; }),
 $globals.BrowserTerminal);
 
 $core.addMethod(
 $core.method({
 selector: "confirm:",
 protocol: "actions",
-fn: function (aString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "confirm: aString\x0a\x09^ window confirm: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["confirm:"]
+}, function ($class, $globals){ return function (aString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -158,22 +160,21 @@ return $recv(window)._confirm_(aString);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"confirm:",{aString:aString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "confirm: aString\x0a\x09^ window confirm: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["confirm:"]
-}),
+}; }),
 $globals.BrowserTerminal);
 
 $core.addMethod(
 $core.method({
 selector: "prompt:",
 protocol: "actions",
-fn: function (aString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "prompt: aString\x0a\x09^ window prompt: aString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["prompt:"]
+}, function ($class, $globals){ return function (aString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -182,22 +183,21 @@ return $recv(window)._prompt_(aString);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"prompt:",{aString:aString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "prompt: aString\x0a\x09^ window prompt: aString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["prompt:"]
-}),
+}; }),
 $globals.BrowserTerminal);
 
 $core.addMethod(
 $core.method({
 selector: "prompt:default:",
 protocol: "actions",
-fn: function (aString,defaultString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "defaultString"],
+source: "prompt: aString default: defaultString\x0a\x09^ window prompt: aString default: defaultString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["prompt:default:"]
+}, function ($class, $globals){ return function (aString,defaultString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -206,15 +206,7 @@ return $recv(window)._prompt_default_(aString,defaultString);
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"prompt:default:",{aString:aString,defaultString:defaultString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "defaultString"],
-source: "prompt: aString default: defaultString\x0a\x09^ window prompt: aString default: defaultString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["prompt:default:"]
-}),
+}; }),
 $globals.BrowserTerminal);
 
 
@@ -222,7 +214,14 @@ $core.addMethod(
 $core.method({
 selector: "initialize",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09self isFeasible ifTrue: [ Terminal registerIfNone: self new ]",
+referencedClasses: ["Terminal"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -236,22 +235,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"initialize",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "initialize\x0a\x09self isFeasible ifTrue: [ Terminal registerIfNone: self new ]",
-referencedClasses: ["Terminal"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
-}),
+}; }),
 $globals.BrowserTerminal.a$cls);
 
 $core.addMethod(
 $core.method({
 selector: "isFeasible",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "isFeasible\x0a<inlineJS: 'return typeof window !== \x22undefined\x22'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["return typeof window !== \x22undefined\x22"]]],
+messageSends: []
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -261,22 +259,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"isFeasible",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "isFeasible\x0a<inlineJS: 'return typeof window !== \x22undefined\x22'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["return typeof window !== \x22undefined\x22"]]],
-messageSends: []
-}),
+}; }),
 $globals.BrowserTerminal.a$cls);
 
 $core.addMethod(
 $core.method({
 selector: "postMessageTo:",
 protocol: "*Platform-Browser",
-fn: function (aFrame){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aFrame"],
+source: "postMessageTo: aFrame\x0a^ self postMessageTo: aFrame origin: '*'",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["postMessageTo:origin:"]
+}, function ($class, $globals){ return function (aFrame){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -285,22 +282,21 @@ return $self._postMessageTo_origin_(aFrame,"*");
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"postMessageTo:",{aFrame:aFrame})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aFrame"],
-source: "postMessageTo: aFrame\x0a^ self postMessageTo: aFrame origin: '*'",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["postMessageTo:origin:"]
-}),
+}; }),
 $globals.Object);
 
 $core.addMethod(
 $core.method({
 selector: "postMessageTo:origin:",
 protocol: "*Platform-Browser",
-fn: function (aFrame,aString){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aFrame", "aString"],
+source: "postMessageTo: aFrame origin: aString\x0a<inlineJS: 'return aFrame.postMessage(self, aString)'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["return aFrame.postMessage(self, aString)"]]],
+messageSends: []
+}, function ($class, $globals){ return function (aFrame,aString){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -310,15 +306,7 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"postMessageTo:origin:",{aFrame:aFrame,aString:aString})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aFrame", "aString"],
-source: "postMessageTo: aFrame origin: aString\x0a<inlineJS: 'return aFrame.postMessage(self, aString)'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["return aFrame.postMessage(self, aString)"]]],
-messageSends: []
-}),
+}; }),
 $globals.Object);
 
 });

+ 18 - 20
lang/src/Platform-DOM-Tests.js

@@ -9,7 +9,14 @@ $core.addMethod(
 $core.method({
 selector: "testEntityConversion",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testEntityConversion\x0a\x09PlatformDom isFeasible ifTrue: [ self assert: '&copy;' htmlTextContent equals: '©' ]",
+referencedClasses: ["PlatformDom"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifTrue:", "isFeasible", "assert:equals:", "htmlTextContent"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -23,22 +30,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testEntityConversion",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "testEntityConversion\x0a\x09PlatformDom isFeasible ifTrue: [ self assert: '&copy;' htmlTextContent equals: '©' ]",
-referencedClasses: ["PlatformDom"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifTrue:", "isFeasible", "assert:equals:", "htmlTextContent"]
-}),
+}; }),
 $globals.PlatformDomTest);
 
 $core.addMethod(
 $core.method({
 selector: "testTextContentDoesNotRunScript",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "testTextContentDoesNotRunScript\x0a\x09PlatformDom isFeasible ifTrue: [\x0a\x09\x09self shouldnt: [ '<script>throw new Error(\x22Intentional\x22)</script>' htmlTextContent ] raise: Error ]",
+referencedClasses: ["PlatformDom", "Error"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifTrue:", "isFeasible", "shouldnt:raise:", "htmlTextContent"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -60,15 +66,7 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"testTextContentDoesNotRunScript",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "testTextContentDoesNotRunScript\x0a\x09PlatformDom isFeasible ifTrue: [\x0a\x09\x09self shouldnt: [ '<script>throw new Error(\x22Intentional\x22)</script>' htmlTextContent ] raise: Error ]",
-referencedClasses: ["PlatformDom", "Error"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifTrue:", "isFeasible", "shouldnt:raise:", "htmlTextContent"]
-}),
+}; }),
 $globals.PlatformDomTest);
 
 

+ 72 - 80
lang/src/Platform-DOM.js

@@ -10,7 +10,14 @@ $core.addMethod(
 $core.method({
 selector: "isDomNode:",
 protocol: "testing",
-fn: function (anObject){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["anObject"],
+source: "isDomNode: anObject\x0a<inlineJS: '\x0a\x09return anObject.nodeType > 0 &&\x0a\x09\x09Object.prototype.toString.call(anObject) !== \x22[object Object]\x22\x0a'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["\x0a\x09return anObject.nodeType > 0 &&\x0a\x09\x09Object.prototype.toString.call(anObject) !== \x22[object Object]\x22"]]],
+messageSends: []
+}, function ($class, $globals){ return function (anObject){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -22,22 +29,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"isDomNode:",{anObject:anObject})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["anObject"],
-source: "isDomNode: anObject\x0a<inlineJS: '\x0a\x09return anObject.nodeType > 0 &&\x0a\x09\x09Object.prototype.toString.call(anObject) !== \x22[object Object]\x22\x0a'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["\x0a\x09return anObject.nodeType > 0 &&\x0a\x09\x09Object.prototype.toString.call(anObject) !== \x22[object Object]\x22"]]],
-messageSends: []
-}),
+}; }),
 $globals.PlatformDom.a$cls);
 
 $core.addMethod(
 $core.method({
 selector: "isFeasible",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "isFeasible\x0a<inlineJS: '\x0a  if (typeof document === \x22undefined\x22) return false;\x0a  try {\x0a    var d = document.createElement(\x22div\x22),\x0a\x09  f = document.createDocumentFragment(),\x0a\x09  t = document.createTextNode(\x22Hello, Amber!\x22);\x0a\x09f.appendChild(t);\x0a\x09d.insertBefore(f, null);\x0a\x09return d.innerHTML === \x22Hello, Amber!\x22;\x0a  } catch (e) {\x0a    return false;\x0a  }\x0a'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["\x0a  if (typeof document === \x22undefined\x22) return false;\x0a  try {\x0a    var d = document.createElement(\x22div\x22),\x0a\x09  f = document.createDocumentFragment(),\x0a\x09  t = document.createTextNode(\x22Hello, Amber!\x22);\x0a\x09f.appendChild(t);\x0a\x09d.insertBefore(f, null);\x0a\x09return d.innerHTML === \x22Hello, Amber!\x22;\x0a  } catch (e) {\x0a    return false;\x0a  }"]]],
+messageSends: []
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -58,22 +64,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"isFeasible",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "isFeasible\x0a<inlineJS: '\x0a  if (typeof document === \x22undefined\x22) return false;\x0a  try {\x0a    var d = document.createElement(\x22div\x22),\x0a\x09  f = document.createDocumentFragment(),\x0a\x09  t = document.createTextNode(\x22Hello, Amber!\x22);\x0a\x09f.appendChild(t);\x0a\x09d.insertBefore(f, null);\x0a\x09return d.innerHTML === \x22Hello, Amber!\x22;\x0a  } catch (e) {\x0a    return false;\x0a  }\x0a'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["\x0a  if (typeof document === \x22undefined\x22) return false;\x0a  try {\x0a    var d = document.createElement(\x22div\x22),\x0a\x09  f = document.createDocumentFragment(),\x0a\x09  t = document.createTextNode(\x22Hello, Amber!\x22);\x0a\x09f.appendChild(t);\x0a\x09d.insertBefore(f, null);\x0a\x09return d.innerHTML === \x22Hello, Amber!\x22;\x0a  } catch (e) {\x0a    return false;\x0a  }"]]],
-messageSends: []
-}),
+}; }),
 $globals.PlatformDom.a$cls);
 
 $core.addMethod(
 $core.method({
 selector: "newCustomEvent:detail:",
 protocol: "creation",
-fn: function (aString,anObject){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "anObject"],
+source: "newCustomEvent: aString detail: anObject\x0a<inlineJS: 'return new CustomEvent(aString, {detail: anObject})'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["return new CustomEvent(aString, {detail: anObject})"]]],
+messageSends: []
+}, function ($class, $globals){ return function (aString,anObject){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -83,22 +88,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"newCustomEvent:detail:",{aString:aString,anObject:anObject})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "anObject"],
-source: "newCustomEvent: aString detail: anObject\x0a<inlineJS: 'return new CustomEvent(aString, {detail: anObject})'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["return new CustomEvent(aString, {detail: anObject})"]]],
-messageSends: []
-}),
+}; }),
 $globals.PlatformDom.a$cls);
 
 $core.addMethod(
 $core.method({
 selector: "toArray:",
 protocol: "converting",
-fn: function (aDomList){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aDomList"],
+source: "toArray: aDomList\x0a<inlineJS: 'return Array.prototype.slice.call(aDomList)'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["return Array.prototype.slice.call(aDomList)"]]],
+messageSends: []
+}, function ($class, $globals){ return function (aDomList){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -108,22 +112,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"toArray:",{aDomList:aDomList})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aDomList"],
-source: "toArray: aDomList\x0a<inlineJS: 'return Array.prototype.slice.call(aDomList)'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["return Array.prototype.slice.call(aDomList)"]]],
-messageSends: []
-}),
+}; }),
 $globals.PlatformDom.a$cls);
 
 $core.addMethod(
 $core.method({
 selector: "asDomNode",
 protocol: "*Platform-DOM",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asDomNode\x0a\x09| fragment |\x0a\x09fragment := document createDocumentFragment.\x0a\x09self do: [ :each | fragment appendChild: each asDomNode ].\x0a\x09^ fragment",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["createDocumentFragment", "do:", "appendChild:", "asDomNode"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 var fragment;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -143,22 +146,21 @@ return fragment;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"asDomNode",{fragment:fragment})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asDomNode\x0a\x09| fragment |\x0a\x09fragment := document createDocumentFragment.\x0a\x09self do: [ :each | fragment appendChild: each asDomNode ].\x0a\x09^ fragment",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["createDocumentFragment", "do:", "appendChild:", "asDomNode"]
-}),
+}; }),
 $globals.Collection);
 
 $core.addMethod(
 $core.method({
 selector: "asDomNode",
 protocol: "*Platform-DOM",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asDomNode\x0a\x09(PlatformDom isDomNode: jsObject)\x0a\x09\x09ifTrue: [ ^ jsObject ]\x0a\x09\x09ifFalse: [ ^ super asDomNode ]",
+referencedClasses: ["PlatformDom"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifTrue:ifFalse:", "isDomNode:", "asDomNode"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -182,22 +184,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"asDomNode",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asDomNode\x0a\x09(PlatformDom isDomNode: jsObject)\x0a\x09\x09ifTrue: [ ^ jsObject ]\x0a\x09\x09ifFalse: [ ^ super asDomNode ]",
-referencedClasses: ["PlatformDom"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifTrue:ifFalse:", "isDomNode:", "asDomNode"]
-}),
+}; }),
 $globals.JSObjectProxy);
 
 $core.addMethod(
 $core.method({
 selector: "asDomNode",
 protocol: "*Platform-DOM",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "asDomNode\x0a\x09^ document createTextNode: self asString",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["createTextNode:", "asString"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -206,22 +207,21 @@ return $recv(document)._createTextNode_($self._asString());
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"asDomNode",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "asDomNode\x0a\x09^ document createTextNode: self asString",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["createTextNode:", "asString"]
-}),
+}; }),
 $globals.String);
 
 $core.addMethod(
 $core.method({
 selector: "htmlTextContent",
 protocol: "*Platform-DOM",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "htmlTextContent\x0a<inlineJS: 'var d=document.createElement(\x22div\x22);d.innerHTML=self;return d.textContent||d.innerText;'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["var d=document.createElement(\x22div\x22);d.innerHTML=self;return d.textContent||d.innerText;"]]],
+messageSends: []
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -231,15 +231,7 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"htmlTextContent",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "htmlTextContent\x0a<inlineJS: 'var d=document.createElement(\x22div\x22);d.innerHTML=self;return d.textContent||d.innerText;'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["var d=document.createElement(\x22div\x22);d.innerHTML=self;return d.textContent||d.innerText;"]]],
-messageSends: []
-}),
+}; }),
 $globals.String);
 
 });

File diff suppressed because it is too large
+ 1156 - 1292
lang/src/Platform-ImportExport.js


+ 32 - 36
lang/src/Platform-Node.js

@@ -16,11 +16,6 @@ $core.addMethod(
 $core.method({
 selector: "globals",
 protocol: "accessing",
-fn: function (){
-var self=this,$self=this;
-return global;
-
-},
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
 source: "globals\x0a\x09^ global",
@@ -28,14 +23,25 @@ referencedClasses: [],
 //>>excludeEnd("ide");
 pragmas: [],
 messageSends: []
-}),
+}, function ($class, $globals){ return function (){
+var self=this,$self=this;
+return global;
+
+}; }),
 $globals.NodePlatform);
 
 $core.addMethod(
 $core.method({
 selector: "newXhr",
 protocol: "accessing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "newXhr\x0a\x09XMLHttpRequest\x0a\x09\x09ifNotNil: [ ^ XMLHttpRequest new ]\x0a\x09\x09ifNil: [ self error: 'XMLHttpRequest not available.' ]",
+referencedClasses: ["XMLHttpRequest"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifNotNil:ifNil:", "new", "error:"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -50,15 +56,7 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"newXhr",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "newXhr\x0a\x09XMLHttpRequest\x0a\x09\x09ifNotNil: [ ^ XMLHttpRequest new ]\x0a\x09\x09ifNil: [ self error: 'XMLHttpRequest not available.' ]",
-referencedClasses: ["XMLHttpRequest"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifNotNil:ifNil:", "new", "error:"]
-}),
+}; }),
 $globals.NodePlatform);
 
 
@@ -66,7 +64,14 @@ $core.addMethod(
 $core.method({
 selector: "initialize",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "initialize\x0a\x09self isFeasible ifTrue: [ Platform registerIfNone: self new ]",
+referencedClasses: ["Platform"],
+//>>excludeEnd("ide");
+pragmas: [],
+messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -80,22 +85,21 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"initialize",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "initialize\x0a\x09self isFeasible ifTrue: [ Platform registerIfNone: self new ]",
-referencedClasses: ["Platform"],
-//>>excludeEnd("ide");
-pragmas: [],
-messageSends: ["ifTrue:", "isFeasible", "registerIfNone:", "new"]
-}),
+}; }),
 $globals.NodePlatform.a$cls);
 
 $core.addMethod(
 $core.method({
 selector: "isFeasible",
 protocol: "testing",
-fn: function (){
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: [],
+source: "isFeasible\x0a<inlineJS: 'return typeof process !== \x22undefined\x22 && process && process.versions && process.versions.node != null'>",
+referencedClasses: [],
+//>>excludeEnd("ide");
+pragmas: [["inlineJS:", ["return typeof process !== \x22undefined\x22 && process && process.versions && process.versions.node != null"]]],
+messageSends: []
+}, function ($class, $globals){ return function (){
 var self=this,$self=this;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 return $core.withContext(function($ctx1) {
@@ -105,15 +109,7 @@ return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
 }, function($ctx1) {$ctx1.fill(self,"isFeasible",{})});
 //>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: [],
-source: "isFeasible\x0a<inlineJS: 'return typeof process !== \x22undefined\x22 && process && process.versions && process.versions.node != null'>",
-referencedClasses: [],
-//>>excludeEnd("ide");
-pragmas: [["inlineJS:", ["return typeof process !== \x22undefined\x22 && process && process.versions && process.versions.node != null"]]],
-messageSends: []
-}),
+}; }),
 $globals.NodePlatform.a$cls);
 
 });

File diff suppressed because it is too large
+ 696 - 775
lang/src/Platform-Services.js


File diff suppressed because it is too large
+ 204 - 227
lang/src/SUnit-Tests.js


File diff suppressed because it is too large
+ 496 - 560
lang/src/SUnit.js


File diff suppressed because it is too large
+ 18 - 20
sdk/lib/NodeTestRunner.js