diff -r 8a6717910608 make/openjdk_distro
--- a/make/openjdk_distro Tue Mar 11 13:02:13 2014 -0700
-+++ b/make/openjdk_distro Tue Apr 29 17:13:46 2014 -0700
++++ b/make/openjdk_distro Wed Apr 30 11:27:18 2014 -0700
@@ -27,6 +27,6 @@
#
PRODUCT_NAME=OpenJDK
diff -r 8a6717910608 src/share/vm/ci/ciObjectFactory.cpp
--- a/src/share/vm/ci/ciObjectFactory.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/ci/ciObjectFactory.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/ci/ciObjectFactory.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -750,3 +750,27 @@
_unloaded_instances->length(),
_unloaded_klasses->length());
+
diff -r 8a6717910608 src/share/vm/ci/ciObjectFactory.hpp
--- a/src/share/vm/ci/ciObjectFactory.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/ci/ciObjectFactory.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/ci/ciObjectFactory.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -90,6 +90,7 @@
ciInstance* get_unloaded_instance(ciInstanceKlass* klass);
#endif // SHARE_VM_CI_CIOBJECTFACTORY_HPP
diff -r 8a6717910608 src/share/vm/classfile/classFileParser.cpp
--- a/src/share/vm/classfile/classFileParser.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/classFileParser.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/classFileParser.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -759,6 +759,7 @@
Array<Klass*>* ClassFileParser::parse_interfaces(int length,
Handle protection_domain,
}
diff -r 8a6717910608 src/share/vm/classfile/classFileParser.hpp
--- a/src/share/vm/classfile/classFileParser.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/classFileParser.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/classFileParser.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -214,11 +214,12 @@
Array<Klass*>* parse_interfaces(int length,
Handle protection_domain,
TRAPS);
diff -r 8a6717910608 src/share/vm/classfile/classLoader.cpp
--- a/src/share/vm/classfile/classLoader.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/classLoader.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/classLoader.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -926,6 +926,7 @@
instanceKlassHandle result = parser.parseClassFile(h_name,
loader_data,
CHECK_(h));
diff -r 8a6717910608 src/share/vm/classfile/dictionary.cpp
--- a/src/share/vm/classfile/dictionary.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/dictionary.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/dictionary.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -145,7 +145,7 @@
InstanceKlass* ik = InstanceKlass::cast(e);
diff -r 8a6717910608 src/share/vm/classfile/dictionary.hpp
--- a/src/share/vm/classfile/dictionary.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/dictionary.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/dictionary.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -78,6 +78,10 @@
void add_klass(Symbol* class_name, ClassLoaderData* loader_data,KlassHandle obj);
bool do_unloading();
diff -r 8a6717910608 src/share/vm/classfile/javaClasses.cpp
--- a/src/share/vm/classfile/javaClasses.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/javaClasses.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/javaClasses.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -1629,6 +1629,8 @@
skip_throwableInit_check = true;
}
}
diff -r 8a6717910608 src/share/vm/classfile/loaderConstraints.cpp
--- a/src/share/vm/classfile/loaderConstraints.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/loaderConstraints.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/loaderConstraints.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -446,7 +446,7 @@
if (k != NULL) {
// We found the class in the system dictionary, so we should
// has to be in the placeholders table.
diff -r 8a6717910608 src/share/vm/classfile/systemDictionary.cpp
--- a/src/share/vm/classfile/systemDictionary.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/systemDictionary.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/systemDictionary.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -174,6 +174,7 @@
// can return a null klass
klass = handle_resolution_exception(class_name, class_loader, protection_domain, throw_error, k_h, THREAD);
} else {
diff -r 8a6717910608 src/share/vm/classfile/systemDictionary.hpp
--- a/src/share/vm/classfile/systemDictionary.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/systemDictionary.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/systemDictionary.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -269,7 +269,7 @@
// Resolve from stream (called by jni_DefineClass and JVM_DefineClass)
static Klass* resolve_from_stream(Symbol* class_name, Handle class_loader,
instanceKlassHandle k, TRAPS);
diff -r 8a6717910608 src/share/vm/classfile/verifier.cpp
--- a/src/share/vm/classfile/verifier.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/verifier.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/verifier.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -189,7 +189,7 @@
Symbol* name = klass->name();
Klass* refl_magic_klass = SystemDictionary::reflect_MagicAccessorImpl_klass();
for (int index = 0; index < num_methods; index++) {
diff -r 8a6717910608 src/share/vm/classfile/verifier.hpp
--- a/src/share/vm/classfile/verifier.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/classfile/verifier.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/classfile/verifier.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -331,6 +331,7 @@
VerificationType object_type() const;
VerificationType _this_type; // the verification type of the current class
diff -r 8a6717910608 src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -161,6 +161,12 @@
}
}
// fragmentation_metric = 1 - [sum of (fbs**2) / (sum of fbs)**2]
diff -r 8a6717910608 src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp
--- a/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -150,6 +150,7 @@
// Support for compacting cms
// Initialization helpers.
diff -r 8a6717910608 src/share/vm/gc_implementation/shared/markSweep.cpp
--- a/src/share/vm/gc_implementation/shared/markSweep.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/gc_implementation/shared/markSweep.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/gc_implementation/shared/markSweep.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -32,6 +32,8 @@
#include "oops/objArrayKlass.inline.hpp"
#include "oops/oop.inline.hpp"
+}
diff -r 8a6717910608 src/share/vm/gc_implementation/shared/markSweep.hpp
--- a/src/share/vm/gc_implementation/shared/markSweep.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/gc_implementation/shared/markSweep.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/gc_implementation/shared/markSweep.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -107,8 +107,12 @@
friend class AdjustPointerClosure;
friend class KeepAliveClosure;
static void follow_klass(Klass* klass);
diff -r 8a6717910608 src/share/vm/interpreter/linkResolver.cpp
--- a/src/share/vm/interpreter/linkResolver.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/interpreter/linkResolver.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/interpreter/linkResolver.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -215,8 +215,8 @@
// Klass resolution
THROW(vmSymbols::java_lang_IllegalAccessError());
}
-@@ -1199,6 +1199,9 @@
+@@ -1199,6 +1199,16 @@
// recv_klass might be an arrayKlassOop but all vtables start at
// the same place. The cast is to avoid virtual call and assertion.
InstanceKlass* inst = (InstanceKlass*)recv_klass();
+
+ // (DCEVM) Check that the receiver is a subtype of the holder of the resolved method.
++ if (!inst->is_subtype_of(resolved_method->method_holder())) {
++ inst->print();
++ tty->print_cr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
++ resolved_method->method_holder()->print();
++ tty->print_cr("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
++ resolved_method->print();
++ }
+ assert(inst->is_subtype_of(resolved_method->method_holder()), "receiver and resolved method holder are inconsistent");
selected_method = methodHandle(THREAD, inst->method_at_vtable(vtable_index));
}
}
diff -r 8a6717910608 src/share/vm/memory/genMarkSweep.cpp
--- a/src/share/vm/memory/genMarkSweep.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/memory/genMarkSweep.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/memory/genMarkSweep.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -334,11 +334,16 @@
// in the same order in phase2, phase3 and phase4. We don't quite do that
// here (perm_gen first rather than last), so we tell the validate code
}
diff -r 8a6717910608 src/share/vm/memory/space.cpp
--- a/src/share/vm/memory/space.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/memory/space.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/memory/space.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -379,9 +379,8 @@
_compaction_top = bottom();
}
void Space::print_short() const { print_short_on(tty); }
diff -r 8a6717910608 src/share/vm/memory/space.hpp
--- a/src/share/vm/memory/space.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/memory/space.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/memory/space.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -450,6 +450,9 @@
// indicates when the next such action should be taken.
virtual void prepare_for_compaction(CompactPoint* cp);
assert(oop(compaction_top)->klass() != NULL, "should have a class"); \
diff -r 8a6717910608 src/share/vm/memory/universe.cpp
--- a/src/share/vm/memory/universe.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/memory/universe.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/memory/universe.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -78,6 +78,8 @@
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
#endif // INCLUDE_ALL_GCS
f->do_oop((oop*) &_int_mirror);
diff -r 8a6717910608 src/share/vm/memory/universe.hpp
--- a/src/share/vm/memory/universe.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/memory/universe.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/memory/universe.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -248,7 +248,13 @@
static void compute_verify_oop_data();
// as static fields of "Universe".
diff -r 8a6717910608 src/share/vm/oops/cpCache.cpp
--- a/src/share/vm/oops/cpCache.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/cpCache.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/cpCache.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -336,7 +336,8 @@
if (has_appendix) {
const int appendix_index = f2_as_index() + _indy_resolved_references_appendix_offset;
resolved_references->obj_at_put(method_type_index, method_type());
}
-@@ -532,6 +534,20 @@
+@@ -532,6 +534,26 @@
// the method is in the interesting class so the entry is interesting
return true;
}
+// Clear cached entry, let it be re-resolved
+void ConstantPoolCacheEntry::clear_entry() {
+ // Clear entry during class redefinition. Note that we still keep flags.
++ if (has_appendix()) {
++ // (DCEVM): Now this gets really ugly. If this entry is used by invokehandle, we cannot
++ // clear it just like that (data is used by _invokehandle bytecode which wouldn't re-resolve anything).
++ // FIXME: (DCEVM) need to figure out if we need to rewrite it somehow or it should be fine...
++ return;
++ }
+ _indices = constant_pool_index();
+ _f1 = NULL;
+ _f2 = 0;
#endif // INCLUDE_JVMTI
void ConstantPoolCacheEntry::print(outputStream* st, int index) const {
-@@ -660,6 +676,14 @@
+@@ -660,6 +682,14 @@
}
}
}
diff -r 8a6717910608 src/share/vm/oops/cpCache.hpp
--- a/src/share/vm/oops/cpCache.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/cpCache.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/cpCache.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -373,6 +373,10 @@
bool * trace_name_printed);
bool check_no_old_or_obsolete_entries();
// Deallocate - no fields to deallocate
diff -r 8a6717910608 src/share/vm/oops/instanceKlass.cpp
--- a/src/share/vm/oops/instanceKlass.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/instanceKlass.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/instanceKlass.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -718,7 +718,8 @@
}
#endif
diff -r 8a6717910608 src/share/vm/oops/instanceKlass.hpp
--- a/src/share/vm/oops/instanceKlass.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/instanceKlass.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/instanceKlass.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -139,6 +139,7 @@
friend class VMStructs;
friend class ClassFileParser;
void array_klasses_do(void f(Klass* k, TRAPS), TRAPS);
diff -r 8a6717910608 src/share/vm/oops/klass.cpp
--- a/src/share/vm/oops/klass.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/klass.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/klass.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -170,6 +170,13 @@
set_next_link(NULL);
TRACE_INIT_ID(this);
diff -r 8a6717910608 src/share/vm/oops/klass.hpp
--- a/src/share/vm/oops/klass.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/klass.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/klass.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -149,6 +149,10 @@
oop _java_mirror;
// Superclass
static ByteSize super_offset() { return in_ByteSize(offset_of(Klass, _super)); }
diff -r 8a6717910608 src/share/vm/oops/klassVtable.cpp
--- a/src/share/vm/oops/klassVtable.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/klassVtable.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/klassVtable.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -1409,6 +1409,8 @@
void klassVtable::verify_against(outputStream* st, klassVtable* vt, int index) {
diff -r 8a6717910608 src/share/vm/oops/method.cpp
--- a/src/share/vm/oops/method.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/method.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/method.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -1185,6 +1185,8 @@
// Reset correct method/const method, method size, and parameter info
if (!SafepointSynchronize::is_at_safepoint()) {
diff -r 8a6717910608 src/share/vm/oops/method.hpp
--- a/src/share/vm/oops/method.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/oops/method.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/oops/method.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -105,6 +105,10 @@
AccessFlags _access_flags; // Access flags
int _vtable_index; // vtable index of this method (see VtableIndexFlag)
int signature_index() const { return constMethod()->signature_index(); }
diff -r 8a6717910608 src/share/vm/prims/jni.cpp
--- a/src/share/vm/prims/jni.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/prims/jni.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/prims/jni.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -406,6 +406,7 @@
}
Klass* k = SystemDictionary::resolve_from_stream(class_name, class_loader,
if (TraceClassResolution && k != NULL) {
diff -r 8a6717910608 src/share/vm/prims/jvm.cpp
--- a/src/share/vm/prims/jvm.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/prims/jvm.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/prims/jvm.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -904,6 +904,7 @@
Klass* k = SystemDictionary::resolve_from_stream(class_name, class_loader,
protection_domain, &st,
if (TraceClassResolution && k != NULL) {
diff -r 8a6717910608 src/share/vm/prims/jvmtiEnv.cpp
--- a/src/share/vm/prims/jvmtiEnv.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/prims/jvmtiEnv.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/prims/jvmtiEnv.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -42,6 +42,7 @@
#include "prims/jvmtiManageCapabilities.hpp"
#include "prims/jvmtiRawMonitor.hpp"
return (op.check_error());
diff -r 8a6717910608 src/share/vm/prims/jvmtiExport.hpp
--- a/src/share/vm/prims/jvmtiExport.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/prims/jvmtiExport.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/prims/jvmtiExport.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -188,6 +188,7 @@
// systems as needed to relax invariant checks.
static bool _has_redefined_a_class;
}
diff -r 8a6717910608 src/share/vm/prims/jvmtiImpl.cpp
--- a/src/share/vm/prims/jvmtiImpl.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/prims/jvmtiImpl.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/prims/jvmtiImpl.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -289,6 +289,11 @@
Symbol* m_name = _method->name();
Symbol* m_signature = _method->signature();
for (PreviousVersionNode * pv_node = pvw.next_previous_version();
diff -r 8a6717910608 src/share/vm/prims/jvmtiRedefineClasses2.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/share/vm/prims/jvmtiRedefineClasses2.cpp Tue Apr 29 17:13:46 2014 -0700
-@@ -0,0 +1,2015 @@
++++ b/src/share/vm/prims/jvmtiRedefineClasses2.cpp Wed Apr 30 11:27:18 2014 -0700
+@@ -0,0 +1,2034 @@
+/*
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ transfer_old_native_function_registrations(the_old_class);
+
+
++ // JSR-292 support
++
++ // Transfer method handles
++ MemberNameTable* mnt = the_old_class->member_names();
++ the_new_class->set_member_names(mnt);
++ the_old_class->set_member_names(NULL);
++ if (mnt != NULL) {
++ for (int i = 0; i < mnt->length(); i++) {
++ oop mem_name = mnt->get_member_name(i);
++ if (mem_name != NULL) {
++ Method* method = (Method*) java_lang_invoke_MemberName::vmtarget(mem_name);
++
++ // Replace the method with matching one from the new class
++ Method* new_method = the_new_class->find_method(method->name(), method->signature());
++ java_lang_invoke_MemberName::set_vmtarget(mem_name, new_method);
++ }
++ }
++ }
++
+
+#ifdef ASSERT
+
+
+ for (int i=0; i<the_new_class->methods()->length(); i++) {
+ assert((the_new_class->methods()->at(i))->method_holder() == the_new_class(), "method holder must match!");
-+ }
++ }
+
+ // FIXME:
+ //_old_methods->verify();
+ // direct and indirect subclasses of the_class
+ increment_class_counter((InstanceKlass *)the_old_class(), THREAD);
+
-+ }
++}
+
+
+void VM_EnhancedRedefineClasses::check_methods_and_mark_as_obsolete(BitMap *emcp_methods, int * emcp_method_count_p) {
+}
diff -r 8a6717910608 src/share/vm/prims/jvmtiRedefineClasses2.hpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/share/vm/prims/jvmtiRedefineClasses2.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/prims/jvmtiRedefineClasses2.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+#endif // SHARE_VM_PRIMS_JVMTIENHANCEDREDEFINECLASSES_HPP
diff -r 8a6717910608 src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/runtime/arguments.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/runtime/arguments.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -59,8 +59,8 @@
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
#endif // INCLUDE_ALL_GCS
"Conflicting collector combinations in option list; "
diff -r 8a6717910608 src/share/vm/runtime/globals.hpp
--- a/src/share/vm/runtime/globals.hpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/runtime/globals.hpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/runtime/globals.hpp Wed Apr 30 11:27:18 2014 -0700
@@ -1273,6 +1273,9 @@
product(intx, TraceRedefineClasses, 0, \
"Trace level for JVMTI RedefineClasses") \
\
diff -r 8a6717910608 src/share/vm/runtime/reflection.cpp
--- a/src/share/vm/runtime/reflection.cpp Tue Mar 11 13:02:13 2014 -0700
-+++ b/src/share/vm/runtime/reflection.cpp Tue Apr 29 17:13:46 2014 -0700
++++ b/src/share/vm/runtime/reflection.cpp Wed Apr 30 11:27:18 2014 -0700
@@ -519,6 +519,12 @@
AccessFlags access,
bool classloader_only,