This is the mail archive of the java-discuss@sourceware.cygnus.com 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]

Re: _Jv_LookupInterfaceMethod


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/

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