38 CI_PACKAGE_ACCESS
39 friend class ciField;
40
41 protected:
42 ciInstance(instanceHandle h_i) : ciObject(h_i) {
43 assert(h_i()->is_instance_noinline(), "wrong type");
44 }
45
46 ciInstance(ciKlass* klass) : ciObject(klass) {}
47
48 const char* type_string() { return "ciInstance"; }
49
50 void print_impl(outputStream* st);
51
52 ciConstant field_value_impl(BasicType field_btype, int offset);
53
54 public:
55 // If this object is a java mirror, return the corresponding type.
56 // Otherwise, return null.
57 // (Remember that a java mirror is an instance of java.lang.Class.)
58 ciType* java_mirror_type();
59
60 // What kind of ciObject is this?
61 bool is_instance() { return true; }
62
63 // Constant value of a field.
64 ciConstant field_value(ciField* field);
65
66 // Constant value of a field at the specified offset.
67 ciConstant field_value_by_offset(int field_offset);
68
69 ciKlass* java_lang_Class_klass();
70 };
71
72 #endif // SHARE_CI_CIINSTANCE_HPP
|
38 CI_PACKAGE_ACCESS
39 friend class ciField;
40
41 protected:
42 ciInstance(instanceHandle h_i) : ciObject(h_i) {
43 assert(h_i()->is_instance_noinline(), "wrong type");
44 }
45
46 ciInstance(ciKlass* klass) : ciObject(klass) {}
47
48 const char* type_string() { return "ciInstance"; }
49
50 void print_impl(outputStream* st);
51
52 ciConstant field_value_impl(BasicType field_btype, int offset);
53
54 public:
55 // If this object is a java mirror, return the corresponding type.
56 // Otherwise, return null.
57 // (Remember that a java mirror is an instance of java.lang.Class.)
58 ciType* java_mirror_type(bool* is_null_free_array = nullptr);
59
60 // What kind of ciObject is this?
61 bool is_instance() { return true; }
62
63 // Constant value of a field.
64 ciConstant field_value(ciField* field);
65
66 // Constant value of a field at the specified offset.
67 ciConstant field_value_by_offset(int field_offset);
68
69 ciKlass* java_lang_Class_klass();
70 };
71
72 #endif // SHARE_CI_CIINSTANCE_HPP
|