< prev index next >
src/share/vm/code/compiledMethod.cpp
Print this page
@@ -313,15 +313,14 @@
// If value types are passed as fields, use the extended signature
// which contains the types of all (oop) fields of the value type.
if (ValueTypePassFieldsAsArgs) {
// Check if receiver or one of the arguments is a value type
- bool has_value_receiver = (callee != NULL && callee->method_holder()->is_value());
+ bool has_value_receiver = (has_receiver && callee != NULL && callee->method_holder()->is_value());
bool has_value_argument = has_value_receiver;
- const int len = signature->utf8_length();
- for (int i = 0; i < len && !has_value_argument; ++i) {
- if (signature->byte_at(i) == 'Q') {
+ for (SignatureStream ss(signature); !has_value_argument && !ss.at_return_type(); ss.next()) {
+ if (ss.type() == T_VALUETYPE) {
has_value_argument = true;
}
}
if (has_value_argument) {
// Get the extended signature from the callee's adapter through the attached method
< prev index next >