This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Note on BC and type assertions
- From: Andrew Haley <aph at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: GCJ Hackers <java at gcc dot gnu dot org>
- Date: Fri, 15 Oct 2004 18:45:10 +0100
- Subject: Note on BC and type assertions
- References: <m3vfdc7y2l.fsf@localhost.localdomain>
Tom Tromey writes:
> While browsing the verifier again, I noticed that there is a dynamic
> constraint that we can't represent using our current type
> assertions, namely:
>
> if (type_isarray (&t) || type_isinterface (&t) \
> || type_isabstract (&t))
> verify_fail ("type is array, interface, or abstract");
>
> We could put this check in _Jv_AllocObject (the worst option IMO), add
> a new kind of verification assertion, or write a BC-only wrapper for
> _Jv_AllocObject that does this check.
>
> There may be other assertion types we need to handle as well, a pass
> through the verifier looking for them is warranted.
That's why I wanted to generate code for the assertions. Then you can
assert anything you want.
Andrew.