changeset 15317:3a850cd34e59

8162815: unnecessary object creation in reflection Reviewed-by: psandoz, shade Contributed-by: tomas.hurka@oracle.com
author redestad
date Tue, 09 Aug 2016 09:42:01 +0200
parents f1ff866fd512
children 5b6bd1fc3d46
files src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java
diffstat 1 files changed, 0 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java	Tue Aug 09 09:44:25 2016 +0530
+++ b/src/java.base/share/classes/jdk/internal/reflect/MethodAccessorGenerator.java	Tue Aug 09 09:42:01 2016 +0200
@@ -437,17 +437,6 @@
             cb.opc_new(targetClass);
             cb.opc_dup();
         } else {
-            // Setup before iterating down argument list
-            if (isPrimitive(returnType)) {
-                // new <boxing type for primitive type>
-                // dup
-                // ... (see below:)
-                // invokespecial <constructor for boxing type for primitive type>
-                // areturn
-                cb.opc_new(indexForPrimitiveType(returnType));
-                cb.opc_dup();
-            }
-
             // Get target object on operand stack if necessary.
 
             // We need to do an explicit null check here; we won't see