[M3devel] TextLiteral.MaxBytes -- use LONGINT or Target.Int more?
Jay K
jay.krell at cornell.edu
Tue Sep 3 07:53:56 CEST 2013
I've complained about this before.
The frontend keeps track of things in bits in INTEGER.
Therefore TextLiteral.MaxBytes is around 512MB.
We could raise it for 64bit targets, but the 32bit cross compile to 64bits would fail.
Fixing this mostly but not entirely would be to plumb through LONGINT
"everywhere" instead of INTEGER.
We would still lose the sign bit and bits vs. bytes would lose us another 3 bits.
So we'd have a 60 bit limit instead of a 64bit limit.
Fixing it even more would require Target.Int.
Thoughts?
Is LONGINT safe to use now throughout cm3/m3front/m3middle/m3back?
Do we still require bootstrapping from LONGINT-less compilers?
Any lingering doubts as to its syntax and meaning?
I still think it should be named INT64.
Because in the future I want INT128 and I don't want LONGINT to grow in size.
Would it be considered adequate as a replacement for Target.Int?
If instead I plumb through Target.Int, any complaints?
Target.Int has the following advantages:
When we need INT128 in the future, it is a very very very simple and small change.
I already extended Target.Int from 64 bits to 72 bits.
It works with old frontends.
Target.Int has the following disadvantages:
no operator overloading so usage is cumbersome
slower
I still don't fully understand it, e.g. division
- Jay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20130903/ab7bee3f/attachment-0001.html>
More information about the M3devel
mailing list