[squeak-dev] The Trunk: System-bf.914.mcz
Chris Muller
asqueaker at gmail.com
Thu Sep 8 20:39:50 UTC 2016
Excellent!
Now I have to wonder if this also fixes the problem with
saving/restoring Projects...
Worth a try, Herbert?
On Thu, Sep 8, 2016 at 2:50 PM, <commits at source.squeak.org> wrote:
> Bert Freudenberg uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-bf.914.mcz
>
> ==================== Summary ====================
>
> Name: System-bf.914
> Author: bf
> Time: 8 September 2016, 9:49:26.777611 pm
> UUID: 5fae5167-168c-4c08-8f4f-a624c6f39fb5
> Ancestors: System-cmm.913
>
> Fix DataStream reading of Characters on Spur.
>
> =============== Diff against System-cmm.913 ===============
>
> Item was changed:
> ----- Method: DataStream>>readCharacterOfSize: (in category 'write and read') -----
> readCharacterOfSize: instSize
> + "Character changed to an immediate class in Spur"
> | refPosn val |
> self assert: instSize = 1.
> refPosn := self getCurrentReference.
> + self setCurrentReference: refPosn. "before recursion - not really needed for integer"
> - self setCurrentReference: refPosn.
> val := self next.
> + self assert: val isInteger.
> + self setCurrentReference: refPosn. "before returning to next"
> ^ Character value: val.
> !
>
> Item was changed:
> ----- Method: DataStream>>readInstance (in category 'write and read') -----
> readInstance
> "PRIVATE -- Read the contents of an arbitrary instance.
> ASSUMES: readDataFrom:size: sends me beginReference: after it
> instantiates the new object but before reading nested objects.
> NOTE: We must restore the current reference position after
> recursive calls to next.
> Let the instance, not the class read the data. "
> | instSize aSymbol refPosn anObject newClass |
>
> instSize := (byteStream nextNumber: 4) - 1.
> refPosn := self getCurrentReference.
> aSymbol := self next.
> + (aSymbol == #Character or: [aSymbol isCharacter "hack - why does this happen?"])
> - aSymbol == #Character
> ifTrue: [^ self readCharacterOfSize: instSize].
> newClass := Smalltalk at: aSymbol asSymbol.
> anObject := newClass isVariable "Create object here"
> ifFalse: [newClass basicNew]
> ifTrue: [newClass basicNew: instSize - (newClass instSize)].
> self setCurrentReference: refPosn. "before readDataFrom:size:"
> anObject := anObject readDataFrom: self size: instSize.
> self setCurrentReference: refPosn. "before returning to next"
> ^ anObject!
>
> Item was changed:
> ----- Method: DataStream>>vacantRef (in category 'other') -----
> vacantRef
> "Answer the magic 32-bit constant we use ***ON DISK*** as a stream 'reference
> position' to identify a reference that's not yet filled in. This must be a
> value that won't be used as an ordinary reference. Cf. outputReference: and
> readReference. --
> NOTE: We could use a different type ID for vacant-refs rather than writing
> object-references with a magic value. (The type ID and value are
> overwritten by ordinary object-references when weak refs are fullfilled.)"
>
> + ^1073741823 "Hardcode former SmallInteger maxVal"!
> - ^ SmallInteger maxVal!
>
>
More information about the Squeak-dev
mailing list
|