[squeak-dev] The Trunk: MorphicExtras-fbs.114.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jul 6 13:43:13 UTC 2013


Frank Shearar uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-fbs.114.mcz

==================== Summary ====================

Name: MorphicExtras-fbs.114
Author: fbs
Time: 6 July 2013, 2:41:35.249 pm
UUID: c096693e-159f-6d49-bf4f-f61ed716d33d
Ancestors: MorphicExtras-fbs.113

These xxx methods belong with the other SqueakPage methods, in MorphicExtras-SqueakPage.

=============== Diff against MorphicExtras-fbs.113 ===============

Item was added:
+ ----- Method: ObjectOut>>xxxFetch (in category '*MorphicExtras-SqueakPage') -----
+ xxxFetch
+ 	"Bring in my object and replace all references to me with references to him.  First try looking up my url in the pageCache.  Then try the page (and install it, under its url).  Then start from scratch with the url."
+ 
+ 	| truePage object existing |
+ 	existing := SqueakPageCache pageCache at: url ifAbsent: [nil].
+ 	existing ifNotNil: [existing isContentsInMemory
+ 		ifTrue: [page := truePage := existing]].	"This url already has an object in this image"
+ 	truePage ifNil: [
+ 		truePage := SqueakPageCache atURL: url oldPage: page].
+ 	object := truePage isContentsInMemory 
+ 		ifTrue: [truePage contentsMorph]
+ 		ifFalse: [truePage fetchInformIfError].	"contents, not the page"
+ 			"Later, collect pointers to object and fix them up.  Not scan memory"
+ 	object ifNil: [^ 'Object could not be fetched.'].
+ 	"recursionFlag := false."  	"while I still have a pointer to myself"
+ 	truePage contentsMorph: object.
+ 	page := truePage.
+ 	self xxxFixup.
+ 	^ object	"the final object!!"
+  !

Item was added:
+ ----- Method: ObjectOut>>xxxFixup (in category '*MorphicExtras-SqueakPage') -----
+ xxxFixup
+ 	"There is already an object in memory for my url.  All pointers to me need to be pointers to him.  Can't use become, because other pointers to him must stay valid."
+ 
+ 	| real temp list |
+ 	real := page contentsMorph.
+ 	real == self ifTrue: [page error: 'should be converted by now'].
+ 	temp := self.
+ 	list := (PointerFinder pointersTo: temp) asOrderedCollection.
+ 	list add: thisContext.  list add: thisContext sender.
+ 	list do: [:holder |
+ 		1 to: holder class instSize do:
+ 			[:i | (holder instVarAt: i) == temp ifTrue: [holder instVarAt: i put: real]].
+ 		1 to: holder basicSize do:
+ 			[:i | (holder basicAt: i) == temp ifTrue: [holder basicAt: i put: real]].
+ 		].
+ 	^ real!

Item was added:
+ ----- Method: ObjectOut>>xxxSetUrl:page: (in category '*MorphicExtras-SqueakPage') -----
+ xxxSetUrl: aString page: aSqkPage
+ 
+ 	url := aString.
+ 	page := aSqkPage.!



More information about the Squeak-dev mailing list