1.1 --- a/src/share/vm/opto/graphKit.cpp Mon Jan 04 15:21:09 2010 -0800 1.2 +++ b/src/share/vm/opto/graphKit.cpp Tue Jan 05 13:05:58 2010 +0100 1.3 @@ -981,14 +981,19 @@ 1.4 case Bytecodes::_invokedynamic: 1.5 case Bytecodes::_invokeinterface: 1.6 { 1.7 - bool is_static = (depth == 0); 1.8 bool ignore; 1.9 ciBytecodeStream iter(method()); 1.10 iter.reset_to_bci(bci()); 1.11 iter.next(); 1.12 ciMethod* method = iter.get_method(ignore); 1.13 inputs = method->arg_size_no_receiver(); 1.14 - if (!is_static) inputs += 1; 1.15 + // Add a receiver argument, maybe: 1.16 + if (code != Bytecodes::_invokestatic && 1.17 + code != Bytecodes::_invokedynamic) 1.18 + inputs += 1; 1.19 + // (Do not use ciMethod::arg_size(), because 1.20 + // it might be an unloaded method, which doesn't 1.21 + // know whether it is static or not.) 1.22 int size = method->return_type()->size(); 1.23 depth = size - inputs; 1.24 }