src/hotspot/share/ci/ciField.cpp
changeset 58273 08a5148e7c4e
parent 54786 ebf733a324d4
child 59056 15936b142f86
equal deleted inserted replaced
58272:e27564cd10e3 58273:08a5148e7c4e
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    88 
    88 
    89   BasicType field_type = FieldType::basic_type(signature);
    89   BasicType field_type = FieldType::basic_type(signature);
    90 
    90 
    91   // If the field is a pointer type, get the klass of the
    91   // If the field is a pointer type, get the klass of the
    92   // field.
    92   // field.
    93   if (field_type == T_OBJECT || field_type == T_ARRAY) {
    93   if (is_reference_type(field_type)) {
    94     bool ignore;
    94     bool ignore;
    95     // This is not really a class reference; the index always refers to the
    95     // This is not really a class reference; the index always refers to the
    96     // field's type signature, as a symbol.  Linkage checks do not apply.
    96     // field's type signature, as a symbol.  Linkage checks do not apply.
    97     _type = ciEnv::current(THREAD)->get_klass_by_index(cpool, sig_index, ignore, klass);
    97     _type = ciEnv::current(THREAD)->get_klass_by_index(cpool, sig_index, ignore, klass);
    98   } else {
    98   } else {
   197 
   197 
   198   BasicType field_type = fd->field_type();
   198   BasicType field_type = fd->field_type();
   199 
   199 
   200   // If the field is a pointer type, get the klass of the
   200   // If the field is a pointer type, get the klass of the
   201   // field.
   201   // field.
   202   if (field_type == T_OBJECT || field_type == T_ARRAY) {
   202   if (is_reference_type(field_type)) {
   203     _type = NULL;  // must call compute_type on first access
   203     _type = NULL;  // must call compute_type on first access
   204   } else {
   204   } else {
   205     _type = ciType::make(field_type);
   205     _type = ciType::make(field_type);
   206   }
   206   }
   207 
   207