changeset 4271:11d5942ef9c7

Merge
author lana
date Tue, 12 Mar 2013 18:22:40 -0700
parents 65b797426a3b d4a32a6f8c82
children 5ee744831dcb
files src/share/vm/interpreter/linkResolver.cpp src/share/vm/runtime/arguments.cpp src/share/vm/runtime/globals.hpp
diffstat 2 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/interpreter/linkResolver.cpp	Fri Mar 08 08:10:01 2013 -0800
+++ b/src/share/vm/interpreter/linkResolver.cpp	Tue Mar 12 18:22:40 2013 -0700
@@ -803,7 +803,7 @@
     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() &&
--- a/src/share/vm/runtime/globals.hpp	Fri Mar 08 08:10:01 2013 -0800
+++ b/src/share/vm/runtime/globals.hpp	Tue Mar 12 18:22:40 2013 -0700
@@ -3644,7 +3644,10 @@
           "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