Mercurial > hg > graal-jvmci-8
diff src/share/vm/prims/jvmtiRedefineClasses.hpp @ 11148:825e6cb66923
8020309: Eliminate InstanceKlass::_cached_class_file_len.
Summary: Use JvmtiCachedClassFileData.
Reviewed-by: iklam, sspitsyn, dcubed
author | jiangli |
---|---|
date | Wed, 17 Jul 2013 18:06:29 -0400 |
parents | 43083e670adf |
children | 50054b63f0aa |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiRedefineClasses.hpp Wed Jun 12 11:17:39 2013 +0200 +++ b/src/share/vm/prims/jvmtiRedefineClasses.hpp Wed Jul 17 18:06:29 2013 -0400 @@ -331,6 +331,11 @@ // coordinate a cleanup of these constants with Runtime. // +struct JvmtiCachedClassFileData { + jint length; + unsigned char data[1]; +}; + class VM_RedefineClasses: public VM_Operation { private: // These static fields are needed by ClassLoaderDataGraph::classes_do() @@ -509,5 +514,12 @@ // Modifiable test must be shared between IsModifiableClass query // and redefine implementation static bool is_modifiable_class(oop klass_mirror); + + static jint get_cached_class_file_len(JvmtiCachedClassFileData *cache) { + return cache == NULL ? 0 : cache->length; + } + static unsigned char * get_cached_class_file_bytes(JvmtiCachedClassFileData *cache) { + return cache == NULL ? NULL : cache->data; + } }; #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP