meth: rebase to bsd-port
authorjrose
Thu Mar 26 19:53:37 2009 -0500 (8 months ago)
changeset 157bb498e01708
parent 14023ca8953eeb
child 164486528f198b
meth: rebase to bsd-port
meth.patch
meth.txt
series
--- a/meth.patch Thu Mar 26 19:52:01 2009 -0500
+++ b/meth.patch Thu Mar 26 19:53:37 2009 -0500
@@ -1,4 +1,5 @@ 6754038: writing libraries in Java for n
6754038: writing libraries in Java for non-Java languages requires method handle invocation
+MQ base = 80586310cc78 in http://hg.openjdk.java.net/bsd-port/bsd-port/langtools [2009-03-12]
diff --git a/src/share/classes/com/sun/tools/classfile/OpCodes.java b/src/share/classes/com/sun/tools/classfile/OpCodes.java
--- a/src/share/classes/com/sun/tools/classfile/OpCodes.java
@@ -131,17 +132,16 @@ diff --git a/src/share/classes/com/sun/t
Name methName = TreeInfo.name(tree.meth);
-@@ -1281,7 +1295,8 @@
+@@ -1281,7 +1295,7 @@
// Otherwise, we are seeing a regular method call.
// Attribute the arguments, yielding list of argument types, ...
argtypes = attribArgs(tree.args, localEnv);
- typeargtypes = attribTypes(tree.typeargs, localEnv);
+ typeargtypes = attribAnyTypes(tree.typeargs, localEnv);
-+ boolean nonRefsOK = false;
// ... and attribute the method using as a prototype a methodtype
// whose formal argument types is exactly the list of actual
-@@ -1318,6 +1333,20 @@
+@@ -1318,6 +1332,20 @@
restype.tsym);
}
@@ -162,7 +162,7 @@ diff --git a/src/share/classes/com/sun/t
// Check that value of resulting type is admissible in the
// current context. Also, capture the return type
result = check(tree, capture(restype), VAL, pkind, pt);
-@@ -1921,7 +1950,8 @@
+@@ -1928,7 +1956,8 @@
// Check if type-qualified fields or methods are static (JLS)
if ((sym.flags() & STATIC) == 0 &&
sym.name != names._super &&
@@ -495,7 +495,7 @@ diff --git a/src/share/classes/com/sun/t
diff --git a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
--- a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
+++ b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
-@@ -1027,7 +1027,13 @@
+@@ -1034,7 +1034,13 @@
return illegal(pos);
}
} else {
--- a/meth.txt Thu Mar 26 19:52:01 2009 -0500
+++ b/meth.txt Thu Mar 26 19:53:37 2009 -0500
@@ -6,10 +6,12 @@ http://bugs.sun.com/bugdatabase/view_bug
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6754038
Features:
-- the method java.dyn.MethodHandle.invoke(AAA)Object exists, even if not explicitly found
-- the static method java.dyn.Dynamic.zzz(AAA)Object always exists, even if not explicitly found
+- the method java.dyn.MethodHandle.<T>invoke(AAA)T exists, even if not explicitly found
+- the static method java.dyn.Dynamic.<T>zzz(AAA)T always exists, even if not explicitly found
+- the return type parameter <T> may be a primitive type or void
+- the return type parameter <T> may be omitted and defaults to Object
- the signature of the implicit method is obtained by erasing actual argument types
-- null arguments are treated as of Object type
+- null arguments are treated as of type java.lang.Void (which can only be a null reference)
- no implicit conversions are performed on these calls; use a cast if you want conversion
Examples from the unit test:
@@ -41,7 +43,7 @@ The syntax for the receiverless formulat
// or (in a later JVM version) invokedynamic greet(String,String,int)void
Notes & Status:
-- The syntax for invokedyanmic is receiverless; the signature describes all stacked args.
+- The syntax for invokedynamic is receiverless; the signature describes all stacked args.
- For -target 7, the instruction uses a new code point (186) and is formatted like invokeinterface.
- The flag -XDinvokedynamic also enables the new instruction, without otherwise changing the target.
@@ -62,11 +64,12 @@ This does not require a full JDK build.
$ (cd make; make)
$ mkdir ./dist/cp1
-$ PATH=$JAVA6_HOME/bin:$PATH ./dist/bin/javac -d dist -target 7 test/tools/javac/meth/Invoke{Dyn,MH}.java
-$ PATH=$JAVA6_HOME/bin:$PATH ./dist/bin/javap -c -classpath dist/cp1 meth.Invoke{Dyn,MH} # observe call sites
+$ ./dist/bin/javac -d dist/cp1 -target 7 test/tools/javac/meth/Invoke{Dyn,MH}.java
+$ ./dist/bin/javap -c -classpath dist/cp1 meth.Invoke{Dyn,MH} # observe call sites
+
+(Note: Your $PATH may need to include a $JAVA_HOME for Java 6.)
---- Using NetBeans ----
-Apply gibbons.patch and follow the instructions in gibbons.txt, etc.
(Assuming a link farm folder at ~/env/.)
$ ln -s <some copy of jtreg> ~/env/JTREG_HOME
--- a/series Thu Mar 26 19:52:01 2009 -0500
+++ b/series Thu Mar 26 19:53:37 2009 -0500
@@ -1,4 +1,4 @@
-# base = 05b47447cbcf in http://hg.openjdk.java.net/jdk7/hotspot/langtools
-gibbons.patch #-/gibbons #+05b47447cbcf # see gibbons.txt, http://mail.openjdk.java.net/pipermail/compiler-dev/2008-December/000808.html
-quid.patch #-/quid #+05b47447cbcf #+jdk7-b43
-meth.patch #-/meth #+05b47447cbcf #+jdk7-b43
+# base = 80586310cc78 in http://hg.openjdk.java.net/bsd-port/bsd-port/langtools [2009-03-12]
+quid.patch #-/quid #+80586310cc78 #+jdk7-b50
+meth.patch #-/meth #+80586310cc78 #+jdk7-b50
+dyncast.patch #-/dyncast #+80586310cc78 #+jdk7-b50