Browse Source

kernel: all calls of ST side in kernel-runtime.js.

(non-parser ones; parser does call lot of them itself)
Herbert Vojčík 6 years ago
parent
commit
768885e871
3 changed files with 11 additions and 4 deletions
  1. 1 1
      CHANGELOG
  2. 2 3
      support/boot.js
  3. 8 0
      support/kernel-runtime.js

+ 1 - 1
CHANGELOG

@@ -2,7 +2,7 @@
 ===================================
 
 * Kernel slimmed, things moved to Smalltalk side.
-* Kernel (sans parser) calls only this Smalltalk-side API:
+* Kernel (via kernel-runtime.js) calls only this Smalltalk-side API:
   * AmberBootstrapInitialization class >> run
   * Message class >> selector:arguments:notUnderstoodBy:
   * Dictionary class >> newFromPairs:

+ 2 - 3
support/boot.js

@@ -46,10 +46,9 @@ define([
 
     require(['./kernel-runtime']); // preload
 
-    SmalltalkInitBrik.deps = ["classes", "smalltalkGlobals"];
+    SmalltalkInitBrik.deps = ["classes"];
     function SmalltalkInitBrik (brikz, st) {
         var bootstrapHierarchy = brikz.classes.bootstrapHierarchy;
-        var globals = brikz.smalltalkGlobals.globals;
 
         var initialized = false;
         var runtimeLoadedPromise = new Promise(function (resolve, reject) {
@@ -63,7 +62,7 @@ define([
                 if (initialized) return;
                 bootstrapHierarchy();
                 configureWithRuntime(brikz);
-                globals.AmberBootstrapInitialization._run();
+                brikz.startImage.run();
                 initialized = true;
             });
         };

+ 8 - 0
support/kernel-runtime.js

@@ -387,6 +387,13 @@ define(function () {
         };
     }
 
+    StartImageBrik.deps = ["frameBinding", "runtimeMethods", "runtime", "primitives"];
+    function StartImageBrik (brikz, st) {
+        this.run = function () {
+            brikz.smalltalkGlobals.globals.AmberBootstrapInitialization._run();
+        };
+    }
+
     /* Making smalltalk that can run */
 
     function configureWithRuntime (brikz) {
@@ -398,6 +405,7 @@ define(function () {
         brikz.messageSend = MessageSendBrik;
         brikz.runtime = RuntimeBrik;
         brikz.primitives = PrimitivesBrik;
+        brikz.startImage = StartImageBrik;
 
         brikz.rebuild();
     }