This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: eliminate gcjh?


Per Bothner wrote:
Christian Stuellenberg wrote:

If I remind right, [coverant returns]
is "only" at language level, since they
did not want to change the VM (to stay compatible e.g.).
...
1.5 does
only translation of some syntactic sugar to other valid java code on
the fly I think...


Well, I'm sure it it doesn't translate to "other java code".  And
it most definitely generates .class files you could not create with
earlier versions.

sf wrote:
 > Covariance has always existed at bytecode level. See also
 > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9861 .

I'd rather say "support for covariance in the sense of overloading based
on return type" as always existed.  Covariance implies that the method
with the changed return types overrides the method in the base class;
in the bytecode they are completely unrelated.

If you put it this way you are right. Overloading, based on return type as well as parameter type, is part of a language specification at a higher level. The Java language supports one but not the other.


So until 1.5, covariant methods just never occured at the bytecode level when compiling java programs.

Regards
	Stephan


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