Parcourir la source

Refactor AmberBootstrapInitialization class >> run.

Clearly separate the "replay the addClass / addMethod" part
that is specific to image boot, from the "initialize loaded classes"
which needs to be done always when class is loaded, even programmatically.
Herby Vojčík il y a 6 ans
Parent
commit
b5f191cde7
2 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 3 3
      src/Kernel-Infrastructure.js
  2. 3 3
      src/Kernel-Infrastructure.st

+ 3 - 3
src/Kernel-Infrastructure.js

@@ -128,9 +128,9 @@ var self=this,$self=this;
 return $core.withContext(function($ctx1) {
 //>>excludeEnd("ctx");
 $recv($globals.SmalltalkImage)._initialize();
-$recv($globals.Smalltalk)._adoptPackageDictionary();
 $self._organizeClasses();
 $self._organizeMethods();
+$recv($globals.Smalltalk)._adoptPackageDictionary();
 $self._initializeClasses();
 return self;
 //>>excludeStart("ctx", pragmas.excludeDebugContexts);
@@ -139,10 +139,10 @@ return self;
 },
 //>>excludeStart("ide", pragmas.excludeIdeData);
 args: [],
-source: "run\x0a\x09SmalltalkImage initialize.\x0a\x09Smalltalk adoptPackageDictionary.\x0a\x09self\x0a\x09\x09organizeClasses;\x0a\x09\x09organizeMethods;\x0a\x09\x09initializeClasses",
+source: "run\x0a\x09SmalltalkImage initialize.\x0a\x09self\x0a\x09\x09organizeClasses;\x0a\x09\x09organizeMethods.\x0a\x09Smalltalk adoptPackageDictionary.\x0a\x09self initializeClasses",
 referencedClasses: ["SmalltalkImage", "Smalltalk"],
 //>>excludeEnd("ide");
-messageSends: ["initialize", "adoptPackageDictionary", "organizeClasses", "organizeMethods", "initializeClasses"]
+messageSends: ["initialize", "organizeClasses", "organizeMethods", "adoptPackageDictionary", "initializeClasses"]
 }),
 $globals.AmberBootstrapInitialization.a$cls);
 

+ 3 - 3
src/Kernel-Infrastructure.st

@@ -26,11 +26,11 @@ organizeMethods
 
 run
 	SmalltalkImage initialize.
-	Smalltalk adoptPackageDictionary.
 	self
 		organizeClasses;
-		organizeMethods;
-		initializeClasses
+		organizeMethods.
+	Smalltalk adoptPackageDictionary.
+	self initializeClasses
 ! !
 
 ProtoObject subclass: #JSObjectProxy