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.
64 // Example: short is boxed by java.lang.Short, etc.
65 // Returns self if it is a reference type.
66 // Returns NULL for void, since null is used in such cases.
67 ciKlass* box_klass();
68
69 // Returns true if this is not a klass or array (i.e., not a reference type).
70 bool is_primitive_type() const { return basic_type() != T_OBJECT && basic_type() != T_ARRAY && basic_type() != T_VALUETYPE; }
71 int size() const { return type2size[basic_type()]; }
72 bool is_void() const { return basic_type() == T_VOID; }
73 bool is_one_word() const { return size() == 1; }
74 bool is_two_word() const { return size() == 2; }
75
76 // What kind of ciObject is this?
77 bool is_type() const { return true; }
78 bool is_classless() const { return is_primitive_type(); }
79
80 const char* name();
81 virtual void print_name_on(outputStream* st);
82 void print_name() {
83 print_name_on(tty);
84 }
85
86 static ciType* make(BasicType t);
87 };
88
89
90 // ciReturnAddress
91 //
92 // This class represents the type of a specific return address in the
93 // bytecodes.
94 class ciReturnAddress : public ciType {
95 CI_PACKAGE_ACCESS
96
97 private:
98 // The bci of this return address.
|
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.
64 // Example: short is boxed by java.lang.Short, etc.
65 // Returns self if it is a reference type.
66 // Returns NULL for void, since null is used in such cases.
67 ciKlass* box_klass();
68
69 // Returns true if this is not a klass or array (i.e., not a reference type).
70 bool is_primitive_type() const { return basic_type() != T_OBJECT && basic_type() != T_ARRAY && basic_type() != T_VALUETYPE; }
71 int size() const { return type2size[basic_type()]; }
72 bool is_void() const { return basic_type() == T_VOID; }
73 bool is_one_word() const { return size() == 1; }
74 bool is_two_word() const { return size() == 2; }
75
76 // What kind of ciObject is this?
77 bool is_type() const { return true; }
78 bool is_classless() const { return is_primitive_type(); }
79 bool is__Value() const;
80
81 const char* name();
82 virtual void print_name_on(outputStream* st);
83 void print_name() {
84 print_name_on(tty);
85 }
86
87 static ciType* make(BasicType t);
88 };
89
90
91 // ciReturnAddress
92 //
93 // This class represents the type of a specific return address in the
94 // bytecodes.
95 class ciReturnAddress : public ciType {
96 CI_PACKAGE_ACCESS
97
98 private:
99 // The bci of this return address.
|