[9] RFR (S): 8148753: Compilation fails due to field accesses on array types
Zoltán Majó
zoltan.majo at oracle.com
Mon Feb 1 15:14:13 UTC 2016
Hi,
please review the patch for 8148753.
https://bugs.openjdk.java.net/browse/JDK-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
java.lang.Object.
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).
Webrev:
http://cr.openjdk.java.net/~zmajo/8148753/webrev.00/
Testing:
- JPRT;
- all JTREG hotspot/compiler tests on all supported platforms.
Thank you and best regards,
Zoltan
More information about the hotspot-compiler-dev
mailing list