[M3devel] <*LAZYALIGN*>

Rodney M. Bates rodney.bates at wichita.edu
Sat Feb 23 05:07:38 CET 2008



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