1.1 --- a/src/share/vm/ci/ciField.hpp Thu Dec 08 15:12:58 2016 +0300 1.2 +++ b/src/share/vm/ci/ciField.hpp Mon Dec 12 12:53:38 2016 +0100 1.3 @@ -124,22 +124,8 @@ 1.4 return _holder->is_shared() && !is_static(); 1.5 } 1.6 1.7 - // Is this field a constant? 1.8 - // 1.9 - // Clarification: A field is considered constant if: 1.10 - // 1. The field is both static and final 1.11 - // 2. The canonical holder of the field has undergone 1.12 - // static initialization. 1.13 - // 3. If the field is an object or array, then the oop 1.14 - // in question is allocated in perm space. 1.15 - // 4. The field is not one of the special static/final 1.16 - // non-constant fields. These are java.lang.System.in 1.17 - // and java.lang.System.out. Abomination. 1.18 - // 1.19 - // A field is also considered constant if it is marked @Stable 1.20 - // and is non-null (or non-zero, if a primitive). 1.21 - // For non-static fields, the null/zero check must be 1.22 - // arranged by the user, as constant_value().is_null_or_zero(). 1.23 + // Is this field a constant? See ciField::initialize_from() for details 1.24 + // about how a field is determined to be constant. 1.25 bool is_constant() { return _is_constant; } 1.26 1.27 // Get the constant value of this field. 1.28 @@ -176,6 +162,9 @@ 1.29 bool is_stable () { return flags().is_stable(); } 1.30 bool is_volatile () { return flags().is_volatile(); } 1.31 bool is_transient () { return flags().is_transient(); } 1.32 + // The field is modified outside of instance initializer methods 1.33 + // (or class/initializer methods if the field is static). 1.34 + bool has_initialized_final_update() { return flags().has_initialized_final_update(); } 1.35 1.36 bool is_call_site_target() { 1.37 ciInstanceKlass* callsite_klass = CURRENT_ENV->CallSite_klass();