default initialization [was: Re: Socket timeout patch]
Eric Blake
ebb9@email.byu.edu
Sat Dec 15 18:57:00 GMT 2001
One last comment on the issue:
The compiler IS allowed to omit default initializers in array
initializations (and that's the only place):
new int[] { 0, 0 };
Here, the compiler can stop after the newarray bytecode; rather than
going on and assigning 0 to slots 0 and 1 of the new array. This is
possible because unlike new instances or loaded classees, nothing has
access to the array being created until it is completely initialized.
Eric Blake wrote:
>
> and say instead that a compiler may NOT omit default initializations,
> not even for static fields:
--
This signature intentionally left boring.
Eric Blake ebb9@email.byu.edu
BYU student, free software programmer
More information about the Java-patches
mailing list