--- a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Wed Oct 29 19:59:53 2014 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java Wed Oct 29 09:31:37 2014 -0700
@@ -628,8 +628,13 @@
// Mark this method as a compiled LambdaForm
mv.visitAnnotation("Ljava/lang/invoke/LambdaForm$Compiled;", true);
- // Force inlining of this invoker method.
- mv.visitAnnotation("Ljava/lang/invoke/ForceInline;", true);
+ if (lambdaForm.forceInline) {
+ // Force inlining of this invoker method.
+ mv.visitAnnotation("Ljava/lang/invoke/ForceInline;", true);
+ } else {
+ mv.visitAnnotation("Ljava/lang/invoke/DontInline;", true);
+ }
+
// iterate over the form's names, generating bytecode instructions for each
// start iterating at the first name following the arguments