Code Review for jdk

Prepared by:mcimadamore on Mon Jul 3 15:07:24 IST 2017
Workspace:/w/lt/valhalla/valhalla-10-openjdk/jdk
Compare against version:17253
Branch:mvt
Summary of changes: 19 lines changed: 18 ins; 0 del; 1 mod; 6413 unchg
Patch of changes: jdk.patch
Legend: Modified file
Deleted file
New file

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/java/lang/invoke/MethodHandles.java

rev 17254 : imported patch 8183133.patch
rev 17247 : 8181425: Reflection API defend against issues with internal VM derived value type
Reviewed-by: mcimadamore, psandoz, dsimms, thartmann
rev 17236 : Add missing access checks to ValueType.findGetter/findWither
rev 17233 : Initial commit of MVT prototype
rev 17232 : Merge
rev 17226 : Merge
rev 17219 : 8020801: Apply the restriction of invoking MethodHandles.lookup to j.l.r.Method.invoke
Reviewed-by: plevart, psandoz
rev 17197 : Merge
rev 17196 : 8178380: Module system implementation refresh (5/2017)
Reviewed-by: mchung, alanb, sspitsyn
Contributed-by: alan.bateman@oracle.com, mandy.chung@oracle.com, chris.hegarty@oracle.com
rev 17190 : 8159995: Rename internal Unsafe.compare methods
Reviewed-by: psandoz, dholmes
Contributed-by: ron.pressler@oracle.com
rev 17177 : 8167229: Improve VarHandle documentation
Reviewed-by: martin, abuckley
rev 17176 : 8177146: MethodHandles.Lookup::bind allows illegal protected access
Reviewed-by: psandoz, vlivanov, redestad
Contributed-by: ron.pressler@oracle.com
rev 17161 : 8179364: update "<a name=" in java.base module to use id attribute
Reviewed-by: darcy
rev 17105 : Reverted MVT merge
rev 17104 : Merge
rev 17102 : Add initial MethodHandle MVT support
rev 17018 : 8177530: Module system implementation refresh (4/2017)
Reviewed-by: mchung, alanb
Contributed-by: alan.bateman@oracle.com, mandy.chung@oracle.com
rev 16953 : 8174823: Module system implementation refresh (3/2017)
Reviewed-by: chegar, mchung, alanb
Contributed-by: alan.bateman@oracle.com, mandy.chung@oracle.com, sundararajan.athijegannathan@oracle.com, peter.levart@gmail.com
rev 16691 : 8173393: Module system implementation refresh (2/2017)
Reviewed-by: dfuchs, psandoz, mchung, alanb
Contributed-by: alan.bateman@oracle.com, mandy.chung@oracle.com, claes.redestad@oracle.com, alex.buckley@oracle.com, mark.reinhold@oracle.com, john.r.rose@oracle.com
rev 16526 : 8160710: Enable Thread to grant VarHandle field access to ThreadLocalRandom/Striped64
Reviewed-by: martin, dl, chegar
rev 16288 : 8170987: Module system implementation refresh (12/2016)
8170859: Run time and tool support for ModuleResolution
Reviewed-by: redestad, mchung, alanb
Contributed-by: alan.bateman@oracle.com, mandy.chung@oracle.com, chris.hegarty@oracle.com, mark.reinhold@oracle.com, john.r.rose@oracle.com
rev 16177 : 8169069: Module system implementation refresh (11/2016)
Reviewed-by: plevart, chegar, psandoz, mchung, alanb, dfuchs, naoto, coffeys, weijun
Contributed-by: alan.bateman@oracle.com, mandy.chung@oracle.com, claes.redestad@oracle.com, mark.reinhold@oracle.com
rev 15976 : 8167974: MethodHandles.iteratedLoop(...) fails with CCE in the case of iterating over array
8167966: MethodHandles.iteratedLoop fails with IAE in the case of correct arguments
Reviewed-by: redestad
rev 15717 : 8151179: address issues raised by JCK team on JEP 274 API
Reviewed-by: jrose, redestad, psandoz
rev 15692 : 8161211: better inlining support for loop bytecode intrinsics
Reviewed-by: jrose, vlivanov, redestad
rev 15577 : 8165492: Reduce number of lambda forms generated by MethodHandleInlineCopyStrategy
Reviewed-by: mhaupt, vlivanov, psandoz, shade
rev 15539 : 8161444: VarHandles should provide access bitwise atomics
8162107: Add acquire/release variants for getAndSet and getAndAdd
Reviewed-by: shade, redestad
rev 15383 : 8164102: MethodHandles.countedLoop/4 works incorrect for start/end = Integer.MAX_VALUE
Reviewed-by: redestad
rev 15344 : 8163878: Remove unnecessary bridge methods, allocations in java.lang.invoke
Reviewed-by: mhaupt, shade
rev 15328 : 8163370: Reduce number of classes loaded by common usage of java.lang.invoke
Reviewed-by: igerasim, psandoz
rev 15282 : 8161379: Force inline methods calling Reflection.getCallerClass
Reviewed-by: shade, mchung
rev 15119 : 8158571: Additional method handle validation
Reviewed-by: jrose, ahgross, mchung
rev 15118 : 8155985: Persistent Parameter Processing
Reviewed-by: jrose, vlivanov, ahgross
rev 15117 : 8154475: Clean up lookup visibility
Reviewed-by: vlivanov, mhaupt, ahgross
rev 14974 : 8158169: MethodHandles.dropArgumentsToMatch(...)
Reviewed-by: psandoz, mhaupt
rev 14962 : Merge
rev 14959 : Merge
rev 14957 : 8158039: VarHandle float/double field/array access should support CAS/set/add atomics
Reviewed-by: shade, vlivanov, darcy
rev 14956 : 8157726: VarHandles/Unsafe should support sub-word atomic ops
Reviewed-by: psandoz, vlivanov, lagergren
rev 14940 : 8143211: provide bytecode intrinsics for loop and try/finally executors
Reviewed-by: psandoz, redestad, vlivanov
rev 14710 : 8158851: MH.publicLookup() init circularity, triggered by custom SecurityManager with String concat and -limitmods java.base
Reviewed-by: alanb, redestad, jlaskey
rev 14686 : 8158171: MethodHandles.dropArgumentsToMatch(...) non-documented IAE
Reviewed-by: sundar, mhaupt
rev 14675 : 8156868: MethodHandles.zero(Class) doc issues
Reviewed-by: psandoz, mhaupt
rev 14592 : 8157590: MethodHandles.arrayLength() lacks @since tag, implementation throws wrong exception
Reviewed-by: psandoz
rev 14496 : 8156915: introduce MethodHandle factory for array length
Reviewed-by: sundar
rev 14302 : 8155106: MHs.Lookup.findConstructor returns handles for array classes
Reviewed-by: shade, sundar
rev 14297 : 8154447: Exempt classes under java.util.concurrent from MH.Lookup restrictions
Reviewed-by: mchung, martin
rev 14296 : 8154556: Use java.nio.ByteOrder instead of boolean value
Reviewed-by: alanb
rev 14276 : 8154754: MethodHandles.countedLoop errors in deriving loop arguments, result type, and local state
Reviewed-by: redestad
rev 14275 : 8154751: MethodHandles.countedLoop does not accept empty bodies
Reviewed-by: redestad
rev 14274 : 8152667: MHs.iteratedLoop(...) throws unexpected WMTE, disallows Iterator subclasses, generates inconsistent loop result type
Reviewed-by: redestad
rev 14211 : 8150956: j.l.i.MethodHandles.whileLoop(...) and .iteratedLoop(...) throw unexpected exceptions in the case of 'init' return type is void
Reviewed-by: psandoz
rev 14176 : 8137058: Clear out all non-Critical APIs from sun.reflect
Reviewed-by: alanb, jfranck, mchung
rev 14160 : 8150829: Enhanced drop-args, identity and default constant, varargs adjustment
Reviewed-by: psandoz, mhaupt, jrose
rev 14156 : 8151705: VarHandle.AccessMode enum names should conform to code style
Reviewed-by: mhaupt, shade, redestad
rev 14153 : 8153637: MethodHandles.countedLoop/3 initialises loop counter to 1 instead of 0
Reviewed-by: psandoz, redestad
rev 14076 : Merge
rev 14075 : 8149644: Integrate VarHandles
Reviewed-by: coffeys, mhaupt, vlivanov
Contributed-by: paul.sandoz@oracle.com, aleksey.shipilev@oracle.com
rev 13938 : Merge
rev 13905 : 8150782: findClass / accessClass throw unexpected exceptions
Reviewed-by: sundar
rev 13901 : 8142968: Module System implementation
Summary: Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, chris.hegarty@oracle.com, alexandr.scherbatiy@oracle.com, amy.lu@oracle.com, calvin.cheung@oracle.com, daniel.fuchs@oracle.com, erik.joelsson@oracle.com, harold.seigel@oracle.com, jaroslav.bachorik@oracle.com, jean-francois.denise@oracle.com, jan.lahoda@oracle.com, james.laskey@oracle.com, lois.foltan@oracle.com, miroslav.kos@oracle.com, huaming.li@oracle.com, sean.mullan@oracle.com, naoto.sato@oracle.com, masayoshi.okutsu@oracle.com, peter.levart@gmail.com, philip.race@oracle.com, claes.redestad@oracle.com, sergey.bylokhov@oracle.com, alexandre.iline@oracle.com, volker.simonis@gmail.com, staffan.larsen@oracle.com, stuart.marks@oracle.com, semyon.sadetsky@oracle.com, serguei.spitsyn@oracle.com, sundararajan.athijegannathan@oracle.com, valerie.peng@oracle.com, vincent.x.ryan@oracle.com, weijun.wang@oracle.com, yuri.nesterenko@oracle.com, yekaterina.kantserova@oracle.com, alexander.kulyakhtin@oracle.com, felix.yang@oracle.com, andrei.eremeev@oracle.com, frank.yuan@oracle.com, sergei.pikalev@oracle.com, sibabrata.sahoo@oracle.com, tiantian.du@oracle.com, sha.jiang@oracle.com
rev 13799 : 8150635: j.l.i.MethodHandles.loop(...) throws IndexOutOfBoundsException
Reviewed-by: psandoz
rev 13797 : 8150953: j.l.i.MethodHandles: example section in whileLoop(...) provides example for doWhileLoop
Reviewed-by: psandoz
rev 13790 : 8150825: MethodHandles.tryFinally throws IndexOutOfBoundsException for non-conforming parameter lists
Reviewed-by: redestad
rev 13768 : 8143410: augment pseudo-code descriptions in MethodHandles API
Reviewed-by: psandoz
rev 13766 : 8150360: augment/correct MethodHandle API documentation
Reviewed-by: psandoz
rev 13686 : 8138884: MethodHandles.Lookup.findVirtual() Javadoc fails to consider private interface methods
Reviewed-by: psandoz, mhaupt
rev 13678 : 8138578: MethodHandles.Lookup.findSpecial() Javadoc fails to consider static methods
Reviewed-by: psandoz, vlivanov, mhaupt
Contributed-by: Shilpi Rastogi <shilpi.rastogi@oracle.com>
rev 13459 : 8147078: MethodHandles.catchException does not enforce Throwable subtype
Reviewed-by: psandoz, sundar
rev 13418 : 8145544: Move sun.misc.VM to jdk.internal.misc
Reviewed-by: alanb, mullan, weijun
rev 13336 : 8144723: MethodHandleImpl.initStatics is no longer needed
Reviewed-by: vlivanov, mhaupt, forax
rev 13256 : 8143343: add JEP 274 Javadoc tests to JavaDocExamplesTest
Reviewed-by: sundar
rev 13111 : 8139885: implement JEP 274: enhanced method handles
Reviewed-by: jrose, psandoz, vlivanov
rev 12745 : 8136583: Core libraries should use blessed modifier order
Summary: Run blessed-modifier-order script (see bug)
Reviewed-by: psandoz, chegar, alanb, plevart
rev 11477 : 8073479: Replace obj.getClass hacks with Objects.requireNonNull
Reviewed-by: dfuchs, plevart, vlivanov
rev 11078 : 8066746: MHs.explicitCastArguments does incorrect type checks for VarargsCollector
Reviewed-by: jrose, psandoz
rev 11009 : 8063135: Enable full LF sharing by default
Reviewed-by: psandoz, shade
rev 10678 : 8058293: Bit set computation in MHs.findFirstDupOrDrop/findFirstDrop is broken
Reviewed-by: jrose
rev 10677 : 8058291: Missing some checks during parameter validation
Reviewed-by: jrose
rev 10634 : 8057922: Improve LambdaForm sharing by using LambdaFormEditor more extensively
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10630 : 8057656: Improve MethodType.isCastableTo() & MethodType.isConvertibleTo() checks
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10629 : 8057654: Extract checks performed during MethodHandle construction into separate methods
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10628 : 8050887: Intrinsify constants for default values
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10627 : 8050884: Intrinsify ValueConversions.identity() functions
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10626 : 8050877: Improve code for pairwise argument conversions and value boxing/unboxing
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10622 : 8050173: Add j.l.i.MethodHandle.copyWith(MethodType, LambdaForm)
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10621 : 8050166: Get rid of some package-private methods on arguments in j.l.i.MethodHandle
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10620 : 8050053: Improve caching of different invokers
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10619 : 8050052: Small cleanups in java.lang.invoke code
Reviewed-by: vlivanov, psandoz
Contributed-by: john.r.rose@oracle.com
rev 10444 : 8054834: Modular Source Code
Reviewed-by: alanb, chegar, ihse, mduigou
Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com
4 lines changed: 3 ins; 0 del; 1 mod; 5932 unchg

Cdiffs Udiffs Sdiffs Frames Old New Patch Raw src/java.base/share/classes/jdk/experimental/value/ValueType.java

rev 17254 : imported patch 8183133.patch
rev 17250 : Unreflect on an array of Field of a VCC to, in order,
apply vwithfield to each Field with a given value.
The initial value can either be the default or passed
in as the first argument.
rev 17249 : Add findConstructor. Calls constructor on VCC and then unboxes to DVT.
rev 17247 : 8181425: Reflection API defend against issues with internal VM derived value type
Reviewed-by: mcimadamore, psandoz, dsimms, thartmann
rev 17246 : Access control checks in findWither.
rev 17245 : Update findWither to use vwithfield (with appropriate
updates to HotSpot for access control).
rev 17243 : defaultValueConstant() using vdefault
rev 17241 : Fix bug in ValueType.wither class name.
rev 17236 : Add missing access checks to ValueType.findGetter/findWither
rev 17235 : Add support for Q-types to lambda forms
Note: support is optional, and can be enabled using the flag:
-Dvalhalla.enableValueLambdaForms=true
rev 17234 : MH names generate classes within the same package as host class (VCC)
rev 17102 : Add initial MethodHandle MVT support
15 lines changed: 15 ins; 0 del; 0 mod; 481 unchg

This code review page was prepared using /home/maurizio/bin/webrev (vers 25.2-hg+openjdk.java.net).