1 /*
2 * Copyright (c) 1997, 2018, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
60 // Clients of this class who are interested in finding if a class has
61 // been completely loaded -- not classes in the process of being loaded --
62 // can read the SystemDictionary unlocked. This is safe because
63 // - entries are only deleted at safepoints
64 // - readers cannot come to a safepoint while actively examining
65 // an entry (an entry cannot be deleted from under a reader)
66 // - entries must be fully formed before they are available to concurrent
67 // readers (we must ensure write ordering)
68 //
69 // Note that placeholders are deleted at any time, as they are removed
70 // when a class is completely loaded. Therefore, readers as well as writers
71 // of placeholders must hold the SystemDictionary_lock.
72 //
73
74 class Dictionary;
75 class PlaceholderTable;
76 class LoaderConstraintTable;
77 template <MEMFLAGS F> class HashtableBucket;
78 class ResolutionErrorTable;
79 class SymbolPropertyTable;
80 class Ticks;
81
82 // Certain classes are preloaded, such as java.lang.Object and java.lang.String.
83 // They are all "well-known", in the sense that no class loader is allowed
84 // to provide a different definition.
85 //
86 // These klasses must all have names defined in vmSymbols.
87
88 #define WK_KLASS_ENUM_NAME(kname) kname##_knum
89
90 // Each well-known class has a short klass name (like object_klass),
91 // a vmSymbol name (like java_lang_Object), and a flag word
92 // that makes some minor distinctions, like whether the klass
93 // is preloaded, optional, release-specific, etc.
94 // The order of these definitions is significant; it is the order in which
95 // preloading is actually performed by initialize_preloaded_classes.
96
97 #define WK_KLASSES_DO(do_klass) \
98 /* well-known classes */ \
99 do_klass(Object_klass, java_lang_Object, Pre ) \
100 do_klass(String_klass, java_lang_String, Pre ) \
|
1 /*
2 * Copyright (c) 1997, 2019, Oracle and/or its affiliates. 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
60 // Clients of this class who are interested in finding if a class has
61 // been completely loaded -- not classes in the process of being loaded --
62 // can read the SystemDictionary unlocked. This is safe because
63 // - entries are only deleted at safepoints
64 // - readers cannot come to a safepoint while actively examining
65 // an entry (an entry cannot be deleted from under a reader)
66 // - entries must be fully formed before they are available to concurrent
67 // readers (we must ensure write ordering)
68 //
69 // Note that placeholders are deleted at any time, as they are removed
70 // when a class is completely loaded. Therefore, readers as well as writers
71 // of placeholders must hold the SystemDictionary_lock.
72 //
73
74 class Dictionary;
75 class PlaceholderTable;
76 class LoaderConstraintTable;
77 template <MEMFLAGS F> class HashtableBucket;
78 class ResolutionErrorTable;
79 class SymbolPropertyTable;
80
81 // Certain classes are preloaded, such as java.lang.Object and java.lang.String.
82 // They are all "well-known", in the sense that no class loader is allowed
83 // to provide a different definition.
84 //
85 // These klasses must all have names defined in vmSymbols.
86
87 #define WK_KLASS_ENUM_NAME(kname) kname##_knum
88
89 // Each well-known class has a short klass name (like object_klass),
90 // a vmSymbol name (like java_lang_Object), and a flag word
91 // that makes some minor distinctions, like whether the klass
92 // is preloaded, optional, release-specific, etc.
93 // The order of these definitions is significant; it is the order in which
94 // preloading is actually performed by initialize_preloaded_classes.
95
96 #define WK_KLASSES_DO(do_klass) \
97 /* well-known classes */ \
98 do_klass(Object_klass, java_lang_Object, Pre ) \
99 do_klass(String_klass, java_lang_String, Pre ) \
|