_Jv_LookupInterfaceMethod

Per Bothner per@bothner.com
Thu Dec 2 15:45:00 GMT 1999


Bryce McKinlay <bryce@albatross.co.nz> writes:

> Now it finds the method index fine, but later gets "internal error in
> check-init: tree code not implemented: record_type", which I guess means that I
> cant stick the `iface' directly into lookup_arg.
> 
> Do I have to do something similar to what is done for "dtable"?:
> 
>   dtable = build1 (INDIRECT_REF, dtable_type, dtable);
>   dtable = build (COMPONENT_REF, class_ptr_type, dtable,
> 		  lookup_field (&dtable_type, class_ident));

No, you need to do something like (one more thing I forgot to mention):

  lookup_arg = tree_cons (NULL_TREE, dtable,
                          tree_cons (NULL_TREE, build_class_ref (IFACE),
                                     build_tree_list (NULL_TREE, IDX)));

build_class_ref takes a tree-node representing a type and turns it
into an expression that will evaluate to (the address of) the
Class for the type.
--
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/


More information about the Java mailing list