help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: Issue to build gnu-smalltalk-2.3.6


From: Paolo Bonzini
Subject: [Help-smalltalk] Re: Issue to build gnu-smalltalk-2.3.6
Date: Fri, 07 Sep 2007 10:21:03 +0200
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)

In the meanwhile here is an easy fix involving lazy initialization.

Paolo
--- orig/kernel/VFS.st
+++ mod/kernel/VFS.st
@@ -231,10 +231,7 @@ update: aspect
      filesystems specified by the subclasses upon image load."
 
     (aspect == #returnFromSnapshot or: [ aspect == #finishedSnapshot ]) 
ifTrue: [
-       Registry := LookupTable new.
-       self allSubclassesDo: [ :each |
-           each fileSystems do: [ :fs | self register: fs forClass: each ]
-       ]
+       Registry := nil.
     ].
     (aspect == #aboutToQuit or: [ aspect == #aboutToSnapshot ]) ifTrue: [
        self allSubclassesDo: [ :each | each release ].
@@ -264,6 +261,12 @@ vfsFor: fileName name: fsName subPath: s
     "Create an instance of a subclass of the receiver, implementing the virtual
      file `subPath' inside the `fileName' archive.  fsName is the virtual
      filesystem name and is used to determine the subclass to be instantiated."
+    Registry isNil ifTrue: [
+        Registry := LookupTable new.
+       self allSubclassesDo: [ :each |
+           each fileSystems do: [ :fs | self register: fs forClass: each ]
+       ]
+    ].
     ^(Registry at: fsName) 
        vfsFor: fileName name: fsName subPath: subPath!
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]