Null pointer check elimination
Tom Tromey
tromey@redhat.com
Sat Nov 12 20:33:00 GMT 2005
>>>>> "Per" == Per Bothner <per@bothner.com> writes:
Per> A type attribute is much more useful. For example it allows:
Per> String x = shared ? "x" : new String("x");
Per> // The type of x [in a single-assignment-world] is non-null.
I think we will need extra code to recognize that String references
via the constant pool will never be null.
Since we make direct references to the constant pool (i.e., we don't
emit a function call), a purely function-call-based approach to
handling non-nullity won't be sufficient.
Tom
More information about the Java
mailing list