[M3devel] TextLiteral.MaxBytes again

Rodney M. Bates rodney_bates at lcwb.coop
Thu Sep 5 16:42:49 CEST 2013

There is another issue here.  I want TextLiteral.MaxBytes to get a final size
and not change.  Every time it changes, it creates compatibility problems by
orphaning any existing pickle files and any compiled programs that write them.
It changes the fingerprint, so a recently-compiled reading program can't find the
type in its own list of known types.  This also affects network objects when two
communicating programs are compiled with different TextLiteral versions.

MaxBytes' particular contribution to the type doesn't otherwise matter, because it's
artificial, but it still undermines reading pickles.

I have been loading up the pickle reading code with hard-coded historical fingerprints
of various older versions.  But it's a pain to keep doing, tedious to ferret out the
values, and it still only helps those who constantly download and compile the latest

At some point, I am thinking of choosing some likely historical TextLiteral.T fingerprint
and hard-coding the compiler to artificially deliver it , rather than the one computed from
the version-of-the day of TextLiteral.  But this too would not help those who would
rather not constantly download the latest, rebuild the compiler, then recompile their

On 09/03/2013 01:02 AM, Jay K wrote:
> ok, another question:
>   (* DIV BITSIZE should not be here! *)
>   (* MaxBytes = LAST (INTEGER) DIV BITSIZE (Byte) - 7 - 8 * ORD(BITSIZE(INTEGER) = 64); *)
>   MaxBytes = 16_7FFFFFFF DIV BITSIZE (Byte) - 7 - 8 * ORD(BITSIZE(INTEGER) = 64);
>    T = RTHooks.TextLiteral;
>    T = TEXT BRANDED "TextLiteral.T" OBJECT
>      cnt : INTEGER;
>      buf : ARRAY [0..MaxBytes - 1] OF Byte;
>    OVERRIDES ...
> T is a reference type.
> Is there a way to state this with no limit?
> Isn't it already unsafe?
> You know -- the array is usually smaller and the compiler is only going to check against this large size.
>   - Jay

More information about the M3devel mailing list