[lworld] RFR: 8242612: [lworld] Javac should not expressly encode the new super interface types in class files
Jim Laskey
jlaskey at openjdk.java.net
Mon May 18 12:53:57 UTC 2020
On Mon, 18 May 2020 12:14:23 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:
> Jim, Could you please review this change ? TIA.
>
> Changes:
>
> - Withdraw the new top type InlineObject (per design)
> - Do not encode the new top types in class files as this is noisy and
> very disruptive and let the static compiler and the dynamic environments
> inject these types as needed. (since classes compiled with legacy compilers
> will not encode these top types anyway the VM has to resort to injection,
> why not resort to injection for everything is the motivation)
> - Adjust some code that is surprised by super interfaces being empty.
>
> More background is available in https://bugs.openjdk.java.net/browse/JDK-8242612
Changes requested by jlaskey (no project role).
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java line 276:
> 275: Type it;
> 276: if (ct.interfaces_field == null || ct.interfaces_field.isEmpty()) {
> 277: it = objectType;
I'm assuming that you are using this to indicate no top interfaces. Is this safe (non-hackish)?
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 2526:
> 2525: ClassType ct = (ClassType) qualifierType;
> 2526: if (ct.interfaces_field == null || ct.interfaces_field.isEmpty()) {
> 2527: wcb = syms.objectType;
Same - maybe define a predicate for this.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/50
More information about the valhalla-dev
mailing list