changeset 52959:3f350339151b intrinsics-project

Correct for ConstantDesc changes
author jlaskey
date Fri, 02 Nov 2018 10:44:41 -0300
parents 465f6d70456a
children b649a12d455d
files src/jdk.compiler/share/classes/com/sun/tools/javac/comp/IntrinsicsVisitor.java src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/FormatterProcessorFactory.java src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/HashProcessorFactory.java src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/IntrinsicProcessor.java src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/Intrinsics.java src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/StringProcessorFactory.java
diffstat 6 files changed, 23 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/IntrinsicsVisitor.java	Thu Nov 01 20:25:34 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/IntrinsicsVisitor.java	Fri Nov 02 10:44:41 2018 -0300
@@ -138,7 +138,7 @@
         return translator.translate(tree);
     }
 
-    private static ConstantDesc<?> typeConstantDesc(Type type) {
+    private static ConstantDesc typeConstantDesc(Type type) {
         if (type.getTag() == BOT) {
             return ConstantDescs.NULL;
         }
@@ -149,10 +149,10 @@
             return null;
         }
 
-        return constant instanceof ConstantDesc ? (ConstantDesc<?>)constant : null;
+        return constant instanceof ConstantDesc ? (ConstantDesc)constant : null;
     }
 
-    private Object resolveConstantDesc(ConstantDesc<?> constantDesc) {
+    private Object resolveConstantDesc(ConstantDesc constantDesc) {
         try {
             return constantDesc.resolveConstantDesc(lookup);
         } catch (ReflectiveOperationException ex) {
@@ -201,7 +201,7 @@
             int allArgsSize = offset + argSize;
             JCExpression[] allArgs = new JCExpression[allArgsSize];
             ClassDesc[] argClassDescs = new ClassDesc[allArgsSize];
-            ConstantDesc<?>[] constantArgs = new ConstantDesc<?>[allArgsSize];
+            ConstantDesc[] constantArgs = new ConstantDesc[allArgsSize];
 
             if (!isStatic) {
                 JCExpression selected = meth.selected;
@@ -273,7 +273,7 @@
                 String bootstrapName = bootstrapMethod.methodName();
                 List<Object> staticArgs = List.nil();
 
-                for (ConstantDesc<?> constantDesc : callSite.bootstrapArgs()) {
+                for (ConstantDesc constantDesc : callSite.bootstrapArgs()) {
                     staticArgs = staticArgs.append(resolveConstantDesc(constantDesc));
                 }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/FormatterProcessorFactory.java	Thu Nov 01 20:25:34 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/FormatterProcessorFactory.java	Fri Nov 02 10:44:41 2018 -0300
@@ -121,7 +121,7 @@
                                     MethodTypeDesc methodType,
                                     boolean isStatic,
                                     ClassDesc[] argClassDescs,
-                                    ConstantDesc<?>[] constantArgs) {
+                                    ConstantDesc[] constantArgs) {
             // Don't bother in array vararg case.
             if (Intrinsics.isArrayVarArg(argClassDescs, methodType.parameterCount())) {
                 return new Result.None();
@@ -141,7 +141,7 @@
                 formatArg = 0;
             }
 
-            ConstantDesc<?> constantFormat = constantArgs[formatArg];
+            ConstantDesc constantFormat = constantArgs[formatArg];
 
             if (constantFormat == null) {
                 return new Result.None();
@@ -161,7 +161,7 @@
                             ),
                             methodName,
                             methodTypeLessFormat,
-                            new ConstantDesc<?>[]{constantFormat}),
+                            new ConstantDesc[]{constantFormat}),
                     Intrinsics.dropArg(argClassDescs.length, formatArg)
             );
         }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/HashProcessorFactory.java	Thu Nov 01 20:25:34 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/HashProcessorFactory.java	Fri Nov 02 10:44:41 2018 -0300
@@ -65,7 +65,7 @@
                                     MethodTypeDesc methodType,
                                     boolean isStatic,
                                     ClassDesc[] argClassDescs,
-                                    ConstantDesc<?>[] constantArgs) {
+                                    ConstantDesc[] constantArgs) {
             if (ClassDesc.of("java.util.Objects").equals(ownerDesc)) {
                 switch (methodName) {
                     case "hash":
@@ -88,7 +88,7 @@
                                             ),
                                             methodName,
                                             methodType,
-                                            new ConstantDesc<?>[0]),
+                                            new ConstantDesc[0]),
                                     argClassDescs.length
                             );
                         }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/IntrinsicProcessor.java	Thu Nov 01 20:25:34 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/IntrinsicProcessor.java	Fri Nov 02 10:44:41 2018 -0300
@@ -60,13 +60,13 @@
          *  deletion without notice.</b>
          */
         public class Ldc implements Result {
-            private final ConstantDesc<?> constant;
+            private final ConstantDesc constant;
 
             /**
              * <p><b>This is NOT part of any supported API.</b>
              * @param constant  constant value result
              */
-            public Ldc(ConstantDesc<?> constant) {
+            public Ldc(ConstantDesc constant) {
                 this.constant = constant;
             }
 
@@ -74,7 +74,7 @@
              * <p><b>This is NOT part of any supported API.</b>
              * @return constant result descriptor
              */
-            public ConstantDesc<?> constant() {
+            public ConstantDesc constant() {
                 return constant;
             }
         }
@@ -145,6 +145,6 @@
                                 MethodTypeDesc methodType,
                                 boolean isStatic,
                                 ClassDesc[] argClassDescs,
-                                ConstantDesc<?>[] constantArgs);
+                                ConstantDesc[] constantArgs);
 }
 
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/Intrinsics.java	Thu Nov 01 20:25:34 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/Intrinsics.java	Fri Nov 02 10:44:41 2018 -0300
@@ -116,14 +116,14 @@
 
     static Class<?> getClass(ClassDesc classDesc) {
         try {
-            return classDesc.resolveConstantDesc(LOOKUP);
+            return (Class<?>)classDesc.resolveConstantDesc(LOOKUP);
         } catch (ReflectiveOperationException ex) {
             // Fall thru
         }
         return null;
     }
 
-    static Object getConstant(ConstantDesc<?> constantDesc) {
+    static Object getConstant(ConstantDesc constantDesc) {
         try {
             return constantDesc.resolveConstantDesc(LOOKUP);
         } catch (ReflectiveOperationException ex) {
@@ -132,7 +132,7 @@
         return null;
     }
 
-    static Object getConstant(ClassDesc classDesc, ConstantDesc<?> constantDesc) {
+    static Object getConstant(ClassDesc classDesc, ConstantDesc constantDesc) {
         try {
             Object constant = constantDesc.resolveConstantDesc(LOOKUP);
             if (ConstantDescs.CD_boolean.equals(classDesc) ||
@@ -160,7 +160,7 @@
     }
 
     static Object[] getConstants(ClassDesc[] classDescs,
-                                 ConstantDesc<?>[] constantDescs,
+                                 ConstantDesc[] constantDescs,
                                  boolean skipReceiver) {
         int length = constantDescs.length;
         if (skipReceiver) {
@@ -179,11 +179,11 @@
     }
 
     static Object[] getConstants(ClassDesc[] classDescs,
-                                 ConstantDesc<?>[] constantDescs) {
+                                 ConstantDesc[] constantDescs) {
         return getConstants(classDescs, constantDescs, false);
     }
 
-    static boolean isAllConstants(ConstantDesc<?>[] constantDescs, boolean skipReceiver) {
+    static boolean isAllConstants(ConstantDesc[] constantDescs, boolean skipReceiver) {
         int length = constantDescs.length;
         for (int i = skipReceiver ? 1 : 0; i < length; i++) {
             if (constantDescs[i] == null) {
@@ -193,7 +193,7 @@
         return true;
     }
 
-    static boolean isAllConstants(ConstantDesc<?>[] constantDescs) {
+    static boolean isAllConstants(ConstantDesc[] constantDescs) {
         return isAllConstants(constantDescs, false);
     }
 
@@ -208,7 +208,7 @@
     }
 
     static boolean checkRegex(IntrinsicContext intrinsicContext,
-                              ConstantDesc<?>[] constantArgs,
+                              ConstantDesc[] constantArgs,
                               int arg) {
         if (constantArgs[arg] != null) {
             try {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/StringProcessorFactory.java	Thu Nov 01 20:25:34 2018 +0100
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/StringProcessorFactory.java	Fri Nov 02 10:44:41 2018 -0300
@@ -85,7 +85,7 @@
                                     MethodTypeDesc methodType,
                                     boolean isStatic,
                                     ClassDesc[] argClassDescs,
-                                    ConstantDesc<?>[] constantArgs) {
+                                    ConstantDesc[] constantArgs) {
             if (ClassDesc.of("java.lang.String").equals(ownerDesc)) {
                 // Compile time checks
                 switch (methodName) {