[Nestmates] RFR: 8194856: [Nestmates] Activate nestmate processing for JDK Version 11 only (original) (raw)

David Holmes david.holmes at oracle.com
Mon Jan 15 21:20:56 UTC 2018


Thanks Karen.

David

On 16/01/2018 12:27 AM, Karen Kinnear wrote:

VM side looks good. Thanks David Karen

On Jan 14, 2018, at 10:57 PM, David Holmes <david.holmes at oracle.com> wrote:

Trivial update: - javac: only generate nestmate attributes and virtual invoke bytecodes for private methods, when outputting for JDK 11 / classfile version 55 - hotspot: only read nestmate attributes if classfile version >= 55 (JDK 11) bug: https://bugs.openjdk.java.net/browse/JDK-8194856 webrev: http://cr.openjdk.java.net/~dholmes/8194856/webrev/ Thanks, David ----- --- old/src/hotspot/share/classfile/classFileParser.cpp 2018-01-14 22:35:12.386673245 -0500 +++ new/src/hotspot/share/classfile/classFileParser.cpp 2018-01-14 22:35:10.230549972 -0500 @@ -3469,7 +3469,7 @@ assert(runtimeinvisibletypeannotations != NULL, "null invisible type annotations"); } cfs->skipu1(attributelength, CHECK); - } else if (majorversion >= JAVA10VERSION) { + } else if (majorversion >= JAVA11VERSION) { if (tag == vmSymbols::tagnestmembers()) { // Check for NestMembers tag if (parsednestmembersattribute) { --- old/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java 2018-01-14 22:35:19.063054956 -0500 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java 2018-01-14 22:35:16.894930997 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -158,13 +158,13 @@ /** Does the target VM support nestmate access? */ public boolean hasNestmateAccess() { - return compareTo(JDK110) >= 0; + return compareTo(JDK111) >= 0; } /** Does the target VM support virtual private invocations? */ public boolean hasVirtualPrivateInvoke() { - return compareTo(JDK110) >= 0; + return compareTo(JDK111) >= 0; } }



More information about the valhalla-dev mailing list