本文整理汇总了C++中KlassHandle::is_null方法的典型用法代码示例。如果您正苦于以下问题:C++ KlassHandle::is_null方法的具体用法?C++ KlassHandle::is_null怎么用?C++ KlassHandle::is_null使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KlassHandle
的用法示例。
在下文中一共展示了KlassHandle::is_null方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initialize_from_super
int klassVtable::initialize_from_super(KlassHandle super) {
if (super.is_null()) {
return 0;
} else {
// copy methods from superKlass
// can't inherit from array class, so must be instanceKlass
assert(super->oop_is_instance(), "must be instance klass");
instanceKlass* sk = (instanceKlass*)super()->klass_part();
klassVtable* superVtable = sk->vtable();
assert(superVtable->length() <= _length, "vtable too short");
#ifdef ASSERT
superVtable->verify(tty, true);
#endif
superVtable->copy_vtable_to(table());
#ifndef PRODUCT
if (PrintVtables && Verbose) {
tty->print_cr("copy vtable from %s to %s size %d", sk->internal_name(), klass()->internal_name(), _length);
}
#endif
return superVtable->length();
}
}
示例2: is_anonymous
bool is_anonymous() {
assert(AnonymousClasses || _host_klass.is_null(), "");
return _host_klass.not_null();
}
示例3: is_anonymous
bool is_anonymous() {
assert(EnableInvokeDynamic || _host_klass.is_null(), "");
return _host_klass.not_null();
}
示例4: h_this_klass
klassOop
instanceKlassKlass::allocate_instance_klass(Symbol* name, int vtable_len, int itable_len,
int static_field_size,
unsigned nonstatic_oop_map_count,
AccessFlags access_flags,
ReferenceType rt,
KlassHandle host_klass, TRAPS) {
const int nonstatic_oop_map_size =
instanceKlass::nonstatic_oop_map_size(nonstatic_oop_map_count);
int size = align_object_offset(vtable_len) + align_object_offset(itable_len);
if (access_flags.is_interface() || !host_klass.is_null()) {
size += align_object_offset(nonstatic_oop_map_size);
} else {
size += nonstatic_oop_map_size;
}
if (access_flags.is_interface()) {
size += (int)sizeof(klassOop)/HeapWordSize;
}
if (!host_klass.is_null()) {
size += (int)sizeof(klassOop)/HeapWordSize;
}
size = instanceKlass::object_size(size);
// Allocation
KlassHandle h_this_klass(THREAD, as_klassOop());
KlassHandle k;
if (rt == REF_NONE) {
if (name != vmSymbols::java_lang_Class()) {
// regular klass
instanceKlass o;
k = base_create_klass(h_this_klass, size, o.vtbl_value(), CHECK_NULL);
} else {
// Class
instanceMirrorKlass o;
k = base_create_klass(h_this_klass, size, o.vtbl_value(), CHECK_NULL);
}
} else {
// reference klass
instanceRefKlass o;
k = base_create_klass(h_this_klass, size, o.vtbl_value(), CHECK_NULL);
}
{
No_Safepoint_Verifier no_safepoint; // until k becomes parsable
instanceKlass* ik = (instanceKlass*) k()->klass_part();
assert(!k()->is_parsable(), "not expecting parsability yet.");
// The sizes of these these three variables are used for determining the
// size of the instanceKlassOop. It is critical that these are set to the right
// sizes before the first GC, i.e., when we allocate the mirror.
ik->set_vtable_length(vtable_len);
ik->set_itable_length(itable_len);
ik->set_static_field_size(static_field_size);
ik->set_nonstatic_oop_map_size(nonstatic_oop_map_size);
ik->set_access_flags(access_flags);
ik->set_is_anonymous(!host_klass.is_null());
assert(k()->size() == size, "wrong size for object");
ik->set_array_klasses(NULL);
ik->set_methods(NULL);
ik->set_method_ordering(NULL);
ik->set_local_interfaces(NULL);
ik->set_transitive_interfaces(NULL);
ik->init_implementor();
ik->set_fields(NULL, 0);
ik->set_constants(NULL);
ik->set_class_loader(NULL);
ik->set_protection_domain(NULL);
ik->set_signers(NULL);
ik->set_source_file_name(NULL);
ik->set_source_debug_extension(NULL, 0);
ik->set_array_name(NULL);
ik->set_inner_classes(NULL);
ik->set_static_oop_field_count(0);
ik->set_nonstatic_field_size(0);
ik->set_is_marked_dependent(false);
ik->set_init_state(instanceKlass::allocated);
ik->set_init_thread(NULL);
ik->set_reference_type(rt);
ik->set_oop_map_cache(NULL);
ik->set_jni_ids(NULL);
ik->set_osr_nmethods_head(NULL);
ik->set_breakpoints(NULL);
ik->init_previous_versions();
ik->set_generic_signature(NULL);
ik->release_set_methods_jmethod_ids(NULL);
ik->release_set_methods_cached_itable_indices(NULL);
ik->set_class_annotations(NULL);
ik->set_fields_annotations(NULL);
ik->set_methods_annotations(NULL);
ik->set_methods_parameter_annotations(NULL);
ik->set_methods_default_annotations(NULL);
ik->set_jvmti_cached_class_field_map(NULL);
ik->set_initial_method_idnum(0);
assert(k()->is_parsable(), "should be parsable here.");
// initialize the non-header words to zero
intptr_t* p = (intptr_t*)k();
for (int index = instanceKlass::header_size(); index < size; index++) {
p[index] = NULL_WORD;
//.........这里部分代码省略.........