23 */
24
25 #ifndef SHARE_VM_CI_CITYPE_HPP
26 #define SHARE_VM_CI_CITYPE_HPP
27
28 #include "ci/ciMetadata.hpp"
29
30 // ciType
31 //
32 // This class represents either a class (T_OBJECT), array (T_ARRAY),
33 // or one of the primitive types such as T_INT.
34 class ciType : public ciMetadata {
35 CI_PACKAGE_ACCESS
36 friend class ciKlass;
37 friend class ciReturnAddress;
38
39 private:
40 BasicType _basic_type;
41
42 ciType(BasicType t); // for primitive and unloaded types
43 ciType(KlassHandle k); // for subclasses (reference types)
44
45 const char* type_string() { return "ciType"; }
46
47 void print_impl(outputStream* st);
48
49 // Distinguished instances of primitive ciTypes..
50 static ciType* _basic_types[T_CONFLICT+1];
51
52 public:
53 BasicType basic_type() const { return _basic_type; }
54
55 // Returns true iff the types are identical, or if both are klasses
56 // and the is_subtype_of relation holds between the klasses.
57 bool is_subtype_of(ciType* type);
58
59 // Get the instance of java.lang.Class corresponding to this type.
60 // There are mirrors for instance, array, and primitive types (incl. void).
61 virtual ciInstance* java_mirror();
62
63 // Get the class which "boxes" (or "wraps") values of this type.
|
23 */
24
25 #ifndef SHARE_VM_CI_CITYPE_HPP
26 #define SHARE_VM_CI_CITYPE_HPP
27
28 #include "ci/ciMetadata.hpp"
29
30 // ciType
31 //
32 // This class represents either a class (T_OBJECT), array (T_ARRAY),
33 // or one of the primitive types such as T_INT.
34 class ciType : public ciMetadata {
35 CI_PACKAGE_ACCESS
36 friend class ciKlass;
37 friend class ciReturnAddress;
38
39 private:
40 BasicType _basic_type;
41
42 ciType(BasicType t); // for primitive and unloaded types
43 ciType(Klass* k); // for subclasses (reference types)
44
45 const char* type_string() { return "ciType"; }
46
47 void print_impl(outputStream* st);
48
49 // Distinguished instances of primitive ciTypes..
50 static ciType* _basic_types[T_CONFLICT+1];
51
52 public:
53 BasicType basic_type() const { return _basic_type; }
54
55 // Returns true iff the types are identical, or if both are klasses
56 // and the is_subtype_of relation holds between the klasses.
57 bool is_subtype_of(ciType* type);
58
59 // Get the instance of java.lang.Class corresponding to this type.
60 // There are mirrors for instance, array, and primitive types (incl. void).
61 virtual ciInstance* java_mirror();
62
63 // Get the class which "boxes" (or "wraps") values of this type.
|