src/share/vm/runtime/deoptimization.cpp

Print this page
rev 4267 : 8009981: nashorn tests fail with -XX:+VerifyStack
Summary: nmethod::preserve_callee_argument_oops() must take appendix into account.
Reviewed-by:

@@ -636,19 +636,23 @@
       // generates debug info before the invoke has executed)
       Bytecodes::Code cur_code = str.next();
       if (cur_code == Bytecodes::_invokevirtual ||
           cur_code == Bytecodes::_invokespecial ||
           cur_code == Bytecodes::_invokestatic  ||
-          cur_code == Bytecodes::_invokeinterface) {
+          cur_code == Bytecodes::_invokeinterface ||
+          cur_code == Bytecodes::_invokedynamic) {
         Bytecode_invoke invoke(mh, iframe->interpreter_frame_bci());
         Symbol* signature = invoke.signature();
         ArgumentSizeComputer asc(signature);
         cur_invoke_parameter_size = asc.size();
-        if (cur_code != Bytecodes::_invokestatic) {
+        if (cur_code != Bytecodes::_invokestatic && cur_code != Bytecodes::_invokedynamic) {
           // Add in receiver
           ++cur_invoke_parameter_size;
         }
+        if (!invoke.is_invokedynamic() && MethodHandles::has_member_arg(invoke.klass(), invoke.name())) {
+          callee_size_of_parameters++;
+        }
       }
       if (str.bci() < max_bci) {
         Bytecodes::Code bc = str.next();
         if (bc >= 0) {
           // The interpreter oop map generator reports results before

@@ -659,10 +663,11 @@
           switch (cur_code) {
             case Bytecodes::_invokevirtual:
             case Bytecodes::_invokespecial:
             case Bytecodes::_invokestatic:
             case Bytecodes::_invokeinterface:
+            case Bytecodes::_invokedynamic:
             case Bytecodes::_athrow:
               break;
             default: {
               InterpreterOopMap next_mask;
               OopMapCache::compute_one_oop_map(mh, str.bci(), &next_mask);