611 assert(_section_start[n], "must be initialized");
612 return _section_start[n];
613 }
614 address section_end(int n) const {
615 assert(_section_end[n], "must be initialized");
616 return _section_end[n];
617 }
618
619 // The address points to the affected displacement part of the instruction.
620 // For RISC, this is just the whole instruction.
621 // For Intel, this is an unaligned 32-bit word.
622
623 // type-specific relocation accessors: oop_Relocation* oop_reloc(), etc.
624 #define EACH_TYPE(name) \
625 inline name##_Relocation* name##_reloc();
626 APPLY_TO_RELOCATIONS(EACH_TYPE)
627 #undef EACH_TYPE
628 // generic relocation accessor; switches on type to call the above
629 Relocation* reloc();
630
631 // CodeBlob's have relocation indexes for faster random access:
632 static int locs_and_index_size(int code_size, int locs_size);
633 // Store an index into [dest_start+dest_count..dest_end).
634 // At dest_start[0..dest_count] is the actual relocation information.
635 // Everything else up to dest_end is free space for the index.
636 static void create_index(relocInfo* dest_begin, int dest_count, relocInfo* dest_end);
637
638 #ifndef PRODUCT
639 public:
640 void print();
641 void print_current();
642 #endif
643 };
644
645
646 // A Relocation is a flyweight object allocated within a RelocationHolder.
647 // It represents the relocation data of relocation record.
648 // So, the RelocIterator unpacks relocInfos into Relocations.
649
650 class Relocation VALUE_OBJ_CLASS_SPEC {
651 friend class RelocationHolder;
652 friend class RelocIterator;
653
654 private:
655 static void guarantee_size();
656
657 // When a relocation has been created by a RelocIterator,
|
611 assert(_section_start[n], "must be initialized");
612 return _section_start[n];
613 }
614 address section_end(int n) const {
615 assert(_section_end[n], "must be initialized");
616 return _section_end[n];
617 }
618
619 // The address points to the affected displacement part of the instruction.
620 // For RISC, this is just the whole instruction.
621 // For Intel, this is an unaligned 32-bit word.
622
623 // type-specific relocation accessors: oop_Relocation* oop_reloc(), etc.
624 #define EACH_TYPE(name) \
625 inline name##_Relocation* name##_reloc();
626 APPLY_TO_RELOCATIONS(EACH_TYPE)
627 #undef EACH_TYPE
628 // generic relocation accessor; switches on type to call the above
629 Relocation* reloc();
630
631 #ifndef PRODUCT
632 public:
633 void print();
634 void print_current();
635 #endif
636 };
637
638
639 // A Relocation is a flyweight object allocated within a RelocationHolder.
640 // It represents the relocation data of relocation record.
641 // So, the RelocIterator unpacks relocInfos into Relocations.
642
643 class Relocation VALUE_OBJ_CLASS_SPEC {
644 friend class RelocationHolder;
645 friend class RelocIterator;
646
647 private:
648 static void guarantee_size();
649
650 // When a relocation has been created by a RelocIterator,
|