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:
Lois Foltan 2019-09-23 14:49:04 -04:00
parent c080a4a4d5
commit 0c507f3180
67 changed files with 183 additions and 183 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -568,7 +568,7 @@ LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_
LIR_Opr t2 = FrameMap::G3_opr;
cmp_value.load_item();
new_value.load_item();
if (type == T_OBJECT || type == T_ARRAY) {
if (is_reference_type(type)) {
__ cas_obj(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), t1, t2);
} else if (type == T_INT) {
__ cas_int(addr->as_address_ptr()->base(), cmp_value.result(), new_value.result(), t1, t2);
@ -583,7 +583,7 @@ LIR_Opr LIRGenerator::atomic_cmpxchg(BasicType type, LIR_Opr addr, LIRItem& cmp_
}
LIR_Opr LIRGenerator::atomic_xchg(BasicType type, LIR_Opr addr, LIRItem& value) {
bool is_obj = type == T_OBJECT || type == T_ARRAY;
bool is_obj = is_reference_type(type);
LIR_Opr result = new_register(type);
LIR_Opr tmp = LIR_OprFact::illegalOpr;