Implementing Universal Character Names in identifiers

Tom Tromey tromey@redhat.com
Fri Nov 1 15:10:00 GMT 2002


>>>>> "Brian" == Brian Sullivan <bsulliv@legacyj.com> writes:

Brian> I was curious if anyone had looked into supporting Java header
Brian> files directly from C++ without generating includes as a
Brian> separate step, for maintainance and ease of use.

The idea has certainly come up.  Nobody has ever looked into it "for
real", as far as I'm aware.

I think it would require some architectural changes in gcc.  In
particular it would mean linking the .class reader into cc1plus.  It
would also mean unifying the internal representation of Java and C++
classes.  I don't know how hard this would be.

Brian> I'm not picky on the mechanism, I just think that it would be a
Brian> cleaner interface than separate generation.

I think so too.  It would also potentially let us inline Java code
into C++ code.  (The other direction would be much harder to do.)

But note that I don't plan to ever work on this.  The benefits don't
seem high enough.  Especially given all the other work that remains to
be done.

Brian> As all the generation and usage would be internal to the compiler,
Brian> character set issues may become moot.

Unfortunately, they'd still be there.  One of the issues at hand is
representing non-ASCII characters in identifiers as given to the
assembler.  That problem would still exist.

Tom



More information about the Java mailing list