浏览代码

TSubclassable in Kernel-Helpers.

Herbert Vojčík 7 年之前
父节点
当前提交
c2e08660ea
共有 8 个文件被更改,包括 313 次插入579 次删除
  1. 2 1
      Gruntfile.js
  2. 2 468
      src/Kernel-Classes.js
  3. 1 109
      src/Kernel-Classes.st
  4. 243 0
      src/Kernel-Helpers.js
  5. 58 0
      src/Kernel-Helpers.st
  6. 3 1
      src/Kernel-Objects.js
  7. 3 0
      src/Kernel-Objects.st
  8. 1 0
      support/deploy.js

+ 2 - 1
Gruntfile.js

@@ -44,7 +44,8 @@ module.exports = function (grunt) {
             },
             amber: {
                 output_dir: 'src',
-                src: ['src/Kernel-Objects.st', 'src/Kernel-Classes.st', 'src/Kernel-Methods.st', 'src/Kernel-Collections.st',
+                src: ['src/Kernel-Helpers.st',
+                    'src/Kernel-Objects.st', 'src/Kernel-Classes.st', 'src/Kernel-Methods.st', 'src/Kernel-Collections.st',
                     'src/Kernel-Infrastructure.st', 'src/Kernel-Promises.st', 'src/Kernel-Exceptions.st', 'src/Kernel-Announcements.st',
                     'src/Platform-Services.st', 'src/Platform-ImportExport.st', 'src/Platform-Browser.st', 'src/Platform-Node.st',
                     'src/Platform-DOM.st',

+ 2 - 468
src/Kernel-Classes.js

@@ -1,4 +1,4 @@
-define(["amber/boot", "amber_core/Kernel-Collections", "amber_core/Kernel-Objects"], function($boot){"use strict";
+define(["amber/boot", "amber_core/Kernel-Collections", "amber_core/Kernel-Helpers", "amber_core/Kernel-Objects"], function($boot){"use strict";
 if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
 if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
@@ -790,239 +790,6 @@ messageSends: ["renameClass:to:", "new"]
 }),
 $globals.Class);
 
-$core.addMethod(
-$core.method({
-selector: "subclass:",
-protocol: "class creation",
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_instanceVariableNames_package_(aString,"",nil);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:",{aString:aString},$globals.Class)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "subclass: aString \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: '' package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:instanceVariableNames:",
-protocol: "class creation",
-fn: function (aString,anotherString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},$globals.Class)});
-//>>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");
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:instanceVariableNames:category:",
-protocol: "class creation",
-fn: function (aString,aString2,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-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},$globals.Class)});
-//>>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");
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
-protocol: "class creation",
-fn: function (aString,aString2,classVars,pools,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-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},$globals.Class)});
-//>>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");
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:instanceVariableNames:package:",
-protocol: "class creation",
-fn: function (aString,aString2,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_instanceVariableNames_package_(self,$recv(aString)._asString(),aString2,aString3);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},$globals.Class)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aString2", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3",
-referencedClasses: ["ClassBuilder"],
-//>>excludeEnd("ide");
-messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:",
-protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,"",nil);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:uses:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription},$globals.Class)});
-//>>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 instanceVariableNames: '' package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:instanceVariableNames:",
-protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,anotherString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,anotherString,nil);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,anotherString:anotherString},$globals.Class)});
-//>>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");
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:instanceVariableNames:category:",
-protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,aString2,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,aString2,aString3);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:category:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3},$globals.Class)});
-//>>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");
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category:",
-protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,aString2,classVars,pools,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,aString2,aString3);
-//>>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},$globals.Class)});
-//>>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");
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
-$globals.Class);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:instanceVariableNames:package:",
-protocol: "class creation",
-fn: function (aString,aTraitCompositionDescription,aString2,aString3){
-var self=this;
-var cls;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-cls=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
-$recv(cls)._setTraitComposition_($recv(aTraitCompositionDescription)._asTraitComposition());
-return cls;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:package:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3,cls:cls},$globals.Class)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
-source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3\x0a\x09| cls |\x0a\x09cls := self subclass: aString instanceVariableNames: aString2 package: aString3.\x0a\x09cls setTraitComposition: aTraitCompositionDescription asTraitComposition.\x0a\x09^ cls",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["subclass:instanceVariableNames:package:", "setTraitComposition:", "asTraitComposition"]
-}),
-$globals.Class);
-
 $core.addMethod(
 $core.method({
 selector: "subclasses",
@@ -4439,7 +4206,7 @@ messageSends: ["trait:", "new", "yourself"]
 $globals.TraitTransformation.klass);
 
 $core.setTraitComposition([{trait: $globals.TBehaviorDefaults}, {trait: $globals.TBehaviorProvider}], $globals.Behavior);
-$core.setTraitComposition([{trait: $globals.TMasterBehavior}], $globals.Class);
+$core.setTraitComposition([{trait: $globals.TMasterBehavior}, {trait: $globals.TSubclassable}], $globals.Class);
 $core.setTraitComposition([{trait: $globals.TBehaviorDefaults}, {trait: $globals.TBehaviorProvider}, {trait: $globals.TMasterBehavior}], $globals.Trait);
 
 $core.addMethod(
@@ -4473,237 +4240,4 @@ messageSends: ["collect:", "asTraitTransformation"]
 }),
 $globals.Array);
 
-$core.addMethod(
-$core.method({
-selector: "subclass:",
-protocol: "*Kernel-Classes",
-fn: function (aString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_instanceVariableNames_package_(aString,"",nil);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:",{aString:aString},$globals.UndefinedObject)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString"],
-source: "subclass: aString \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: '' package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:instanceVariableNames:",
-protocol: "*Kernel-Classes",
-fn: function (aString,anotherString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},$globals.UndefinedObject)});
-//>>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");
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:instanceVariableNames:category:",
-protocol: "*Kernel-Classes",
-fn: function (aString,aString2,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-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},$globals.UndefinedObject)});
-//>>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");
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:instanceVariableNames:classVariableNames:poolDictionaries:category:",
-protocol: "*Kernel-Classes",
-fn: function (aString,aString2,classVars,pools,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-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},$globals.UndefinedObject)});
-//>>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");
-messageSends: ["subclass:instanceVariableNames:package:"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:instanceVariableNames:package:",
-protocol: "*Kernel-Classes",
-fn: function (aString,aString2,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_instanceVariableNames_package_(self,$recv(aString)._asString(),aString2,aString3);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},$globals.UndefinedObject)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aString2", "aString3"],
-source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3",
-referencedClasses: ["ClassBuilder"],
-//>>excludeEnd("ide");
-messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:",
-protocol: "*Kernel-Classes",
-fn: function (aString,aTraitCompositionDescription){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,"",nil);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:uses:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription},$globals.UndefinedObject)});
-//>>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 instanceVariableNames: '' package: nil",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:instanceVariableNames:",
-protocol: "*Kernel-Classes",
-fn: function (aString,aTraitCompositionDescription,anotherString){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,anotherString,nil);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,anotherString:anotherString},$globals.UndefinedObject)});
-//>>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");
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:instanceVariableNames:category:",
-protocol: "*Kernel-Classes",
-fn: function (aString,aTraitCompositionDescription,aString2,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,aString2,aString3);
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:category:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3},$globals.UndefinedObject)});
-//>>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");
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:instanceVariableNames:classVariableNames:poolDictionaries:category:",
-protocol: "*Kernel-Classes",
-fn: function (aString,aTraitCompositionDescription,aString2,classVars,pools,aString3){
-var self=this;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,aString2,aString3);
-//>>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},$globals.UndefinedObject)});
-//>>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");
-messageSends: ["subclass:uses:instanceVariableNames:package:"]
-}),
-$globals.UndefinedObject);
-
-$core.addMethod(
-$core.method({
-selector: "subclass:uses:instanceVariableNames:package:",
-protocol: "*Kernel-Classes",
-fn: function (aString,aTraitCompositionDescription,aString2,aString3){
-var self=this;
-var cls;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-return $core.withContext(function($ctx1) {
-//>>excludeEnd("ctx");
-cls=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
-$recv(cls)._setTraitComposition_($recv(aTraitCompositionDescription)._asTraitComposition());
-return cls;
-//>>excludeStart("ctx", pragmas.excludeDebugContexts);
-}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:package:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3,cls:cls},$globals.UndefinedObject)});
-//>>excludeEnd("ctx");
-},
-//>>excludeStart("ide", pragmas.excludeIdeData);
-args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
-source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3\x0a\x09| cls |\x0a\x09cls := self subclass: aString instanceVariableNames: aString2 package: aString3.\x0a\x09cls setTraitComposition: aTraitCompositionDescription asTraitComposition.\x0a\x09^ cls",
-referencedClasses: [],
-//>>excludeEnd("ide");
-messageSends: ["subclass:instanceVariableNames:package:", "setTraitComposition:", "asTraitComposition"]
-}),
-$globals.UndefinedObject);
-
 });

+ 1 - 109
src/Kernel-Classes.st

@@ -183,60 +183,6 @@ theMetaClass
 	^ self class
 ! !
 
-!Class methodsFor: 'class creation'!
-
-subclass: aString 
-	"Kept for file-in compatibility."
-	^ self subclass: aString instanceVariableNames: '' package: nil
-!
-
-subclass: aString instanceVariableNames: anotherString
-	"Kept for file-in compatibility."
-	^ self subclass: aString instanceVariableNames: anotherString package: nil
-!
-
-subclass: aString instanceVariableNames: aString2 category: aString3
-	"Kept for file-in compatibility."
-	^ self subclass: aString instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3
-	"Kept for file-in compatibility. ignores class variables and pools."
-	^ self subclass: aString instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString instanceVariableNames: aString2 package: aString3
-	^ ClassBuilder new
-		superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString uses: aTraitCompositionDescription 
-	"Kept for file-in compatibility."
-	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: '' package: nil
-!
-
-subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString
-	"Kept for file-in compatibility."
-	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString package: nil
-!
-
-subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 category: aString3
-	"Kept for file-in compatibility."
-	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3
-	"Kept for file-in compatibility. ignores class variables and pools."
-	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
-	| cls |
-	cls := self subclass: aString instanceVariableNames: aString2 package: aString3.
-	cls setTraitComposition: aTraitCompositionDescription asTraitComposition.
-	^ cls
-! !
-
 !Class methodsFor: 'testing'!
 
 isClass
@@ -1110,7 +1056,7 @@ on: aTrait
 ! !
 
 Behavior setTraitComposition: {TBehaviorDefaults. TBehaviorProvider} asTraitComposition!
-Class setTraitComposition: {TMasterBehavior} asTraitComposition!
+Class setTraitComposition: {TMasterBehavior. TSubclassable} asTraitComposition!
 Trait setTraitComposition: {TBehaviorDefaults. TBehaviorProvider. TMasterBehavior} asTraitComposition!
 ! !
 
@@ -1121,57 +1067,3 @@ asTraitComposition
 	^ self collect: [ :each | each asTraitTransformation ]
 ! !
 
-!UndefinedObject methodsFor: '*Kernel-Classes'!
-
-subclass: aString 
-	"Kept for file-in compatibility."
-	^ self subclass: aString instanceVariableNames: '' package: nil
-!
-
-subclass: aString instanceVariableNames: anotherString
-	"Kept for file-in compatibility."
-	^ self subclass: aString instanceVariableNames: anotherString package: nil
-!
-
-subclass: aString instanceVariableNames: aString2 category: aString3
-	"Kept for file-in compatibility."
-	^ self subclass: aString instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3
-	"Kept for file-in compatibility. ignores class variables and pools."
-	^ self subclass: aString instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString instanceVariableNames: aString2 package: aString3
-	^ ClassBuilder new
-		superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString uses: aTraitCompositionDescription 
-	"Kept for file-in compatibility."
-	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: '' package: nil
-!
-
-subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString
-	"Kept for file-in compatibility."
-	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString package: nil
-!
-
-subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 category: aString3
-	"Kept for file-in compatibility."
-	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3
-	"Kept for file-in compatibility. ignores class variables and pools."
-	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
-!
-
-subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
-	| cls |
-	cls := self subclass: aString instanceVariableNames: aString2 package: aString3.
-	cls setTraitComposition: aTraitCompositionDescription asTraitComposition.
-	^ cls
-! !
-

+ 243 - 0
src/Kernel-Helpers.js

@@ -0,0 +1,243 @@
+define(["amber/boot"], function($boot){"use strict";
+if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
+var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
+if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
+$core.addPackage("Kernel-Helpers");
+$core.packages["Kernel-Helpers"].innerEval = function (expr) { return eval(expr); };
+$core.packages["Kernel-Helpers"].transport = {"type":"amd","amdNamespace":"amber_core"};
+
+$core.addTrait("TSubclassable", "Kernel-Helpers");
+$core.addMethod(
+$core.method({
+selector: "subclass:",
+protocol: "class creation",
+fn: function (aString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._subclass_instanceVariableNames_package_(aString,"",nil);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"subclass:",{aString:aString},$globals.TSubclassable)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString"],
+source: "subclass: aString \x0a\x09\x22Kept for file-in compatibility.\x22\x0a\x09^ self subclass: aString instanceVariableNames: '' package: nil",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["subclass:instanceVariableNames:package:"]
+}),
+$globals.TSubclassable);
+
+$core.addMethod(
+$core.method({
+selector: "subclass:instanceVariableNames:",
+protocol: "class creation",
+fn: function (aString,anotherString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._subclass_instanceVariableNames_package_(aString,anotherString,nil);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:",{aString:aString,anotherString:anotherString},$globals.TSubclassable)});
+//>>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");
+messageSends: ["subclass:instanceVariableNames:package:"]
+}),
+$globals.TSubclassable);
+
+$core.addMethod(
+$core.method({
+selector: "subclass:instanceVariableNames:category:",
+protocol: "class creation",
+fn: function (aString,aString2,aString3){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+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},$globals.TSubclassable)});
+//>>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");
+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){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+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},$globals.TSubclassable)});
+//>>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");
+messageSends: ["subclass:instanceVariableNames:package:"]
+}),
+$globals.TSubclassable);
+
+$core.addMethod(
+$core.method({
+selector: "subclass:instanceVariableNames:package:",
+protocol: "class creation",
+fn: function (aString,aString2,aString3){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return $recv($recv($globals.ClassBuilder)._new())._superclass_subclass_instanceVariableNames_package_(self,$recv(aString)._asString(),aString2,aString3);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"subclass:instanceVariableNames:package:",{aString:aString,aString2:aString2,aString3:aString3},$globals.TSubclassable)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aString2", "aString3"],
+source: "subclass: aString instanceVariableNames: aString2 package: aString3\x0a\x09^ ClassBuilder new\x0a\x09\x09superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3",
+referencedClasses: ["ClassBuilder"],
+//>>excludeEnd("ide");
+messageSends: ["superclass:subclass:instanceVariableNames:package:", "new", "asString"]
+}),
+$globals.TSubclassable);
+
+$core.addMethod(
+$core.method({
+selector: "subclass:uses:",
+protocol: "class creation",
+fn: function (aString,aTraitCompositionDescription){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,"",nil);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"subclass:uses:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription},$globals.TSubclassable)});
+//>>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 instanceVariableNames: '' package: nil",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["subclass:uses:instanceVariableNames:package:"]
+}),
+$globals.TSubclassable);
+
+$core.addMethod(
+$core.method({
+selector: "subclass:uses:instanceVariableNames:",
+protocol: "class creation",
+fn: function (aString,aTraitCompositionDescription,anotherString){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,anotherString,nil);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,anotherString:anotherString},$globals.TSubclassable)});
+//>>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");
+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){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,aString2,aString3);
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:category:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3},$globals.TSubclassable)});
+//>>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");
+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){
+var self=this;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+return self._subclass_uses_instanceVariableNames_package_(aString,aTraitCompositionDescription,aString2,aString3);
+//>>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},$globals.TSubclassable)});
+//>>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");
+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){
+var self=this;
+var cls;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+return $core.withContext(function($ctx1) {
+//>>excludeEnd("ctx");
+cls=self._subclass_instanceVariableNames_package_(aString,aString2,aString3);
+$recv(cls)._setTraitComposition_($recv(aTraitCompositionDescription)._asTraitComposition());
+return cls;
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
+}, function($ctx1) {$ctx1.fill(self,"subclass:uses:instanceVariableNames:package:",{aString:aString,aTraitCompositionDescription:aTraitCompositionDescription,aString2:aString2,aString3:aString3,cls:cls},$globals.TSubclassable)});
+//>>excludeEnd("ctx");
+},
+//>>excludeStart("ide", pragmas.excludeIdeData);
+args: ["aString", "aTraitCompositionDescription", "aString2", "aString3"],
+source: "subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3\x0a\x09| cls |\x0a\x09cls := self subclass: aString instanceVariableNames: aString2 package: aString3.\x0a\x09cls setTraitComposition: aTraitCompositionDescription asTraitComposition.\x0a\x09^ cls",
+referencedClasses: [],
+//>>excludeEnd("ide");
+messageSends: ["subclass:instanceVariableNames:package:", "setTraitComposition:", "asTraitComposition"]
+}),
+$globals.TSubclassable);
+
+});

+ 58 - 0
src/Kernel-Helpers.st

@@ -0,0 +1,58 @@
+Smalltalk createPackage: 'Kernel-Helpers'!
+Trait named: #TSubclassable
+	package: 'Kernel-Helpers'!
+
+!TSubclassable methodsFor: 'class creation'!
+
+subclass: aString 
+	"Kept for file-in compatibility."
+	^ self subclass: aString instanceVariableNames: '' package: nil
+!
+
+subclass: aString instanceVariableNames: anotherString
+	"Kept for file-in compatibility."
+	^ self subclass: aString instanceVariableNames: anotherString package: nil
+!
+
+subclass: aString instanceVariableNames: aString2 category: aString3
+	"Kept for file-in compatibility."
+	^ self subclass: aString instanceVariableNames: aString2 package: aString3
+!
+
+subclass: aString instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3
+	"Kept for file-in compatibility. ignores class variables and pools."
+	^ self subclass: aString instanceVariableNames: aString2 package: aString3
+!
+
+subclass: aString instanceVariableNames: aString2 package: aString3
+	^ ClassBuilder new
+		superclass: self subclass: aString asString instanceVariableNames: aString2 package: aString3
+!
+
+subclass: aString uses: aTraitCompositionDescription 
+	"Kept for file-in compatibility."
+	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: '' package: nil
+!
+
+subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString
+	"Kept for file-in compatibility."
+	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: anotherString package: nil
+!
+
+subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 category: aString3
+	"Kept for file-in compatibility."
+	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
+!
+
+subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 classVariableNames: classVars poolDictionaries: pools category: aString3
+	"Kept for file-in compatibility. ignores class variables and pools."
+	^ self subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
+!
+
+subclass: aString uses: aTraitCompositionDescription instanceVariableNames: aString2 package: aString3
+	| cls |
+	cls := self subclass: aString instanceVariableNames: aString2 package: aString3.
+	cls setTraitComposition: aTraitCompositionDescription asTraitComposition.
+	^ cls
+! !
+

+ 3 - 1
src/Kernel-Objects.js

@@ -1,4 +1,4 @@
-define(["amber/boot"], function($boot){"use strict";
+define(["amber/boot", "amber_core/Kernel-Helpers"], function($boot){"use strict";
 if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
 var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
 if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
@@ -5798,4 +5798,6 @@ messageSends: ["error:"]
 }),
 $globals.UndefinedObject.klass);
 
+$core.setTraitComposition([{trait: $globals.TSubclassable}], $globals.UndefinedObject);
+
 });

+ 3 - 0
src/Kernel-Objects.st

@@ -1372,3 +1372,6 @@ new
 		self error: 'You cannot create new instances of UndefinedObject. Use nil'
 ! !
 
+UndefinedObject setTraitComposition: {TSubclassable} asTraitComposition!
+! !
+

+ 1 - 0
support/deploy.js

@@ -5,6 +5,7 @@ define([
     './kernel-language', // pre-fetch, dep of ./boot
     './boot', // pre-fetch, dep of ./helpers
     // --- packages of the core Amber begin here ---
+    'amber_core/Kernel-Helpers',
     'amber_core/Kernel-Objects',
     'amber_core/Kernel-Classes',
     'amber_core/Kernel-Methods',