theseion / Fuel

Fuel, the Smalltalk object serializer
https://theseion.github.io/Fuel
MIT License
27 stars 13 forks source link

64-bit adaptations #224

Closed theseion closed 7 years ago

theseion commented 7 years ago

See https://pharo.fogbugz.com/f/cases/20120:

There are several problems under 64 bits, mainly because SmallInteger has up to 61 bits, and because of SmallFloat64.

See method #clusterClassForSmallInteger: that only works for 31 bits SmallInteger. See also Float class>>materializeFrom: which might try to write into a SmallFloat64 and fail.

I would write something like:

materializeFrom: aDecoder
    ^ (BoxedFloat64 new: 2)
        at: 1 put: aDecoder nextEncodedUint32;
        at: 2 put: aDecoder nextEncodedUint32;
        * 1.

The * 1 is here to give a chance to the VM to create a SmallFloat64 if it can.

theseion commented 7 years ago

@marianopeck @tinchodias This issue has become an important problem (see mailing list). If one of you could start to work on it that would be great. I will be on holiday next week and have no time this week.

tinchodias commented 7 years ago

oh, ok. Thursday/Friday evening I could check.

tinchodias commented 7 years ago

Yesterday, I wrote in the fogbugz case with a fix.

theseion commented 7 years ago

Thanks a lot @tinchodias! Great work.

tinchodias commented 7 years ago

Max, I forgot to say that when I commit the fix, travis showed some problems in squeak build... it was some expectedFailures that were green. I didn't investigate though.

theseion commented 7 years ago

I'm aware of that. It's because of a fix to the handling of WideString instances.

noha commented 6 years ago

What's the status on this?

theseion commented 6 years ago

I'm on it.

theseion commented 6 years ago

In Pharo with https://github.com/pharo-project/pharo/pull/654