当前位置: 首页>>代码示例>>C++>>正文


C++ Klass::oop_is_typeArray方法代码示例

本文整理汇总了C++中Klass::oop_is_typeArray方法的典型用法代码示例。如果您正苦于以下问题:C++ Klass::oop_is_typeArray方法的具体用法?C++ Klass::oop_is_typeArray怎么用?C++ Klass::oop_is_typeArray使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Klass的用法示例。


在下文中一共展示了Klass::oop_is_typeArray方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: create_new_object

// ------------------------------------------------------------------
// ciObjectFactory::create_new_object
//
// Create a new ciObject from a Metadata*.
//
// Implementation note: this functionality could be virtual behavior
// of the oop itself.  For now, we explicitly marshal the object.
ciMetadata* ciObjectFactory::create_new_object(Metadata* o) {
  EXCEPTION_CONTEXT;

  if (o->is_klass()) {
    KlassHandle h_k(THREAD, (Klass*)o);
    Klass* k = (Klass*)o;
    if (k->oop_is_instance()) {
      return new (arena()) ciInstanceKlass(h_k);
    } else if (k->oop_is_objArray()) {
      return new (arena()) ciObjArrayKlass(h_k);
    } else if (k->oop_is_typeArray()) {
      return new (arena()) ciTypeArrayKlass(h_k);
    }
  } else if (o->is_method()) {
    methodHandle h_m(THREAD, (Method*)o);
    return new (arena()) ciMethod(h_m);
  } else if (o->is_methodData()) {
    // Hold methodHandle alive - might not be necessary ???
    methodHandle h_m(THREAD, ((MethodData*)o)->method());
    return new (arena()) ciMethodData((MethodData*)o);
  }

  // The oop is of some type not supported by the compiler interface.
  ShouldNotReachHere();
  return NULL;
}
开发者ID:4T-Shirt,项目名称:OpenJDK-Research,代码行数:33,代码来源:ciObjectFactory.cpp

示例2: push_contents

inline void oopDesc::push_contents(PSPromotionManager* pm) {
  Klass* klass = blueprint();
  if (!klass->oop_is_typeArray()) {
    // It might contain oops beyond the header, so take the virtual call.
    klass->oop_push_contents(pm, this);
  }
  // Else skip it.  The typeArrayKlass in the header never needs scavenging.
}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:8,代码来源:oop.psgc.inline.hpp

示例3: create_new_metadata

// ------------------------------------------------------------------
// ciObjectFactory::create_new_metadata
//
// Create a new ciMetadata from a Metadata*.
//
// Implementation note: in order to keep Metadata live, an auxiliary ciObject
// is used, which points to it's holder.
ciMetadata* ciObjectFactory::create_new_metadata(Metadata* o) {
  EXCEPTION_CONTEXT;

  // Hold metadata from unloading by keeping it's holder alive.
  if (_initialized && o->is_klass()) {
    Klass* holder = ((Klass*)o);
    if (holder->oop_is_instance() && InstanceKlass::cast(holder)->is_anonymous()) {
      // Though ciInstanceKlass records class loader oop, it's not enough to keep
      // VM anonymous classes alive (loader == NULL). Klass holder should be used instead.
      // It is enough to record a ciObject, since cached elements are never removed
      // during ciObjectFactory lifetime. ciObjectFactory itself is created for
      // every compilation and lives for the whole duration of the compilation.
      ciObject* h = get(holder->klass_holder());
    }
  }

  if (o->is_klass()) {
    KlassHandle h_k(THREAD, (Klass*)o);
    Klass* k = (Klass*)o;
    if (k->oop_is_instance()) {
      return new (arena()) ciInstanceKlass(h_k);
    } else if (k->oop_is_objArray()) {
      return new (arena()) ciObjArrayKlass(h_k);
    } else if (k->oop_is_typeArray()) {
      return new (arena()) ciTypeArrayKlass(h_k);
    }
  } else if (o->is_method()) {
    methodHandle h_m(THREAD, (Method*)o);
    ciEnv *env = CURRENT_THREAD_ENV;
    ciInstanceKlass* holder = env->get_instance_klass(h_m()->method_holder());
    return new (arena()) ciMethod(h_m, holder);
  } else if (o->is_methodData()) {
    // Hold methodHandle alive - might not be necessary ???
    methodHandle h_m(THREAD, ((MethodData*)o)->method());
    return new (arena()) ciMethodData((MethodData*)o);
  }

  // The Metadata* is of some type not supported by the compiler interface.
  ShouldNotReachHere();
  return NULL;
}
开发者ID:MyProgrammingStyle,项目名称:hotspot,代码行数:48,代码来源:ciObjectFactory.cpp

示例4: create_new_object

// ------------------------------------------------------------------
// ciObjectFactory::create_new_object
//
// Create a new ciObject from an oop.
//
// Implementation note: this functionality could be virtual behavior
// of the oop itself.  For now, we explicitly marshal the object.
ciObject* ciObjectFactory::create_new_object(oop o) {
  EXCEPTION_CONTEXT;

  if (o->is_symbol()) {
    symbolHandle h_o(THREAD, (symbolOop)o);
    assert(vmSymbols::find_sid(h_o()) == vmSymbols::NO_SID, "");
    return new (arena()) ciSymbol(h_o, vmSymbols::NO_SID);
  } else if (o->is_klass()) {
    KlassHandle h_k(THREAD, (klassOop)o);
    Klass* k = ((klassOop)o)->klass_part();
    if (k->oop_is_instance()) {
      return new (arena()) ciInstanceKlass(h_k);
    } else if (k->oop_is_objArray()) {
      return new (arena()) ciObjArrayKlass(h_k);
    } else if (k->oop_is_typeArray()) {
      return new (arena()) ciTypeArrayKlass(h_k);
    } else if (k->oop_is_method()) {
      return new (arena()) ciMethodKlass(h_k);
    } else if (k->oop_is_symbol()) {
      return new (arena()) ciSymbolKlass(h_k);
    } else if (k->oop_is_klass()) {
      if (k->oop_is_objArrayKlass()) {
        return new (arena()) ciObjArrayKlassKlass(h_k);
      } else if (k->oop_is_typeArrayKlass()) {
        return new (arena()) ciTypeArrayKlassKlass(h_k);
      } else if (k->oop_is_instanceKlass()) {
        return new (arena()) ciInstanceKlassKlass(h_k);
      } else {
        assert(o == Universe::klassKlassObj(), "bad klassKlass");
        return new (arena()) ciKlassKlass(h_k);
      }
    }
  } else if (o->is_method()) {
    methodHandle h_m(THREAD, (methodOop)o);
    return new (arena()) ciMethod(h_m);
  } else if (o->is_methodData()) {
    methodDataHandle h_md(THREAD, (methodDataOop)o);
    return new (arena()) ciMethodData(h_md);
  } else if (o->is_instance()) {
    instanceHandle h_i(THREAD, (instanceOop)o);
    if (java_dyn_CallSite::is_instance(o))
      return new (arena()) ciCallSite(h_i);
    else if (java_dyn_MethodHandle::is_instance(o))
      return new (arena()) ciMethodHandle(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);
  } else if (o->is_constantPoolCache()) {
    constantPoolCacheHandle h_cpc(THREAD, (constantPoolCacheOop) o);
    return new (arena()) ciCPCache(h_cpc);
  }

  // The oop is of some type not supported by the compiler interface.
  ShouldNotReachHere();
  return NULL;
}
开发者ID:ericbbcc,项目名称:hotspot,代码行数:68,代码来源:ciObjectFactory.cpp


注:本文中的Klass::oop_is_typeArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。