[m-dev.] Bootstrapping in the Java backend?

Julien Fischer jfischer at opturion.com
Wed Apr 17 19:33:24 AEST 2013


On Wed, Apr 17, 2013 at 5:55 PM, Paul Bone <paul at bone.id.au> wrote:

> Do we support or is there an effort to support bootstrapping in the Java
> backend?

Not really.  The compiler itself should build in the java grade and also the
csharp grade.  It might also build in the erlang grade, I haven't checked
However, in terms of performance none of those three result in a compiler
that is even remotely competitive with one created by the two C backends.

I've added a new Mercury program to util/ called mfilterjavac

You cannot have Mercury programs in that directory.  There's no way
it could be compiled with the source distribution.  The contents of the util
directory are the first thing that is built (i.e. before the standard
library, which
we we would need to link any Mercury program against).

It re-write javac's output to fix error locations in .java files to put to
> the correct
> line in the original .m file (for foreign code).  Because the java backend
> now uses this program, but the program is written in Mercury have I created
> a bootstrap problem?

You've created a problem by putting Mercury code in the util directory.
In any case, the Mercury compiler itself should have an option to disable
filtering of javac output through mfilterjavac.

 Or is this okay becase we will always build the system for C first?

No, see above.  Is there any reason that mfilterjavac cannot be implemented
in C, as per mfiltercc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/developers/attachments/20130417/faea6d3b/attachment.html>

More information about the developers mailing list