instanceof in CNI
Per Bothner
per@bothner.com
Sat Mar 25 21:05:00 GMT 2000
Tom Tromey <tromey@cygnus.com> writes:
> Lately I've been thinking gcjh could generate a per-class inline
> function named something like "$class"; I got this idea because
> apparently javac generates an internal function named "class$" to
> implement the ".class" notation.
The compiler generates a static field the the actuall
Class object. If we picked a good name for this,
we could have gcjg also emit it.
E.g.
class java::lang::String : public java::lang::Object
{
java::lang::Class $class;
}
Then you'd just reference String::$class .
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/
More information about the Java
mailing list