This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BC ABI] Type assertions


Andrew Haley wrote:

This patch adds type assertions to the ouput generated by gcj when
compiling with -findirect-dispatch.


There's a new field, Class.verify, which points to executable code.
When a class is loaded, this code is called.  In turn, this calls
_Jv_CheckAssignment for every assertion.

Bryce has pointed out that this would be much more space efficient
with a table of {source, dest} pairs. While true, if this were the
only assertion form it would preclude more complex assertions, and I
want to leave that possibility open for a little while.


If it turns out we need other kinds of type assertions, the table could be in a form like:

struct assertion_table_entry
{
 int opcode;
 utf8const operand_a;
 utf8const operand_b;
}

Where the opcode can be eg: types_compatable, is_interface, etc.

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]