Print this page
rev 1026 : imported patch indy.compiler.inline.patch
Split |
Close |
Expand all |
Collapse all |
--- old/src/share/vm/ci/ciKlass.hpp
+++ new/src/share/vm/ci/ciKlass.hpp
1 1 /*
2 - * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
2 + * Copyright 1999-2009 Sun Microsystems, Inc. All Rights Reserved.
3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 4 *
5 5 * This code is free software; you can redistribute it and/or modify it
6 6 * under the terms of the GNU General Public License version 2 only, as
7 7 * published by the Free Software Foundation.
8 8 *
9 9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 12 * version 2 for more details (a copy is included in the LICENSE file that
13 13 * accompanied this code).
14 14 *
15 15 * You should have received a copy of the GNU General Public License version
16 16 * 2 along with this work; if not, write to the Free Software Foundation,
17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 18 *
19 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 21 * have any questions.
22 22 *
23 23 */
24 24
25 25 // ciKlass
26 26 //
27 27 // This class and its subclasses represent klassOops in the
28 28 // HotSpot virtual machine. In the vm, each klassOop contains an
29 29 // embedded Klass object. ciKlass is subclassed to explicitly
30 30 // represent the kind of Klass embedded in the klassOop. For
31 31 // example, a klassOop with an embedded objArrayKlass object is
32 32 // represented in the ciObject hierarchy by the class
33 33 // ciObjArrayKlass.
34 34 class ciKlass : public ciType {
35 35 CI_PACKAGE_ACCESS
36 36 friend class ciEnv;
37 37 friend class ciField;
38 38 friend class ciMethod;
39 39 friend class ciObjArrayKlass;
40 40
41 41 private:
42 42 ciSymbol* _name;
43 43 jint _layout_helper;
44 44
45 45 protected:
46 46 ciKlass(KlassHandle k_h, ciSymbol* name);
47 47 ciKlass(ciSymbol* name, ciKlass* klass);
48 48
49 49 klassOop get_klassOop() const {
50 50 klassOop k = (klassOop)get_oop();
51 51 assert(k != NULL, "illegal use of unloaded klass");
52 52 return k;
53 53 }
54 54
55 55 Klass* get_Klass() const { return get_klassOop()->klass_part(); }
56 56
57 57 // Certain subklasses have an associated class loader.
58 58 virtual oop loader() { return NULL; }
59 59 virtual jobject loader_handle() { return NULL; }
60 60
61 61 virtual oop protection_domain() { return NULL; }
62 62 virtual jobject protection_domain_handle() { return NULL; }
63 63
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
64 64 const char* type_string() { return "ciKlass"; }
65 65
66 66 void print_impl(outputStream* st);
67 67
68 68 public:
69 69 ciKlass(KlassHandle k_h);
70 70
71 71 // What is the name of this klass?
72 72 ciSymbol* name() { return _name; }
73 73
74 + // Is this klass in the given package?
75 + bool is_in_package(const char* packagename) const;
76 +
74 77 // What is its layout helper value?
75 78 jint layout_helper() { return _layout_helper; }
76 79
77 80 bool is_subtype_of(ciKlass* klass);
78 81 bool is_subclass_of(ciKlass* klass);
79 82 juint super_depth();
80 83 juint super_check_offset();
81 84 ciKlass* super_of_depth(juint i);
82 85 bool can_be_primary_super();
83 86 static juint primary_super_limit() { return Klass::primary_super_limit(); }
84 87
85 88 // Get the shared parent of two klasses.
86 89 ciKlass* least_common_ancestor(ciKlass* k);
87 90
88 91 virtual bool is_interface() {
89 92 return false;
90 93 }
91 94
92 95 virtual bool is_abstract() {
93 96 return false;
94 97 }
95 98
96 99 // Does this type (array, class, interface) have no subtypes?
97 100 virtual bool is_leaf_type() {
98 101 return false;
99 102 }
100 103
101 104 // Attempt to get a klass using this ciKlass's loader.
102 105 ciKlass* find_klass(ciSymbol* klass_name);
103 106 // Note: To find a class from its name string, use ciSymbol::make,
104 107 // but consider adding to vmSymbols.hpp instead.
105 108
106 109 // Get the instance of java.lang.Class corresponding to this klass.
107 110 ciInstance* java_mirror();
108 111
109 112 // Fetch Klass::modifier_flags.
110 113 jint modifier_flags();
111 114
112 115 // Fetch Klass::access_flags.
113 116 jint access_flags();
114 117
115 118 // What kind of ciObject is this?
116 119 bool is_klass() { return true; }
117 120
118 121 void print_name_on(outputStream* st);
119 122 };
↓ open down ↓ |
36 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX