mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
6829187: compiler optimizations required for JSR 292
C2 implementation for invokedynamic support. Reviewed-by: kvn, never
This commit is contained in:
parent
9be2e29930
commit
375527d84e
31 changed files with 566 additions and 89 deletions
|
@ -981,14 +981,19 @@ bool GraphKit::compute_stack_effects(int& inputs, int& depth) {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue