--- a/SnapShotImage.st Wed Jan 10 15:31:39 2001 +0100
+++ b/SnapShotImage.st Thu Jan 25 11:19:21 2001 +0100
@@ -1,4 +1,4 @@
-"{ Package: 'stx:libtool' }"
+"{ Package: 'stx:libtool2' }"
Object subclass:#SnapShotImage
instanceVariableNames:'memory globals'
@@ -7,6 +7,22 @@
category:'System-Support'
!
+!SnapShotImage class methodsFor:'documentation'!
+
+documentation
+"
+ I simulate a Smalltalk environment as present in a snapshot image.
+ My protocol mimics the NameSpace (i.e. class-environment) protocol,
+ and I can be used as a Browsers environment, in order to open a
+ browser into an old snapShot image (st.img - file).
+
+ I am not used directly; instead, via the SystemBrowsers entry:
+ SystemBrowser openOnSnapShotImage:'/export/home/cg/work/stx/projects/smalltalk/st.img'
+
+ [author:]
+ Claus Gittinger
+"
+! !
!SnapShotImage class methodsFor:'instance creation'!
@@ -33,7 +49,8 @@
for:aFilename
memory := SnapShotImageMemory for:aFilename.
memory image:self.
- memory readHeader! !
+ memory readHeader
+! !
!SnapShotImage methodsFor:'smalltalk protocol'!
@@ -60,7 +77,8 @@
self allClassesInCategory:aCategory do:[:aClass |
coll add:aClass
].
- ^ coll!
+ ^ coll
+!
allClassesInCategory:aCategory do:aBlock
"evaluate the argument, aBlock for all classes in the aCategory;
@@ -74,7 +92,8 @@
]
]
]
- ]!
+ ]
+!
at:aKey
globals isNil ifTrue:[
@@ -87,7 +106,8 @@
globals isNil ifTrue:[
self fetchGlobals
].
- ^ globals at:aKey ifAbsent:exceptionValue!
+ ^ globals at:aKey ifAbsent:exceptionValue
+!
keysAndValuesDo:aTwoArgBlock
globals isNil ifTrue:[
--- a/SnapShotImageMemory.st Wed Jan 10 15:31:39 2001 +0100
+++ b/SnapShotImageMemory.st Thu Jan 25 11:19:21 2001 +0100
@@ -22,6 +22,13 @@
privateIn:SnapShotImageMemory
!
+SnapShotImageMemory::ImageHeader variableByteSubclass:#ImageByteObject
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:SnapShotImageMemory
+!
+
SnapShotImageMemory::ImageObject variableSubclass:#ImageClassObject
instanceVariableNames:''
classVariableNames:''
@@ -36,13 +43,20 @@
privateIn:SnapShotImageMemory
!
-SnapShotImageMemory::ImageHeader variableByteSubclass:#ImageByteObject
- instanceVariableNames:''
- classVariableNames:''
- poolDictionaries:''
- privateIn:SnapShotImageMemory
-!
-
+!SnapShotImageMemory class methodsFor:'documentation'!
+
+documentation
+"
+ I represent the memory as contained in a snapshot image.
+
+ I am not used directly; instead, via the SystemBrowsers entry:
+ SystemBrowser openOnSnapShotImage:'/export/home/cg/work/stx/projects/smalltalk/st.img'
+
+ [author:]
+ Claus Gittinger
+
+"
+! !
!SnapShotImageMemory class methodsFor:'instance creation'!
@@ -1310,6 +1324,12 @@
self halt.
! !
+!SnapShotImageMemory::ImageByteObject methodsFor:'queries'!
+
+size
+ ^ byteSize
+! !
+
!SnapShotImageMemory::ImageClassObject methodsFor:'accessing - slots'!
category
@@ -3843,12 +3863,6 @@
start := something.
! !
-!SnapShotImageMemory::ImageByteObject methodsFor:'queries'!
-
-size
- ^ byteSize
-! !
-
!SnapShotImageMemory class methodsFor:'documentation'!
version