Initialization test
John Keiser
John.Keiser at mci.com
Wed Oct 28 08:55:59 PST 1998
> From: Artur Biesiadowski [mailto:abies at pg.gda.pl]
>
>
> John Keiser wrote:
>
> > Class1 - static field access - This should *not* fail.
> The accessed
> > field is not constant.
> > Class2 - static field and method access - You are correct,
> this won't
> > fail. I must ask, though, why you think that if both Class1 and Class3
> > should not cause initialization, that Class2 should.
> > Class3 - static method access - This should *not* fail. A
> method is
> > called.
> > Class4 - compile-time constant field access - You are correct, this
> > *should* fail. access to fields initialized with a
> compile-time constant
> > will not cause initialization. This is the most useful test here and
> > probably should be included in various test suites.
>
> Note that I suppose that argv.length is less than 10. This way Class1
> and Class3 is never seen on runtime and not initialized.
>
> And yes, all JDK I have (1.1.3, 1.1.6,1.2b3, and Linux 1.1.5) pass this
> test. Only symcjit compiler for 1.1.3 fails it (but I think it is
> corrected in never jit versions).
>
> Artur
>
Can you please provide a reference to the spec that says it should behave in
this manner? Thanks.
--John Keiser
More information about the kaffe
mailing list