src/share/vm/oops/instanceClassLoaderKlass.hpp

Fri, 07 Sep 2012 12:04:16 -0400

author
coleenp
date
Fri, 07 Sep 2012 12:04:16 -0400
changeset 4047
aed758eda82a
parent 4037
da91efe96a93
child 4542
db9981fd3124
permissions
-rw-r--r--

7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
Summary: Simple renaming to be consistent with instanceKlass->InstanceKlass renaming
Reviewed-by: stefank, jmasa

coleenp@4037 1 /*
coleenp@4037 2 * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
coleenp@4037 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
coleenp@4037 4 *
coleenp@4037 5 * This code is free software; you can redistribute it and/or modify it
coleenp@4037 6 * under the terms of the GNU General Public License version 2 only, as
coleenp@4037 7 * published by the Free Software Foundation.
coleenp@4037 8 *
coleenp@4037 9 * This code is distributed in the hope that it will be useful, but WITHOUT
coleenp@4037 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
coleenp@4037 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
coleenp@4037 12 * version 2 for more details (a copy is included in the LICENSE file that
coleenp@4037 13 * accompanied this code).
coleenp@4037 14 *
coleenp@4037 15 * You should have received a copy of the GNU General Public License version
coleenp@4037 16 * 2 along with this work; if not, write to the Free Software Foundation,
coleenp@4037 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
coleenp@4037 18 *
coleenp@4037 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
coleenp@4037 20 * or visit www.oracle.com if you need additional information or have any
coleenp@4037 21 * questions.
coleenp@4037 22 *
coleenp@4037 23 */
coleenp@4037 24
coleenp@4037 25 #ifndef SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP
coleenp@4037 26 #define SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP
coleenp@4037 27
coleenp@4037 28 #include "oops/instanceKlass.hpp"
coleenp@4037 29
coleenp@4047 30 // An InstanceClassLoaderKlass is a specialization of the InstanceKlass. It does
coleenp@4037 31 // not add any field. It is added to walk the dependencies for the class loader
coleenp@4037 32 // key that this class loader points to. This is how the loader_data graph is
coleenp@4037 33 // walked and dependant class loaders are kept alive. I thought we walked
coleenp@4037 34 // the list later?
coleenp@4037 35
coleenp@4047 36 class InstanceClassLoaderKlass: public InstanceKlass {
coleenp@4037 37 friend class VMStructs;
coleenp@4037 38 friend class InstanceKlass;
coleenp@4037 39
coleenp@4037 40 // Constructor
coleenp@4047 41 InstanceClassLoaderKlass(int vtable_len, int itable_len, int static_field_size, int nonstatic_oop_map_size, ReferenceType rt, AccessFlags access_flags, bool is_anonymous)
coleenp@4037 42 : InstanceKlass(vtable_len, itable_len, static_field_size, nonstatic_oop_map_size, rt, access_flags, is_anonymous) {}
coleenp@4037 43
coleenp@4037 44 public:
coleenp@4037 45 virtual bool oop_is_instanceClassLoader() const { return true; }
coleenp@4037 46
coleenp@4047 47 InstanceClassLoaderKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
coleenp@4037 48
coleenp@4037 49 // Iterators
coleenp@4037 50 int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
coleenp@4037 51 return oop_oop_iterate_v(obj, blk);
coleenp@4037 52 }
coleenp@4037 53 int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {
coleenp@4037 54 return oop_oop_iterate_v_m(obj, blk, mr);
coleenp@4037 55 }
coleenp@4037 56
coleenp@4037 57 #define InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \
coleenp@4037 58 int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk); \
coleenp@4037 59 int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, MemRegion mr);
coleenp@4037 60
coleenp@4037 61 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
coleenp@4037 62 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_DECL)
coleenp@4037 63
coleenp@4037 64 #ifndef SERIALGC
coleenp@4037 65 #define InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \
coleenp@4037 66 int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk);
coleenp@4037 67
coleenp@4037 68 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
coleenp@4037 69 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceClassLoaderKlass_OOP_OOP_ITERATE_BACKWARDS_DECL)
coleenp@4037 70 #endif // !SERIALGC
coleenp@4037 71
coleenp@4037 72 // Garbage collection
coleenp@4037 73 void oop_follow_contents(oop obj);
coleenp@4037 74
coleenp@4037 75 // Parallel Scavenge and Parallel Old
coleenp@4037 76 PARALLEL_GC_DECLS
coleenp@4037 77 };
coleenp@4037 78
coleenp@4037 79 #endif // SHARE_VM_OOPS_INSTANCECLASSLOADERKLASS_HPP

mercurial