1.1 --- a/src/share/vm/code/codeBlob.cpp Tue Jun 01 11:48:33 2010 -0700 1.2 +++ b/src/share/vm/code/codeBlob.cpp Wed Jun 02 22:45:42 2010 -0700 1.3 @@ -66,8 +66,6 @@ 1.4 _relocation_size = locs_size; 1.5 _instructions_offset = align_code_offset(header_size + locs_size); 1.6 _data_offset = size; 1.7 - _oops_offset = size; 1.8 - _oops_length = 0; 1.9 _frame_size = 0; 1.10 set_oop_maps(NULL); 1.11 } 1.12 @@ -94,9 +92,6 @@ 1.13 _relocation_size = round_to(cb->total_relocation_size(), oopSize); 1.14 _instructions_offset = align_code_offset(header_size + _relocation_size); 1.15 _data_offset = _instructions_offset + round_to(cb->total_code_size(), oopSize); 1.16 - _oops_offset = _size - round_to(cb->total_oop_size(), oopSize); 1.17 - _oops_length = 0; // temporary, until the copy_oops handshake 1.18 - assert(_oops_offset >= _data_offset, "codeBlob is too small"); 1.19 assert(_data_offset <= size, "codeBlob is too small"); 1.20 1.21 cb->copy_code_and_locs_to(this); 1.22 @@ -131,99 +126,6 @@ 1.23 } 1.24 1.25 1.26 -// Promote one word from an assembly-time handle to a live embedded oop. 1.27 -inline void CodeBlob::initialize_immediate_oop(oop* dest, jobject handle) { 1.28 - if (handle == NULL || 1.29 - // As a special case, IC oops are initialized to 1 or -1. 1.30 - handle == (jobject) Universe::non_oop_word()) { 1.31 - (*dest) = (oop)handle; 1.32 - } else { 1.33 - (*dest) = JNIHandles::resolve_non_null(handle); 1.34 - } 1.35 -} 1.36 - 1.37 - 1.38 -void CodeBlob::copy_oops(GrowableArray<jobject>* array) { 1.39 - assert(_oops_length == 0, "do this handshake just once, please"); 1.40 - int length = array->length(); 1.41 - assert((address)(oops_begin() + length) <= data_end(), "oops big enough"); 1.42 - oop* dest = oops_begin(); 1.43 - for (int index = 0 ; index < length; index++) { 1.44 - initialize_immediate_oop(&dest[index], array->at(index)); 1.45 - } 1.46 - _oops_length = length; 1.47 - 1.48 - // Now we can fix up all the oops in the code. 1.49 - // We need to do this in the code because 1.50 - // the assembler uses jobjects as placeholders. 1.51 - // The code and relocations have already been 1.52 - // initialized by the CodeBlob constructor, 1.53 - // so it is valid even at this early point to 1.54 - // iterate over relocations and patch the code. 1.55 - fix_oop_relocations(NULL, NULL, /*initialize_immediates=*/ true); 1.56 -} 1.57 - 1.58 - 1.59 -relocInfo::relocType CodeBlob::reloc_type_for_address(address pc) { 1.60 - RelocIterator iter(this, pc, pc+1); 1.61 - while (iter.next()) { 1.62 - return (relocInfo::relocType) iter.type(); 1.63 - } 1.64 - // No relocation info found for pc 1.65 - ShouldNotReachHere(); 1.66 - return relocInfo::none; // dummy return value 1.67 -} 1.68 - 1.69 - 1.70 -bool CodeBlob::is_at_poll_return(address pc) { 1.71 - RelocIterator iter(this, pc, pc+1); 1.72 - while (iter.next()) { 1.73 - if (iter.type() == relocInfo::poll_return_type) 1.74 - return true; 1.75 - } 1.76 - return false; 1.77 -} 1.78 - 1.79 - 1.80 -bool CodeBlob::is_at_poll_or_poll_return(address pc) { 1.81 - RelocIterator iter(this, pc, pc+1); 1.82 - while (iter.next()) { 1.83 - relocInfo::relocType t = iter.type(); 1.84 - if (t == relocInfo::poll_return_type || t == relocInfo::poll_type) 1.85 - return true; 1.86 - } 1.87 - return false; 1.88 -} 1.89 - 1.90 - 1.91 -void CodeBlob::fix_oop_relocations(address begin, address end, 1.92 - bool initialize_immediates) { 1.93 - // re-patch all oop-bearing instructions, just in case some oops moved 1.94 - RelocIterator iter(this, begin, end); 1.95 - while (iter.next()) { 1.96 - if (iter.type() == relocInfo::oop_type) { 1.97 - oop_Relocation* reloc = iter.oop_reloc(); 1.98 - if (initialize_immediates && reloc->oop_is_immediate()) { 1.99 - oop* dest = reloc->oop_addr(); 1.100 - initialize_immediate_oop(dest, (jobject) *dest); 1.101 - } 1.102 - // Refresh the oop-related bits of this instruction. 1.103 - reloc->fix_oop_relocation(); 1.104 - } 1.105 - 1.106 - // There must not be any interfering patches or breakpoints. 1.107 - assert(!(iter.type() == relocInfo::breakpoint_type 1.108 - && iter.breakpoint_reloc()->active()), 1.109 - "no active breakpoint"); 1.110 - } 1.111 -} 1.112 - 1.113 -void CodeBlob::do_unloading(BoolObjectClosure* is_alive, 1.114 - OopClosure* keep_alive, 1.115 - bool unloading_occurred) { 1.116 - ShouldNotReachHere(); 1.117 -} 1.118 - 1.119 OopMap* CodeBlob::oop_map_for_return_address(address return_address) { 1.120 address pc = return_address ; 1.121 assert (oop_maps() != NULL, "nope");