mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8230505: Replace JVM type comparisons to T_OBJECT and T_ARRAY with call to is_reference_type
Consistently use is_reference_type when comparing type for T_OBJECT or T_ARRAY. Co-authored-by: John Rose <john.r.rose@oracle.com> Reviewed-by: dlong, coleenp, hseigel
This commit is contained in:
parent
c080a4a4d5
commit
0c507f3180
67 changed files with 183 additions and 183 deletions
|
@ -216,7 +216,7 @@ int TypeEntriesAtCall::compute_cell_count(BytecodeStream* stream) {
|
|||
args_cell = TypeStackSlotEntries::compute_cell_count(inv.signature(), false, TypeProfileArgsLimit);
|
||||
}
|
||||
int ret_cell = 0;
|
||||
if (MethodData::profile_return_for_invoke(m, bci) && (inv.result_type() == T_OBJECT || inv.result_type() == T_ARRAY)) {
|
||||
if (MethodData::profile_return_for_invoke(m, bci) && is_reference_type(inv.result_type())) {
|
||||
ret_cell = ReturnTypeEntry::static_cell_count();
|
||||
}
|
||||
int header_cell = 0;
|
||||
|
@ -289,7 +289,7 @@ void CallTypeData::post_initialize(BytecodeStream* stream, MethodData* mdo) {
|
|||
}
|
||||
|
||||
if (has_return()) {
|
||||
assert(inv.result_type() == T_OBJECT || inv.result_type() == T_ARRAY, "room for a ret type but doesn't return obj?");
|
||||
assert(is_reference_type(inv.result_type()), "room for a ret type but doesn't return obj?");
|
||||
_ret.post_initialize();
|
||||
}
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ void VirtualCallTypeData::post_initialize(BytecodeStream* stream, MethodData* md
|
|||
}
|
||||
|
||||
if (has_return()) {
|
||||
assert(inv.result_type() == T_OBJECT || inv.result_type() == T_ARRAY, "room for a ret type but doesn't return obj?");
|
||||
assert(is_reference_type(inv.result_type()), "room for a ret type but doesn't return obj?");
|
||||
_ret.post_initialize();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue