Mercurial > hg > graal-jvmci-8
changeset 23670:1b4311ab7797
Revert 098c16f6e0b5
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 07 Jun 2016 17:22:34 -0700 |
parents | 098c16f6e0b5 |
children | d995c88d9cd9 |
files | src/share/vm/prims/jvmtiEnv.cpp |
diffstat | 1 files changed, 8 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiEnv.cpp Mon Jun 06 12:41:03 2016 -0700 +++ b/src/share/vm/prims/jvmtiEnv.cpp Tue Jun 07 17:22:34 2016 -0700 @@ -226,7 +226,6 @@ NEW_RESOURCE_ARRAY(jvmtiClassDefinition, class_count); NULL_CHECK(class_definitions, JVMTI_ERROR_OUT_OF_MEMORY); - int redef_index = 0; for (index = 0; index < class_count; index++) { HandleMark hm(current_thread); @@ -254,11 +253,6 @@ return JVMTI_ERROR_UNMODIFIABLE_CLASS; } - if (klass->oop_is_instance() && InstanceKlass::cast(klass())->is_anonymous()) { - // return JVMTI_ERROR_UNMODIFIABLE_CLASS; - continue; - } - instanceKlassHandle ikh(current_thread, k_oop); if (ikh->get_cached_class_file_bytes() == NULL) { // Not cached, we need to reconstitute the class file from the @@ -273,24 +267,19 @@ return reconstituter.get_error(); } - class_definitions[redef_index].class_byte_count = (jint)reconstituter.class_file_size(); - class_definitions[redef_index].class_bytes = (unsigned char*) + class_definitions[index].class_byte_count = (jint)reconstituter.class_file_size(); + class_definitions[index].class_bytes = (unsigned char*) reconstituter.class_file_bytes(); } else { // it is cached, get it from the cache - class_definitions[redef_index].class_byte_count = ikh->get_cached_class_file_len(); - class_definitions[redef_index].class_bytes = ikh->get_cached_class_file_bytes(); + class_definitions[index].class_byte_count = ikh->get_cached_class_file_len(); + class_definitions[index].class_bytes = ikh->get_cached_class_file_bytes(); } - class_definitions[redef_index].klass = jcls; - redef_index++; + class_definitions[index].klass = jcls; } - if (redef_index > 0) { - VM_RedefineClasses op(redef_index, class_definitions, jvmti_class_load_kind_retransform); - VMThread::execute(&op); - return (op.check_error()); - } else { - return JVMTI_ERROR_NONE; - } + VM_RedefineClasses op(class_count, class_definitions, jvmti_class_load_kind_retransform); + VMThread::execute(&op); + return (op.check_error()); } /* end RetransformClasses */