hotspot/src/share/vm/oops/constMethod.hpp
changeset 14745 03904dd8649b
parent 14586 1262473e8fc1
child 15102 0a86564e5f61
equal deleted inserted replaced
14739:12125dacc077 14745:03904dd8649b
    44 // | stackmap_data                  (oop)                 |
    44 // | stackmap_data                  (oop)                 |
    45 // | constMethod_size                                     |
    45 // | constMethod_size                                     |
    46 // | interp_kind  | flags    | code_size                  |
    46 // | interp_kind  | flags    | code_size                  |
    47 // | name index              | signature index            |
    47 // | name index              | signature index            |
    48 // | method_idnum            | max_stack                  |
    48 // | method_idnum            | max_stack                  |
       
    49 // | max_locals              | size_of_parameters         |
    49 // |------------------------------------------------------|
    50 // |------------------------------------------------------|
    50 // |                                                      |
    51 // |                                                      |
    51 // | byte codes                                           |
    52 // | byte codes                                           |
    52 // |                                                      |
    53 // |                                                      |
    53 // |------------------------------------------------------|
    54 // |------------------------------------------------------|
   148   u2                _signature_index;            // Method signature (index in constant pool)
   149   u2                _signature_index;            // Method signature (index in constant pool)
   149   u2                _method_idnum;               // unique identification number for the method within the class
   150   u2                _method_idnum;               // unique identification number for the method within the class
   150                                                  // initially corresponds to the index into the methods array.
   151                                                  // initially corresponds to the index into the methods array.
   151                                                  // but this may change with redefinition
   152                                                  // but this may change with redefinition
   152   u2                _max_stack;                  // Maximum number of entries on the expression stack
   153   u2                _max_stack;                  // Maximum number of entries on the expression stack
   153 
   154   u2                _max_locals;                 // Number of local variables used by this method
       
   155   u2                _size_of_parameters;         // size of the parameter block (receiver + arguments) in words
   154 
   156 
   155   // Constructor
   157   // Constructor
   156   ConstMethod(int byte_code_size,
   158   ConstMethod(int byte_code_size,
   157               int compressed_line_number_size,
   159               int compressed_line_number_size,
   158               int localvariable_table_length,
   160               int localvariable_table_length,
   336   static ByteSize constants_offset()
   338   static ByteSize constants_offset()
   337                             { return byte_offset_of(ConstMethod, _constants); }
   339                             { return byte_offset_of(ConstMethod, _constants); }
   338 
   340 
   339   static ByteSize max_stack_offset()
   341   static ByteSize max_stack_offset()
   340                             { return byte_offset_of(ConstMethod, _max_stack); }
   342                             { return byte_offset_of(ConstMethod, _max_stack); }
       
   343   static ByteSize size_of_locals_offset()
       
   344                             { return byte_offset_of(ConstMethod, _max_locals); }
       
   345   static ByteSize size_of_parameters_offset()
       
   346                             { return byte_offset_of(ConstMethod, _size_of_parameters); }
       
   347 
   341 
   348 
   342   // Unique id for the method
   349   // Unique id for the method
   343   static const u2 MAX_IDNUM;
   350   static const u2 MAX_IDNUM;
   344   static const u2 UNSET_IDNUM;
   351   static const u2 UNSET_IDNUM;
   345   u2 method_idnum() const                        { return _method_idnum; }
   352   u2 method_idnum() const                        { return _method_idnum; }
   347 
   354 
   348   // max stack
   355   // max stack
   349   int  max_stack() const                         { return _max_stack; }
   356   int  max_stack() const                         { return _max_stack; }
   350   void set_max_stack(int size)                   { _max_stack = size; }
   357   void set_max_stack(int size)                   { _max_stack = size; }
   351 
   358 
       
   359   // max locals
       
   360   int  max_locals() const                        { return _max_locals; }
       
   361   void set_max_locals(int size)                  { _max_locals = size; }
       
   362 
       
   363   // size of parameters
       
   364   int  size_of_parameters() const                { return _size_of_parameters; }
       
   365   void set_size_of_parameters(int size)          { _size_of_parameters = size; }
       
   366 
   352   // Deallocation for RedefineClasses
   367   // Deallocation for RedefineClasses
   353   void deallocate_contents(ClassLoaderData* loader_data);
   368   void deallocate_contents(ClassLoaderData* loader_data);
   354   bool is_klass() const { return false; }
   369   bool is_klass() const { return false; }
   355   DEBUG_ONLY(bool on_stack() { return false; })
   370   DEBUG_ONLY(bool on_stack() { return false; })
   356 
   371