< prev index next > src/hotspot/share/ci/ciObjectFactory.cpp
Print this page
* questions.
*
*/
#include "ci/ciCallSite.hpp"
+ #include "ci/ciFlatArray.hpp"
+ #include "ci/ciFlatArrayKlass.hpp"
+ #include "ci/ciInlineKlass.hpp"
#include "ci/ciInstance.hpp"
#include "ci/ciInstanceKlass.hpp"
#include "ci/ciMemberName.hpp"
#include "ci/ciMethod.hpp"
#include "ci/ciMethodData.hpp"
#endif
}
for (int i = T_BOOLEAN; i <= T_CONFLICT; i++) {
BasicType t = (BasicType)i;
! if (type2name(t) != nullptr && !is_reference_type(t) &&
t != T_NARROWOOP && t != T_NARROWKLASS) {
ciType::_basic_types[t] = new (_arena) ciType(t);
init_ident_of(ciType::_basic_types[t]);
}
}
#endif
}
for (int i = T_BOOLEAN; i <= T_CONFLICT; i++) {
BasicType t = (BasicType)i;
! if (type2name(t) != nullptr && t != T_FLAT_ELEMENT && !is_reference_type(t) &&
t != T_NARROWOOP && t != T_NARROWKLASS) {
ciType::_basic_types[t] = new (_arena) ciType(t);
init_ident_of(ciType::_basic_types[t]);
}
}
return new (arena()) ciMethodHandle(h_i);
else if (java_lang_invoke_MethodType::is_instance(o))
return new (arena()) ciMethodType(h_i);
else
return new (arena()) ciInstance(h_i);
! } else if (o->is_objArray()) {
objArrayHandle h_oa(THREAD, (objArrayOop)o);
return new (arena()) ciObjArray(h_oa);
} else if (o->is_typeArray()) {
typeArrayHandle h_ta(THREAD, (typeArrayOop)o);
return new (arena()) ciTypeArray(h_ta);
}
// The oop is of some type not supported by the compiler interface.
ShouldNotReachHere();
return nullptr;
return new (arena()) ciMethodHandle(h_i);
else if (java_lang_invoke_MethodType::is_instance(o))
return new (arena()) ciMethodType(h_i);
else
return new (arena()) ciInstance(h_i);
! } else if (o->is_refArray()) {
objArrayHandle h_oa(THREAD, (objArrayOop)o);
return new (arena()) ciObjArray(h_oa);
} else if (o->is_typeArray()) {
typeArrayHandle h_ta(THREAD, (typeArrayOop)o);
return new (arena()) ciTypeArray(h_ta);
+ } else if (o->is_flatArray()) {
+ flatArrayHandle h_ta(THREAD, (flatArrayOop)o);
+ return new (arena()) ciFlatArray(h_ta);
}
// The oop is of some type not supported by the compiler interface.
ShouldNotReachHere();
return nullptr;
ciMetadata* ciObjectFactory::create_new_metadata(Metadata* o) {
EXCEPTION_CONTEXT;
if (o->is_klass()) {
Klass* k = (Klass*)o;
! if (k->is_instance_klass()) {
assert(!ReplayCompiles || ciReplay::no_replay_state() || !ciReplay::is_klass_unresolved((InstanceKlass*)k), "must be whitelisted for replay compilation");
return new (arena()) ciInstanceKlass(k);
! } else if (k->is_objArray_klass()) {
return new (arena()) ciObjArrayKlass(k);
} else if (k->is_typeArray_klass()) {
return new (arena()) ciTypeArrayKlass(k);
}
} else if (o->is_method()) {
ciMetadata* ciObjectFactory::create_new_metadata(Metadata* o) {
EXCEPTION_CONTEXT;
if (o->is_klass()) {
Klass* k = (Klass*)o;
! if (k->is_inline_klass()) {
+ return new (arena()) ciInlineKlass(k);
+ } else if (k->is_instance_klass()) {
assert(!ReplayCompiles || ciReplay::no_replay_state() || !ciReplay::is_klass_unresolved((InstanceKlass*)k), "must be whitelisted for replay compilation");
return new (arena()) ciInstanceKlass(k);
! } else if (k->is_flatArray_klass()) {
+ return new (arena()) ciFlatArrayKlass(k);
+ } else if (k->is_refArray_klass() || k->is_objArray_klass()) {
return new (arena()) ciObjArrayKlass(k);
} else if (k->is_typeArray_klass()) {
return new (arena()) ciTypeArrayKlass(k);
}
} else if (o->is_method()) {
init_ident_of(new_ret_addr);
_return_addresses.append(new_ret_addr);
return new_ret_addr;
}
+ ciWrapper* ciObjectFactory::make_early_larval_wrapper(ciType* type) {
+ ciWrapper* wrapper = new (arena()) ciWrapper(type, ciWrapper::EarlyLarval);
+ init_ident_of(wrapper);
+ return wrapper;
+ }
+
+ ciWrapper* ciObjectFactory::make_null_free_wrapper(ciType* type) {
+ ciWrapper* wrapper = new (arena()) ciWrapper(type, ciWrapper::NullFree);
+ init_ident_of(wrapper);
+ return wrapper;
+ }
+
// ------------------------------------------------------------------
// ciObjectFactory::init_ident_of
void ciObjectFactory::init_ident_of(ciBaseObject* obj) {
obj->set_ident(_next_ident++);
}
< prev index next >