8071788: BlockInliningWrapper.asType() is broken
authorvlivanov
Thu, 29 Jan 2015 10:29:49 -0800
changeset 29022 31bbb5dcc603
parent 29021 cf13db21f970
child 29023 550372e828c8
8071788: BlockInliningWrapper.asType() is broken Reviewed-by: jrose
jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java
--- a/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Jan 29 10:29:43 2015 -0800
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/MethodHandleImpl.java	Thu Jan 29 10:29:49 2015 -0800
@@ -832,7 +832,7 @@
             MethodHandle wrapper;
             if (isCounting) {
                 LambdaForm lform;
-                lform = countingFormProducer.apply(target);
+                lform = countingFormProducer.apply(newTarget);
                 wrapper = new CountingWrapper(newTarget, lform, countingFormProducer, nonCountingFormProducer, DONT_INLINE_THRESHOLD);
             } else {
                 wrapper = newTarget; // no need for a counting wrapper anymore