< prev index next >

src/hotspot/share/oops/cpCache.cpp

Print this page
@@ -209,10 +209,11 @@
        // case, the method gets reresolved with caller for each interface call
        // because the actual selected method may not be public.
        //
        // We set bytecode_2() to _invokevirtual.
        // See also interpreterRuntime.cpp. (8/25/2000)
+       invoke_code = Bytecodes::_invokevirtual;
      } else {
        assert(invoke_code == Bytecodes::_invokevirtual ||
               (invoke_code == Bytecodes::_invokeinterface &&
                ((method->is_private() ||
                  (method->is_final() && method->method_holder() == vmClasses::Object_klass())))),

@@ -224,11 +225,11 @@
          // We set bytecode_2() to _invokevirtual.
          method_entry->set_bytecode1(invoke_code);
        }
      }
      // set up for invokevirtual, even if linking for invokeinterface also:
-     method_entry->set_bytecode2(Bytecodes::_invokevirtual);
+     method_entry->set_bytecode2(invoke_code);
    } else {
      ShouldNotReachHere();
    }
  }
  
< prev index next >