A question about VSE which has always puzzled me: let’s suppose I have a development image which was constructed by taking a basic image, binding a set of SLLs to it (with each SLL having a corresponding SML), and then saving the image. All of the compiled code contained within each SLL is (if I understand correctly) incorporated into the v.exe image file when the library is bound, with the .sml files being used for source code. Why, therefore, does VSE still need to have the original SLL file present when the image launches, and is there a way to get an image like this to launch without the original bound SLL file being there? |
>All of the compiled code contained within each SLL is (if I understand correctly) incorporated into the v.exe image file when the
library is bound No, this does not happen. All objects contained by a SLL still "live" there. When a SLL is bound, references to objects in the image must be created. For instance the method dictionary array of a class being bound must be changed to include the method dictionaries from all superclasses (that may live in the V.EXE or other SLLs). These changes require that pointers must be changed in the SLL memory segments. You could also modify an object/a class variable of a class living in a SLL a.s.o. You can check if an object lives in a certain SLL by sending #libraryOrdinal. If you save the image now, the changed SLL memory segments cannot be written back. To save the current relationship between the objects in the V.EXE and the objects from the SLL a list of patches is computed and is saved as part of the V.EXE. When you start the V.EXE again the objects from the SLL are loaded and then the patches are applied to the SLL memory segment. This way the relationship between all objects is restored. The process of dynamic binding a SLL is much slower, because the SLL-Binder must check for class shapes and external references. The static binding only checks for the SLL version and then loads the object segments and applies the patches. Unfortunately I don't know a way to move the objects from a SLL into the V.EXE. A special VM primitive would be required. Regards Andreas -----Original Message----- From: Using Visual Smalltalk for Windows/Enterprise [mailto:[hidden email]]On Behalf Of Nicolas Bryant Sent: Donnerstag, 21. April 2011 17:23 To: [hidden email] Subject: Launching image without original SLL A question about VSE which has always puzzled me: let's suppose I have a development image which was constructed by taking a basic image, binding a set of SLLs to it (with each SLL having a corresponding SML), and then saving the image. All of the compiled code contained within each SLL is (if I understand correctly) incorporated into the v.exe image file when the library is bound, with the .sml files being used for source code. Why, therefore, does VSE still need to have the original SLL file present when the image launches, and is there a way to get an image like this to launch without the original bound SLL file being there? *** this signature added by listserv *** *** Visit http://www.listserv.dfn.de/archives/vswe-l.html *** *** for archive browsing and VSWE-L membership management *** *** this signature added by listserv *** *** Visit http://www.listserv.dfn.de/archives/vswe-l.html *** *** for archive browsing and VSWE-L membership management *** |
Free forum by Nabble | Edit this page |