本文整理汇总了C++中AccessFlags::is_native方法的典型用法代码示例。如果您正苦于以下问题:C++ AccessFlags::is_native方法的具体用法?C++ AccessFlags::is_native怎么用?C++ AccessFlags::is_native使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AccessFlags
的用法示例。
在下文中一共展示了AccessFlags::is_native方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: allocate
methodOop methodKlass::allocate(constMethodHandle xconst,
AccessFlags access_flags, TRAPS) {
int size = methodOopDesc::object_size(access_flags.is_native());
KlassHandle h_k(THREAD, as_klassOop());
assert(xconst()->is_parsable(), "possible publication protocol violation");
methodOop m = (methodOop)CollectedHeap::permanent_obj_allocate(h_k, size, CHECK_NULL);
assert(!m->is_parsable(), "not expecting parsability yet.");
No_Safepoint_Verifier no_safepoint; // until m becomes parsable below
m->set_constMethod(xconst());
m->set_access_flags(access_flags);
m->set_method_size(size);
m->set_name_index(0);
m->set_signature_index(0);
#ifdef CC_INTERP
m->set_result_index(T_VOID);
#endif
m->set_constants(NULL);
m->set_max_stack(0);
m->set_max_locals(0);
m->set_intrinsic_id(vmIntrinsics::_none);
m->set_method_data(NULL);
m->set_interpreter_throwout_count(0);
m->set_vtable_index(methodOopDesc::garbage_vtable_index);
// Fix and bury in methodOop
m->set_interpreter_entry(NULL); // sets i2i entry and from_int
m->set_highest_tier_compile(CompLevel_none);
m->set_adapter_entry(NULL);
m->clear_code(); // from_c/from_i get set to c2i/i2i
if (access_flags.is_native()) {
m->clear_native_function();
m->set_signature_handler(NULL);
}
NOT_PRODUCT(m->set_compiled_invocation_count(0);)
示例2: new_method
methodOop oopFactory::new_method(int byte_code_size, AccessFlags access_flags,
int compressed_line_number_size,
int localvariable_table_length,
int checked_exceptions_length,
bool is_conc_safe,
TRAPS) {
methodKlass* mk = methodKlass::cast(Universe::methodKlassObj());
assert(!access_flags.is_native() || byte_code_size == 0,
"native methods should not contain byte codes");
constMethodOop cm = new_constMethod(byte_code_size,
compressed_line_number_size,
localvariable_table_length,
checked_exceptions_length,
is_conc_safe, CHECK_NULL);
constMethodHandle rw(THREAD, cm);
return mk->allocate(rw, access_flags, CHECK_NULL);
}