[M3devel] LONGINT
Tony Hosking
hosking at cs.purdue.edu
Thu Jul 19 16:34:22 CEST 2007
On Jul 19, 2007, at 9:13 AM, Rodney M. Bates wrote:
> I'll volunteer to do the update to the language definition, as that
> is an
> interest of mine.
Great! Let's try to flesh this out soon so I can try to get the
compiler up to speed with what we spec out.
>
> Tony Hosking wrote:
>> I've successfully bootstrapped a CM3 compiler that supports
>> LONGINT as a 64-bit integer type (equivalent to "long long" in C)
>> in addition to INTEGER (same as "long" in C). This will be
>> useful for simplifying interfaces to C library routines that
>> expect to be able to treat 64-bit integers such as "off_t" for
>> lseek, etc.
>> Currently, the compiler does not treat LONGINT as an ordinal type
>> (I'm not sure this would ever be a good idea) so it cannot be used
>> to index arrays, define enumerations etc., though the simple
>> operations ABS, MAX, MIN, addition, comparisons, MOD,
>> multiplication, subtraction, assignment, are all supported. This
>> includes changes to m3core (with support for Long.T similar to
>> Word.T, plus RTTipe and RTTypeMap, etc.) and libm3 for Pickle2,
>> as well as to m3middle, m3front, and the gcc-based compiler
>> backend. There is still work that needs to be done to support
>> and test all the other M3 tools such as network objects, etc.,
>> with support and testing needed in m3tk for the new type, as well
>> as in other tools like m3browser.
>> How best should I proceed to get this out to the community. I am
>> tempted to push it into the CVS head just so that it gets some
>> testing, but perhaps that is premature. I can confirm a complete
>> bootstrap via "do-cm3-std.sh" that appears to produce perfectly
>> functional executables, including mentor, etc.
>
> --
> -------------------------------------------------------------
> 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