< prev index next >
src/share/vm/opto/runtime.cpp
Print this page
*** 45,54 ****
--- 45,55 ----
#include "logging/log.hpp"
#include "memory/oopFactory.hpp"
#include "oops/objArrayKlass.hpp"
#include "oops/oop.inline.hpp"
#include "oops/typeArrayOop.inline.hpp"
+ #include "oops/valueArrayKlass.hpp"
#include "opto/ad.hpp"
#include "opto/addnode.hpp"
#include "opto/callnode.hpp"
#include "opto/cfgnode.hpp"
#include "opto/graphKit.hpp"
*** 264,274 ****
assert(check_compiled_frame(thread), "incorrect caller");
// Scavenge and allocate an instance.
oop result;
! if (array_type->is_typeArray_klass()) {
// The oopFactory likes to work with the element type.
// (We could bypass the oopFactory, since it doesn't add much value.)
BasicType elem_type = TypeArrayKlass::cast(array_type)->element_type();
result = oopFactory::new_typeArray(elem_type, len, THREAD);
} else {
--- 265,280 ----
assert(check_compiled_frame(thread), "incorrect caller");
// Scavenge and allocate an instance.
oop result;
! if (array_type->is_valueArray_klass()) {
! // TODO refactor all these checks, is_typeArray_klass should not be true for a value type array
! // TODO use oopFactory::new_array
! Klass* elem_type = ValueArrayKlass::cast(array_type)->element_klass();
! result = oopFactory::new_valueArray(elem_type, len, THREAD);
! } else if (array_type->is_typeArray_klass()) {
// The oopFactory likes to work with the element type.
// (We could bypass the oopFactory, since it doesn't add much value.)
BasicType elem_type = TypeArrayKlass::cast(array_type)->element_type();
result = oopFactory::new_typeArray(elem_type, len, THREAD);
} else {
< prev index next >