Maksim,

Am I right, that at the place you need to retrieve field from a class, you
have both field's name AND descriptor?

If so, you should move definion of FIeld*
class_lookup_field_recursive(Class*, const char*, const char*) from
vmcore/include/Class.h to include/jit_intf.h and change its prototype to
accept Class_Handle instead of Class* and return Field_Handle instead of
FIeld*. Also, please, change the implementation in C_Interface.cpp
accordingly.

Regards,
   Pavel.
On 10/21/06, Maksim Ananjev <[EMAIL PROTECTED]> wrote:

21.10.06, Mikhail Fursov<[EMAIL PROTECTED]> wrote:

> AFAIK the vm/vmcore/include/Class.h is vmcore internal header and was
never
> included in JIT.
> To use its functionality you should declare the method you need in
> vm/include/open/vm.h or in vm/include/open/*class*.h file

Thanks! The way you described works!

> What exact functionality do you need?

I need to get field_desc of exact class having only the string name of
this field. So I described special function in Class.h and defined it
in Class.cpp. This method was a bit less painful on last version of
Harmony build , but on actual version it caused severe сompilation
errors.

Such functionality I need in order to develop package of
multidimensional arrays according to JSR-83 and  have it optimized in
JIT-compiler. The idea is to eliminate
redundant boundchecks in a sort of way already implemented ABCD
algorithm eliminates redundant boundchecks in one-dimensional arrays.
(I wrote about this idea here some time ago)

--
Maksim

Reply via email to