< 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/ciMethod.hpp"
  #include "ci/ciMethodData.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"

@@ -363,10 +366,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 nullptr;

@@ -382,13 +388,17 @@
  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()) {
        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_objArray_klass()) {
        return new (arena()) ciObjArrayKlass(k);
      } else if (k->is_typeArray_klass()) {
        return new (arena()) ciTypeArrayKlass(k);
      }

@@ -625,10 +635,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 >