changeset 77:5daab1a9961d

rebase to jdk7-b132 in bsd-port
author jrose
date Mon, 21 Mar 2011 10:07:24 -0700
parents d856f668f901
children 300ab8eafd59
files indy-notrans-6981791.patch meth-7017414.patch series
diffstat 3 files changed, 228 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/indy-notrans-6981791.patch	Mon Mar 21 10:07:24 2011 -0700
@@ -0,0 +1,115 @@
+6981791: remove experimental code for JSR 292
+Reviewed-by: ?
+
+diff --git a/src/share/classes/com/sun/tools/javac/code/Symtab.java b/src/share/classes/com/sun/tools/javac/code/Symtab.java
+--- a/src/share/classes/com/sun/tools/javac/code/Symtab.java
++++ b/src/share/classes/com/sun/tools/javac/code/Symtab.java
+@@ -123,9 +123,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;
+@@ -419,9 +417,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");
+@@ -466,7 +462,6 @@
+ 
+         synthesizeEmptyInterfaceIfMissing(cloneableType);
+         synthesizeEmptyInterfaceIfMissing(serializableType);
+-        synthesizeEmptyInterfaceIfMissing(transientPolymorphicSignatureType); // transient - 292
+         synthesizeEmptyInterfaceIfMissing(polymorphicSignatureType);
+         synthesizeBoxTypeIfMissing(doubleType);
+         synthesizeBoxTypeIfMissing(floatType);
+diff --git a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
+--- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
++++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
+@@ -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.
+diff --git a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
+--- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
++++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
+@@ -1318,8 +1318,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;
+                 }
+             }
+diff --git a/src/share/classes/com/sun/tools/javac/util/Names.java b/src/share/classes/com/sun/tools/javac/util/Names.java
+--- a/src/share/classes/com/sun/tools/javac/util/Names.java
++++ b/src/share/classes/com/sun/tools/javac/util/Names.java
+@@ -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");
+diff --git a/test/tools/javac/meth/InvokeMH.java b/test/tools/javac/meth/InvokeMH.java
+--- a/test/tools/javac/meth/InvokeMH.java
++++ b/test/tools/javac/meth/InvokeMH.java
+@@ -42,7 +42,7 @@
+ 
+ package meth;
+ 
+-import java.dyn.MethodHandle;
++import java.lang.invoke.MethodHandle;
+ 
+ public class InvokeMH {
+     void test(MethodHandle mh_SiO,
+diff --git a/test/tools/javac/meth/TestCP.java b/test/tools/javac/meth/TestCP.java
+--- a/test/tools/javac/meth/TestCP.java
++++ b/test/tools/javac/meth/TestCP.java
+@@ -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 {
+diff --git a/test/tools/javac/meth/XlintWarn.java b/test/tools/javac/meth/XlintWarn.java
+--- a/test/tools/javac/meth/XlintWarn.java
++++ b/test/tools/javac/meth/XlintWarn.java
+@@ -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 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/meth-7017414.patch	Mon Mar 21 10:07:24 2011 -0700
@@ -0,0 +1,104 @@
+7017414: before the move of JSR 292 to package java.lang.invoke, javac must recognize the new package
+Summary: added support for future 292 package (support for old location 'java.dyn' will be removed in followup changeset)
+Reviewed-by: jjg
+(Modified for mlvm.)
+
+--- a/src/share/classes/com/sun/tools/javac/code/Flags.java	Fri Feb 04 17:30:28 2011 -0800
++++ b/src/share/classes/com/sun/tools/javac/code/Flags.java	Mon Feb 07 18:09:46 2011 +0000
+@@ -237,7 +237,7 @@ public class Flags {
+ 
+     /**
+      * Flag that marks a signature-polymorphic invoke method.
+-     * (These occur inside java.dyn.MethodHandle.)
++     * (These occur inside java.lang.invoke.MethodHandle.)
+      */
+     public static final long POLYMORPHIC_SIGNATURE = 1L<<40;
+ 
+--- a/src/share/classes/com/sun/tools/javac/code/Symtab.java	Fri Feb 04 17:30:28 2011 -0800
++++ b/src/share/classes/com/sun/tools/javac/code/Symtab.java	Mon Feb 07 18:09:46 2011 +0000
+@@ -124,7 +124,9 @@ public class Symtab {
+     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 invokeDynamicType;
+     public final Type throwableType;
+@@ -419,8 +421,10 @@ public class Symtab {
+         cloneableType = enterClass("java.lang.Cloneable");
+         throwableType = enterClass("java.lang.Throwable");
+         serializableType = enterClass("java.io.Serializable");
+-        methodHandleType = enterClass("java.dyn.MethodHandle");
+-        polymorphicSignatureType = enterClass("java.dyn.MethodHandle$PolymorphicSignature");
++        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");
+         invokeDynamicType = enterClass("java.dyn.InvokeDynamic");
+         errorType = enterClass("java.lang.Error");
+         illegalArgumentExceptionType = enterClass("java.lang.IllegalArgumentException");
+@@ -464,6 +468,7 @@ public class Symtab {
+ 
+         synthesizeEmptyInterfaceIfMissing(cloneableType);
+         synthesizeEmptyInterfaceIfMissing(serializableType);
++        synthesizeEmptyInterfaceIfMissing(transientPolymorphicSignatureType); // transient - 292
+         synthesizeEmptyInterfaceIfMissing(polymorphicSignatureType);
+         synthesizeBoxTypeIfMissing(doubleType);
+         synthesizeBoxTypeIfMissing(floatType);
+
+--- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Fri Feb 04 17:30:28 2011 -0800
++++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Mon Feb 07 18:09:46 2011 +0000
+@@ -787,10 +787,11 @@ public class MemberEnter extends JCTree.
+                 && s.owner.kind != MTH
+                 && types.isSameType(c.type, syms.deprecatedType))
+                 s.flags_field |= Flags.DEPRECATED;
+-            // Internally to java.dyn, a @PolymorphicSignature annotation
++            // 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.polymorphicSignatureType) ||
++                     types.isSameType(c.type, syms.transientPolymorphicSignatureType))) {
+                 if (!target.hasMethodHandles()) {
+                     // Somebody is compiling JDK7 source code to a JDK6 target.
+                     // Make it a strict warning, since it is unlikely but important.
+
+--- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Fri Feb 04 17:30:28 2011 -0800
++++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Mon Feb 07 18:09:46 2011 +0000
+@@ -1321,7 +1321,9 @@ public class ClassReader implements Comp
+                     sym.flags_field |= PROPRIETARY;
+                 else
+                     proxies.append(proxy);
+-                if (majorVersion >= V51.major && proxy.type.tsym == syms.polymorphicSignatureType.tsym) {
++                if (majorVersion >= V51.major &&
++                        (proxy.type.tsym == syms.polymorphicSignatureType.tsym ||
++                         proxy.type.tsym == syms.transientPolymorphicSignatureType.tsym)) {
+                     sym.flags_field |= POLYMORPHIC_SIGNATURE;
+                 }
+             }
+
+--- a/src/share/classes/com/sun/tools/javac/util/Names.java	Fri Feb 04 17:30:28 2011 -0800
++++ b/src/share/classes/com/sun/tools/javac/util/Names.java	Mon Feb 07 18:09:46 2011 +0000
+@@ -73,7 +73,8 @@ public class Names {
+     public final Name java_io_Serializable;
+     public final Name serialVersionUID;
+     public final Name java_lang_Enum;
+-    public final Name java_dyn_MethodHandle;
++    public final Name transient_java_dyn_MethodHandle; // transient - 292
++    public final Name java_lang_invoke_MethodHandle;
+     public final Name java_dyn_InvokeDynamic;
+     public final Name package_info;
+     public final Name ConstantValue;
+@@ -183,7 +184,8 @@ public class Names {
+         java_lang_Cloneable = fromString("java.lang.Cloneable");
+         java_io_Serializable = fromString("java.io.Serializable");
+         java_lang_Enum = fromString("java.lang.Enum");
+-        java_dyn_MethodHandle = fromString("java.dyn.MethodHandle");
++        transient_java_dyn_MethodHandle = fromString("java.dyn.MethodHandle"); //transient - 292
++        java_lang_invoke_MethodHandle = fromString("java.lang.invoke.MethodHandle");
+         java_dyn_InvokeDynamic = fromString("java.dyn.InvokeDynamic");
+         package_info = fromString("package-info");
+         serialVersionUID = fromString("serialVersionUID");
+
--- a/series	Mon Jan 24 19:42:45 2011 -0800
+++ b/series	Mon Mar 21 10:07:24 2011 -0700
@@ -1,18 +1,20 @@
-# base = 51940d36817b in http://hg.openjdk.java.net/bsd-port/bsd-port/langtools [2011-01-22]
+# base = 30197f7ab94c in http://hg.openjdk.java.net/bsd-port/bsd-port/langtools [2011-01-22]
 
 compile-error-tweak.patch       #+compile-error-tweak
 netbeans-project.patch          #+netbeans-project
 dump-stack-on-error.patch       #+dump-stack-on-error
 
 # pushed to jdk7/hotspot-comp; will be deleted when they get to bsd-port:
+#(none)
 
 # non-pushed files are under review or development, or merely experimental:
-meth.patch                      #-/meth #+51940d36817b
-indy-bsm-6964498.patch          #-/meth #+51940d36817b #-/experimental #-testable
-indy-args-6984311.patch         #-/indy #+51940d36817b #-/experimental #-testable
-meth-ldc-6939203.patch          #-/meth #+51940d36817b #-/experimental #-testable
-meth-ver-6949040.patch          #-/meth #+51940d36817b #-testable
-meth-anno.patch                 #-/meth #+51940d36817b #-/experimental #-testable
+meth.patch                      #-/meth #+30197f7ab94c
+indy-notrans-6981791.patch      #-/meth #+30197f7ab94c
+indy-bsm-6964498.patch          #-/meth #+30197f7ab94c #-/experimental #-testable
+indy-args-6984311.patch         #-/indy #+30197f7ab94c #-/experimental #-testable
+meth-ldc-6939203.patch          #-/meth #+30197f7ab94c #-/experimental #-testable
+meth-ver-6949040.patch          #-/meth #+30197f7ab94c #-testable
+meth-anno.patch                 #-/meth #+30197f7ab94c #-/experimental #-testable
 
 # Keep these separate, for debugging and review:
 dyncast.patch   #+dyncast       #-/dyncast