1 /*
2 * Copyright (c) 2003, 2007, 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 *
23 */
24
25 class PlaceholderEntry;
26
27 // Placeholder objects. These represent classes currently
28 // being loaded, as well as arrays of primitives.
29 //
30
31 class PlaceholderTable : public TwoOopHashtable {
32 friend class VMStructs;
33
34 public:
35 PlaceholderTable(int table_size);
36
37 PlaceholderEntry* new_entry(int hash, symbolOop name, oop loader, bool havesupername, symbolOop supername);
38
39 PlaceholderEntry* bucket(int i) {
40 return (PlaceholderEntry*)Hashtable::bucket(i);
41 }
42
43 PlaceholderEntry** bucket_addr(int i) {
44 return (PlaceholderEntry**)Hashtable::bucket_addr(i);
312 if (seen->next()) {
313 seen->next()->set_prev(prev);
314 }
315 delete seen;
316 break;
317 }
318 prev = seen;
319 seen = seen->next();
320 }
321 return (actionToQueue(action) == NULL);
322 }
323
324 // GC support
325 // Applies "f->do_oop" to all root oops in the placeholder table.
326 void oops_do(OopClosure* blk);
327
328 // Print method doesn't append a cr
329 void print() const PRODUCT_RETURN;
330 void verify() const;
331 };
|
1 /*
2 * Copyright (c) 2003, 2010, 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 *
23 */
24
25 #ifndef SHARE_VM_CLASSFILE_PLACEHOLDERS_HPP
26 #define SHARE_VM_CLASSFILE_PLACEHOLDERS_HPP
27
28 #include "utilities/hashtable.hpp"
29
30 class PlaceholderEntry;
31
32 // Placeholder objects. These represent classes currently
33 // being loaded, as well as arrays of primitives.
34 //
35
36 class PlaceholderTable : public TwoOopHashtable {
37 friend class VMStructs;
38
39 public:
40 PlaceholderTable(int table_size);
41
42 PlaceholderEntry* new_entry(int hash, symbolOop name, oop loader, bool havesupername, symbolOop supername);
43
44 PlaceholderEntry* bucket(int i) {
45 return (PlaceholderEntry*)Hashtable::bucket(i);
46 }
47
48 PlaceholderEntry** bucket_addr(int i) {
49 return (PlaceholderEntry**)Hashtable::bucket_addr(i);
317 if (seen->next()) {
318 seen->next()->set_prev(prev);
319 }
320 delete seen;
321 break;
322 }
323 prev = seen;
324 seen = seen->next();
325 }
326 return (actionToQueue(action) == NULL);
327 }
328
329 // GC support
330 // Applies "f->do_oop" to all root oops in the placeholder table.
331 void oops_do(OopClosure* blk);
332
333 // Print method doesn't append a cr
334 void print() const PRODUCT_RETURN;
335 void verify() const;
336 };
337
338 #endif // SHARE_VM_CLASSFILE_PLACEHOLDERS_HPP
|