src/share/vm/ci/ciField.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File 6893268 Sdiff src/share/vm/ci

src/share/vm/ci/ciField.hpp

Print this page
rev 1083 : [mq]: indy.compiler.inline.patch


 121     return _holder->is_shared() && !is_static();
 122   }
 123 
 124   // Is this field a constant?
 125   //
 126   // Clarification: A field is considered constant if:
 127   //   1. The field is both static and final
 128   //   2. The canonical holder of the field has undergone
 129   //      static initialization.
 130   //   3. If the field is an object or array, then the oop
 131   //      in question is allocated in perm space.
 132   //   4. The field is not one of the special static/final
 133   //      non-constant fields.  These are java.lang.System.in
 134   //      and java.lang.System.out.  Abomination.
 135   //
 136   // Note: the check for case 4 is not yet implemented.
 137   bool is_constant() { return _is_constant; }
 138 
 139   // Get the constant value of this field.
 140   ciConstant constant_value() {
 141     assert(is_constant(), "illegal call to constant_value()");
 142     return _constant_value;
 143   }
 144 








 145   // Check for link time errors.  Accessing a field from a
 146   // certain class via a certain bytecode may or may not be legal.
 147   // This call checks to see if an exception may be raised by
 148   // an access of this field.
 149   //
 150   // Usage note: if the same field is accessed multiple times
 151   // in the same compilation, will_link will need to be checked
 152   // at each point of access.
 153   bool will_link(ciInstanceKlass* accessing_klass,
 154                  Bytecodes::Code bc);
 155 
 156   // Java access flags
 157   bool is_public      () { return flags().is_public(); }
 158   bool is_private     () { return flags().is_private(); }
 159   bool is_protected   () { return flags().is_protected(); }
 160   bool is_static      () { return flags().is_static(); }
 161   bool is_final       () { return flags().is_final(); }
 162   bool is_volatile    () { return flags().is_volatile(); }
 163   bool is_transient   () { return flags().is_transient(); }
 164 


 121     return _holder->is_shared() && !is_static();
 122   }
 123 
 124   // Is this field a constant?
 125   //
 126   // Clarification: A field is considered constant if:
 127   //   1. The field is both static and final
 128   //   2. The canonical holder of the field has undergone
 129   //      static initialization.
 130   //   3. If the field is an object or array, then the oop
 131   //      in question is allocated in perm space.
 132   //   4. The field is not one of the special static/final
 133   //      non-constant fields.  These are java.lang.System.in
 134   //      and java.lang.System.out.  Abomination.
 135   //
 136   // Note: the check for case 4 is not yet implemented.
 137   bool is_constant() { return _is_constant; }
 138 
 139   // Get the constant value of this field.
 140   ciConstant constant_value() {
 141     assert(is_static() && is_constant(), "illegal call to constant_value()");
 142     return _constant_value;
 143   }
 144 
 145   // Get the constant value of non-static final field in the given
 146   // object.
 147   ciConstant constant_value_of(ciObject* object) {
 148     assert(!is_static() && is_constant(), "only if field is non-static constant");
 149     assert(object->is_instance(), "must be instance");
 150     return object->as_instance()->field_value(this);
 151   }
 152 
 153   // Check for link time errors.  Accessing a field from a
 154   // certain class via a certain bytecode may or may not be legal.
 155   // This call checks to see if an exception may be raised by
 156   // an access of this field.
 157   //
 158   // Usage note: if the same field is accessed multiple times
 159   // in the same compilation, will_link will need to be checked
 160   // at each point of access.
 161   bool will_link(ciInstanceKlass* accessing_klass,
 162                  Bytecodes::Code bc);
 163 
 164   // Java access flags
 165   bool is_public      () { return flags().is_public(); }
 166   bool is_private     () { return flags().is_private(); }
 167   bool is_protected   () { return flags().is_protected(); }
 168   bool is_static      () { return flags().is_static(); }
 169   bool is_final       () { return flags().is_final(); }
 170   bool is_volatile    () { return flags().is_volatile(); }
 171   bool is_transient   () { return flags().is_transient(); }
 172 
src/share/vm/ci/ciField.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File