105 // generated code to represent this oop. This address
106 // is not the true address of the oop -- it will get patched
107 // during nmethod creation.
108 //
109 // Usage note: no address arithmetic allowed. Oop must
110 // be registered with the oopRecorder.
111 jobject constant_encoding();
112
113 virtual bool is_object() const { return true; }
114
115 // What kind of ciObject is this?
116 virtual bool is_null_object() const { return false; }
117 virtual bool is_call_site() const { return false; }
118 virtual bool is_instance() { return false; }
119 virtual bool is_member_name() const { return false; }
120 virtual bool is_method_handle() const { return false; }
121 virtual bool is_method_type() const { return false; }
122 virtual bool is_array() { return false; }
123 virtual bool is_obj_array() { return false; }
124 virtual bool is_type_array() { return false; }
125
126 // Is this a type or value which has no associated class?
127 // It is true of primitive types and null objects.
128 virtual bool is_classless() const { return false; }
129 virtual void dump_replay_data(outputStream* st) { /* do nothing */ }
130
131 // Note: some ciObjects refer to oops which have yet to be created.
132 // We refer to these as "unloaded". Specifically, there are
133 // unloaded instances of java.lang.Class,
134 // java.lang.invoke.MethodHandle, and java.lang.invoke.MethodType.
135 // By convention the ciNullObject is considered loaded, and
136 // primitive types are considered loaded.
137 bool is_loaded() const {
138 return handle() != NULL || is_classless();
139 }
140
141 // Subclass casting with assertions.
142 ciNullObject* as_null_object() {
143 assert(is_null_object(), "bad cast");
144 return (ciNullObject*)this;
|
105 // generated code to represent this oop. This address
106 // is not the true address of the oop -- it will get patched
107 // during nmethod creation.
108 //
109 // Usage note: no address arithmetic allowed. Oop must
110 // be registered with the oopRecorder.
111 jobject constant_encoding();
112
113 virtual bool is_object() const { return true; }
114
115 // What kind of ciObject is this?
116 virtual bool is_null_object() const { return false; }
117 virtual bool is_call_site() const { return false; }
118 virtual bool is_instance() { return false; }
119 virtual bool is_member_name() const { return false; }
120 virtual bool is_method_handle() const { return false; }
121 virtual bool is_method_type() const { return false; }
122 virtual bool is_array() { return false; }
123 virtual bool is_obj_array() { return false; }
124 virtual bool is_type_array() { return false; }
125 virtual bool is_value_array() { return false; }
126
127 // Is this a type or value which has no associated class?
128 // It is true of primitive types and null objects.
129 virtual bool is_classless() const { return false; }
130 virtual void dump_replay_data(outputStream* st) { /* do nothing */ }
131
132 // Note: some ciObjects refer to oops which have yet to be created.
133 // We refer to these as "unloaded". Specifically, there are
134 // unloaded instances of java.lang.Class,
135 // java.lang.invoke.MethodHandle, and java.lang.invoke.MethodType.
136 // By convention the ciNullObject is considered loaded, and
137 // primitive types are considered loaded.
138 bool is_loaded() const {
139 return handle() != NULL || is_classless();
140 }
141
142 // Subclass casting with assertions.
143 ciNullObject* as_null_object() {
144 assert(is_null_object(), "bad cast");
145 return (ciNullObject*)this;
|