(original) (raw)

�� open

Code Review for Nestmates<o:p>

Prepared by:<o:p>

dholmes on Wed Jan 17 00:23:20 EST 2018<o:p>

Workspace:<o:p>

/export/users/dh198349/valhalla/repos/jdk-nestmates/open<o:p>

Compare against:<o:p>

http://hg.openjdk.java.net/jdk/jdk <o:p>

Summary of changes:<o:p>

14210 lines changed: 14059 ins; 43 del; 108 mod; 80425 unchg<o:p>

Patch of changes:<o:p>

open.patch<o:p>

Legend:<o:p>

Modified file
Deleted file
New file<o:p>

Javac:

Summary of changes:

<![if !supportLists]>       <![endif]>Define new NestHost and NestMembers attributes

------ ------ ------ ------ --- New Patch Raw src/jdk.jdeps/share/classes/com/sun/tools/classfile/NestHost_attribute.java <o:p>

------ ------ ------ ------ --- New Patch Raw src/jdk.jdeps/share/classes/com/sun/tools/classfile/NestMembers_attribute.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/jdk.jdeps/share/classes/com/sun/tools/classfile/Attribute.java <o:p>

<![if !supportLists]>       <![endif]>Generate new nestmate attributes

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/jdk.jdeps/share/classes/com/sun/tools/classfile/ClassWriter.java <o:p>

<![if !supportLists]>       <![endif]>Disable generation of access bridges

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java <o:p>

<![if !supportLists]>       <![endif]>Generate invokevirtual/invokeinterface for private method

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java <o:p>

<![if !supportLists]>       <![endif]>Control new features

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java <o:p>

Javap:

<![if !supportLists]>       <![endif]>Recognise and print nestmate attributes

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/jdk.jdeps/share/classes/com/sun/tools/javap/AttributeWriter.java <o:p>

New Core Reflection API:

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/java/lang/Class.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/native/libjava/Class.c <o:p>

Core Reflection Access Control Update:

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/jdk/internal/reflect/Reflection.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/sun/invoke/util/VerifyAccess.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/native/libjava/Reflection.c <o:p>

Miscellaneous Core Library changes:

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/jdk/internal/org/objectweb/asm/Attribute.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java<o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/java/lang/invoke/MethodHandles.java <o:p>

Hotspot Changes:

Summary of changes:

<![if !supportLists]>       <![endif]>Classfile parsing of new attributes

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/classfile/classFileParser.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/classfile/classFileParser.hpp <o:p>

<![if !supportLists]>       <![endif]>Klass support for new attributes, nest membership validation, and nestmate check

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/oops/instanceKlass.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/oops/instanceKlass.hpp <o:p>

<![if !supportLists]>       <![endif]>Interpreter changes for invokeinterface use with private methods

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/oops/cpCache.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/cpu/aarch64/templateTable_aarch64.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/cpu/arm/templateTable_arm.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/cpu/ppc/templateTable_ppc_64.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/cpu/s390/templateTable_s390.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/cpu/sparc/templateTable_sparc.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/cpu/x86/templateTable_x86.cpp <o:p>

<![if !supportLists]>       <![endif]>Core reflection API support

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw make/hotspot/symbols/symbols-unix <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw make/mapfiles/libjava/mapfile-vers <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/include/jvm.h <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/prims/jvm.cpp <o:p>

<![if !supportLists]>       <![endif]>Method resolution changes

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/interpreter/linkResolver.cpp <o:p>

<![if !supportLists]>       <![endif]>Access control changes

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/runtime/reflection.cpp <o:p>

<![if !supportLists]>       <![endif]>Miscellaneous changes

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/ci/ciField.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/classfile/systemDictionary.cpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/classfile/vmSymbols.hpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/logging/logTag.hpp <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/hotspot/share/memory/heapInspection.hpp <o:p>

Test Adjustments

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveConcreteMethodTest.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/ResolvedJavaTypeResolveMethodTest.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/hotspot/jtreg/runtime/CommandLine/OptionsValidation/TestOptionsWithRanges.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/hotspot/jtreg/runtime/SelectionResolution/InvokeInterfaceICCE.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/hotspot/jtreg/runtime/SelectionResolution/InvokeInterfaceSuccessTest.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/jdk/ProblemList.txt <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/jdk/jdk/lambda/vm/InterfaceAccessFlagsTest.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/langtools/lib/annotations/annotations/classfile/ClassfileInspector.java <o:p>

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw test/langtools/tools/javac/MethodParameters/AttributeVisitor.java <o:p>

New Nestmate Tests:

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestMembersEntry.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/BadNestMembersLength.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/ConflictingAttributesInNestHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/ConflictingAttributesInNestMember.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TestFinalMethodOverride.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TestNestmateAttributes.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TwoNestHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/classFileParsing/TwoNestMembers.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/CallerMissingHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/CallerNoHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/CallerNotInstanceHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/CallerNotOurHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/CallerSelfHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/InvalidNestHost.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost2.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHost2Member.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/PackagedNestHostMember.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/TargetMissingHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/TargetNoHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/TargetNotInstanceHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/TargetNotOurHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/TargetSelfHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/membership/TestNestmateMembership.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateConstructors/ExternalSub.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateConstructors/ExternalSuper.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestConstructorHierarchy.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestInvokeSpecial.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestMethodHandles.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateConstructors/TestReflection.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateFields/TestMethodHandles.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateFields/TestPrivateField.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateFields/TestReflection.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/ExternalSub.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/ExternalSuper.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingMethod.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingMethodWithSuper.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/MissingNestHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvoke.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeErrors.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestInvokeHierarchy.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestMethodHandles.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestMethodHandlesHierarchy.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestReflection.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateMethods/TestReflectionHierarchy.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestMethodHandles.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestPrivateStaticField.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateStaticFields/TestReflection.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestInvokeStatic.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestMethodHandles.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/privateStaticMethods/TestReflection.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/HostOfMemberMalformedHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/HostOfMemberMissingHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/HostOfMemberNoHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/HostOfMemberNotInstanceHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/HostOfMemberNotOurHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/HostWithDuplicateMembers.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/HostWithSelfMember.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/Hosts.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/InvalidNestHost.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/MalformedHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/MemberMalformedHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/MemberMissingHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/MemberNoHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/MemberNotInstanceHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/MemberNotOurHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/PackagedNestHost.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/PackagedNestHost.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/PackagedNestHost2.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/PackagedNestHost2Member.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/PackagedNestHostMember.jcod <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/SampleNest.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/hotspot/jtreg/runtime/Nestmates/reflectionAPI/TestReflectionAPI.java <o:p>

------ ------ ------ ------ --- New Patch Raw test/langtools/tools/javac/valhalla/nestmate/CheckNestmateAttrs.java <o:p>