< prev index next >

src/hotspot/share/ci/ciObjectFactory.cpp

Print this page
@@ -22,10 +22,12 @@
   *
   */
  
  #include "precompiled.hpp"
  #include "ci/ciCallSite.hpp"
+ #include "ci/ciFlatArray.hpp"
+ #include "ci/ciFlatArrayKlass.hpp"
  #include "ci/ciInstance.hpp"
  #include "ci/ciInstanceKlass.hpp"
  #include "ci/ciMemberName.hpp"
  #include "ci/ciNativeEntryPoint.hpp"
  #include "ci/ciMethod.hpp"

@@ -40,10 +42,11 @@
  #include "ci/ciSymbol.hpp"
  #include "ci/ciSymbols.hpp"
  #include "ci/ciTypeArray.hpp"
  #include "ci/ciTypeArrayKlass.hpp"
  #include "ci/ciUtilities.inline.hpp"
+ #include "ci/ciInlineKlass.hpp"
  #include "classfile/javaClasses.inline.hpp"
  #include "classfile/vmClasses.hpp"
  #include "compiler/compiler_globals.hpp"
  #include "gc/shared/collectedHeap.inline.hpp"
  #include "memory/allocation.inline.hpp"

@@ -356,10 +359,13 @@
      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 NULL;

@@ -375,12 +381,16 @@
  ciMetadata* ciObjectFactory::create_new_metadata(Metadata* o) {
    EXCEPTION_CONTEXT;
  
    if (o->is_klass()) {
      Klass* k = (Klass*)o;
-     if (k->is_instance_klass()) {
+     if (k->is_inline_klass()) {
+       return new (arena()) ciInlineKlass(k);
+     } else if (k->is_instance_klass()) {
        return new (arena()) ciInstanceKlass(k);
+     } else if (k->is_flatArray_klass()) {
+       return new (arena()) ciFlatArrayKlass(k);
      } else if (k->is_objArray_klass()) {
        return new (arena()) ciObjArrayKlass(k);
      } else if (k->is_typeArray_klass()) {
        return new (arena()) ciTypeArrayKlass(k);
      }

@@ -486,11 +496,11 @@
      SignatureStream ss(name->get_symbol(), false);
      int dimension = ss.skip_array_prefix();  // skip all '['s
      BasicType element_type = ss.type();
      assert(element_type != T_ARRAY, "unsuccessful decomposition");
      ciKlass* element_klass = NULL;
-     if (element_type == T_OBJECT) {
+     if (element_type == T_OBJECT || element_type == T_INLINE_TYPE) {
        ciEnv *env = CURRENT_THREAD_ENV;
        ciSymbol* ci_name = env->get_symbol(ss.as_symbol());
        element_klass =
          env->get_klass_by_name(accessing_klass, ci_name, false)->as_instance_klass();
      } else {

@@ -617,10 +627,16 @@
    init_ident_of(new_ret_addr);
    _return_addresses.append(new_ret_addr);
    return new_ret_addr;
  }
  
+ ciWrapper* ciObjectFactory::make_null_free_wrapper(ciType* type) {
+   ciWrapper* wrapper = new (arena()) ciWrapper(type);
+   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 >