[BC ABI] Type assertions

Tom Tromey tromey@redhat.com
Mon Aug 30 12:12:00 GMT 2004


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

Andrew> This does far too much checking, in that even when we can prove at
Andrew> compile time that an assigment is legal, we still output the
Andrew> assertions.  Some optimization required.

There aren't many we can actually elide.  Casts to Object; casts from
the current class to its direct superclass or superinterfaces; and
casts from an array type to Object, Cloneable, Serializable, and, if
the array's component type is a reference type, Object[], Cloneable[],
and Serializable[].  Are there any more?

Andrew> +   verify_identifier_node = get_identifier ("<verify>");

This is created but never used.

Andrew> + /* Add an assertion of the form "source_type is a subclass/
Andrew> +    subinterface of target_type" to the "__verify" function of the
Andrew> +    current class.  */

Comment refers to a different name.

Andrew> + 	= build_decl (FUNCTION_DECL, get_identifier ("__verify"), 

Probably meant verify_identifier_node here.

Tom



More information about the Java-patches mailing list