Mercurial > hg > truffle
comparison src/share/vm/ci/ciField.hpp @ 12190:edb5ab0f3fe5
8001107: @Stable annotation for constant folding of lazily evaluated variables
Reviewed-by: rbackman, twisti, kvn
Contributed-by: john.r.rose@oracle.com, vladimir.x.ivanov@oracle.com
author | vlivanov |
---|---|
date | Tue, 10 Sep 2013 14:51:48 -0700 |
parents | e778c29768e6 |
children | b2e698d2276c |
comparison
equal
deleted
inserted
replaced
12188:cd16d587b0fa | 12190:edb5ab0f3fe5 |
---|---|
137 // in question is allocated in perm space. | 137 // in question is allocated in perm space. |
138 // 4. The field is not one of the special static/final | 138 // 4. The field is not one of the special static/final |
139 // non-constant fields. These are java.lang.System.in | 139 // non-constant fields. These are java.lang.System.in |
140 // and java.lang.System.out. Abomination. | 140 // and java.lang.System.out. Abomination. |
141 // | 141 // |
142 // Note: the check for case 4 is not yet implemented. | 142 // A field is also considered constant if it is marked @Stable |
143 // and is non-null (or non-zero, if a primitive). | |
144 // For non-static fields, the null/zero check must be | |
145 // arranged by the user, as constant_value().is_null_or_zero(). | |
143 bool is_constant() { return _is_constant; } | 146 bool is_constant() { return _is_constant; } |
144 | 147 |
145 // Get the constant value of this field. | 148 // Get the constant value of this field. |
146 ciConstant constant_value() { | 149 ciConstant constant_value() { |
147 assert(is_static() && is_constant(), "illegal call to constant_value()"); | 150 assert(is_static() && is_constant(), "illegal call to constant_value()"); |
171 bool is_public () { return flags().is_public(); } | 174 bool is_public () { return flags().is_public(); } |
172 bool is_private () { return flags().is_private(); } | 175 bool is_private () { return flags().is_private(); } |
173 bool is_protected () { return flags().is_protected(); } | 176 bool is_protected () { return flags().is_protected(); } |
174 bool is_static () { return flags().is_static(); } | 177 bool is_static () { return flags().is_static(); } |
175 bool is_final () { return flags().is_final(); } | 178 bool is_final () { return flags().is_final(); } |
179 bool is_stable () { return flags().is_stable(); } | |
176 bool is_volatile () { return flags().is_volatile(); } | 180 bool is_volatile () { return flags().is_volatile(); } |
177 bool is_transient () { return flags().is_transient(); } | 181 bool is_transient () { return flags().is_transient(); } |
178 | 182 |
179 bool is_call_site_target() { | 183 bool is_call_site_target() { |
180 ciInstanceKlass* callsite_klass = CURRENT_ENV->CallSite_klass(); | 184 ciInstanceKlass* callsite_klass = CURRENT_ENV->CallSite_klass(); |