493 JVMCI_ERROR("unexpected Assumption subclass %s", jvmci_env()->klass_name(assumption));
494 }
495 }
496 }
497 }
498 if (JvmtiExport::can_hotswap_or_post_breakpoint()) {
499 JVMCIObjectArray methods = jvmci_env()->get_HotSpotCompiledCode_methods(compiled_code);
500 if (methods.is_non_null()) {
501 int length = JVMCIENV->get_length(methods);
502 for (int i = 0; i < length; ++i) {
503 JVMCIObject method_handle = JVMCIENV->get_object_at(methods, i);
504 methodHandle method = jvmci_env()->asMethod(method_handle);
505 _dependencies->assert_evol_method(method());
506 }
507 }
508 }
509 }
510
511 #if INCLUDE_AOT
512 RelocBuffer::~RelocBuffer() {
513 if (_buffer != NULL) {
514 FREE_C_HEAP_ARRAY(char, _buffer);
515 }
516 }
517
518 address RelocBuffer::begin() const {
519 if (_buffer != NULL) {
520 return (address) _buffer;
521 }
522 return (address) _static_buffer;
523 }
524
525 void RelocBuffer::set_size(size_t bytes) {
526 assert(bytes <= _size, "can't grow in size!");
527 _size = bytes;
528 }
529
530 void RelocBuffer::ensure_size(size_t bytes) {
531 assert(_buffer == NULL, "can only be used once");
532 assert(_size == 0, "can only be used once");
533 if (bytes >= RelocBuffer::stack_size) {
534 _buffer = NEW_C_HEAP_ARRAY(char, bytes, mtJVMCI);
535 }
|
493 JVMCI_ERROR("unexpected Assumption subclass %s", jvmci_env()->klass_name(assumption));
494 }
495 }
496 }
497 }
498 if (JvmtiExport::can_hotswap_or_post_breakpoint()) {
499 JVMCIObjectArray methods = jvmci_env()->get_HotSpotCompiledCode_methods(compiled_code);
500 if (methods.is_non_null()) {
501 int length = JVMCIENV->get_length(methods);
502 for (int i = 0; i < length; ++i) {
503 JVMCIObject method_handle = JVMCIENV->get_object_at(methods, i);
504 methodHandle method = jvmci_env()->asMethod(method_handle);
505 _dependencies->assert_evol_method(method());
506 }
507 }
508 }
509 }
510
511 #if INCLUDE_AOT
512 RelocBuffer::~RelocBuffer() {
513 FREE_C_HEAP_ARRAY(char, _buffer);
514 }
515
516 address RelocBuffer::begin() const {
517 if (_buffer != NULL) {
518 return (address) _buffer;
519 }
520 return (address) _static_buffer;
521 }
522
523 void RelocBuffer::set_size(size_t bytes) {
524 assert(bytes <= _size, "can't grow in size!");
525 _size = bytes;
526 }
527
528 void RelocBuffer::ensure_size(size_t bytes) {
529 assert(_buffer == NULL, "can only be used once");
530 assert(_size == 0, "can only be used once");
531 if (bytes >= RelocBuffer::stack_size) {
532 _buffer = NEW_C_HEAP_ARRAY(char, bytes, mtJVMCI);
533 }
|