[M3devel] <*LAZYALIGN*>

Darko darko at darko.org
Sat Feb 23 06:33:13 CET 2008


The alignment rules are particular to a platform, not a type (at least  
after we get rid of the pragma), so is there no field where we can  
encode some information about the platform in the pickle header or  
something? Where is endian stored?


On 23/02/2008, at 3:07 PM, Rodney M. Bates wrote:

>
>
> Darko wrote:
>> It's been several years since I looked at the code, so my  
>> recollection  is obviously faulty. But this means that the actual  
>> change is a  positive one, allowing more packings to be legal, and  
>> there is no need  for any pragmas.
>> So the new alignment rules would be that for any platform that  
>> allows  it, allow fields to align on byte boundaries, except traced  
>> references  that must be aligned on word boundaries.
>> This would mean that a pickle packed on a platform with the more   
>> liberal alignment might be illegal on another platform. Therefore   
>> caution should be taken, otherwise I see no problem with this.
>>
> Actually, if RTTipe can detect this illegality, then it can just
> as easily make it legal and accommodate it,  rearranging the fields
> to the new displacements.  It already does this for other reasons
> anyway.
>
> The tricky design problem is how to communicate to RTTipe code, which
> rules were used.  If a mix of different rules exists anywhere in the
> universe, either in different compilers or in the same compiler with
> different options, then it must be somehow encoded in a type  
> description,
> as read by RTTipe, which rules were used.  Otherwise, RTTipe not  
> even detect
> this mismatch, and bits get shuffled.  And do this without  
> invalidating
> existing pickle files and existing compiled code (where the type
> descriptions are stored.)
> -- 
> -------------------------------------------------------------
> Rodney M. Bates, retired assistant professor
> Dept. of Computer Science, Wichita State University
> Wichita, KS 67260-0083
> 316-978-3922
> rodney.bates at wichita.edu




More information about the M3devel mailing list