comparison src/share/vm/ci/ciObjectFactory.cpp @ 1339:09ac706c2623

Merge
author asaha
date Wed, 24 Mar 2010 17:16:33 -0700
parents 4ce7240d622c
children 5571b97fc1ec cd5dbf694d45
comparison
equal deleted inserted replaced
1338:f5dd08ad65df 1339:09ac706c2623
142 get(Universe::typeArrayKlassKlassObj()) 142 get(Universe::typeArrayKlassKlassObj())
143 ->as_type_array_klass_klass(); 143 ->as_type_array_klass_klass();
144 ciEnv::_obj_array_klass_klass_instance = 144 ciEnv::_obj_array_klass_klass_instance =
145 get(Universe::objArrayKlassKlassObj()) 145 get(Universe::objArrayKlassKlassObj())
146 ->as_obj_array_klass_klass(); 146 ->as_obj_array_klass_klass();
147 ciEnv::_ArrayStoreException = 147
148 get(SystemDictionary::ArrayStoreException_klass()) 148 #define WK_KLASS_DEFN(name, ignore_s, opt) \
149 ->as_instance_klass(); 149 if (SystemDictionary::name() != NULL) \
150 ciEnv::_Class = 150 ciEnv::_##name = get(SystemDictionary::name())->as_instance_klass();
151 get(SystemDictionary::class_klass()) 151
152 ->as_instance_klass(); 152 WK_KLASSES_DO(WK_KLASS_DEFN)
153 ciEnv::_ClassCastException = 153 #undef WK_KLASS_DEFN
154 get(SystemDictionary::ClassCastException_klass())
155 ->as_instance_klass();
156 ciEnv::_Object =
157 get(SystemDictionary::object_klass())
158 ->as_instance_klass();
159 ciEnv::_Throwable =
160 get(SystemDictionary::throwable_klass())
161 ->as_instance_klass();
162 ciEnv::_Thread =
163 get(SystemDictionary::thread_klass())
164 ->as_instance_klass();
165 ciEnv::_OutOfMemoryError =
166 get(SystemDictionary::OutOfMemoryError_klass())
167 ->as_instance_klass();
168 ciEnv::_String =
169 get(SystemDictionary::string_klass())
170 ->as_instance_klass();
171 154
172 for (int len = -1; len != _ci_objects->length(); ) { 155 for (int len = -1; len != _ci_objects->length(); ) {
173 len = _ci_objects->length(); 156 len = _ci_objects->length();
174 for (int i2 = 0; i2 < len; i2++) { 157 for (int i2 = 0; i2 < len; i2++) {
175 ciObject* obj = _ci_objects->at(i2); 158 ciObject* obj = _ci_objects->at(i2);
322 } else if (o->is_methodData()) { 305 } else if (o->is_methodData()) {
323 methodDataHandle h_md(THREAD, (methodDataOop)o); 306 methodDataHandle h_md(THREAD, (methodDataOop)o);
324 return new (arena()) ciMethodData(h_md); 307 return new (arena()) ciMethodData(h_md);
325 } else if (o->is_instance()) { 308 } else if (o->is_instance()) {
326 instanceHandle h_i(THREAD, (instanceOop)o); 309 instanceHandle h_i(THREAD, (instanceOop)o);
327 return new (arena()) ciInstance(h_i); 310 if (java_dyn_CallSite::is_instance(o))
311 return new (arena()) ciCallSite(h_i);
312 else if (java_dyn_MethodHandle::is_instance(o))
313 return new (arena()) ciMethodHandle(h_i);
314 else
315 return new (arena()) ciInstance(h_i);
328 } else if (o->is_objArray()) { 316 } else if (o->is_objArray()) {
329 objArrayHandle h_oa(THREAD, (objArrayOop)o); 317 objArrayHandle h_oa(THREAD, (objArrayOop)o);
330 return new (arena()) ciObjArray(h_oa); 318 return new (arena()) ciObjArray(h_oa);
331 } else if (o->is_typeArray()) { 319 } else if (o->is_typeArray()) {
332 typeArrayHandle h_ta(THREAD, (typeArrayOop)o); 320 typeArrayHandle h_ta(THREAD, (typeArrayOop)o);
333 return new (arena()) ciTypeArray(h_ta); 321 return new (arena()) ciTypeArray(h_ta);
322 } else if (o->is_constantPoolCache()) {
323 constantPoolCacheHandle h_cpc(THREAD, (constantPoolCacheOop) o);
324 return new (arena()) ciCPCache(h_cpc);
334 } 325 }
335 326
336 // The oop is of some type not supported by the compiler interface. 327 // The oop is of some type not supported by the compiler interface.
337 ShouldNotReachHere(); 328 ShouldNotReachHere();
338 return NULL; 329 return NULL;
565 // Thus, there might be a matching perm object in the table. 556 // Thus, there might be a matching perm object in the table.
566 // If there is, this probe must find it. 557 // If there is, this probe must find it.
567 if (key->is_perm() && _non_perm_count == 0) { 558 if (key->is_perm() && _non_perm_count == 0) {
568 return emptyBucket; 559 return emptyBucket;
569 } else if (key->is_instance()) { 560 } else if (key->is_instance()) {
570 if (key->klass() == SystemDictionary::class_klass()) { 561 if (key->klass() == SystemDictionary::Class_klass()) {
571 // class mirror instances are always perm 562 // class mirror instances are always perm
572 return emptyBucket; 563 return emptyBucket;
573 } 564 }
574 // fall through to probe 565 // fall through to probe
575 } else if (key->is_array()) { 566 } else if (key->is_array()) {