class initialization check overhead
Mon Nov 25 22:37:00 GMT 2002
>>>>> ">" == shudo <email@example.com> writes:
>> | Method void main(java.lang.String)
>> | 0 aconst_null
>> | 1 astore_1
>> | 2 aload_1
>> | 3 invokespecial #3 <Method java.lang.Object()>
>> | 6 return
>> Sun's Java 2 SE 1.4.1 throws java.lang.VeifyError and
Interesting. This makes sense, too.
At first I thought it didn't, but as `null' is not an "uninitialized
object", it seems that this must fail to verify.
I'm going to check this in to the Mauve verification test suite.
This case doesn't really impact class initialization though.
It might make sense to elide calls to superclass constructors in some
situations. Unfortunately binary compatibility rears its head here as
well. Still, in the meantime it may be a useful optimization.
Anybody care to find out?
More information about the Java