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: [boehm-gc] Import 6.3 alpha 1


>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:

Jeff> class A {
Jeff>   B b() {
Jeff>     return new B();
Jeff>   }
Jeff> }

Jeff> should "new A()" cause B to be loaded?  (With the JRE it does
Jeff> not.)

Jeff> This is an example of what blocks us from using gcj from "real
Jeff> world" applications.

I think it is valid for B to be loaded in this situation.  For
instance, the verifier could load B as part of its verification
process.  I can dig up chapter and verse for this if you want; Java
code that assumes that B won't be loaded is incorrect.
(Initialization is a separate matter though.  That would be clearly
invalid.)

Of course, correctness isn't the only thing.  There's plenty of bogus
code out there, that you might actually want to run :-(.

Tom


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