Mercurial > hg > graal-jvmci-8
diff src/share/vm/opto/graphKit.cpp @ 1137:97125851f396
6829187: compiler optimizations required for JSR 292
Summary: C2 implementation for invokedynamic support.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Tue, 05 Jan 2010 13:05:58 +0100 |
parents | c5d3d979ae27 |
children | 7b0e9cba0307 |
line wrap: on
line diff
--- a/src/share/vm/opto/graphKit.cpp Mon Jan 04 15:21:09 2010 -0800 +++ b/src/share/vm/opto/graphKit.cpp Tue Jan 05 13:05:58 2010 +0100 @@ -981,14 +981,19 @@ case Bytecodes::_invokedynamic: case Bytecodes::_invokeinterface: { - bool is_static = (depth == 0); bool ignore; ciBytecodeStream iter(method()); iter.reset_to_bci(bci()); iter.next(); ciMethod* method = iter.get_method(ignore); inputs = method->arg_size_no_receiver(); - if (!is_static) inputs += 1; + // Add a receiver argument, maybe: + if (code != Bytecodes::_invokestatic && + code != Bytecodes::_invokedynamic) + inputs += 1; + // (Do not use ciMethod::arg_size(), because + // it might be an unloaded method, which doesn't + // know whether it is static or not.) int size = method->return_type()->size(); depth = size - inputs; }