src/share/vm/runtime/relocator.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7013008 Sdiff src/share/vm/runtime

src/share/vm/runtime/relocator.hpp

Print this page




  89   void set_compressed_line_number_table_size(int size)        { _compressed_line_number_table_size = size; }
  90 
  91   methodHandle method() const               { return _method; }
  92   void set_method(methodHandle method)      { _method = method; }
  93 
  94   // This will return a raw bytecode, which is possibly rewritten.
  95   Bytecodes::Code code_at(int bci) const          { return (Bytecodes::Code) code_array()[bci]; }
  96   void code_at_put(int bci, Bytecodes::Code code) { code_array()[bci] = (char) code; }
  97 
  98   // get and set signed integers in the code_array
  99   inline int   int_at(int bci) const               { return Bytes::get_Java_u4(&code_array()[bci]); }
 100   inline void  int_at_put(int bci, int value)      { Bytes::put_Java_u4(&code_array()[bci], value); }
 101 
 102   // get and set signed shorts in the code_array
 103   inline short short_at(int bci) const            { return (short)Bytes::get_Java_u2(&code_array()[bci]); }
 104   inline void  short_at_put(int bci, short value) { Bytes::put_Java_u2((address) &code_array()[bci], value); }
 105 
 106   // get the address of in the code_array
 107   inline char* addr_at(int bci) const             { return (char*) &code_array()[bci]; }
 108 
 109   int  instruction_length_at(int bci)             { return Bytecodes::length_at(_method(), code_array() + bci); }
 110 
 111   // Helper methods
 112   int  align(int n) const                          { return (n+3) & ~3; }
 113   int  code_slop_pct() const                       { return 25; }
 114   bool is_opcode_lookupswitch(Bytecodes::Code bc);
 115 
 116   // basic relocation methods
 117   bool relocate_code         (int bci, int ilen, int delta);
 118   void change_jumps          (int break_bci, int delta);
 119   void change_jump           (int bci, int offset, bool is_short, int break_bci, int delta);
 120   void adjust_exception_table(int bci, int delta);
 121   void adjust_line_no_table  (int bci, int delta);
 122   void adjust_local_var_table(int bci, int delta);
 123   void adjust_stack_map_table(int bci, int delta);
 124   int  get_orig_switch_pad   (int bci, bool is_lookup_switch);
 125   int  rc_instr_len          (int bci);
 126   bool expand_code_array     (int delta);
 127 
 128   // Callback support
 129   RelocatorListener *_listener;


  89   void set_compressed_line_number_table_size(int size)        { _compressed_line_number_table_size = size; }
  90 
  91   methodHandle method() const               { return _method; }
  92   void set_method(methodHandle method)      { _method = method; }
  93 
  94   // This will return a raw bytecode, which is possibly rewritten.
  95   Bytecodes::Code code_at(int bci) const          { return (Bytecodes::Code) code_array()[bci]; }
  96   void code_at_put(int bci, Bytecodes::Code code) { code_array()[bci] = (char) code; }
  97 
  98   // get and set signed integers in the code_array
  99   inline int   int_at(int bci) const               { return Bytes::get_Java_u4(&code_array()[bci]); }
 100   inline void  int_at_put(int bci, int value)      { Bytes::put_Java_u4(&code_array()[bci], value); }
 101 
 102   // get and set signed shorts in the code_array
 103   inline short short_at(int bci) const            { return (short)Bytes::get_Java_u2(&code_array()[bci]); }
 104   inline void  short_at_put(int bci, short value) { Bytes::put_Java_u2((address) &code_array()[bci], value); }
 105 
 106   // get the address of in the code_array
 107   inline char* addr_at(int bci) const             { return (char*) &code_array()[bci]; }
 108 
 109   int  instruction_length_at(int bci)             { return Bytecodes::length_at(NULL, code_array() + bci); }
 110 
 111   // Helper methods
 112   int  align(int n) const                          { return (n+3) & ~3; }
 113   int  code_slop_pct() const                       { return 25; }
 114   bool is_opcode_lookupswitch(Bytecodes::Code bc);
 115 
 116   // basic relocation methods
 117   bool relocate_code         (int bci, int ilen, int delta);
 118   void change_jumps          (int break_bci, int delta);
 119   void change_jump           (int bci, int offset, bool is_short, int break_bci, int delta);
 120   void adjust_exception_table(int bci, int delta);
 121   void adjust_line_no_table  (int bci, int delta);
 122   void adjust_local_var_table(int bci, int delta);
 123   void adjust_stack_map_table(int bci, int delta);
 124   int  get_orig_switch_pad   (int bci, bool is_lookup_switch);
 125   int  rc_instr_len          (int bci);
 126   bool expand_code_array     (int delta);
 127 
 128   // Callback support
 129   RelocatorListener *_listener;
src/share/vm/runtime/relocator.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File