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) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 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
@ -868,7 +868,7 @@ void NullCheckEliminator::handle_AccessField(AccessField* x) {
if (field->is_constant()) {
ciConstant field_val = field->constant_value();
BasicType field_type = field_val.basic_type();
if (field_type == T_OBJECT || field_type == T_ARRAY) {
if (is_reference_type(field_type)) {
ciObject* obj_val = field_val.as_object();
if (!obj_val->is_null_object()) {
if (PrintNullCheckElimination) {