< prev index next >

src/hotspot/share/code/relocInfo.cpp

Print this page
rev 53683 : 8218625: Remove dead code in relocInfo
Reviewed-by: TBD

@@ -90,22 +90,10 @@
   assert(type()==(int)t, "sanity check");
   assert(addr_offset()==old_offset, "sanity check");
   assert(format()==old_format, "sanity check");
 }
 
-nmethod* RelocIterator::code_as_nmethod() const {
-  return _code->as_nmethod();
-}
-
-void relocInfo::set_format(int f) {
-  int old_offset = addr_offset();
-  assert((f & format_mask) == f, "wrong format");
-  _value = (_value & ~(format_mask << offset_width)) | (f << offset_width);
-  assert(addr_offset()==old_offset, "sanity check");
-}
-
-
 void relocInfo::change_reloc_info_for_address(RelocIterator *itr, address pc, relocType old_type, relocType new_type) {
   bool found = false;
   while (itr->next() && !found) {
     if (itr->addr() == pc) {
       assert(itr->type()==old_type, "wrong relocInfo type found");

@@ -115,15 +103,10 @@
   }
   assert(found, "no relocInfo found for pc");
 }
 
 
-void relocInfo::remove_reloc_info_for_address(RelocIterator *itr, address pc, relocType old_type) {
-  change_reloc_info_for_address(itr, pc, old_type, none);
-}
-
-
 // ----------------------------------------------------------------------------------------------------
 // Implementation of RelocIterator
 
 void RelocIterator::initialize(CompiledMethod* nm, address begin, address limit) {
   initialize_misc();

@@ -177,18 +160,10 @@
   assert(begin == NULL || begin >= cs->start(), "in bounds");
   assert(limit == NULL || limit <= cs->end(),   "in bounds");
   set_limits(begin, limit);
 }
 
-
-enum { indexCardSize = 128 };
-struct RelocIndexEntry {
-  jint addr_offset;          // offset from header_end of an addr()
-  jint reloc_offset;         // offset from header_end of a relocInfo (prefix)
-};
-
-
 bool RelocIterator::addr_in_const() const {
   const int n = CodeBuffer::SECT_CONSTS;
   return section_start(n) <= addr() && addr() < section_end(n);
 }
 

@@ -213,16 +188,10 @@
     set_has_current(false);
   }
 }
 
 
-void RelocIterator::set_limit(address limit) {
-  address code_end = (address)code() + code()->size();
-  assert(limit == NULL || limit <= code_end, "in bounds");
-  _limit = limit;
-}
-
 // All the strange bit-encodings are in here.
 // The idea is to encode relocation data which are small integers
 // very efficiently (a single extra halfword).  Larger chunks of
 // relocation data need a halfword header to hold their size.
 void RelocIterator::advance_over_prefix() {

@@ -620,18 +589,10 @@
     // get the metadata from the pool, and re-insert it into the instruction:
     pd_fix_value(value());
   }
 }
 
-
-void metadata_Relocation::verify_metadata_relocation() {
-  if (!metadata_is_immediate()) {
-    // get the metadata from the pool, and re-insert it into the instruction:
-    verify_value(value());
-  }
-}
-
 address virtual_call_Relocation::cached_value() {
   assert(_cached_value != NULL && _cached_value < addr(), "must precede ic_call");
   return _cached_value;
 }
 
< prev index next >