< prev index next > src/hotspot/share/ci/ciField.hpp
Print this page
/*
! * 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
/*
! * Copyright (c) 1999, 2022, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
friend class ciInstanceKlass;
private:
ciFlags _flags;
ciInstanceKlass* _holder;
+ ciInstanceKlass* _original_holder; // For flattened fields
ciSymbol* _name;
ciSymbol* _signature;
ciType* _type;
int _offset;
bool _is_constant;
+ bool _is_flattened;
+ bool _is_null_free;
ciMethod* _known_to_link_with_put;
ciInstanceKlass* _known_to_link_with_get;
ciConstant _constant_value;
ciType* compute_type();
ciType* compute_type_impl();
ciField(ciInstanceKlass* klass, int index);
ciField(fieldDescriptor* fd);
+ ciField(ciField* field, ciInstanceKlass* holder, int offset, bool is_final);
// shared constructor code
void initialize_from(fieldDescriptor* fd);
public:
// Of what type is this field?
ciType* type() { return (_type == NULL) ? compute_type() : _type; }
// How is this field actually stored in memory?
! BasicType layout_type() { return type2field[(_type == NULL) ? T_OBJECT : _type->basic_type()]; }
// How big is this field in memory?
int size_in_bytes() { return type2aelembytes(layout_type()); }
// What is the offset of this field?
// Of what type is this field?
ciType* type() { return (_type == NULL) ? compute_type() : _type; }
// How is this field actually stored in memory?
! BasicType layout_type() { return type2field[type()->basic_type()]; }
// How big is this field in memory?
int size_in_bytes() { return type2aelembytes(layout_type()); }
// What is the offset of this field?
bool is_static () const { return flags().is_static(); }
bool is_final () const { return flags().is_final(); }
bool is_stable () const { return flags().is_stable(); }
bool is_volatile () const { return flags().is_volatile(); }
bool is_transient () const { return flags().is_transient(); }
+ bool is_flattened () const { return _is_flattened; }
+ bool is_null_free () const { return _is_null_free; }
+
// The field is modified outside of instance initializer methods
// (or class/initializer methods if the field is static).
bool has_initialized_final_update() const { return flags().has_initialized_final_update(); }
bool is_call_site_target();
< prev index next >