This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [BC ABI] Type assertions
- From: Tom Tromey <tromey at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 27 Aug 2004 14:21:36 -0600
- Subject: Re: [BC ABI] Type assertions
- References: <16687.37236.782256.518763@cuddles.cambridge.redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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