src/share/vm/oops/constMethod.hpp

Print this page




 198   volatile uint64_t _fingerprint;
 199 
 200   ConstantPool*     _constants;                  // Constant pool
 201 
 202   // Raw stackmap data for the method
 203   Array<u1>*        _stackmap_data;
 204 
 205   int               _constMethod_size;
 206   u2                _flags;
 207 
 208   // Size of Java bytecodes allocated immediately after Method*.
 209   u2                _code_size;
 210   u2                _name_index;                 // Method name (index in constant pool)
 211   u2                _signature_index;            // Method signature (index in constant pool)
 212   u2                _method_idnum;               // unique identification number for the method within the class
 213                                                  // initially corresponds to the index into the methods array.
 214                                                  // but this may change with redefinition
 215   u2                _max_stack;                  // Maximum number of entries on the expression stack
 216   u2                _max_locals;                 // Number of local variables used by this method
 217   u2                _size_of_parameters;         // size of the parameter block (receiver + arguments) in words

 218 
 219   // Constructor
 220   ConstMethod(int byte_code_size,
 221               InlineTableSizes* sizes,
 222               MethodType is_overpass,
 223               int size);
 224 public:
 225 
 226   static ConstMethod* allocate(ClassLoaderData* loader_data,
 227                                int byte_code_size,
 228                                InlineTableSizes* sizes,
 229                                MethodType mt,
 230                                TRAPS);
 231 
 232   bool is_constMethod() const { return true; }
 233 
 234   // Inlined tables
 235   void set_inlined_tables_length(InlineTableSizes* sizes);
 236 
 237   bool has_generic_signature() const


 456   static ByteSize codes_offset()
 457                             { return in_ByteSize(sizeof(ConstMethod)); }
 458 
 459   static ByteSize constants_offset()
 460                             { return byte_offset_of(ConstMethod, _constants); }
 461 
 462   static ByteSize max_stack_offset()
 463                             { return byte_offset_of(ConstMethod, _max_stack); }
 464   static ByteSize size_of_locals_offset()
 465                             { return byte_offset_of(ConstMethod, _max_locals); }
 466   static ByteSize size_of_parameters_offset()
 467                             { return byte_offset_of(ConstMethod, _size_of_parameters); }
 468 
 469 
 470   // Unique id for the method
 471   static const u2 MAX_IDNUM;
 472   static const u2 UNSET_IDNUM;
 473   u2 method_idnum() const                        { return _method_idnum; }
 474   void set_method_idnum(u2 idnum)                { _method_idnum = idnum; }
 475 



 476   // max stack
 477   int  max_stack() const                         { return _max_stack; }
 478   void set_max_stack(int size)                   { _max_stack = size; }
 479 
 480   // max locals
 481   int  max_locals() const                        { return _max_locals; }
 482   void set_max_locals(int size)                  { _max_locals = size; }
 483 
 484   // size of parameters
 485   int  size_of_parameters() const                { return _size_of_parameters; }
 486   void set_size_of_parameters(int size)          { _size_of_parameters = size; }
 487 
 488   // Deallocation for RedefineClasses
 489   void deallocate_contents(ClassLoaderData* loader_data);
 490   bool is_klass() const { return false; }
 491   DEBUG_ONLY(bool on_stack() { return false; })
 492 
 493 private:
 494   // Since the size of the compressed line number table is unknown, the
 495   // offsets of the other variable sized sections are computed backwards




 198   volatile uint64_t _fingerprint;
 199 
 200   ConstantPool*     _constants;                  // Constant pool
 201 
 202   // Raw stackmap data for the method
 203   Array<u1>*        _stackmap_data;
 204 
 205   int               _constMethod_size;
 206   u2                _flags;
 207 
 208   // Size of Java bytecodes allocated immediately after Method*.
 209   u2                _code_size;
 210   u2                _name_index;                 // Method name (index in constant pool)
 211   u2                _signature_index;            // Method signature (index in constant pool)
 212   u2                _method_idnum;               // unique identification number for the method within the class
 213                                                  // initially corresponds to the index into the methods array.
 214                                                  // but this may change with redefinition
 215   u2                _max_stack;                  // Maximum number of entries on the expression stack
 216   u2                _max_locals;                 // Number of local variables used by this method
 217   u2                _size_of_parameters;         // size of the parameter block (receiver + arguments) in words
 218   u2                _orig_method_idnum;          // Original unique identification number for the method
 219 
 220   // Constructor
 221   ConstMethod(int byte_code_size,
 222               InlineTableSizes* sizes,
 223               MethodType is_overpass,
 224               int size);
 225 public:
 226 
 227   static ConstMethod* allocate(ClassLoaderData* loader_data,
 228                                int byte_code_size,
 229                                InlineTableSizes* sizes,
 230                                MethodType mt,
 231                                TRAPS);
 232 
 233   bool is_constMethod() const { return true; }
 234 
 235   // Inlined tables
 236   void set_inlined_tables_length(InlineTableSizes* sizes);
 237 
 238   bool has_generic_signature() const


 457   static ByteSize codes_offset()
 458                             { return in_ByteSize(sizeof(ConstMethod)); }
 459 
 460   static ByteSize constants_offset()
 461                             { return byte_offset_of(ConstMethod, _constants); }
 462 
 463   static ByteSize max_stack_offset()
 464                             { return byte_offset_of(ConstMethod, _max_stack); }
 465   static ByteSize size_of_locals_offset()
 466                             { return byte_offset_of(ConstMethod, _max_locals); }
 467   static ByteSize size_of_parameters_offset()
 468                             { return byte_offset_of(ConstMethod, _size_of_parameters); }
 469 
 470 
 471   // Unique id for the method
 472   static const u2 MAX_IDNUM;
 473   static const u2 UNSET_IDNUM;
 474   u2 method_idnum() const                        { return _method_idnum; }
 475   void set_method_idnum(u2 idnum)                { _method_idnum = idnum; }
 476 
 477   u2 orig_method_idnum() const                   { return _orig_method_idnum; }
 478   void set_orig_method_idnum(u2 idnum)           { _orig_method_idnum = idnum; }
 479 
 480   // max stack
 481   int  max_stack() const                         { return _max_stack; }
 482   void set_max_stack(int size)                   { _max_stack = size; }
 483 
 484   // max locals
 485   int  max_locals() const                        { return _max_locals; }
 486   void set_max_locals(int size)                  { _max_locals = size; }
 487 
 488   // size of parameters
 489   int  size_of_parameters() const                { return _size_of_parameters; }
 490   void set_size_of_parameters(int size)          { _size_of_parameters = size; }
 491 
 492   // Deallocation for RedefineClasses
 493   void deallocate_contents(ClassLoaderData* loader_data);
 494   bool is_klass() const { return false; }
 495   DEBUG_ONLY(bool on_stack() { return false; })
 496 
 497 private:
 498   // Since the size of the compressed line number table is unknown, the
 499   // offsets of the other variable sized sections are computed backwards