RFR (S): 8148753: Compilation fails due to field accesses on array types
vladimir.kozlov at oracle.com
Mon Feb 1 17:43:20 UTC 2016
+ // handling in ciField::will_link.
"and throw a java.lang.NoSuchFieldError exception (the expected behavior
in this case)."
Give different name to first local 'declared_holder' and after array
type check do cast:
ciInstanceKlass* declared_holder = holder->as_instance_klass();
then you don't need to change following code.
On 2/1/16 7:14 AM, Zoltán Majó wrote:
> please review the patch for 8148753.
> Problem: Compiling methods that access fields of array types fails. The
> problem is that both compilers assume that only fields of instance types
> (but not field of array types) can be accessed. However, an array can be
> also seen as an instance type, as every array is a subclass of
> Solution: Treat accesses to fields of array types as accesses to fields
> of java.lang.Object. By convention, the java.lang.Object does not have
> any fields. As a result, the generated code will throw a
> java.lang.NoSuchFieldError exception (the expected behavior in this case).
> - JPRT;
> - all JTREG hotspot/compiler tests on all supported platforms.
> Thank you and best regards,
More information about the hotspot-compiler-dev