[m-rev.] diff: large integer literals in java backend
Paul Bone
pbone at csse.unimelb.edu.au
Mon Jul 20 10:25:11 AEST 2009
On Thu, Jul 16, 2009 at 03:24:33PM +1000, Peter Wang wrote:
> Other suggestions welcome.
>
>
> Branches: main
>
> When using a 64-bit Mercury compiler, a hexadecimal literal with the 32nd bit
> set (e.g. 0xffffffff) would be written out to Java source files as a large
> positive integer, but the Java compiler would complain because the integer is
> too large to fit in 32-bits.
>
> This patch works around the problem by writing such literals in hexadecimal.
Does this mean that the Java backend (for all intents and purposes) is a
32bit backend no matter what machine it runs on?
Can/will the compiler bootstrap in Java? Does this routine work
correctly in when the compiler is built using the Java backend? Perhaps
the more general question here is can a 32bit mercury compiler build a
64bit mercury program?
I'm not suggesting any changes to the compiler, but perhaps these things
should be stated explicitly in the documentation if they aren't already.
Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 485 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20090720/ba43f498/attachment.sig>
More information about the reviews
mailing list