Mercurial > hg > truffle
annotate src/share/vm/oops/instanceRefKlass.hpp @ 7666:31540ca73e81
Remove ControlFlowException in SimpleLanguage.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 01 Feb 2013 19:53:52 +0100 |
parents | aed758eda82a |
children | db9981fd3124 |
rev | line source |
---|---|
0 | 1 /* |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 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 * | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
342
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
342
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
342
diff
changeset
|
21 * questions. |
0 | 22 * |
23 */ | |
24 | |
1972 | 25 #ifndef SHARE_VM_OOPS_INSTANCEREFKLASS_HPP |
26 #define SHARE_VM_OOPS_INSTANCEREFKLASS_HPP | |
27 | |
28 #include "oops/instanceKlass.hpp" | |
29 | |
6735
aed758eda82a
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
6725
diff
changeset
|
30 // An InstanceRefKlass is a specialized InstanceKlass for Java |
0 | 31 // classes that are subclasses of java/lang/ref/Reference. |
32 // | |
33 // These classes are used to implement soft/weak/final/phantom | |
34 // references and finalization, and need special treatment by the | |
35 // garbage collector. | |
36 // | |
37 // During GC discovered reference objects are added (chained) to one | |
38 // of the four lists below, depending on the type of reference. | |
39 // The linked occurs through the next field in class java/lang/ref/Reference. | |
40 // | |
41 // Afterwards, the discovered references are processed in decreasing | |
42 // order of reachability. Reference objects eligible for notification | |
43 // are linked to the static pending_list in class java/lang/ref/Reference, | |
44 // and the pending list lock object in the same class is notified. | |
45 | |
46 | |
6735
aed758eda82a
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
6725
diff
changeset
|
47 class InstanceRefKlass: public InstanceKlass { |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
48 friend class InstanceKlass; |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
49 |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
50 // Constructor |
6735
aed758eda82a
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
6725
diff
changeset
|
51 InstanceRefKlass(int vtable_len, int itable_len, int static_field_size, int nonstatic_oop_map_size, ReferenceType rt, AccessFlags access_flags, bool is_anonymous) |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
52 : InstanceKlass(vtable_len, itable_len, static_field_size, nonstatic_oop_map_size, rt, access_flags, is_anonymous) {} |
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
53 |
0 | 54 public: |
6735
aed758eda82a
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
6725
diff
changeset
|
55 InstanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); } |
0 | 56 // Type testing |
57 bool oop_is_instanceRef() const { return true; } | |
58 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
59 // Casting from Klass* |
6735
aed758eda82a
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
6725
diff
changeset
|
60 static InstanceRefKlass* cast(Klass* k) { |
aed758eda82a
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
6725
diff
changeset
|
61 assert(k->oop_is_instanceRef(), "cast to InstanceRefKlass"); |
aed758eda82a
7195833: NPG: Rename instanceClassLoaderKlass, instanceRefKlass and instanceMirrorKlass
coleenp
parents:
6725
diff
changeset
|
62 return (InstanceRefKlass*) k; |
0 | 63 } |
64 | |
65 // Garbage collection | |
66 int oop_adjust_pointers(oop obj); | |
67 void oop_follow_contents(oop obj); | |
68 | |
69 // Parallel Scavenge and Parallel Old | |
70 PARALLEL_GC_DECLS | |
71 | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
72 int oop_oop_iterate(oop obj, ExtendedOopClosure* blk) { |
0 | 73 return oop_oop_iterate_v(obj, blk); |
74 } | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
75 int oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) { |
0 | 76 return oop_oop_iterate_v_m(obj, blk, mr); |
77 } | |
78 | |
79 #define InstanceRefKlass_OOP_OOP_ITERATE_DECL(OopClosureType, nv_suffix) \ | |
80 int oop_oop_iterate##nv_suffix(oop obj, OopClosureType* blk); \ | |
81 int oop_oop_iterate##nv_suffix##_m(oop obj, OopClosureType* blk, MemRegion mr); | |
82 | |
83 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_DECL) | |
342 | 84 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_DECL) |
85 | |
86 #ifndef SERIALGC | |
87 #define InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL(OopClosureType, nv_suffix) \ | |
88 int oop_oop_iterate_backwards##nv_suffix(oop obj, OopClosureType* blk); | |
89 | |
90 ALL_OOP_OOP_ITERATE_CLOSURES_1(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL) | |
91 ALL_OOP_OOP_ITERATE_CLOSURES_2(InstanceRefKlass_OOP_OOP_ITERATE_BACKWARDS_DECL) | |
92 #endif // !SERIALGC | |
0 | 93 |
94 static void release_and_notify_pending_list_lock(BasicLock *pending_list_basic_lock); | |
95 static void acquire_pending_list_lock(BasicLock *pending_list_basic_lock); | |
2021
7cf1a74771e8
6988439: Parallel Class Loading test deadlock involving MethodData_lock and Pending List Lock
coleenp
parents:
1972
diff
changeset
|
96 static bool owns_pending_list_lock(JavaThread* thread); |
0 | 97 |
98 // Update non-static oop maps so 'referent', 'nextPending' and | |
99 // 'discovered' will look like non-oops | |
6725
da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
coleenp
parents:
2021
diff
changeset
|
100 static void update_nonstatic_oop_maps(Klass* k); |
0 | 101 |
102 public: | |
103 // Verification | |
104 void oop_verify_on(oop obj, outputStream* st); | |
105 }; | |
1972 | 106 |
107 #endif // SHARE_VM_OOPS_INSTANCEREFKLASS_HPP |