--- a/indy-6858164.patch Thu Nov 19 18:50:23 2009 +0100
+++ b/indy-6858164.patch Sun Nov 22 16:09:22 2009 -0800
@@ -1,7 +1,7 @@ 6858164: invokedynamic code needs some c
6858164: invokedynamic code needs some cleanup (post-6655638)
Note: The bug ID for this change set was erroneously used to call for review of 6815692.
Summary: Fix several crashers, remove needless paths for boxed-style bootstrap method call, refactor & simplify APIs for rewriter constantPoolOop, remove sun.dyn.CallSiteImpl
-Reviewed-by: ?
+Reviewed-by: kvn
diff --git a/src/cpu/sparc/vm/templateInterpreter_sparc.cpp b/src/cpu/sparc/vm/templateInterpreter_sparc.cpp
--- a/src/cpu/sparc/vm/templateInterpreter_sparc.cpp
@@ -366,7 +366,7 @@ diff --git a/src/share/vm/classfile/syst
tty->print_cr("Linked invokedynamic bci=%d site="INTPTR_FORMAT":", caller_bci, call_site_oop);
call_site_oop->print();
tty->cr();
-+#endif // PRODUCT
++#endif //PRODUCT
}
return call_site_oop;
}
--- a/indy-cleanup-6893081.patch Thu Nov 19 18:50:23 2009 +0100
+++ b/indy-cleanup-6893081.patch Sun Nov 22 16:09:22 2009 -0800
@@ -533,11 +533,11 @@ diff --git a/src/share/vm/code/pcDesc.hp
unsigned int reexecute: 1;
+ unsigned int is_method_handle_invoke: 1;
} bits;
+ bool operator ==(const PcDescFlags& other) { return word == other.word; }
} _flags;
-
@@ -64,6 +65,9 @@
- bool should_reexecute() const { return _flags.bits.reexecute; }
- void set_should_reexecute(bool z) { _flags.bits.reexecute = z; }
+ _flags == pd->_flags;
+ }
+ bool is_method_handle_invoke() const { return _flags.bits.is_method_handle_invoke; }
+ void set_is_method_handle_invoke(bool z) { _flags.bits.is_method_handle_invoke = z; }
--- a/indy.compiler.inline.patch Thu Nov 19 18:50:23 2009 +0100
+++ b/indy.compiler.inline.patch Sun Nov 22 16:09:22 2009 -0800
@@ -2633,7 +2633,7 @@ diff --git a/src/share/vm/prims/methodHa
+#endif
extern "C"
- void print_method_handle(oop mh) {
+ void print_method_handle(oopDesc* mh) {
if (java_dyn_MethodHandle::is_instance(mh)) {
- MethodHandlePrinter::print(mh);
+// MethodHandlePrinter::print(mh);
--- a/meth-6815692.patch Thu Nov 19 18:50:23 2009 +0100
+++ b/meth-6815692.patch Sun Nov 22 16:09:22 2009 -0800
@@ -1,7 +1,6 @@ 6815692: method handle code needs some c
6815692: method handle code needs some cleanup (post-6655638)
-Note: The initial call for review for this change set was under bug ID 6858164.
Summary: correctly raise exceptions, support safe bitwise "raw" conversions, fix bugs revealed by VerifyMethodHandles, remove dead code, improve debugging support
-Reviewed-by: ?
+Reviewed-by: never, twisti
diff --git a/src/cpu/x86/vm/methodHandles_x86.cpp b/src/cpu/x86/vm/methodHandles_x86.cpp
--- a/src/cpu/x86/vm/methodHandles_x86.cpp
@@ -20,7 +19,7 @@ diff --git a/src/cpu/x86/vm/methodHandle
+ printf("MH %s mh="INTPTR_FORMAT" sp=("INTPTR_FORMAT"+"INTX_FORMAT") stack_size="INTX_FORMAT" bp="INTPTR_FORMAT"\n",
+ adaptername, (intptr_t)mh, (intptr_t)entry_sp, (intptr_t)(saved_sp - entry_sp), (intptr_t)(base_sp - last_sp), (intptr_t)saved_bp);
+ if (last_sp != saved_sp)
-+ printf("*** last_sp="PTR_FORMAT"\n", last_sp);
++ printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t)last_sp);
}
#endif //PRODUCT
@@ -766,7 +765,12 @@ diff --git a/src/share/vm/prims/methodHa
template(sun_dyn_AdapterMethodHandle,OP_CHECK_CAST) \
template(sun_dyn_AdapterMethodHandle,OP_PRIM_TO_PRIM) \
template(sun_dyn_AdapterMethodHandle,OP_REF_TO_PRIM) \
-@@ -2349,6 +2414,8 @@
+@@ -2349,10 +2414,12 @@
+ // note: this explicit warning-producing stuff will be replaced by auto-detection of the JSR 292 classes
+
+ if (!EnableMethodHandles) {
+- warning("JSR 292 method handles are disabled in this JVM. Use -XX:+EnableMethodHandles to enable.");
++ warning("JSR 292 method handles are disabled in this JVM. Use -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles to enable.");
return; // bind nothing
}
@@ -775,7 +779,7 @@ diff --git a/src/share/vm/prims/methodHa
{
ThreadToNativeFromVM ttnfv(thread);
-@@ -2356,12 +2423,31 @@
+@@ -2356,14 +2423,33 @@
if (env->ExceptionOccurred()) {
MethodHandles::set_enabled(false);
warning("JSR 292 method handle code is mismatched to this JVM. Disabling support.");
@@ -807,8 +811,11 @@ diff --git a/src/share/vm/prims/methodHa
+ }
+
if (!EnableInvokeDynamic) {
- warning("JSR 292 invokedynamic is disabled in this JVM. Use -XX:+EnableInvokeDynamic to enable.");
+- warning("JSR 292 invokedynamic is disabled in this JVM. Use -XX:+EnableInvokeDynamic to enable.");
++ warning("JSR 292 invokedynamic is disabled in this JVM. Use -XX:+UnlockExperimentalVMOptions -XX:+EnableInvokeDynamic to enable.");
return; // bind nothing
+ }
+
diff --git a/src/share/vm/prims/methodHandles.hpp b/src/share/vm/prims/methodHandles.hpp
--- a/src/share/vm/prims/methodHandles.hpp
+++ b/src/share/vm/prims/methodHandles.hpp
--- a/meth.walker.patch Thu Nov 19 18:50:23 2009 +0100
+++ b/meth.walker.patch Sun Nov 22 16:09:22 2009 -0800
@@ -1,23 +1,18 @@ diff --git a/src/cpu/x86/vm/methodHandle
diff --git a/src/cpu/x86/vm/methodHandles_x86.cpp b/src/cpu/x86/vm/methodHandles_x86.cpp
--- a/src/cpu/x86/vm/methodHandles_x86.cpp
+++ b/src/cpu/x86/vm/methodHandles_x86.cpp
-@@ -268,8 +268,9 @@
+@@ -268,6 +268,7 @@
}
#ifndef PRODUCT
-+extern "C" void print_method_handle(oop mh);
++extern "C" void print_method_handle(oopDesc* mh);
void trace_method_handle_stub(const char* adaptername,
-- oopDesc* mh,
-+ oop mh,
+ oopDesc* mh,
intptr_t* entry_sp,
- intptr_t* saved_sp,
- intptr_t* saved_bp) {
-@@ -279,7 +280,8 @@
- printf("MH %s mh="INTPTR_FORMAT" sp=("INTPTR_FORMAT"+"INTX_FORMAT") stack_size="INTX_FORMAT" bp="INTPTR_FORMAT"\n",
+@@ -277,6 +278,7 @@
adaptername, (intptr_t)mh, (intptr_t)entry_sp, (intptr_t)(saved_sp - entry_sp), (intptr_t)(base_sp - last_sp), (intptr_t)saved_bp);
if (last_sp != saved_sp)
-- printf("*** last_sp="PTR_FORMAT"\n", last_sp);
-+ printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t) last_sp);
+ printf("*** last_sp="INTPTR_FORMAT"\n", (intptr_t)last_sp);
+ if (Verbose) print_method_handle(mh);
}
#endif //PRODUCT
@@ -278,7 +273,7 @@ diff --git a/src/share/vm/includeDB_core
diff --git a/src/share/vm/includeDB_core b/src/share/vm/includeDB_core
--- a/src/share/vm/includeDB_core
+++ b/src/share/vm/includeDB_core
-@@ -2813,6 +2813,10 @@
+@@ -2812,6 +2812,10 @@
methodDataOop.hpp orderAccess.hpp
methodDataOop.hpp universe.hpp
@@ -1084,7 +1079,7 @@ new file mode 100644
+};
+
+extern "C"
-+void print_method_handle(oop mh) {
++void print_method_handle(oopDesc* mh) {
+ if (java_dyn_MethodHandle::is_instance(mh)) {
+ MethodHandlePrinter::print(mh);
+ } else {
--- a/series Thu Nov 19 18:50:23 2009 +0100
+++ b/series Sun Nov 22 16:09:22 2009 -0800
@@ -1,16 +1,16 @@
-# base = f1cb99ee0838 in http://hg.openjdk.java.net/bsd-port/bsd-port/hotspot [2009-10-18]
+# base = d6e9dd8952b4 in http://hg.openjdk.java.net/bsd-port/bsd-port/hotspot [2009-11-17]
# Let's try using bsd-port as a patch base, since it works with all of Solaris, Linux, Windows, Mac/BSD.
-snowleopard.patch #-/snowleopard #+f1cb99ee0838
-meth-6815692.patch #-/meth #+f1cb99ee0838
-indy-6858164.patch #-/indy #+f1cb99ee0838
-indy-amd64.patch #-/indy #+f1cb99ee0838
-meth.walker.patch #-/meth #+f1cb99ee0838
-indy-cleanup-6893081.patch #-/indy #+f1cb99ee0838
-indy.compiler.patch #-/indy #+f1cb99ee0838
-indy.compiler.inline.patch #-/indy #+f1cb99ee0838 #-testable
-dynopt.patch #-/dynopt #+f1cb99ee0838 #-buildable
-indy-sparc.patch #-/indy #+f1cb99ee0838 #-buildable
+snowleopard.patch #-/snowleopard #+gcc42
+#empty meth.patch #-/meth #+d6e9dd8952b4
+indy-6858164.patch #-/indy #+d6e9dd8952b4
+indy-amd64.patch #-/indy #+d6e9dd8952b4
+meth.walker.patch #-/meth #+d6e9dd8952b4
+indy-cleanup-6893081.patch #-/indy #+d6e9dd8952b4
+indy.compiler.patch #-/indy #+d6e9dd8952b4
+indy.compiler.inline.patch #-/indy #+d6e9dd8952b4 #-testable
+dynopt.patch #-/dynopt #+d6e9dd8952b4 #-buildable
+indy-sparc.patch #-/indy #+d6e9dd8952b4 #-buildable
meth.proj.patch #-/meth #+projects
anonk.proj.patch #-/anonk #+projects
@@ -18,7 +18,7 @@ anonk.proj.patch #-/anonk
# Keep these separate, for debugging and review:
annot.patch #+annot #-/annot #+d1605aabd0a1 #+jdk7-b30 #-testable
inti.patch #+inti #-/inti #+d1605aabd0a1 #+jdk7-b30 #-buildable
-callcc.patch #+callcc #+/meth #+/indy #-/callcc #+f1cb99ee0838 #-testable
+callcc.patch #+callcc #+/meth #+/indy #-/callcc #+d6e9dd8952b4 #-testable
tailc.patch #+tailc-lazy #-/tailc #-tailc-eager
tailc-eager.patch #+tailc-lazy #-/tailc #-tailc-lazy
hotswap.patch #+hotswap #-/hotswap
--- a/snowleopard.patch Thu Nov 19 18:50:23 2009 +0100
+++ b/snowleopard.patch Sun Nov 22 16:09:22 2009 -0800
@@ -2,30 +2,6 @@ Note that GCC 4.2 builds (x86_32) crash
Note that GCC 4.2 builds (x86_32) crash quickly, at least on Mac.
Build on affected systems with these settings: CC=gcc-4.0 CXX=g++-4.0
-diff --git a/src/cpu/x86/vm/methodHandles_x86.cpp b/src/cpu/x86/vm/methodHandles_x86.cpp
---- a/src/cpu/x86/vm/methodHandles_x86.cpp
-+++ b/src/cpu/x86/vm/methodHandles_x86.cpp
-@@ -273,7 +273,7 @@
- intptr_t* entry_sp,
- intptr_t* saved_sp) {
- // called as a leaf from native code: do not block the JVM!
-- printf("MH %s "PTR_FORMAT" "PTR_FORMAT" "INTX_FORMAT"\n", adaptername, (void*)mh, entry_sp, entry_sp - saved_sp);
-+ printf("MH %s "INTPTR_FORMAT" "INTPTR_FORMAT" "INTX_FORMAT"\n", adaptername, (intptr_t)mh, (intptr_t)entry_sp, (intptr_t)(entry_sp - saved_sp));
- }
- #endif //PRODUCT
-
-diff --git a/src/share/vm/classfile/javaClasses.cpp b/src/share/vm/classfile/javaClasses.cpp
---- a/src/share/vm/classfile/javaClasses.cpp
-+++ b/src/share/vm/classfile/javaClasses.cpp
-@@ -952,7 +952,7 @@
- }
- nmethod* nm = method->code();
- if (WizardMode && nm != NULL) {
-- sprintf(buf + (int)strlen(buf), "(nmethod " PTR_FORMAT ")", (intptr_t)nm);
-+ sprintf(buf + (int)strlen(buf), "(nmethod " INTPTR_FORMAT ")", (intptr_t)nm);
- }
- }
-
diff --git a/src/share/vm/utilities/globalDefinitions.hpp b/src/share/vm/utilities/globalDefinitions.hpp
--- a/src/share/vm/utilities/globalDefinitions.hpp
+++ b/src/share/vm/utilities/globalDefinitions.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/meth.patch Sun Nov 22 16:09:22 2009 -0800
@@ -0,0 +1,1 @@
+# Changes to method handles after 6815692 are entrained here.