aboutsummaryrefslogtreecommitdiffstats
path: root/hotspot/.hg/patches
diff options
context:
space:
mode:
authorIvan Dubrov <idubrov@guidewire.com>2014-05-05 14:22:44 -0700
committerIvan Dubrov <idubrov@guidewire.com>2014-05-05 14:32:10 -0700
commitde9a2b816af42d438993ef2e551f4bd5dd0112fb (patch)
tree4d6f0aab52f1991fea2cbbc2ac199085cccb3739 /hotspot/.hg/patches
parentfcab9a9f1d254292fab75b61a8a5c84b2155010c (diff)
downloaddcevm-de9a2b816af42d438993ef2e551f4bd5dd0112fb.tar.gz
dcevm-de9a2b816af42d438993ef2e551f4bd5dd0112fb.zip
Extracting changes to javaClasses.cpp
Separating changes for $StaticAccessor/$Accessor into separate patch.
Diffstat (limited to 'hotspot/.hg/patches')
-rw-r--r--hotspot/.hg/patches/dmh-field-accessors-java8.patch164
-rw-r--r--hotspot/.hg/patches/light-jdk8u5-b13.patch158
-rw-r--r--hotspot/.hg/patches/series3
3 files changed, 171 insertions, 154 deletions
diff --git a/hotspot/.hg/patches/dmh-field-accessors-java8.patch b/hotspot/.hg/patches/dmh-field-accessors-java8.patch
new file mode 100644
index 00000000..49d4e937
--- /dev/null
+++ b/hotspot/.hg/patches/dmh-field-accessors-java8.patch
@@ -0,0 +1,164 @@
+Add support for DirectMethodHandle field implementations (StaticAccessor/Accessor).
+
+During the redefinition run, these instances are updated to point to new field index location.
+# HG changeset patch
+# Parent 93419aa9be423015ad99c0e5fa53abca1939aa00
+
+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
+@@ -2617,6 +2617,50 @@
+ }
+ }
+
++// Support for java_lang_invoke_DirectMethodHandle$StaticAccessor
++
++int java_lang_invoke_DirectMethodHandle_StaticAccessor::_static_offset_offset;
++
++long java_lang_invoke_DirectMethodHandle_StaticAccessor::static_offset(oop dmh) {
++ assert(_static_offset_offset != 0, "");
++ return dmh->long_field(_static_offset_offset);
++}
++
++void java_lang_invoke_DirectMethodHandle_StaticAccessor::set_static_offset(oop dmh, long static_offset) {
++ assert(_static_offset_offset != 0, "");
++ dmh->long_field_put(_static_offset_offset, static_offset);
++}
++
++
++void java_lang_invoke_DirectMethodHandle_StaticAccessor::compute_offsets() {
++ Klass* klass_oop = SystemDictionary::DirectMethodHandle_StaticAccessor_klass();
++ if (klass_oop != NULL && EnableInvokeDynamic) {
++ compute_offset(_static_offset_offset, klass_oop, vmSymbols::static_offset_name(), vmSymbols::long_signature());
++ }
++}
++
++// Support for java_lang_invoke_DirectMethodHandle$Accessor
++
++int java_lang_invoke_DirectMethodHandle_Accessor::_field_offset_offset;
++
++int java_lang_invoke_DirectMethodHandle_Accessor::field_offset(oop dmh) {
++ assert(_field_offset_offset != 0, "");
++ return dmh->int_field(_field_offset_offset);
++}
++
++void java_lang_invoke_DirectMethodHandle_Accessor::set_field_offset(oop dmh, int field_offset) {
++ assert(_field_offset_offset != 0, "");
++ dmh->int_field_put(_field_offset_offset, field_offset);
++}
++
++
++void java_lang_invoke_DirectMethodHandle_Accessor::compute_offsets() {
++ Klass* klass_oop = SystemDictionary::DirectMethodHandle_Accessor_klass();
++ if (klass_oop != NULL && EnableInvokeDynamic) {
++ compute_offset(_field_offset_offset, klass_oop, vmSymbols::field_offset_name(), vmSymbols::int_signature());
++ }
++}
++
+ // Support for java_lang_invoke_MethodHandle
+
+ int java_lang_invoke_MethodHandle::_type_offset;
+@@ -3269,6 +3313,9 @@
+ java_lang_invoke_LambdaForm::compute_offsets();
+ java_lang_invoke_MethodType::compute_offsets();
+ java_lang_invoke_CallSite::compute_offsets();
++
++ java_lang_invoke_DirectMethodHandle_StaticAccessor::compute_offsets();
++ java_lang_invoke_DirectMethodHandle_Accessor::compute_offsets();
+ }
+ java_security_AccessControlContext::compute_offsets();
+ // Initialize reflection classes. The layouts of these classes
+diff --git a/src/share/vm/classfile/javaClasses.hpp b/src/share/vm/classfile/javaClasses.hpp
+--- a/src/share/vm/classfile/javaClasses.hpp
++++ b/src/share/vm/classfile/javaClasses.hpp
+@@ -1003,6 +1003,55 @@
+ static int member_offset_in_bytes() { return _member_offset; }
+ };
+
++// Interface to java.lang.invoke.DirectMethodHandle$StaticAccessor objects
++
++class java_lang_invoke_DirectMethodHandle_StaticAccessor: AllStatic {
++ friend class JavaClasses;
++
++ private:
++ static int _static_offset_offset; // offset to static field
++
++ static void compute_offsets();
++
++ public:
++ // Accessors
++ static long static_offset(oop dmh);
++ static void set_static_offset(oop dmh, long value);
++
++ // Testers
++ static bool is_subclass(Klass* klass) {
++ return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_StaticAccessor_klass());
++ }
++ static bool is_instance(oop obj) {
++ return obj != NULL && is_subclass(obj->klass());
++ }
++};
++
++// Interface to java.lang.invoke.DirectMethodHandle$Accessor objects
++
++class java_lang_invoke_DirectMethodHandle_Accessor: AllStatic {
++ friend class JavaClasses;
++
++ private:
++ static int _field_offset_offset; // offset to field
++
++ static void compute_offsets();
++
++ public:
++ // Accessors
++ static int field_offset(oop dmh);
++ static void set_field_offset(oop dmh, int value);
++
++ // Testers
++ static bool is_subclass(Klass* klass) {
++ return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_Accessor_klass());
++ }
++ static bool is_instance(oop obj) {
++ return obj != NULL && is_subclass(obj->klass());
++ }
++};
++
++
+ // Interface to java.lang.invoke.LambdaForm objects
+ // (These are a private interface for managing adapter code generation.)
+
+diff --git a/src/share/vm/classfile/systemDictionary.hpp b/src/share/vm/classfile/systemDictionary.hpp
+--- a/src/share/vm/classfile/systemDictionary.hpp
++++ b/src/share/vm/classfile/systemDictionary.hpp
+@@ -151,6 +151,8 @@
+ \
+ /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \
+ do_klass(DirectMethodHandle_klass, java_lang_invoke_DirectMethodHandle, Opt ) \
++ do_klass(DirectMethodHandle_StaticAccessor_klass, java_lang_invoke_DirectMethodHandle_StaticAccessor, Opt ) \
++ do_klass(DirectMethodHandle_Accessor_klass, java_lang_invoke_DirectMethodHandle_Accessor, Opt ) \
+ do_klass(MethodHandle_klass, java_lang_invoke_MethodHandle, Pre_JSR292 ) \
+ do_klass(MemberName_klass, java_lang_invoke_MemberName, Pre_JSR292 ) \
+ do_klass(MethodHandleNatives_klass, java_lang_invoke_MethodHandleNatives, Pre_JSR292 ) \
+diff --git a/src/share/vm/classfile/vmSymbols.hpp b/src/share/vm/classfile/vmSymbols.hpp
+--- a/src/share/vm/classfile/vmSymbols.hpp
++++ b/src/share/vm/classfile/vmSymbols.hpp
+@@ -256,6 +256,8 @@
+ template(java_lang_invoke_CallSite, "java/lang/invoke/CallSite") \
+ template(java_lang_invoke_ConstantCallSite, "java/lang/invoke/ConstantCallSite") \
+ template(java_lang_invoke_DirectMethodHandle, "java/lang/invoke/DirectMethodHandle") \
++ template(java_lang_invoke_DirectMethodHandle_StaticAccessor, "java/lang/invoke/DirectMethodHandle$StaticAccessor") \
++ template(java_lang_invoke_DirectMethodHandle_Accessor, "java/lang/invoke/DirectMethodHandle$Accessor") \
+ template(java_lang_invoke_MutableCallSite, "java/lang/invoke/MutableCallSite") \
+ template(java_lang_invoke_VolatileCallSite, "java/lang/invoke/VolatileCallSite") \
+ template(java_lang_invoke_MethodHandle, "java/lang/invoke/MethodHandle") \
+@@ -397,6 +399,10 @@
+ template(signers_name, "signers_name") \
+ template(loader_data_name, "loader_data") \
+ template(dependencies_name, "dependencies") \
++ template(static_offset_name, "staticOffset") \
++ template(static_base_name, "staticBase") \
++ template(field_offset_name, "fieldOffset") \
++ template(field_type_name, "fieldType") \
+ \
+ /* non-intrinsic name/signature pairs: */ \
+ template(register_method_name, "register") \
diff --git a/hotspot/.hg/patches/light-jdk8u5-b13.patch b/hotspot/.hg/patches/light-jdk8u5-b13.patch
index 28869d4c..96495483 100644
--- a/hotspot/.hg/patches/light-jdk8u5-b13.patch
+++ b/hotspot/.hg/patches/light-jdk8u5-b13.patch
@@ -392,123 +392,6 @@ diff --git a/src/share/vm/classfile/javaClasses.cpp b/src/share/vm/classfile/jav
if (method->is_hidden()) {
if (skip_hidden) continue;
}
-@@ -2617,6 +2619,50 @@
- }
- }
-
-+// Support for java_lang_invoke_DirectMethodHandle$StaticAccessor
-+
-+int java_lang_invoke_DirectMethodHandle_StaticAccessor::_static_offset_offset;
-+
-+long java_lang_invoke_DirectMethodHandle_StaticAccessor::static_offset(oop dmh) {
-+ assert(_static_offset_offset != 0, "");
-+ return dmh->long_field(_static_offset_offset);
-+}
-+
-+void java_lang_invoke_DirectMethodHandle_StaticAccessor::set_static_offset(oop dmh, long static_offset) {
-+ assert(_static_offset_offset != 0, "");
-+ dmh->long_field_put(_static_offset_offset, static_offset);
-+}
-+
-+
-+void java_lang_invoke_DirectMethodHandle_StaticAccessor::compute_offsets() {
-+ Klass* klass_oop = SystemDictionary::DirectMethodHandle_StaticAccessor_klass();
-+ if (klass_oop != NULL && EnableInvokeDynamic) {
-+ compute_offset(_static_offset_offset, klass_oop, vmSymbols::static_offset_name(), vmSymbols::long_signature());
-+ }
-+}
-+
-+// Support for java_lang_invoke_DirectMethodHandle$Accessor
-+
-+int java_lang_invoke_DirectMethodHandle_Accessor::_field_offset_offset;
-+
-+int java_lang_invoke_DirectMethodHandle_Accessor::field_offset(oop dmh) {
-+ assert(_field_offset_offset != 0, "");
-+ return dmh->int_field(_field_offset_offset);
-+}
-+
-+void java_lang_invoke_DirectMethodHandle_Accessor::set_field_offset(oop dmh, int field_offset) {
-+ assert(_field_offset_offset != 0, "");
-+ dmh->int_field_put(_field_offset_offset, field_offset);
-+}
-+
-+
-+void java_lang_invoke_DirectMethodHandle_Accessor::compute_offsets() {
-+ Klass* klass_oop = SystemDictionary::DirectMethodHandle_Accessor_klass();
-+ if (klass_oop != NULL && EnableInvokeDynamic) {
-+ compute_offset(_field_offset_offset, klass_oop, vmSymbols::field_offset_name(), vmSymbols::int_signature());
-+ }
-+}
-+
- // Support for java_lang_invoke_MethodHandle
-
- int java_lang_invoke_MethodHandle::_type_offset;
-@@ -3269,6 +3315,9 @@
- java_lang_invoke_LambdaForm::compute_offsets();
- java_lang_invoke_MethodType::compute_offsets();
- java_lang_invoke_CallSite::compute_offsets();
-+
-+ java_lang_invoke_DirectMethodHandle_StaticAccessor::compute_offsets();
-+ java_lang_invoke_DirectMethodHandle_Accessor::compute_offsets();
- }
- java_security_AccessControlContext::compute_offsets();
- // Initialize reflection classes. The layouts of these classes
-diff --git a/src/share/vm/classfile/javaClasses.hpp b/src/share/vm/classfile/javaClasses.hpp
---- a/src/share/vm/classfile/javaClasses.hpp
-+++ b/src/share/vm/classfile/javaClasses.hpp
-@@ -1003,6 +1003,52 @@
- static int member_offset_in_bytes() { return _member_offset; }
- };
-
-+// Interface to java.lang.invoke.DirectMethodHandle$StaticAccessor objects
-+
-+class java_lang_invoke_DirectMethodHandle_StaticAccessor: AllStatic {
-+ friend class JavaClasses;
-+
-+ private:
-+ static int _static_offset_offset; // offset to static field
-+
-+ static void compute_offsets();
-+
-+ public:
-+ // Accessors
-+ static long static_offset(oop dmh);
-+ static void set_static_offset(oop dmh, long value);
-+
-+ // Testers
-+ static bool is_subclass(Klass* klass) {
-+ return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_StaticAccessor_klass());
-+ }
-+ static bool is_instance(oop obj) {
-+ return obj != NULL && is_subclass(obj->klass());
-+ }
-+};
-+
-+class java_lang_invoke_DirectMethodHandle_Accessor: AllStatic {
-+ friend class JavaClasses;
-+
-+ private:
-+ static int _field_offset_offset; // offset to field
-+
-+ static void compute_offsets();
-+
-+ public:
-+ // Accessors
-+ static int field_offset(oop dmh);
-+ static void set_field_offset(oop dmh, int value);
-+
-+ // Testers
-+ static bool is_subclass(Klass* klass) {
-+ return klass->is_subclass_of(SystemDictionary::DirectMethodHandle_Accessor_klass());
-+ }
-+ static bool is_instance(oop obj) {
-+ return obj != NULL && is_subclass(obj->klass());
-+ }
-+};
-+
- // Interface to java.lang.invoke.LambdaForm objects
- // (These are a private interface for managing adapter code generation.)
-
diff --git a/src/share/vm/classfile/loaderConstraints.cpp b/src/share/vm/classfile/loaderConstraints.cpp
--- a/src/share/vm/classfile/loaderConstraints.cpp
+++ b/src/share/vm/classfile/loaderConstraints.cpp
@@ -678,16 +561,7 @@ diff --git a/src/share/vm/classfile/systemDictionary.cpp b/src/share/vm/classfil
diff --git a/src/share/vm/classfile/systemDictionary.hpp b/src/share/vm/classfile/systemDictionary.hpp
--- a/src/share/vm/classfile/systemDictionary.hpp
+++ b/src/share/vm/classfile/systemDictionary.hpp
-@@ -151,6 +151,8 @@
- \
- /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \
- do_klass(DirectMethodHandle_klass, java_lang_invoke_DirectMethodHandle, Opt ) \
-+ do_klass(DirectMethodHandle_StaticAccessor_klass, java_lang_invoke_DirectMethodHandle_StaticAccessor, Opt ) \
-+ do_klass(DirectMethodHandle_Accessor_klass, java_lang_invoke_DirectMethodHandle_Accessor, Opt ) \
- do_klass(MethodHandle_klass, java_lang_invoke_MethodHandle, Pre_JSR292 ) \
- do_klass(MemberName_klass, java_lang_invoke_MemberName, Pre_JSR292 ) \
- do_klass(MethodHandleNatives_klass, java_lang_invoke_MethodHandleNatives, Pre_JSR292 ) \
-@@ -269,7 +271,7 @@
+@@ -271,7 +271,7 @@
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
static Klass* resolve_from_stream(Symbol* class_name, Handle class_loader,
Handle protection_domain,
@@ -696,7 +570,7 @@ diff --git a/src/share/vm/classfile/systemDictionary.hpp b/src/share/vm/classfil
// Lookup an already loaded class. If not found NULL is returned.
static Klass* find(Symbol* class_name, Handle class_loader, Handle protection_domain, TRAPS);
-@@ -339,6 +341,8 @@
+@@ -341,6 +341,8 @@
// System loader lock
static oop system_loader_lock() { return _system_loader_lock_obj; }
@@ -705,7 +579,7 @@ diff --git a/src/share/vm/classfile/systemDictionary.hpp b/src/share/vm/classfil
private:
// Extended Redefine classes support (tbi)
static void preloaded_classes_do(KlassClosure* f);
-@@ -408,6 +412,9 @@
+@@ -410,6 +412,9 @@
initialize_wk_klasses_until((WKID) limit, start_id, THREAD);
}
@@ -715,7 +589,7 @@ diff --git a/src/share/vm/classfile/systemDictionary.hpp b/src/share/vm/classfil
public:
#define WK_KLASS_DECLARE(name, symbol, option) \
static Klass* name() { return check_klass_##option(_well_known_klasses[WK_KLASS_ENUM_NAME(name)]); } \
-@@ -613,7 +620,7 @@
+@@ -615,7 +620,7 @@
// after waiting, but before reentering SystemDictionary_lock
// to preserve lock order semantics.
static void double_lock_wait(Handle lockObject, TRAPS);
@@ -765,30 +639,6 @@ diff --git a/src/share/vm/classfile/verifier.hpp b/src/share/vm/classfile/verifi
instanceKlassHandle _klass; // the class being verified
methodHandle _method; // current method being verified
VerificationType _this_type; // the verification type of the current class
-diff --git a/src/share/vm/classfile/vmSymbols.hpp b/src/share/vm/classfile/vmSymbols.hpp
---- a/src/share/vm/classfile/vmSymbols.hpp
-+++ b/src/share/vm/classfile/vmSymbols.hpp
-@@ -256,6 +256,8 @@
- template(java_lang_invoke_CallSite, "java/lang/invoke/CallSite") \
- template(java_lang_invoke_ConstantCallSite, "java/lang/invoke/ConstantCallSite") \
- template(java_lang_invoke_DirectMethodHandle, "java/lang/invoke/DirectMethodHandle") \
-+ template(java_lang_invoke_DirectMethodHandle_StaticAccessor, "java/lang/invoke/DirectMethodHandle$StaticAccessor") \
-+ template(java_lang_invoke_DirectMethodHandle_Accessor, "java/lang/invoke/DirectMethodHandle$Accessor") \
- template(java_lang_invoke_MutableCallSite, "java/lang/invoke/MutableCallSite") \
- template(java_lang_invoke_VolatileCallSite, "java/lang/invoke/VolatileCallSite") \
- template(java_lang_invoke_MethodHandle, "java/lang/invoke/MethodHandle") \
-@@ -397,6 +399,11 @@
- template(signers_name, "signers_name") \
- template(loader_data_name, "loader_data") \
- template(dependencies_name, "dependencies") \
-+ template(static_offset_name, "staticOffset") \
-+ template(static_base_name, "staticBase") \
-+ template(field_offset_name, "fieldOffset") \
-+ template(field_type_name, "fieldType") \
-+ template(as_type_cache_name, "asTypeCache") \
- \
- /* non-intrinsic name/signature pairs: */ \
- template(register_method_name, "register") \
diff --git a/src/share/vm/interpreter/linkResolver.cpp b/src/share/vm/interpreter/linkResolver.cpp
--- a/src/share/vm/interpreter/linkResolver.cpp
+++ b/src/share/vm/interpreter/linkResolver.cpp
diff --git a/hotspot/.hg/patches/series b/hotspot/.hg/patches/series
index 31a56fb7..29566fbc 100644
--- a/hotspot/.hg/patches/series
+++ b/hotspot/.hg/patches/series
@@ -7,6 +7,9 @@ arguments-java8.patch #+jdk8
# GC changes to allow modifying instances during redefinition run
gc-java8.patch #+jdk8
+# Add support for certain DMH implementations
+dmh-field-accessors-java8.patch #+jdk8
+
# Rest of the changes
full-jdk7u11-b21.patch #+full-jdk7u11-b21
full-jdk7u45-b08.patch #+full-jdk7u45-b08