On Sep 9, 2014, at 12:51 PM, Vladimir Ivanov <vladimir.x.iva...@oracle.com> 
wrote:

> http://cr.openjdk.java.net/~vlivanov/8057922/webrev.00
> https://bugs.openjdk.java.net/browse/JDK-8057922
> 
> Introduce more sharing on LambdaForm level by rewriting most of the MH 
> combinators using LambdaFormEditor.
> 
> The new code is guarded by USE_LAMBDA_FORM_EDITOR flag and turned off by 
> default because it introduces significant peak performance regression on 
> Octane benchmark. I'm working on the fix. Original implementation will be 
> removed once performance degradation is fixed.
> 

Generally looks ok.


- LambdaFormEditor

 465         buf.endEdit();
 466         form = buf.lambdaForm();
 467         return putInCache(key, form);

A suggestion (feel free to ignore), that pattern repeats quite a bit. With some 
tweaks one could do:

  return putIntCache(but.endEdit()); // or buf.toLambdaForm()


- MethodHandles

2869     public static
2870     MethodHandle filterReturnValue(MethodHandle target, MethodHandle 
filter) {
2871         MethodType targetType = target.type();
2872         MethodType filterType = filter.type();
2873         filterReturnValueChecks(targetType, filterType);
2874         BoundMethodHandle result = target.rebind();
2875         BasicType rtype = BasicType.basicType(filterType.returnType());
2876         LambdaForm lform = result.editor().filterReturnForm(rtype, false);
2877         MethodType newType = 
targetType.changeReturnType(filterType.returnType());
2878         result = result.copyWithExtendL(newType, lform, filter);
2879         return result;
2880     }

Missing "if (USE_LAMBDA_FORM_EDITOR)".

Paul.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to