[9] RFR (L): 8057042: LambdaFormEditor: derive new LFs from a base LF
John Rose
john.r.rose at oracle.com
Wed Sep 3 17:59:32 UTC 2014
On Sep 3, 2014, at 8:46 AM, Morris Meyer <morris.meyer at oracle.com> wrote:
> src/share/classes/java/lang/invoke/BoundMethodHandle.java
>
> Could we keep /* */ comment style consistent throughout?
>
> @Override // there is a default binder in the super class, for 'L' types only
> /*non-public*/
Most comments are "//" style, or else javadoc.
The locution /*non-public*/ is a stand-in for a modifier keyword that emphasizes that the API is not to be made public. There have been proposals to use 'default' or 'package' for this purpose, but they may never be adopted, and until that time, we need something that can do the job of a modifier, at least for documentation.
> src/share/classes/java/lang/invoke/LambdaForm.java
>
> ! Object transformCache; // managed by LambdaFormEditor
>
> This is sort of odd. Could we have a TransformCache class that has a Transform[] part and a ConcurrentHashMap<Transform, Transform> part?
That's maybe worth a comment. The first-class way to do this would be a CHM, but it would add an order of magnitude overhead to something that is (at least currently) a footprint problem, and also (probably) a startup bottleneck. The given design is optimized for a cache arity of close to 1, at the expense of clear static typing (but the type weakness is localized) and possible over-retention.
— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20140903/558a8d89/attachment.html>
More information about the mlvm-dev
mailing list