515 static const u2 MAX_IDNUM;
516 static const u2 UNSET_IDNUM;
517 u2 method_idnum() const { return _method_idnum; }
518 void set_method_idnum(u2 idnum) { _method_idnum = idnum; }
519
520 u2 orig_method_idnum() const { return _orig_method_idnum; }
521 void set_orig_method_idnum(u2 idnum) { _orig_method_idnum = idnum; }
522
523 // max stack
524 int max_stack() const { return _max_stack; }
525 void set_max_stack(int size) { _max_stack = size; }
526
527 // max locals
528 int max_locals() const { return _max_locals; }
529 void set_max_locals(int size) { _max_locals = size; }
530
531 // size of parameters
532 int size_of_parameters() const { return _size_of_parameters; }
533 void set_size_of_parameters(int size) { _size_of_parameters = size; }
534
535 void set_result_type(BasicType rt) { assert(rt < 16, "result type too large");
536 _result_type = (u1)rt; }
537 // Deallocation for RedefineClasses
538 void deallocate_contents(ClassLoaderData* loader_data);
539 bool is_klass() const { return false; }
540 DEBUG_ONLY(bool on_stack() { return false; })
541
542 void metaspace_pointers_do(MetaspaceClosure* it);
543 MetaspaceObj::Type type() const { return ConstMethodType; }
544 private:
545 // Since the size of the compressed line number table is unknown, the
546 // offsets of the other variable sized sections are computed backwards
547 // from the end of the ConstMethod*.
548
549 // First byte after ConstMethod*
550 address constMethod_end() const
551 { return (address)((intptr_t*)this + _constMethod_size); }
552
553 // Last short in ConstMethod*
554 u2* last_u2_element() const;
|
515 static const u2 MAX_IDNUM;
516 static const u2 UNSET_IDNUM;
517 u2 method_idnum() const { return _method_idnum; }
518 void set_method_idnum(u2 idnum) { _method_idnum = idnum; }
519
520 u2 orig_method_idnum() const { return _orig_method_idnum; }
521 void set_orig_method_idnum(u2 idnum) { _orig_method_idnum = idnum; }
522
523 // max stack
524 int max_stack() const { return _max_stack; }
525 void set_max_stack(int size) { _max_stack = size; }
526
527 // max locals
528 int max_locals() const { return _max_locals; }
529 void set_max_locals(int size) { _max_locals = size; }
530
531 // size of parameters
532 int size_of_parameters() const { return _size_of_parameters; }
533 void set_size_of_parameters(int size) { _size_of_parameters = size; }
534
535 // result type (basic type of return value)
536 BasicType result_type() const { assert(_result_type >= T_BOOLEAN, "Must be set");
537 return (BasicType)_result_type; }
538
539 void set_result_type(BasicType rt) { assert(rt < 16, "result type too large");
540 _result_type = (u1)rt; }
541 // Deallocation for RedefineClasses
542 void deallocate_contents(ClassLoaderData* loader_data);
543 bool is_klass() const { return false; }
544 DEBUG_ONLY(bool on_stack() { return false; })
545
546 void metaspace_pointers_do(MetaspaceClosure* it);
547 MetaspaceObj::Type type() const { return ConstMethodType; }
548 private:
549 // Since the size of the compressed line number table is unknown, the
550 // offsets of the other variable sized sections are computed backwards
551 // from the end of the ConstMethod*.
552
553 // First byte after ConstMethod*
554 address constMethod_end() const
555 { return (address)((intptr_t*)this + _constMethod_size); }
556
557 // Last short in ConstMethod*
558 u2* last_u2_element() const;
|