提交 800f7ccf 编写于 作者: L lana

Merge

......@@ -803,7 +803,7 @@ void LinkResolver::runtime_resolve_special_method(CallInfo& result, methodHandle
if (!direct_calling_default_method &&
check_access &&
// a) check if ACC_SUPER flag is set for the current class
current_klass->is_super() &&
(current_klass->is_super() || !AllowNonVirtualCalls) &&
// b) check if the method class is a superclass of the current class (superclass relation is not reflexive!)
current_klass->is_subtype_of(method_klass()) &&
current_klass() != method_klass() &&
......
......@@ -3644,7 +3644,10 @@ class CommandLineFlags {
"Enable internal testing APIs") \
\
product(bool, PrintGCCause, true, \
"Include GC cause in GC logging")
"Include GC cause in GC logging") \
\
product(bool, AllowNonVirtualCalls, false, \
"Obey the ACC_SUPER flag and allow invokenonvirtual calls")
/*
* Macros for factoring of globals
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册