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

src/share/vm/ci/ciObject.hpp

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


 114   // Is this object guaranteed to be in the permanent part of the heap?
 115   // If so, CollectedHeap::can_elide_permanent_oop_store_barriers is relevant.
 116   // If the answer is false, no guarantees are made.
 117   bool is_perm() { return (_ident & PERM_FLAG) != 0; }
 118 
 119   // Might this object possibly move during a scavenge operation?
 120   // If the answer is true and ScavengeRootsInCode==0, the oop cannot be embedded in code.
 121   bool is_scavengable() { return (_ident & SCAVENGABLE_FLAG) != 0; }
 122 
 123   // The address which the compiler should embed into the
 124   // generated code to represent this oop.  This address
 125   // is not the true address of the oop -- it will get patched
 126   // during nmethod creation.
 127   //
 128   // Usage note: no address arithmetic allowed.  Oop must
 129   // be registered with the oopRecorder.
 130   jobject constant_encoding();
 131 
 132   // What kind of ciObject is this?
 133   virtual bool is_null_object() const       { return false; }

 134   virtual bool is_instance()                { return false; }
 135   virtual bool is_method()                  { return false; }
 136   virtual bool is_method_data()             { return false; }
 137   virtual bool is_array()                   { return false; }
 138   virtual bool is_obj_array()               { return false; }
 139   virtual bool is_type_array()              { return false; }
 140   virtual bool is_symbol()                  { return false; }
 141   virtual bool is_type()                    { return false; }
 142   virtual bool is_return_address()          { return false; }
 143   virtual bool is_klass()                   { return false; }
 144   virtual bool is_instance_klass()          { return false; }
 145   virtual bool is_method_klass()            { return false; }
 146   virtual bool is_array_klass()             { return false; }
 147   virtual bool is_obj_array_klass()         { return false; }
 148   virtual bool is_type_array_klass()        { return false; }
 149   virtual bool is_symbol_klass()            { return false; }
 150   virtual bool is_klass_klass()             { return false; }
 151   virtual bool is_instance_klass_klass()    { return false; }
 152   virtual bool is_array_klass_klass()       { return false; }
 153   virtual bool is_obj_array_klass_klass()   { return false; }


 168   // Is this ciObject the ciInstanceKlass representing
 169   // java.lang.Object()?
 170   virtual bool is_java_lang_Object()        { return false; }
 171 
 172   // Does this ciObject refer to a real oop in the VM?
 173   //
 174   // Note: some ciObjects refer to oops which have yet to be
 175   // created.  We refer to these as "unloaded".  Specifically,
 176   // there are unloaded ciMethods, ciObjArrayKlasses, and
 177   // ciInstanceKlasses.  By convention the ciNullObject is
 178   // considered loaded, and primitive types are considered loaded.
 179   bool is_loaded() const {
 180     return handle() != NULL || is_classless();
 181   }
 182 
 183   // Subclass casting with assertions.
 184   ciNullObject*            as_null_object() {
 185     assert(is_null_object(), "bad cast");
 186     return (ciNullObject*)this;
 187   }




 188   ciInstance*              as_instance() {
 189     assert(is_instance(), "bad cast");
 190     return (ciInstance*)this;
 191   }
 192   ciMethod*                as_method() {
 193     assert(is_method(), "bad cast");
 194     return (ciMethod*)this;
 195   }
 196   ciMethodData*            as_method_data() {
 197     assert(is_method_data(), "bad cast");
 198     return (ciMethodData*)this;
 199   }
 200   ciArray*                 as_array() {
 201     assert(is_array(), "bad cast");
 202     return (ciArray*)this;
 203   }
 204   ciObjArray*              as_obj_array() {
 205     assert(is_obj_array(), "bad cast");
 206     return (ciObjArray*)this;
 207   }




 114   // Is this object guaranteed to be in the permanent part of the heap?
 115   // If so, CollectedHeap::can_elide_permanent_oop_store_barriers is relevant.
 116   // If the answer is false, no guarantees are made.
 117   bool is_perm() { return (_ident & PERM_FLAG) != 0; }
 118 
 119   // Might this object possibly move during a scavenge operation?
 120   // If the answer is true and ScavengeRootsInCode==0, the oop cannot be embedded in code.
 121   bool is_scavengable() { return (_ident & SCAVENGABLE_FLAG) != 0; }
 122 
 123   // The address which the compiler should embed into the
 124   // generated code to represent this oop.  This address
 125   // is not the true address of the oop -- it will get patched
 126   // during nmethod creation.
 127   //
 128   // Usage note: no address arithmetic allowed.  Oop must
 129   // be registered with the oopRecorder.
 130   jobject constant_encoding();
 131 
 132   // What kind of ciObject is this?
 133   virtual bool is_null_object() const       { return false; }
 134   virtual bool is_cpcache() const           { return false; }
 135   virtual bool is_instance()                { return false; }
 136   virtual bool is_method()                  { return false; }
 137   virtual bool is_method_data()             { return false; }
 138   virtual bool is_array()                   { return false; }
 139   virtual bool is_obj_array()               { return false; }
 140   virtual bool is_type_array()              { return false; }
 141   virtual bool is_symbol()                  { return false; }
 142   virtual bool is_type()                    { return false; }
 143   virtual bool is_return_address()          { return false; }
 144   virtual bool is_klass()                   { return false; }
 145   virtual bool is_instance_klass()          { return false; }
 146   virtual bool is_method_klass()            { return false; }
 147   virtual bool is_array_klass()             { return false; }
 148   virtual bool is_obj_array_klass()         { return false; }
 149   virtual bool is_type_array_klass()        { return false; }
 150   virtual bool is_symbol_klass()            { return false; }
 151   virtual bool is_klass_klass()             { return false; }
 152   virtual bool is_instance_klass_klass()    { return false; }
 153   virtual bool is_array_klass_klass()       { return false; }
 154   virtual bool is_obj_array_klass_klass()   { return false; }


 169   // Is this ciObject the ciInstanceKlass representing
 170   // java.lang.Object()?
 171   virtual bool is_java_lang_Object()        { return false; }
 172 
 173   // Does this ciObject refer to a real oop in the VM?
 174   //
 175   // Note: some ciObjects refer to oops which have yet to be
 176   // created.  We refer to these as "unloaded".  Specifically,
 177   // there are unloaded ciMethods, ciObjArrayKlasses, and
 178   // ciInstanceKlasses.  By convention the ciNullObject is
 179   // considered loaded, and primitive types are considered loaded.
 180   bool is_loaded() const {
 181     return handle() != NULL || is_classless();
 182   }
 183 
 184   // Subclass casting with assertions.
 185   ciNullObject*            as_null_object() {
 186     assert(is_null_object(), "bad cast");
 187     return (ciNullObject*)this;
 188   }
 189   ciCPCache*               as_cpcache() {
 190     assert(is_cpcache(), "bad cast");
 191     return (ciCPCache*) this;
 192   }
 193   ciInstance*              as_instance() {
 194     assert(is_instance(), "bad cast");
 195     return (ciInstance*)this;
 196   }
 197   ciMethod*                as_method() {
 198     assert(is_method(), "bad cast");
 199     return (ciMethod*)this;
 200   }
 201   ciMethodData*            as_method_data() {
 202     assert(is_method_data(), "bad cast");
 203     return (ciMethodData*)this;
 204   }
 205   ciArray*                 as_array() {
 206     assert(is_array(), "bad cast");
 207     return (ciArray*)this;
 208   }
 209   ciObjArray*              as_obj_array() {
 210     assert(is_obj_array(), "bad cast");
 211     return (ciObjArray*)this;
 212   }


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