Browse Source

Move st.alias into kernel-runtime.

Herby Vojčík 5 years ago
parent
commit
aeb4211f0a
2 changed files with 8 additions and 7 deletions
  1. 0 6
      lang/base/kernel-fundamentals.js
  2. 8 1
      lang/base/kernel-runtime.js

+ 0 - 6
lang/base/kernel-fundamentals.js

@@ -157,12 +157,6 @@ define(function () {
 
         this.removeTraitOrClass = removeTraitOrClass;
 
-        /* Create an alias for an existing class */
-
-        st.alias = function (traitOrClass, alias) {
-            globals[alias] = traitOrClass;
-        };
-
         st.traitsOrClasses = this.traitsOrClasses = traitsOrClasses;
     }
 

+ 8 - 1
lang/base/kernel-runtime.js

@@ -55,8 +55,9 @@ define(function () {
         installNewSelectors(selectors, []);
     }
 
-    RuntimeClassesBrik.deps = ["event", "runtimeSelectors", "behaviors", "classes", "runtimeMethods"];
+    RuntimeClassesBrik.deps = ["event", "smalltalkGlobals", "runtimeSelectors", "behaviors", "classes", "runtimeMethods"];
     function RuntimeClassesBrik (brikz, st) {
+        var globals = brikz.smalltalkGlobals.globals;
         var jsSelectors = brikz.runtimeSelectors.jsSelectors;
         var installNewSelectors = brikz.runtimeSelectors.installNewSelectors;
         var installMethod = brikz.runtimeMethods.installMethod;
@@ -131,6 +132,12 @@ define(function () {
             });
         }
 
+        /* Create an alias for an existing class */
+
+        st.alias = function (traitOrClass, alias) {
+            globals[alias] = traitOrClass;
+        };
+
         /* Manually set the constructor of an existing Smalltalk klass, making it a detached root class. */
 
         st.setClassConstructor = this.setClassConstructor = function (klass, constructor) {