The Trunk: System-bf.914.mcz

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

The Trunk: System-bf.914.mcz

commits-2
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!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-bf.914.mcz

Chris Muller-3
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,  <[hidden email]> 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!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-bf.914.mcz

Herbert König
On the Weekend :-)


Am 08.09.2016 um 22:39 schrieb Chris Muller:

> 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,  <[hidden email]> 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!
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: System-bf.914.mcz

Herbert König
In reply to this post by Chris Muller-3
Hi,

sadly it doesn't fix it. I tried to:

update a 6.0 alpha to trunk --> freezes

update 5.1 to trunk --> works if some changes are accepted and merged

and just loaded System-bf.915.mcz into a 5.1

With the latter two

MorphicProject DNU #acceptProjectDetails.

in the last one (loading  System-bf.915.mcz)

I comment out self acceptProjectDetails: details in
MorphicProject>>storeOnServer

then

FileList2>>morphicViewProjectSaverFor: stumbles over the removal of
ColorTheme, which I think has taken place recently.

Replacing ColorTheme current with SmallLandColorTheme fails because
SmallLandColorTheme lacks a lot of messages.

So replacing all these with plausible values lets me find out that
AlignmentMorphBob1 also relies on ColorTheme

Next I filed in ColorTheme which was still present in 5.0 and I really
get the save dialogue for the project.

But then EtoyProjectDetailsMorph class>>getFullInfoFor: aProject
ifValid: aBlock expandedFormat:

wants one argument for aBlock but gets zero. I give up :-(

I guess here we see why we want as many packages as possible in trunk to
prevent that changes over several versions make it hard to get something
to work again.


Cheers,


Herbert




Then it fails during to


Am 08.09.2016 um 22:39 schrieb Chris Muller:

> 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,  <[hidden email]> 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!
>>
>>