Tom Tromey wrote:
"Per" == Per Bothner <[EMAIL PROTECTED]> 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.

Right - the "type-variant" approach handles that smoothly.
I.e. in Java a string literal would have type
"never-null pointer to java.lang.String".
--
        --Per Bothner
[EMAIL PROTECTED]   http://per.bothner.com/

Reply via email to