src/share/vm/ci/ciMethod.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8168926-work Cdiff src/share/vm/ci/ciMethod.hpp
src/share/vm/ci/ciMethod.hpp
Print this page
*** 134,152 ****
// Can only be used on loaded ciMethods
int arg_size() const {
check_is_loaded();
return _signature->size() + (_flags.is_static() ? 0 : 1);
}
! // Report the number of elements on stack when invoking this method.
! // This is different than the regular arg_size because invokedynamic
! // has an implicit receiver.
int invoke_arg_size(Bytecodes::Code code) const {
if (is_loaded()) {
return arg_size();
} else {
int arg_size = _signature->size();
- // Add a receiver argument, maybe:
if (code != Bytecodes::_invokestatic &&
code != Bytecodes::_invokedynamic) {
arg_size++;
}
return arg_size;
--- 134,156 ----
// Can only be used on loaded ciMethods
int arg_size() const {
check_is_loaded();
return _signature->size() + (_flags.is_static() ? 0 : 1);
}
! // Report the number of elements on stack when invoking the current method.
! // If the method is loaded, arg_size() gives precise information about the
! // number of stack elements (using the method's signature and its flags).
! // However, if the method is not loaded, the number of stack elements must
! // be determined differently, as the method's flags are not yet available.
! // The invoke_arg_size() method assumes in that case that all bytecodes except
! // invokestatic and invokedynamic have a receiver that is also pushed onto the
! // stack by the caller of the current method.
int invoke_arg_size(Bytecodes::Code code) const {
if (is_loaded()) {
return arg_size();
} else {
int arg_size = _signature->size();
if (code != Bytecodes::_invokestatic &&
code != Bytecodes::_invokedynamic) {
arg_size++;
}
return arg_size;
src/share/vm/ci/ciMethod.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File