src/share/vm/oops/constMethodKlass.hpp

Tue, 14 Oct 2008 10:15:33 -0400

author
coleenp
date
Tue, 14 Oct 2008 10:15:33 -0400
changeset 833
443791f333a2
parent 435
a61af66fc99e
child 953
0af8b0718fc9
permissions
-rw-r--r--

6700107: java/lang/Class/forName/TooManyDimensions.java crashes with SIGSEGV in c2 compiler with fastdebug
Summary: objArrayKlass::compute_modifier_flags was unnecessarily recursive
Reviewed-by: kamg

     1 /*
     2  * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     8  *
     9  * This code is distributed in the hope that it will be useful, but WITHOUT
    10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    12  * version 2 for more details (a copy is included in the LICENSE file that
    13  * accompanied this code).
    14  *
    15  * You should have received a copy of the GNU General Public License version
    16  * 2 along with this work; if not, write to the Free Software Foundation,
    17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    18  *
    19  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    20  * CA 95054 USA or visit www.sun.com if you need additional information or
    21  * have any questions.
    22  *
    23  */
    25 // A constMethodKlass is the klass of a constMethodOop
    27 class constMethodKlass : public Klass {
    28   friend class VMStructs;
    29 private:
    30   juint    _alloc_size;        // allocation profiling support
    31 public:
    32   // Testing
    33   bool oop_is_constMethod() const { return true; }
    34   virtual bool oop_is_parsable(oop obj) const;
    36   // Allocation
    37   DEFINE_ALLOCATE_PERMANENT(constMethodKlass);
    38   constMethodOop allocate(int byte_code_size, int compressed_line_number_size,
    39                           int localvariable_table_length,
    40                           int checked_exceptions_length, TRAPS);
    41   static klassOop create_klass(TRAPS);
    43   // Sizing
    44   int oop_size(oop obj) const;
    45   int klass_oop_size() const     { return object_size(); }
    47   // Casting from klassOop
    48   static constMethodKlass* cast(klassOop k) {
    49     assert(k->klass_part()->oop_is_constMethod(), "cast to constMethodKlass");
    50     return (constMethodKlass*) k->klass_part();
    51   }
    53   // Sizing
    54   static int header_size() {
    55     return oopDesc::header_size() + sizeof(constMethodKlass)/HeapWordSize;
    56   }
    57   int object_size() const {
    58     return align_object_size(header_size());
    59   }
    61   // Garbage collection
    62   void oop_follow_contents(oop obj);
    63   int  oop_adjust_pointers(oop obj);
    65   // Parallel Scavenge and Parallel Old
    66   PARALLEL_GC_DECLS
    68   // Allocation profiling support
    69   juint alloc_size() const              { return _alloc_size; }
    70   void set_alloc_size(juint n)          { _alloc_size = n; }
    72   // Iterators
    73   int oop_oop_iterate(oop obj, OopClosure* blk);
    74   int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr);
    76 #ifndef PRODUCT
    77  public:
    78   // Printing
    79   void oop_print_on      (oop obj, outputStream* st);
    80   void oop_print_value_on(oop obj, outputStream* st);
    82 #endif
    84  public:
    85   // Verify operations
    86   const char* internal_name() const;
    87   void oop_verify_on(oop obj, outputStream* st);
    88   bool oop_partially_loaded(oop obj) const;
    89   void oop_set_partially_loaded(oop obj);
    90 };

mercurial