< prev index next >

src/share/vm/oops/method.cpp

Print this page

        

*** 173,183 **** } return buf; } ! int Method::fast_exception_handler_bci_for(methodHandle mh, Klass* ex_klass, int throw_bci, TRAPS) { // exception table holds quadruple entries of the form (beg_bci, end_bci, handler_bci, klass_index) // access exception table ExceptionTable table(mh()); int length = table.length(); // iterate through all entries sequentially --- 173,183 ---- } return buf; } ! int Method::fast_exception_handler_bci_for(const methodHandle& mh, Klass* ex_klass, int throw_bci, TRAPS) { // exception table holds quadruple entries of the form (beg_bci, end_bci, handler_bci, klass_index) // access exception table ExceptionTable table(mh()); int length = table.length(); // iterate through all entries sequentially
*** 1076,1086 **** // ONLY USE the h_method now as make_adapter may have blocked } ! address Method::make_adapters(methodHandle mh, TRAPS) { // Adapters for compiled code are made eagerly here. They are fairly // small (generally < 100 bytes) and quick to make (and cached and shared) // so making them eagerly shouldn't be too expensive. AdapterHandlerEntry* adapter = AdapterHandlerLibrary::get_adapter(mh); if (adapter == NULL ) { --- 1076,1086 ---- // ONLY USE the h_method now as make_adapter may have blocked } ! address Method::make_adapters(const methodHandle& mh, TRAPS) { // Adapters for compiled code are made eagerly here. They are fairly // small (generally < 100 bytes) and quick to make (and cached and shared) // so making them eagerly shouldn't be too expensive. AdapterHandlerEntry* adapter = AdapterHandlerLibrary::get_adapter(mh); if (adapter == NULL ) {
*** 1145,1155 **** CompiledMethod *code = (CompiledMethod *)OrderAccess::load_ptr_acquire(&_code); return code == NULL || (code->method() == NULL) || (code->method() == (Method*)this && !code->is_osr_method()); } // Install compiled code. Instantly it can execute. ! void Method::set_code(methodHandle mh, CompiledMethod *code) { MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag); assert( code, "use clear_code to remove code" ); assert( mh->check_code(), "" ); guarantee(mh->adapter() != NULL, "Adapter blob must already exist!"); --- 1145,1155 ---- CompiledMethod *code = (CompiledMethod *)OrderAccess::load_ptr_acquire(&_code); return code == NULL || (code->method() == NULL) || (code->method() == (Method*)this && !code->is_osr_method()); } // Install compiled code. Instantly it can execute. ! void Method::set_code(const methodHandle& mh, CompiledMethod *code) { MutexLockerEx pl(Patching_lock, Mutex::_no_safepoint_check_flag); assert( code, "use clear_code to remove code" ); assert( mh->check_code(), "" ); guarantee(mh->adapter() != NULL, "Adapter blob must already exist!");
*** 1348,1358 **** } return NULL; } ! methodHandle Method::clone_with_new_data(methodHandle m, u_char* new_code, int new_code_length, u_char* new_compressed_linenumber_table, int new_compressed_linenumber_size, TRAPS) { // Code below does not work for native methods - they should never get rewritten anyway assert(!m->is_native(), "cannot rewrite native methods"); // Allocate new Method* AccessFlags flags = m->access_flags(); --- 1348,1358 ---- } return NULL; } ! methodHandle Method::clone_with_new_data(const methodHandle& m, u_char* new_code, int new_code_length, u_char* new_compressed_linenumber_table, int new_compressed_linenumber_size, TRAPS) { // Code below does not work for native methods - they should never get rewritten anyway assert(!m->is_native(), "cannot rewrite native methods"); // Allocate new Method* AccessFlags flags = m->access_flags();
*** 1543,1553 **** return; } } // These two methods are static since a GC may move the Method ! bool Method::load_signature_classes(methodHandle m, TRAPS) { if (!THREAD->can_call_java()) { // There is nothing useful this routine can do from within the Compile thread. // Hopefully, the signature contains only well-known classes. // We could scan for this and return true/false, but the caller won't care. return false; --- 1543,1553 ---- return; } } // These two methods are static since a GC may move the Method ! bool Method::load_signature_classes(const methodHandle& m, TRAPS) { if (!THREAD->can_call_java()) { // There is nothing useful this routine can do from within the Compile thread. // Hopefully, the signature contains only well-known classes. // We could scan for this and return true/false, but the caller won't care. return false;
*** 1577,1587 **** } } return sig_is_loaded; } ! bool Method::has_unloaded_classes_in_signature(methodHandle m, TRAPS) { Handle class_loader(THREAD, m->method_holder()->class_loader()); Handle protection_domain(THREAD, m->method_holder()->protection_domain()); ResourceMark rm(THREAD); Symbol* signature = m->signature(); for(SignatureStream ss(signature); !ss.is_done(); ss.next()) { --- 1577,1587 ---- } } return sig_is_loaded; } ! bool Method::has_unloaded_classes_in_signature(const methodHandle& m, TRAPS) { Handle class_loader(THREAD, m->method_holder()->class_loader()); Handle protection_domain(THREAD, m->method_holder()->protection_domain()); ResourceMark rm(THREAD); Symbol* signature = m->signature(); for(SignatureStream ss(signature); !ss.is_done(); ss.next()) {
< prev index next >