This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: instanceof in CNI


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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]