src/share/vm/oops/cpCacheKlass.hpp

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

author
coleenp
date
Tue, 14 Oct 2008 10:15:33 -0400
changeset 833
443791f333a2
parent 631
d1605aabd0a1
child 977
9a25e0c45327
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 1998-2008 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 class constantPoolCacheKlass: public Klass {
    26   juint    _alloc_size;        // allocation profiling support
    27  public:
    28   // Dispatched klass operations
    29   bool oop_is_constantPoolCache() const          { return true; }
    30   int  oop_size(oop obj) const;
    31   int  klass_oop_size() const                    { return object_size(); }
    33   // Allocation
    34   DEFINE_ALLOCATE_PERMANENT(constantPoolCacheKlass);
    35   constantPoolCacheOop allocate(int length, TRAPS);
    36   static klassOop create_klass(TRAPS);
    38   // Casting from klassOop
    39   static constantPoolCacheKlass* cast(klassOop k) {
    40     assert(k->klass_part()->oop_is_constantPoolCache(), "cast to constantPoolCacheKlass");
    41     return (constantPoolCacheKlass*)k->klass_part();
    42   }
    44   // Sizing
    45   static int header_size()       { return oopDesc::header_size() + sizeof(constantPoolCacheKlass)/HeapWordSize; }
    46   int object_size() const        { return align_object_size(header_size()); }
    48   // Garbage collection
    49   void oop_follow_contents(oop obj);
    50   int oop_adjust_pointers(oop obj);
    52   // Parallel Scavenge and Parallel Old
    53   PARALLEL_GC_DECLS
    55   // Iterators
    56   int oop_oop_iterate(oop obj, OopClosure* blk);
    57   int oop_oop_iterate_m(oop obj, OopClosure* blk, MemRegion mr);
    59   // Allocation profiling support
    60   juint alloc_size() const              { return _alloc_size; }
    61   void set_alloc_size(juint n)          { _alloc_size = n; }
    63 #ifndef PRODUCT
    64  public:
    65   // Printing
    66   void oop_print_on(oop obj, outputStream* st);
    67 #endif
    69  public:
    70   // Verification
    71   const char* internal_name() const;
    72   void oop_verify_on(oop obj, outputStream* st);
    73 };

mercurial