public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Implementation Q
  2000-04-01  0:00     ` Tom Tromey
@ 2000-04-01  0:00       ` Colin McCormack
  2000-04-01  0:00       ` Colin McCormack
       [not found]       ` <200003050036.QAA18810@cygnus.com>
  2 siblings, 0 replies; 7+ messages in thread
From: Colin McCormack @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Tom Tromey; +Cc: java-discuss

> *** cygint.cygnus.com can't find coldstore.linuxbox.org: Non-existent host/domain

Gah.  Sorry, http://coldstore.linuxbox.com/ (you can see how much time I get to maintain the page :)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Implementation Q
  2000-04-01  0:00     ` Tom Tromey
  2000-04-01  0:00       ` Colin McCormack
@ 2000-04-01  0:00       ` Colin McCormack
       [not found]       ` <200003050036.QAA18810@cygnus.com>
  2 siblings, 0 replies; 7+ messages in thread
From: Colin McCormack @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Tom Tromey; +Cc: java-discuss

> Anyway, yes, not supporting rtti makes it hard to link gcj code to
> existing C++ libraries which rely on rtti.  Fixing gcj is the best
> approach.  If you need it in a timely way, as always, you'll probably
> have to write it yourself...

Yep.  I suspect that a partial solution would be easy enough, ie lie :)

One could, I suppose, make typeinfo for a Java class be the same as that for 
void, or create some other opaque thing - JavaClass or something.

How does that strike you, as an initial approximation?

Colin.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Implementation Q
       [not found]       ` <200003050036.QAA18810@cygnus.com>
@ 2000-04-01  0:00         ` Tom Tromey
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Colin McCormack; +Cc: Tom Tromey, java-discuss

>> Anyway, yes, not supporting rtti makes it hard to link gcj code to
>> existing C++ libraries which rely on rtti.  Fixing gcj is the best
>> approach.  If you need it in a timely way, as always, you'll probably
>> have to write it yourself...

Colin> One could, I suppose, make typeinfo for a Java class be the
Colin> same as that for void, or create some other opaque thing -
Colin> JavaClass or something.

Colin> How does that strike you, as an initial approximation?

Of course I'd prefer to see a full implementation.
A dummy implementation just papers over the problem... presumably code
that relies on rtti expects it to mean something.

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Implementation Q
       [not found]   ` <200003050013.QAA16307@cygnus.com>
@ 2000-04-01  0:00     ` Tom Tromey
  2000-04-01  0:00       ` Colin McCormack
                         ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Colin McCormack; +Cc: java-discuss

>>>>> "Colin" == Colin McCormack <colin@field.medicine.adelaide.edu.au> writes:

Colin> We're looking at using gjc to generate stuff to store in
Colin> ColdStore (coldstore.linuxbox.org, sorry about the netscape
Colin> bug, try reloading.)

*** cygint.cygnus.com can't find coldstore.linuxbox.org: Non-existent host/domain


Anyway, yes, not supporting rtti makes it hard to link gcj code to
existing C++ libraries which rely on rtti.  Fixing gcj is the best
approach.  If you need it in a timely way, as always, you'll probably
have to write it yourself...

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Implementation Q
  2000-04-01  0:00 ` Implementation Q Tom Tromey
@ 2000-04-01  0:00   ` Colin McCormack
       [not found]   ` <200003050013.QAA16307@cygnus.com>
  1 sibling, 0 replies; 7+ messages in thread
From: Colin McCormack @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss

> Why do you want rtti in your CNI code?

We're looking at using gjc to generate stuff to store in ColdStore (coldstore.linuxbox.org, sorry about the netscape bug, try reloading.)  The current snapshot's at ftp://field.medicine.adelaide.edu.au/pub/Outgoing/cold-* in case you're interested.

It should be pretty cool.  Instant persistence for Java.  And we don't have to embark upon a huge VM project - colour me happy :)

Anyway, we were idly thinking about mapping Java builtin classes to the layer1 stuff in coldstore, giving some kind of interoperability between Java and other languages as we implement 'em.  Layer1 uses rtti.  How critically, I'm not sure.

Early days, yet.  We just realised this was a possibility a couple of days ago.

Colin.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Implementation Q
       [not found] <200003042343.PAA13366@cygnus.com>
@ 2000-04-01  0:00 ` Tom Tromey
  2000-04-01  0:00   ` Colin McCormack
       [not found]   ` <200003050013.QAA16307@cygnus.com>
  0 siblings, 2 replies; 7+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: colin; +Cc: java-discuss

>>>>> "Colin" == Colin McCormack <colin@field.medicine.adelaide.edu.au> writes:

Colin> What's the reason rtti has to be off in CNI?

The C++ compiler knows that the Java compiler is responsible for
generating the vtable for every "Java" object.  The Java compiler
doesn't know how to generate rtti information.  So, if you compile CNI
code with rtti enabled, you get link errors -- the g++-compiled .o
files refer to nonexisting rtti objects.

Colin> Is Java doing some mapping via the vtbl, and the extra vtbl
Colin> pointer for rtti messes this up?

Nope.  We just leave the rtti slot empty.  Actually, we have
experimental code to use the rtti slot to store some information for
the GC (this would let us speed up the marking process).  However, we
could move that information to vtable[-1] if we had to.

Colin> If so, how hard would it be to trick up a version which used
Colin> rtti across the board?

Semi-hard.  I think you either have to copy a big chunk of
gcc/cp/rtti.c into gcc/java, or you have to solve the g++/java
infrastructure problem (i.e., making it possible for them to share
code).  The latter problem would be good to solve, and is probably
necessary to solve in the medium term (with the new ABI work).  I
won't have time to look at it for quite a while (unless it suddenly
becomes critical somehow).  I don't know if anybody else is planning
to address the problem.

Also, you have to be prepared to generate rtti information at runtime.
At runtime we construct array classes as well as interpreted classes.

Having the rtti information would let us clean up some hacks related
to exception handling.

Why do you want rtti in your CNI code?

Tom

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Implementation Q
@ 2000-04-01  0:00 Colin McCormack
  0 siblings, 0 replies; 7+ messages in thread
From: Colin McCormack @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss

Hi,

What's the reason rtti has to be off in CNI?

Is Java doing some mapping via the vtbl, and the extra vtbl pointer for rtti 
messes this up?

If so, how hard would it be to trick up a version which used rtti across the 
board?

Colin.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200003042343.PAA13366@cygnus.com>
2000-04-01  0:00 ` Implementation Q Tom Tromey
2000-04-01  0:00   ` Colin McCormack
     [not found]   ` <200003050013.QAA16307@cygnus.com>
2000-04-01  0:00     ` Tom Tromey
2000-04-01  0:00       ` Colin McCormack
2000-04-01  0:00       ` Colin McCormack
     [not found]       ` <200003050036.QAA18810@cygnus.com>
2000-04-01  0:00         ` Tom Tromey
2000-04-01  0:00 Colin McCormack

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).