Browse Source

kernel: Fundamentals and Language objects.

Herby Vojčík 4 years ago
parent
commit
2f775c9b31
3 changed files with 10 additions and 9 deletions
  1. 3 3
      lang/base/boot.js
  2. 5 4
      lang/base/kernel-fundamentals.js
  3. 2 2
      lang/base/kernel-language.js

+ 3 - 3
lang/base/boot.js

@@ -41,7 +41,7 @@
 
 define([
     'require', './kernel-checks', './brikz', './kernel-fundamentals', './kernel-language'
-], function (require, _, Brikz, configureWithFundamentals, configureWithHierarchy) {
+], function (require, _, Brikz, Fundamentals, Language) {
     "use strict";
 
     var globals = Object.create(global);
@@ -84,9 +84,9 @@ define([
     Object.defineProperty(brikz, "commonGlobals", {value: globals});
     Object.defineProperty(brikz, "commonEmit", {value: emit});
 
-    configureWithFundamentals(brikz);
+    Fundamentals.configure(brikz);
 
-    configureWithHierarchy(brikz);
+    Language.configure(brikz);
 
     brikz.stInit = SmalltalkInitBrik;
     brikz.amd = AMDBrik;

+ 5 - 4
lang/base/kernel-fundamentals.js

@@ -255,10 +255,11 @@ define(function () {
         });
     }
 
-    /* Making smalltalk that has basic building blocks */
+    var specialConstructors = Object.create(null);
 
-    function configureWithFundamentals (brikz) {
-        Object.defineProperty(brikz, "commonSpecialConstructors", {value: Object.create(null)});
+    /* Making smalltalk that has basic building blocks */
+    function configure (brikz) {
+        Object.defineProperty(brikz, "commonSpecialConstructors", {value: specialConstructors});
         brikz.root = RootBrik;
         brikz.nil = NilBrik;
         brikz.event = EventBrik;
@@ -271,5 +272,5 @@ define(function () {
         brikz();
     }
 
-    return configureWithFundamentals;
+    return {configure: configure, specialConstructors: specialConstructors};
 });

+ 2 - 2
lang/base/kernel-language.js

@@ -448,7 +448,7 @@ define(function () {
 
     /* Making smalltalk that can load */
 
-    function configureWithHierarchy (brikz) {
+    function configure (brikz) {
         brikz.traits = TraitsBrik;
         brikz.composition = MethodCompositionBrik;
         brikz.classes = ClassesBrik;
@@ -456,5 +456,5 @@ define(function () {
         brikz();
     }
 
-    return configureWithHierarchy;
+    return {configure: configure};
 });