本文整理汇总了C++中methodHandle::is_method_handle_invoke方法的典型用法代码示例。如果您正苦于以下问题:C++ methodHandle::is_method_handle_invoke方法的具体用法?C++ methodHandle::is_method_handle_invoke怎么用?C++ methodHandle::is_method_handle_invoke使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类methodHandle
的用法示例。
在下文中一共展示了methodHandle::is_method_handle_invoke方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: method_kind
AbstractInterpreter::MethodKind AbstractInterpreter::method_kind(methodHandle m) {
// Abstract method?
if (m->is_abstract()) return abstract;
// Invoker for method handles?
if (m->is_method_handle_invoke()) return method_handle;
// Native method?
// Note: This test must come _before_ the test for intrinsic
// methods. See also comments below.
if (m->is_native()) {
assert(!m->is_method_handle_invoke(), "overlapping bits here, watch out");
return m->is_synchronized() ? native_synchronized : native;
}
// Synchronized?
if (m->is_synchronized()) {
return zerolocals_synchronized;
}
if (RegisterFinalizersAtInit && m->code_size() == 1 &&
m->intrinsic_id() == vmIntrinsics::_Object_init) {
// We need to execute the special return bytecode to check for
// finalizer registration so create a normal frame.
return zerolocals;
}
// Empty method?
if (m->is_empty_method()) {
return empty;
}
// Special intrinsic method?
// Note: This test must come _after_ the test for native methods,
// otherwise we will run into problems with JDK 1.2, see also
// AbstractInterpreterGenerator::generate_method_entry() for
// for details.
switch (m->intrinsic_id()) {
case vmIntrinsics::_dsin : return java_lang_math_sin ;
case vmIntrinsics::_dcos : return java_lang_math_cos ;
case vmIntrinsics::_dtan : return java_lang_math_tan ;
case vmIntrinsics::_dabs : return java_lang_math_abs ;
case vmIntrinsics::_dsqrt : return java_lang_math_sqrt ;
case vmIntrinsics::_dlog : return java_lang_math_log ;
case vmIntrinsics::_dlog10: return java_lang_math_log10;
case vmIntrinsics::_Reference_get:
return java_lang_ref_reference_get;
}
// Accessor method?
if (m->is_accessor()) {
assert(m->size_of_parameters() == 1, "fast code for accessors assumes parameter size = 1");
return accessor;
}
// Note: for now: zero locals for all non-empty methods
return zerolocals;
}