<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I do this. I shouldn't have to make local edits each time. It isn't meant to only be once. I should be able to long-term use a 32bit toolset to target 32bit & 64bit.</div><div><br> - Jay</div><div><br>On Jun 3, 2015, at 5:16 AM, Antony Hosking <<a href="mailto:hosking@purdue.edu">hosking@purdue.edu</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Other than cross-compile from 32 to 64 bit what purpose does this serve?<br><br>Sent from my iPad</div><div><br>On Jun 2, 2015, at 9:58 PM, Jay K <<a href="mailto:jay.krell@cornell.edu">jay.krell@cornell.edu</a>> wrote:<br><br></div><blockquote type="cite"><div>

<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style>
<div dir="ltr"><div>We cannot cross from 32bit host to 64bit target.</div><div><br></div><div><br></div><div>Ok to commit this?</div><div><br></div><div>diff --git a/m3-libs/m3core/src/text/TextLiteral.i3 b/m3-libs/m3core/src/text/TextLiteral.i3</div><div>index fa72589..37bf238 100644</div><div>--- a/m3-libs/m3core/src/text/TextLiteral.i3</div><div>+++ b/m3-libs/m3core/src/text/TextLiteral.i3</div><div>@@ -12,9 +12,16 @@ UNSAFE INTERFACE TextLiteral;</div><div> IMPORT RTHooks, TextClass;</div><div> </div><div> CONST</div><div>- (* DIV BITSIZE should not be here! *)</div><div>+(* When cm3 uses TInt and when pickle special cases this, it should be approx:</div><div>+    MaxBytes = LAST (INTEGER) - BITSIZE (INTEGER) * 2 *)</div><div>+(* This fails for 32bit host and 64bit target:</div><div>+    MaxBytes = 16_7FFFFFFF DIV BITSIZE (Byte) - 7; *)</div><div>+(* Until/unless unpickling special cases this, it must not be sizeof(INTEGER)</div><div>+   dependent. *)</div><div>+ (* DIV BITSIZE should not be here -- compiler limitation due to</div><div>+    non-use of TInt. *)</div><div>  (* MaxBytes = LAST (INTEGER) DIV BITSIZE (Byte) - 7 - 8 * ORD(BITSIZE(INTEGER) = 64); *)</div><div>- MaxBytes = 16_7FFFFFFF DIV BITSIZE (Byte) - 7; </div><div>+ MaxBytes = 16_7FFFFFFF DIV BITSIZE (Byte) - 15;</div><div>     (* - 8 * ORD(BITSIZE(INTEGER) = 64) *) </div><div>     (* Do not adjust this for INTEGER size.  It makes T have different </div><div>        fingerprints on 32- and 64-bit machines, which undermines pickling/</div><div><br></div><div><br></div><div>Yes I know TEXT pickles will be broken.</div><div>I propose that unpickle should special case a few values here.</div><div>Or, isn't the brand supposed to help?</div><div>Or, can we encode this in a better way, w/o an upper bound?</div><div>I know if you put in 0..0 or 0..-1 you incur range violations at runtime.</div><div>Which makes me wonder -- are TEXTs unsafe?</div><div><br></div><div>Should we support a syntax something like:</div><div><br></div><div><div>    cnt : INTEGER;</div><div>    buf : ARRAY [0..cnt - 1] OF Byte;</div></div><div>?</div><div><br></div><div>Thanks,</div><div> - Jay</div>                                        </div>
</div></blockquote></div></blockquote></body></html>