Squeak 4.6: System-cwp.754.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Squeak 4.6: System-cwp.754.mcz

commits-2
Colin Putney uploaded a new version of System to project Squeak 4.6:
http://source.squeak.org/squeak46/System-cwp.754.mcz

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

Name: System-cwp.754
Author: cwp
Time: 7 December 2015, 9:14:14.615 pm
UUID: 68390bf4-02ab-46d4-b3bc-96bf2723e7d5
Ancestors: System-topa.753
Backported From: System-cwp.782

Backport image segment serialization fixes from trunk

=============== Diff against System-topa.753 ===============

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]!

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"!