meth, indy: fix buglets; add indy.compiler.patch to series with -testable
authorjrose
Fri Jun 19 21:32:37 2009 -0700 (5 months ago)
changeset 539de72da6d165
parent 52aeb8308e7dfe
child 5496e4f21a8673
meth, indy: fix buglets; add indy.compiler.patch to series with -testable
indy.patch
meth.patch
series
--- a/indy.patch Wed Jun 17 15:24:43 2009 +0200
+++ b/indy.patch Fri Jun 19 21:32:37 2009 -0700
@@ -77,26 +77,3 @@ diff --git a/src/share/vm/oops/generateO
// Parse method signature
CellTypeState out[4];
-diff --git a/src/share/vm/prims/methodHandles.cpp b/src/share/vm/prims/methodHandles.cpp
---- a/src/share/vm/prims/methodHandles.cpp
-+++ b/src/share/vm/prims/methodHandles.cpp
-@@ -157,7 +157,8 @@
- }
-
- methodOop MethodHandles::decode_BoundMethodHandle(oop mh, klassOop& receiver_limit_result, int& decode_flags_result) {
-- assert(mh->klass() == SystemDictionary::BoundMethodHandle_klass(), "");
-+ assert(sun_dyn_BoundMethodHandle::is_instance(mh), "");
-+ assert(mh->klass() != SystemDictionary::AdapterMethodHandle_klass(), "");
- for (oop bmh = mh;;) {
- // Bound MHs can be stacked to bind several arguments.
- oop target = java_dyn_MethodHandle::vmtarget(bmh);
-@@ -214,6 +215,9 @@
- return decode_BoundMethodHandle(mh, receiver_limit_result, decode_flags_result);
- } else if (mhk == SystemDictionary::AdapterMethodHandle_klass()) {
- return decode_AdapterMethodHandle(mh, receiver_limit_result, decode_flags_result);
-+ } else if (sun_dyn_BoundMethodHandle::is_subclass(mhk)) {
-+ // could be a JavaMethodHandle (but not an adapter MH)
-+ return decode_BoundMethodHandle(mh, receiver_limit_result, decode_flags_result);
- } else {
- assert(false, "cannot parse this MH");
- return NULL; // random MH?
--- a/meth.patch Wed Jun 17 15:24:43 2009 +0200
+++ b/meth.patch Fri Jun 19 21:32:37 2009 -0700
@@ -3,7 +3,7 @@ diff --git a/src/share/vm/interpreter/te
diff --git a/src/share/vm/interpreter/templateInterpreter.hpp b/src/share/vm/interpreter/templateInterpreter.hpp
--- a/src/share/vm/interpreter/templateInterpreter.hpp
+++ b/src/share/vm/interpreter/templateInterpreter.hpp
-@@ -139,6 +139,7 @@
+@@ -141,6 +141,7 @@
static address remove_activation_entry() { return _remove_activation_entry; }
static address throw_exception_entry() { return _throw_exception_entry; }
static address throw_ArithmeticException_entry() { return _throw_ArithmeticException_entry; }
@@ -11,3 +11,73 @@ diff --git a/src/share/vm/interpreter/te
static address throw_WrongMethodType_entry() { return _throw_WrongMethodType_entry; }
static address throw_NullPointerException_entry() { return _throw_NullPointerException_entry; }
static address throw_StackOverflowError_entry() { return _throw_StackOverflowError_entry; }
+diff --git a/src/share/vm/oops/klass.cpp b/src/share/vm/oops/klass.cpp
+--- a/src/share/vm/oops/klass.cpp
++++ b/src/share/vm/oops/klass.cpp
+@@ -496,11 +496,13 @@
+ return result;
+ }
+ }
++ if (name() == NULL) return "<unknown>";
+ return name()->as_klass_external_name();
+ }
+
+
+ char* Klass::signature_name() const {
++ if (name() == NULL) return "<unknown>";
+ return name()->as_C_string();
+ }
+
+diff --git a/src/share/vm/prims/methodHandles.cpp b/src/share/vm/prims/methodHandles.cpp
+--- a/src/share/vm/prims/methodHandles.cpp
++++ b/src/share/vm/prims/methodHandles.cpp
+@@ -157,7 +157,8 @@
+ }
+
+ methodOop MethodHandles::decode_BoundMethodHandle(oop mh, klassOop& receiver_limit_result, int& decode_flags_result) {
+- assert(mh->klass() == SystemDictionary::BoundMethodHandle_klass(), "");
++ assert(sun_dyn_BoundMethodHandle::is_instance(mh), "");
++ assert(mh->klass() != SystemDictionary::AdapterMethodHandle_klass(), "");
+ for (oop bmh = mh;;) {
+ // Bound MHs can be stacked to bind several arguments.
+ oop target = java_dyn_MethodHandle::vmtarget(bmh);
+@@ -214,6 +215,9 @@
+ return decode_BoundMethodHandle(mh, receiver_limit_result, decode_flags_result);
+ } else if (mhk == SystemDictionary::AdapterMethodHandle_klass()) {
+ return decode_AdapterMethodHandle(mh, receiver_limit_result, decode_flags_result);
++ } else if (sun_dyn_BoundMethodHandle::is_subclass(mhk)) {
++ // could be a JavaMethodHandle (but not an adapter MH)
++ return decode_BoundMethodHandle(mh, receiver_limit_result, decode_flags_result);
+ } else {
+ assert(false, "cannot parse this MH");
+ return NULL; // random MH?
+@@ -2133,7 +2137,7 @@
+ guarantee(MethodHandlePushLimit >= 2 && MethodHandlePushLimit <= 0xFF,
+ "MethodHandlePushLimit parameter must be in valid range");
+ return MethodHandlePushLimit;
+- case MethodHandles::GC_JVM_STACK_MOVE_LIMIT:
++ case MethodHandles::GC_JVM_STACK_MOVE_UNIT:
+ // return number of words per slot, signed according to stack direction
+ return MethodHandles::stack_move_unit();
+ }
+@@ -2144,7 +2148,7 @@
+ #ifndef PRODUCT
+ #define EACH_NAMED_CON(template) \
+ template(MethodHandles,GC_JVM_PUSH_LIMIT) \
+- template(MethodHandles,GC_JVM_STACK_MOVE_LIMIT) \
++ template(MethodHandles,GC_JVM_STACK_MOVE_UNIT) \
+ template(MethodHandles,ETF_HANDLE_OR_METHOD_NAME) \
+ template(MethodHandles,ETF_DIRECT_HANDLE) \
+ template(MethodHandles,ETF_METHOD_NAME) \
+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
+@@ -243,7 +243,7 @@
+ enum {
+ // format of query to getConstant:
+ GC_JVM_PUSH_LIMIT = 0,
+- GC_JVM_STACK_MOVE_LIMIT = 1,
++ GC_JVM_STACK_MOVE_UNIT = 1,
+
+ // format of result from getTarget / encode_target:
+ ETF_HANDLE_OR_METHOD_NAME = 0, // all available data (immediate MH or method)
--- a/series Wed Jun 17 15:24:43 2009 +0200
+++ b/series Fri Jun 19 21:32:37 2009 -0700
@@ -3,6 +3,7 @@
meth.patch #-/meth #+f658ac06fb8e
indy.patch #-/indy #+f658ac06fb8e
+indy.compiler.patch #-/indy #+f658ac06fb8e #-testable
indy-amd64.patch #-/indy #+f658ac06fb8e #-buildable
indy-sparc.patch #-/indy #+f658ac06fb8e #-buildable