This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Untimed resolve ?
- From: Tom Tromey <tromey at redhat dot com>
- To: Martin Vechev <martin at fadata dot bg>
- Cc: java at gcc dot gnu dot org
- Date: 30 Dec 2002 15:50:37 -0700
- Subject: Re: Untimed resolve ?
- References: <5.1.0.14.0.20021227193130.02e0aa40@mail.fadata.bg>
- Reply-to: tromey at redhat dot com
>>>>> "Martin" == Martin Vechev <martin@fadata.bg> writes:
Martin> System.out.println("loaded.");
Martin> new X();
Martin> At the end of loading the X class it also resolves it, which
Martin> seems incorrect. Shouldn't it rich the actual 'new' bytecode
Martin> and then throw NoClassDefFoundError.
I don't think this is a requirement.
See JVMS 1st Ed, section 2.16.1:
Linking involves verification, preparation, and (optionally)
resolution.
Later in that section it discusses the possibility of lazily-resolving
and eagerly-resolving runtimes.
At this point I don't think there is a bug here, just a difference. I
believe code relying on one particular implementation here is not
well-defined.
Tom