comparison src/share/vm/ci/ciEnv.hpp @ 1413:1ecc8f0aad00

Draft implementation of HotSpot CRI / first method compiling without exception.
author Thomas Wuerthinger <thomas.wuerthinger@gmail.com>
date Tue, 18 May 2010 17:43:37 +0200
parents b4776199210f
children 2d26b0046e0d
comparison
equal deleted inserted replaced
1412:9195b99c841b 1413:1ecc8f0aad00
91 ciInstance* _ArrayStoreException_instance; 91 ciInstance* _ArrayStoreException_instance;
92 ciInstance* _ClassCastException_instance; 92 ciInstance* _ClassCastException_instance;
93 93
94 ciInstance* _the_null_string; // The Java string "null" 94 ciInstance* _the_null_string; // The Java string "null"
95 ciInstance* _the_min_jint_string; // The Java string "-2147483648" 95 ciInstance* _the_min_jint_string; // The Java string "-2147483648"
96
97 public:
96 98
97 // Look up a klass by name from a particular class loader (the accessor's). 99 // Look up a klass by name from a particular class loader (the accessor's).
98 // If require_local, result must be defined in that class loader, or NULL. 100 // If require_local, result must be defined in that class loader, or NULL.
99 // If !require_local, a result from remote class loader may be reported, 101 // If !require_local, a result from remote class loader may be reported,
100 // if sufficient class loader constraints exist such that initiating 102 // if sufficient class loader constraints exist such that initiating
125 ciField* get_field_by_index(ciInstanceKlass* loading_klass, 127 ciField* get_field_by_index(ciInstanceKlass* loading_klass,
126 int field_index); 128 int field_index);
127 ciMethod* get_method_by_index(constantPoolHandle cpool, 129 ciMethod* get_method_by_index(constantPoolHandle cpool,
128 int method_index, Bytecodes::Code bc, 130 int method_index, Bytecodes::Code bc,
129 ciInstanceKlass* loading_klass); 131 ciInstanceKlass* loading_klass);
132
133 private:
130 134
131 // Implementation methods for loading and constant pool access. 135 // Implementation methods for loading and constant pool access.
132 ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass, 136 ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass,
133 ciSymbol* klass_name, 137 ciSymbol* klass_name,
134 bool require_local); 138 bool require_local);
158 instanceKlass* holder, 162 instanceKlass* holder,
159 symbolOop name, 163 symbolOop name,
160 symbolOop sig, 164 symbolOop sig,
161 Bytecodes::Code bc); 165 Bytecodes::Code bc);
162 166
167 public:
163 // Get a ciObject from the object factory. Ensures uniqueness 168 // Get a ciObject from the object factory. Ensures uniqueness
164 // of ciObjects. 169 // of ciObjects.
165 ciObject* get_object(oop o) { 170 ciObject* get_object(oop o) {
166 if (o == NULL) { 171 if (o == NULL) {
167 return _null_object_instance; 172 return _null_object_instance;
168 } else { 173 } else {
169 return _factory->get(o); 174 return _factory->get(o);
170 } 175 }
171 } 176 }
177 private:
172 178
173 ciMethod* get_method_from_handle(jobject method); 179 ciMethod* get_method_from_handle(jobject method);
174 180
175 ciInstance* get_or_create_exception(jobject& handle, symbolHandle name); 181 ciInstance* get_or_create_exception(jobject& handle, symbolHandle name);
176 182