equal
deleted
inserted
replaced
328 // - The exception table update code in set_new_constant_pool() defines |
328 // - The exception table update code in set_new_constant_pool() defines |
329 // const values that are also defined in a local context elsewhere. |
329 // const values that are also defined in a local context elsewhere. |
330 // The same literal values are also used in elsewhere. We need to |
330 // The same literal values are also used in elsewhere. We need to |
331 // coordinate a cleanup of these constants with Runtime. |
331 // coordinate a cleanup of these constants with Runtime. |
332 // |
332 // |
|
333 |
|
334 struct JvmtiCachedClassFileData { |
|
335 jint length; |
|
336 unsigned char data[1]; |
|
337 }; |
333 |
338 |
334 class VM_RedefineClasses: public VM_Operation { |
339 class VM_RedefineClasses: public VM_Operation { |
335 private: |
340 private: |
336 // These static fields are needed by ClassLoaderDataGraph::classes_do() |
341 // These static fields are needed by ClassLoaderDataGraph::classes_do() |
337 // facility and the AdjustCpoolCacheAndVtable helper: |
342 // facility and the AdjustCpoolCacheAndVtable helper: |
507 jvmtiError check_error() { return _res; } |
512 jvmtiError check_error() { return _res; } |
508 |
513 |
509 // Modifiable test must be shared between IsModifiableClass query |
514 // Modifiable test must be shared between IsModifiableClass query |
510 // and redefine implementation |
515 // and redefine implementation |
511 static bool is_modifiable_class(oop klass_mirror); |
516 static bool is_modifiable_class(oop klass_mirror); |
|
517 |
|
518 static jint get_cached_class_file_len(JvmtiCachedClassFileData *cache) { |
|
519 return cache == NULL ? 0 : cache->length; |
|
520 } |
|
521 static unsigned char * get_cached_class_file_bytes(JvmtiCachedClassFileData *cache) { |
|
522 return cache == NULL ? NULL : cache->data; |
|
523 } |
512 }; |
524 }; |
513 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP |
525 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP |