src/share/vm/ci/ciObjectFactory.cpp

changeset 4151
6e5a59a8e4a7
parent 4133
f6b0eb4e44cf
parent 4142
d8ce2825b193
child 4164
d804e148cff8
equal deleted inserted replaced
4141:81e878c53615 4151:6e5a59a8e4a7
172 } 172 }
173 } 173 }
174 } 174 }
175 175
176 ciEnv::_unloaded_cisymbol = ciObjectFactory::get_symbol(vmSymbols::dummy_symbol()); 176 ciEnv::_unloaded_cisymbol = ciObjectFactory::get_symbol(vmSymbols::dummy_symbol());
177 // Create dummy InstanceKlass and objArrayKlass object and assign them idents 177 // Create dummy InstanceKlass and ObjArrayKlass object and assign them idents
178 ciEnv::_unloaded_ciinstance_klass = new (_arena) ciInstanceKlass(ciEnv::_unloaded_cisymbol, NULL, NULL); 178 ciEnv::_unloaded_ciinstance_klass = new (_arena) ciInstanceKlass(ciEnv::_unloaded_cisymbol, NULL, NULL);
179 init_ident_of(ciEnv::_unloaded_ciinstance_klass); 179 init_ident_of(ciEnv::_unloaded_ciinstance_klass);
180 ciEnv::_unloaded_ciobjarrayklass = new (_arena) ciObjArrayKlass(ciEnv::_unloaded_cisymbol, ciEnv::_unloaded_ciinstance_klass, 1); 180 ciEnv::_unloaded_ciobjarrayklass = new (_arena) ciObjArrayKlass(ciEnv::_unloaded_cisymbol, ciEnv::_unloaded_ciinstance_klass, 1);
181 init_ident_of(ciEnv::_unloaded_ciobjarrayklass); 181 init_ident_of(ciEnv::_unloaded_ciobjarrayklass);
182 assert(ciEnv::_unloaded_ciobjarrayklass->is_obj_array_klass(), "just checking"); 182 assert(ciEnv::_unloaded_ciobjarrayklass->is_obj_array_klass(), "just checking");
452 452
453 // This is a new unloaded klass. Create it and stick it in 453 // This is a new unloaded klass. Create it and stick it in
454 // the cache. 454 // the cache.
455 ciKlass* new_klass = NULL; 455 ciKlass* new_klass = NULL;
456 456
457 // Two cases: this is an unloaded objArrayKlass or an 457 // Two cases: this is an unloaded ObjArrayKlass or an
458 // unloaded InstanceKlass. Deal with both. 458 // unloaded InstanceKlass. Deal with both.
459 if (name->byte_at(0) == '[') { 459 if (name->byte_at(0) == '[') {
460 // Decompose the name.' 460 // Decompose the name.'
461 FieldArrayInfo fd; 461 FieldArrayInfo fd;
462 BasicType element_type = FieldType::get_array_info(name->get_symbol(), 462 BasicType element_type = FieldType::get_array_info(name->get_symbol(),
478 assert(dimension > 1, "one dimensional type arrays are always loaded."); 478 assert(dimension > 1, "one dimensional type arrays are always loaded.");
479 479
480 // The type array itself takes care of one of the dimensions. 480 // The type array itself takes care of one of the dimensions.
481 dimension--; 481 dimension--;
482 482
483 // The element klass is a typeArrayKlass. 483 // The element klass is a TypeArrayKlass.
484 element_klass = ciTypeArrayKlass::make(element_type); 484 element_klass = ciTypeArrayKlass::make(element_type);
485 } 485 }
486 new_klass = new (arena()) ciObjArrayKlass(name, element_klass, dimension); 486 new_klass = new (arena()) ciObjArrayKlass(name, element_klass, dimension);
487 } else { 487 } else {
488 jobject loader_handle = NULL; 488 jobject loader_handle = NULL;

mercurial