--- old/src/hotspot/share/ci/ciObjectFactory.cpp 2019-03-11 14:25:26.734355700 +0100 +++ new/src/hotspot/share/ci/ciObjectFactory.cpp 2019-03-11 14:25:26.510355703 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,6 +26,7 @@ #include "ci/ciCallSite.hpp" #include "ci/ciInstance.hpp" #include "ci/ciInstanceKlass.hpp" +#include "ci/ciValueKlass.hpp" #include "ci/ciMemberName.hpp" #include "ci/ciMethod.hpp" #include "ci/ciMethodData.hpp" @@ -40,6 +41,8 @@ #include "ci/ciTypeArray.hpp" #include "ci/ciTypeArrayKlass.hpp" #include "ci/ciUtilities.inline.hpp" +#include "ci/ciValueArray.hpp" +#include "ci/ciValueArrayKlass.hpp" #include "classfile/javaClasses.inline.hpp" #include "classfile/systemDictionary.hpp" #include "gc/shared/collectedHeap.inline.hpp" @@ -148,7 +151,8 @@ for (int i = T_BOOLEAN; i <= T_CONFLICT; i++) { BasicType t = (BasicType)i; - if (type2name(t) != NULL && t != T_OBJECT && t != T_ARRAY && t != T_NARROWOOP && t != T_NARROWKLASS) { + if (type2name(t) != NULL && t != T_OBJECT && t != T_ARRAY && + t != T_VALUETYPE && t != T_NARROWOOP && t != T_NARROWKLASS) { ciType::_basic_types[t] = new (_arena) ciType(t); init_ident_of(ciType::_basic_types[t]); } @@ -362,6 +366,9 @@ } else if (o->is_typeArray()) { typeArrayHandle h_ta(THREAD, (typeArrayOop)o); return new (arena()) ciTypeArray(h_ta); + } else if (o->is_valueArray()) { + valueArrayHandle h_ta(THREAD, (valueArrayOop)o); + return new (arena()) ciValueArray(h_ta); } // The oop is of some type not supported by the compiler interface. @@ -381,8 +388,12 @@ if (o->is_klass()) { Klass* k = (Klass*)o; - if (k->is_instance_klass()) { + if (k->is_value()) { + return new (arena()) ciValueKlass(k); + } else if (k->is_instance_klass()) { return new (arena()) ciInstanceKlass(k); + } else if (k->is_valueArray_klass()) { + return new (arena()) ciValueArrayKlass(k); } else if (k->is_objArray_klass()) { return new (arena()) ciObjArrayKlass(k); } else if (k->is_typeArray_klass()) { @@ -497,7 +508,7 @@ int dimension = fd.dimension(); assert(element_type != T_ARRAY, "unsuccessful decomposition"); ciKlass* element_klass = NULL; - if (element_type == T_OBJECT) { + if (element_type == T_OBJECT || element_type == T_VALUETYPE) { ciEnv *env = CURRENT_THREAD_ENV; ciSymbol* ci_name = env->get_symbol(fd.object_key()); element_klass = @@ -628,6 +639,12 @@ return new_ret_addr; } +ciWrapper* ciObjectFactory::make_never_null_wrapper(ciType* type) { + ciWrapper* wrapper = new (arena()) ciWrapper(type, /* never_null */ true); + init_ident_of(wrapper); + return wrapper; +} + // ------------------------------------------------------------------ // ciObjectFactory::init_ident_of void ciObjectFactory::init_ident_of(ciBaseObject* obj) {