Colin Putney uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cwp.782.mcz
==================== Summary ====================
Name: System-cwp.782
Author: cwp
Time: 27 November 2015, 9:00:42.904 pm
UUID: ae1f1166-0438-4e78-8ded-46c59c212210
Ancestors: System-cwp.781
Reload DiskProxies using the current environment
When looking up objects from the destination image, DiskProxies should use the current environment, rather than referring to to Smalltalk. This lets objects on disk be loaded into arbitrary environments.
=============== Diff against System-cwp.781 ===============
Item was changed:
----- Method: DiskProxy>>comeFullyUpOnReload: (in category 'i/o') -----
comeFullyUpOnReload: smartRefStream
"Internalize myself into a fully alive object after raw loading from a DataStream. (See my class comment.) DataStream will substitute the object from this eval for the DiskProxy."
+ | globalObj symbol pr nn arrayIndex env |
- | globalObj symbol pr nn arrayIndex |
- self flag: #environments.
symbol := globalObjectName.
"See if class is mapped to another name"
(smartRefStream respondsTo: #renamed) ifTrue: [
"If in outPointers in an ImageSegment, remember original class name.
See mapClass:installIn:. Would be lost otherwise."
((thisContext sender sender sender sender sender sender
sender sender receiver class == ImageSegment) and: [
thisContext sender sender sender sender method ==
(DataStream compiledMethodAt: #readArray)]) ifTrue: [
arrayIndex := (thisContext sender sender sender sender) tempAt: 4.
"index var in readArray. Later safer to find i on stack of context."
smartRefStream renamedConv at: arrayIndex put: symbol]. "save original name"
symbol := smartRefStream renamed at: symbol ifAbsent: [symbol]]. "map"
+ env := Environment current.
+ globalObj := env valueOf: symbol ifAbsent: [
- globalObj := Smalltalk at: symbol ifAbsent: [
preSelector == nil & (constructorSelector = #yourself) ifTrue: [
Transcript cr; show: symbol, ' is undeclared.'.
+ env undeclare: symbol.
- (Undeclared includesKey: symbol) ifTrue: [^ Undeclared at: symbol].
- Undeclared at: symbol put: nil.
^ nil].
^ self error: 'Global "', symbol, '" not found'].
((symbol == #World) and: [Smalltalk isMorphic not]) ifTrue: [
self inform: 'These objects will work better if opened in a Morphic World.
Dismiss and reopen all menus.'].
preSelector ifNotNil: [
Symbol hasInterned: preSelector ifTrue: [:selector |
[globalObj := globalObj perform: selector] on: Error do: [:ex |
ex messageText = 'key not found' ifTrue: [^ nil].
^ ex signal]]
].
symbol == #Project ifTrue: [
(constructorSelector = #fromUrl:) ifTrue: [
nn := (constructorArgs first findTokens: '/') last.
nn := (nn findTokens: '.|') first.
pr := Project named: nn.
^ pr ifNil: [self] ifNotNil: [pr]].
pr := globalObj perform: constructorSelector withArguments: constructorArgs.
^ pr ifNil: [self] ifNotNil: [pr]]. "keep the Proxy if Project does not exist"
constructorSelector ifNil: [^ globalObj].
Symbol hasInterned: constructorSelector ifTrue: [:selector |
[^ globalObj perform: selector withArguments: constructorArgs] on: Error do: [:ex |
ex messageText = 'key not found' ifTrue: [^ nil].
^ ex signal]
].
"args not checked against Renamed"
^ nil "was not in proper form"!
Colin Putney uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cwp.782.mcz
==================== Summary ====================
Name: System-cwp.782
Author: cwp
Time: 27 November 2015, 9:00:42.904 pm
UUID: ae1f1166-0438-4e78-8ded-46c59c212210
Ancestors: System-cwp.781
Reload DiskProxies using the current environment
When looking up objects from the destination image, DiskProxies should use the current environment, rather than referring to to Smalltalk. This lets objects on disk be loaded into arbitrary environments.
=============== Diff against System-cwp.781 ===============
Item was changed:
----- Method: DiskProxy>>comeFullyUpOnReload: (in category 'i/o') -----
comeFullyUpOnReload: smartRefStream
"Internalize myself into a fully alive object after raw loading from a DataStream. (See my class comment.) DataStream will substitute the object from this eval for the DiskProxy."
+ | globalObj symbol pr nn arrayIndex env |
- | globalObj symbol pr nn arrayIndex |
- self flag: #environments.
symbol := globalObjectName.
"See if class is mapped to another name"
(smartRefStream respondsTo: #renamed) ifTrue: [
"If in outPointers in an ImageSegment, remember original class name.
See mapClass:installIn:. Would be lost otherwise."
((thisContext sender sender sender sender sender sender
sender sender receiver class == ImageSegment) and: [
thisContext sender sender sender sender method ==
(DataStream compiledMethodAt: #readArray)]) ifTrue: [
arrayIndex := (thisContext sender sender sender sender) tempAt: 4.
"index var in readArray. Later safer to find i on stack of context."
smartRefStream renamedConv at: arrayIndex put: symbol]. "save original name"
symbol := smartRefStream renamed at: symbol ifAbsent: [symbol]]. "map"
+ env := Environment current.
+ globalObj := env valueOf: symbol ifAbsent: [
- globalObj := Smalltalk at: symbol ifAbsent: [
preSelector == nil & (constructorSelector = #yourself) ifTrue: [
Transcript cr; show: symbol, ' is undeclared.'.
+ env undeclare: symbol.
- (Undeclared includesKey: symbol) ifTrue: [^ Undeclared at: symbol].
- Undeclared at: symbol put: nil.
^ nil].
^ self error: 'Global "', symbol, '" not found'].
((symbol == #World) and: [Smalltalk isMorphic not]) ifTrue: [
self inform: 'These objects will work better if opened in a Morphic World.
Dismiss and reopen all menus.'].
preSelector ifNotNil: [
Symbol hasInterned: preSelector ifTrue: [:selector |
[globalObj := globalObj perform: selector] on: Error do: [:ex |
ex messageText = 'key not found' ifTrue: [^ nil].
^ ex signal]]
].
symbol == #Project ifTrue: [
(constructorSelector = #fromUrl:) ifTrue: [
nn := (constructorArgs first findTokens: '/') last.
nn := (nn findTokens: '.|') first.
pr := Project named: nn.
^ pr ifNil: [self] ifNotNil: [pr]].
pr := globalObj perform: constructorSelector withArguments: constructorArgs.
^ pr ifNil: [self] ifNotNil: [pr]]. "keep the Proxy if Project does not exist"
constructorSelector ifNil: [^ globalObj].
Symbol hasInterned: constructorSelector ifTrue: [:selector |
[^ globalObj perform: selector withArguments: constructorArgs] on: Error do: [:ex |
ex messageText = 'key not found' ifTrue: [^ nil].
^ ex signal]
].
"args not checked against Renamed"
^ nil "was not in proper form"!
Colin Putney uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cwp.781.mcz
==================== Summary ====================
Name: System-cwp.781
Author: cwp
Time: 27 November 2015, 5:22:38.591 pm
UUID: c0ffbab7-f7ee-4966-ba07-d57436ac42f2
Ancestors: System-mt.780
Remove specialized serialization of Associations.
Since associations are no longer used as globals, we never need to serialize them using DiskProxy.
=============== Diff against System-mt.780 ===============
Item was removed:
- ----- Method: Association>>objectForDataStream: (in category '*System-Object Storage-objects from disk') -----
- objectForDataStream: refStrm
- | dp |
- "I am about to be written on an object file. If I am a known global, write a proxy that will hook up with the same resource in the destination system."
- self flag: #environments.
-
- ^ (Smalltalk globals associationAt: key ifAbsent: [nil]) == self
- ifTrue: [dp := DiskProxy global: #Smalltalk selector: #associationOrUndeclaredAt:
- args: (Array with: key).
- refStrm replace: self with: dp.
- dp]
- ifFalse: [self]!
Colin Putney uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-cwp.781.mcz
==================== Summary ====================
Name: System-cwp.781
Author: cwp
Time: 27 November 2015, 5:22:38.591 pm
UUID: c0ffbab7-f7ee-4966-ba07-d57436ac42f2
Ancestors: System-mt.780
Remove specialized serialization of Associations.
Since associations are no longer used as globals, we never need to serialize them using DiskProxy.
=============== Diff against System-mt.780 ===============
Item was removed:
- ----- Method: Association>>objectForDataStream: (in category '*System-Object Storage-objects from disk') -----
- objectForDataStream: refStrm
- | dp |
- "I am about to be written on an object file. If I am a known global, write a proxy that will hook up with the same resource in the destination system."
- self flag: #environments.
-
- ^ (Smalltalk globals associationAt: key ifAbsent: [nil]) == self
- ifTrue: [dp := DiskProxy global: #Smalltalk selector: #associationOrUndeclaredAt:
- args: (Array with: key).
- refStrm replace: self with: dp.
- dp]
- ifFalse: [self]!
Colin Putney uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-cwp.60.mcz
==================== Summary ====================
Name: Environments-cwp.60
Author: cwp
Time: 27 November 2015, 5:14:36.376 pm
UUID: c8836cde-f21e-4652-a2e9-73f8de6f00e0
Ancestors: Environments-kfr.59
Always serialize Bindings as DiskProxies.
=============== Diff against Environments-kfr.59 ===============
Item was changed:
----- Method: Binding>>objectForDataStream: (in category 'as yet unclassified') -----
objectForDataStream: refStrm
+ "I am about to be written on an object file. I am a global, so write a proxy that
+ will hook up with the same resource in the destination system."
- | dp |
- "I am about to be written on an object file. If I am a known global, write a proxy that will hook up with the same resource in the destination system."
- self flag: #environments.
+ | dp |
+ dp := DiskProxy
+ global: #Smalltalk
+ selector: #associationOrUndeclaredAt:
+ args: (Array with: key).
+ refStrm replace: self with: dp.
+ ^ dp!
- ^ (Smalltalk globals associationAt: key ifAbsent: [nil]) == self
- ifTrue: [dp := DiskProxy global: #Smalltalk selector: #associationOrUndeclaredAt:
- args: (Array with: key).
- refStrm replace: self with: dp.
- dp]
- ifFalse: [self]!
Colin Putney uploaded a new version of Environments to project The Trunk:
http://source.squeak.org/trunk/Environments-cwp.60.mcz
==================== Summary ====================
Name: Environments-cwp.60
Author: cwp
Time: 27 November 2015, 5:14:36.376 pm
UUID: c8836cde-f21e-4652-a2e9-73f8de6f00e0
Ancestors: Environments-kfr.59
Always serialize Bindings as DiskProxies.
=============== Diff against Environments-kfr.59 ===============
Item was changed:
----- Method: Binding>>objectForDataStream: (in category 'as yet unclassified') -----
objectForDataStream: refStrm
+ "I am about to be written on an object file. I am a global, so write a proxy that
+ will hook up with the same resource in the destination system."
- | dp |
- "I am about to be written on an object file. If I am a known global, write a proxy that will hook up with the same resource in the destination system."
- self flag: #environments.
+ | dp |
+ dp := DiskProxy
+ global: #Smalltalk
+ selector: #associationOrUndeclaredAt:
+ args: (Array with: key).
+ refStrm replace: self with: dp.
+ ^ dp!
- ^ (Smalltalk globals associationAt: key ifAbsent: [nil]) == self
- ifTrue: [dp := DiskProxy global: #Smalltalk selector: #associationOrUndeclaredAt:
- args: (Array with: key).
- refStrm replace: self with: dp.
- dp]
- ifFalse: [self]!
Karl Ramberg uploaded a new version of Squeak-Version to project The Trunk:
http://source.squeak.org/trunk/Squeak-Version-kfr.4713.mcz
==================== Summary ====================
Name: Squeak-Version-kfr.4713
Author: kfr
Time: 26 November 2015, 4:57:34.747 pm
UUID: 96c171dc-c340-492e-b376-30e0212b9c8e
Ancestors: Squeak-Version-kfr.4712
Unload and unregister Universes
=============== Diff against Squeak-Version-kfr.4712 ===============
Item was added:
+ (PackageInfo named: 'Squeak-Version') postscript: '"below, add code to be run after the loading of this package"
+ (MCPackage named: ''Universes'') workingCopy unload.
+ (MCPackage named: ''Universes'') workingCopy unregister.
+ '!
Karl Ramberg uploaded a new version of Squeak-Version to project The Trunk:
http://source.squeak.org/trunk/Squeak-Version-kfr.4713.mcz
==================== Summary ====================
Name: Squeak-Version-kfr.4713
Author: kfr
Time: 26 November 2015, 4:57:34.747 pm
UUID: 96c171dc-c340-492e-b376-30e0212b9c8e
Ancestors: Squeak-Version-kfr.4712
Unload and unregister Universes
=============== Diff against Squeak-Version-kfr.4712 ===============
Item was added:
+ (PackageInfo named: 'Squeak-Version') postscript: '"below, add code to be run after the loading of this package"
+ (MCPackage named: ''Universes'') workingCopy unload.
+ (MCPackage named: ''Universes'') workingCopy unregister.
+ '!
Karl Ramberg uploaded a new version of Squeak-Version to project The Trunk:
http://source.squeak.org/trunk/Squeak-Version-kfr.4712.mcz
==================== Summary ====================
Name: Squeak-Version-kfr.4712
Author: kfr
Time: 25 November 2015, 8:09:45.569 pm
UUID: d76df055-6e8c-459d-abed-9d978d04c9b2
Ancestors: Squeak-Version-ar.4662
Messed up last version, try again
=============== Diff against Squeak-Version-ar.4662 ===============
Karl Ramberg uploaded a new version of Squeak-Version to project The Trunk:
http://source.squeak.org/trunk/Squeak-Version-kfr.4712.mcz
==================== Summary ====================
Name: Squeak-Version-kfr.4712
Author: kfr
Time: 25 November 2015, 8:09:45.569 pm
UUID: d76df055-6e8c-459d-abed-9d978d04c9b2
Ancestors: Squeak-Version-ar.4662
Messed up last version, try again
=============== Diff against Squeak-Version-ar.4662 ===============