7028405: (javac) remove unused JSR-292 code
authorksrini
Sun, 03 Apr 2011 17:00:50 -0700
changeset 9082 53409a3a93f8
parent 9081 282d5ac0914e
child 9083 63f3c4d2d992
child 9084 0e6af03b5c9e
7028405: (javac) remove unused JSR-292 code Reviewed-by: jrose, mcimadamore
langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
langtools/src/share/classes/com/sun/tools/javac/util/Names.java
langtools/test/tools/javac/meth/InvokeMH.java
langtools/test/tools/javac/meth/TestCP.java
langtools/test/tools/javac/meth/XlintWarn.java
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java	Fri Apr 01 10:17:56 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java	Sun Apr 03 17:00:50 2011 -0700
@@ -125,9 +125,7 @@
     public final Type stringBuilderType;
     public final Type cloneableType;
     public final Type serializableType;
-    public final Type transientMethodHandleType; // transient - 292
     public final Type methodHandleType;
-    public final Type transientPolymorphicSignatureType; // transient - 292
     public final Type polymorphicSignatureType;
     public final Type throwableType;
     public final Type errorType;
@@ -436,9 +434,7 @@
         cloneableType = enterClass("java.lang.Cloneable");
         throwableType = enterClass("java.lang.Throwable");
         serializableType = enterClass("java.io.Serializable");
-        transientMethodHandleType = enterClass("java.dyn.MethodHandle"); // transient - 292
         methodHandleType = enterClass("java.lang.invoke.MethodHandle");
-        transientPolymorphicSignatureType = enterClass("java.dyn.MethodHandle$PolymorphicSignature"); // transient - 292
         polymorphicSignatureType = enterClass("java.lang.invoke.MethodHandle$PolymorphicSignature");
         errorType = enterClass("java.lang.Error");
         illegalArgumentExceptionType = enterClass("java.lang.IllegalArgumentException");
@@ -485,7 +481,6 @@
         synthesizeEmptyInterfaceIfMissing(autoCloseableType);
         synthesizeEmptyInterfaceIfMissing(cloneableType);
         synthesizeEmptyInterfaceIfMissing(serializableType);
-        synthesizeEmptyInterfaceIfMissing(transientPolymorphicSignatureType); // transient - 292
         synthesizeEmptyInterfaceIfMissing(polymorphicSignatureType);
         synthesizeBoxTypeIfMissing(doubleType);
         synthesizeBoxTypeIfMissing(floatType);
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Apr 01 10:17:56 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Sun Apr 03 17:00:50 2011 -0700
@@ -788,8 +788,7 @@
             // Internally to java.lang.invoke, a @PolymorphicSignature annotation
             // acts like a classfile attribute.
             if (!c.type.isErroneous() &&
-                    (types.isSameType(c.type, syms.polymorphicSignatureType) ||
-                     types.isSameType(c.type, syms.transientPolymorphicSignatureType))) {
+                types.isSameType(c.type, syms.polymorphicSignatureType)) {
                 if (!target.hasMethodHandles()) {
                     // Somebody is compiling JDK7 source code to a JDK6 target.
                     // Make it an error, since it is unlikely but important.
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Fri Apr 01 10:17:56 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Sun Apr 03 17:00:50 2011 -0700
@@ -1321,8 +1321,7 @@
                 else
                     proxies.append(proxy);
                 if (majorVersion >= V51.major &&
-                        (proxy.type.tsym == syms.polymorphicSignatureType.tsym ||
-                         proxy.type.tsym == syms.transientPolymorphicSignatureType.tsym)) {
+                    proxy.type.tsym == syms.polymorphicSignatureType.tsym) {
                     sym.flags_field |= POLYMORPHIC_SIGNATURE;
                 }
             }
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Names.java	Fri Apr 01 10:17:56 2011 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Names.java	Sun Apr 03 17:00:50 2011 -0700
@@ -73,7 +73,6 @@
     public final Name java_io_Serializable;
     public final Name serialVersionUID;
     public final Name java_lang_Enum;
-    public final Name transient_java_dyn_MethodHandle; // transient - 292
     public final Name java_lang_invoke_MethodHandle;
     public final Name package_info;
     public final Name ConstantValue;
@@ -184,7 +183,6 @@
         java_lang_Cloneable = fromString("java.lang.Cloneable");
         java_io_Serializable = fromString("java.io.Serializable");
         java_lang_Enum = fromString("java.lang.Enum");
-        transient_java_dyn_MethodHandle = fromString("java.dyn.MethodHandle"); //transient - 292
         java_lang_invoke_MethodHandle = fromString("java.lang.invoke.MethodHandle");
         package_info = fromString("package-info");
         serialVersionUID = fromString("serialVersionUID");
--- a/langtools/test/tools/javac/meth/InvokeMH.java	Fri Apr 01 10:17:56 2011 -0700
+++ b/langtools/test/tools/javac/meth/InvokeMH.java	Sun Apr 03 17:00:50 2011 -0700
@@ -42,7 +42,7 @@
 
 package meth;
 
-import java.dyn.MethodHandle;
+import java.lang.invoke.MethodHandle;
 
 public class InvokeMH {
     void test(MethodHandle mh_SiO,
--- a/langtools/test/tools/javac/meth/TestCP.java	Fri Apr 01 10:17:56 2011 -0700
+++ b/langtools/test/tools/javac/meth/TestCP.java	Sun Apr 03 17:00:50 2011 -0700
@@ -35,7 +35,7 @@
 import com.sun.tools.classfile.ConstantPool.*;
 import com.sun.tools.classfile.Method;
 
-import java.dyn.*;
+import java.lang.invoke.*;
 import java.io.*;
 
 public class TestCP {
--- a/langtools/test/tools/javac/meth/XlintWarn.java	Fri Apr 01 10:17:56 2011 -0700
+++ b/langtools/test/tools/javac/meth/XlintWarn.java	Sun Apr 03 17:00:50 2011 -0700
@@ -30,7 +30,7 @@
  * @compile -Werror -Xlint:cast XlintWarn.java
  */
 
-import java.dyn.*;
+import java.lang.invoke.*;
 
 class XlintWarn {
     void test(MethodHandle mh) throws Throwable {