< prev index next >

src/hotspot/share/opto/type.hpp

Print this page
rev 57329 : 8234974: Shenandoah: Do concurrent roots even when no evacuation is necessary


1013   virtual ciKlass* klass() const { return _klass;     }
1014   bool klass_is_exact()    const { return _klass_is_exact; }
1015 
1016   // Returns true if this pointer points at memory which contains a
1017   // compressed oop references.
1018   bool is_ptr_to_narrowoop_nv() const { return _is_ptr_to_narrowoop; }
1019   bool is_ptr_to_narrowklass_nv() const { return _is_ptr_to_narrowklass; }
1020   bool is_ptr_to_boxed_value()   const { return _is_ptr_to_boxed_value; }
1021   bool is_known_instance()       const { return _instance_id > 0; }
1022   int  instance_id()             const { return _instance_id; }
1023   bool is_known_instance_field() const { return is_known_instance() && _offset >= 0; }
1024 
1025   virtual intptr_t get_con() const;
1026 
1027   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1028 
1029   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1030 
1031   virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
1032 
1033   virtual const TypeOopPtr *cast_to_nonconst() const;
1034 
1035   // corresponding pointer to klass, for a given instance
1036   const TypeKlassPtr* as_klass_type() const;
1037 
1038   virtual const TypePtr *add_offset( intptr_t offset ) const;
1039 
1040   // Speculative type helper methods.
1041   virtual const Type* remove_speculative() const;
1042   virtual const Type* cleanup_speculative() const;
1043   virtual bool would_improve_type(ciKlass* exact_kls, int inline_depth) const;
1044   virtual const TypePtr* with_inline_depth(int depth) const;
1045 
1046   virtual const TypePtr* with_instance_id(int instance_id) const;
1047 
1048   virtual const Type *xdual() const;    // Compute dual right now.
1049   // the core of the computation of the meet for TypeOopPtr and for its subclasses
1050   virtual const Type *xmeet_helper(const Type *t) const;
1051 
1052   // Convenience common pre-built type.
1053   static const TypeOopPtr *BOTTOM;
1054 #ifndef PRODUCT


1099   // Make a pointer to an oop.
1100   static const TypeInstPtr *make(PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset,
1101                                  int instance_id = InstanceBot,
1102                                  const TypePtr* speculative = NULL,
1103                                  int inline_depth = InlineDepthBottom);
1104 
1105   /** Create constant type for a constant boxed value */
1106   const Type* get_const_boxed_value() const;
1107 
1108   // If this is a java.lang.Class constant, return the type for it or NULL.
1109   // Pass to Type::get_const_type to turn it to a type, which will usually
1110   // be a TypeInstPtr, but may also be a TypeInt::INT for int.class, etc.
1111   ciType* java_mirror_type() const;
1112 
1113   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1114 
1115   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1116 
1117   virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
1118 
1119   virtual const TypeOopPtr *cast_to_nonconst() const;
1120 
1121   virtual const TypePtr *add_offset( intptr_t offset ) const;
1122 
1123   // Speculative type helper methods.
1124   virtual const Type* remove_speculative() const;
1125   virtual const TypePtr* with_inline_depth(int depth) const;
1126   virtual const TypePtr* with_instance_id(int instance_id) const;
1127 
1128   // the core of the computation of the meet of 2 types
1129   virtual const Type *xmeet_helper(const Type *t) const;
1130   virtual const TypeInstPtr *xmeet_unloaded( const TypeInstPtr *t ) const;
1131   virtual const Type *xdual() const;    // Compute dual right now.
1132 
1133   // Convenience common pre-built types.
1134   static const TypeInstPtr *NOTNULL;
1135   static const TypeInstPtr *BOTTOM;
1136   static const TypeInstPtr *MIRROR;
1137   static const TypeInstPtr *MARK;
1138   static const TypeInstPtr *KLASS;
1139 #ifndef PRODUCT
1140   virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping


1184   bool      is_stable() const { return _ary->_stable; }
1185 
1186   bool is_autobox_cache() const { return _is_autobox_cache; }
1187 
1188   static const TypeAryPtr *make(PTR ptr, const TypeAry *ary, ciKlass* k, bool xk, int offset,
1189                                 int instance_id = InstanceBot,
1190                                 const TypePtr* speculative = NULL,
1191                                 int inline_depth = InlineDepthBottom);
1192   // Constant pointer to array
1193   static const TypeAryPtr *make(PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, int offset,
1194                                 int instance_id = InstanceBot,
1195                                 const TypePtr* speculative = NULL,
1196                                 int inline_depth = InlineDepthBottom, bool is_autobox_cache = false);
1197 
1198   // Return a 'ptr' version of this type
1199   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1200 
1201   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1202 
1203   virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
1204 
1205   virtual const TypeOopPtr *cast_to_nonconst() const;
1206 
1207   virtual const TypeAryPtr* cast_to_size(const TypeInt* size) const;
1208   virtual const TypeInt* narrow_size_type(const TypeInt* size) const;
1209 
1210   virtual bool empty(void) const;        // TRUE if type is vacuous
1211   virtual const TypePtr *add_offset( intptr_t offset ) const;
1212 
1213   // Speculative type helper methods.
1214   virtual const Type* remove_speculative() const;
1215   virtual const TypePtr* with_inline_depth(int depth) const;
1216   virtual const TypePtr* with_instance_id(int instance_id) const;
1217 
1218   // the core of the computation of the meet of 2 types
1219   virtual const Type *xmeet_helper(const Type *t) const;
1220   virtual const Type *xdual() const;    // Compute dual right now.
1221 
1222   const TypeAryPtr* cast_to_stable(bool stable, int stable_dimension = 1) const;
1223   int stable_dimension() const;
1224 
1225   const TypeAryPtr* cast_to_autobox_cache(bool cache) const;




1013   virtual ciKlass* klass() const { return _klass;     }
1014   bool klass_is_exact()    const { return _klass_is_exact; }
1015 
1016   // Returns true if this pointer points at memory which contains a
1017   // compressed oop references.
1018   bool is_ptr_to_narrowoop_nv() const { return _is_ptr_to_narrowoop; }
1019   bool is_ptr_to_narrowklass_nv() const { return _is_ptr_to_narrowklass; }
1020   bool is_ptr_to_boxed_value()   const { return _is_ptr_to_boxed_value; }
1021   bool is_known_instance()       const { return _instance_id > 0; }
1022   int  instance_id()             const { return _instance_id; }
1023   bool is_known_instance_field() const { return is_known_instance() && _offset >= 0; }
1024 
1025   virtual intptr_t get_con() const;
1026 
1027   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1028 
1029   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1030 
1031   virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
1032 


1033   // corresponding pointer to klass, for a given instance
1034   const TypeKlassPtr* as_klass_type() const;
1035 
1036   virtual const TypePtr *add_offset( intptr_t offset ) const;
1037 
1038   // Speculative type helper methods.
1039   virtual const Type* remove_speculative() const;
1040   virtual const Type* cleanup_speculative() const;
1041   virtual bool would_improve_type(ciKlass* exact_kls, int inline_depth) const;
1042   virtual const TypePtr* with_inline_depth(int depth) const;
1043 
1044   virtual const TypePtr* with_instance_id(int instance_id) const;
1045 
1046   virtual const Type *xdual() const;    // Compute dual right now.
1047   // the core of the computation of the meet for TypeOopPtr and for its subclasses
1048   virtual const Type *xmeet_helper(const Type *t) const;
1049 
1050   // Convenience common pre-built type.
1051   static const TypeOopPtr *BOTTOM;
1052 #ifndef PRODUCT


1097   // Make a pointer to an oop.
1098   static const TypeInstPtr *make(PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset,
1099                                  int instance_id = InstanceBot,
1100                                  const TypePtr* speculative = NULL,
1101                                  int inline_depth = InlineDepthBottom);
1102 
1103   /** Create constant type for a constant boxed value */
1104   const Type* get_const_boxed_value() const;
1105 
1106   // If this is a java.lang.Class constant, return the type for it or NULL.
1107   // Pass to Type::get_const_type to turn it to a type, which will usually
1108   // be a TypeInstPtr, but may also be a TypeInt::INT for int.class, etc.
1109   ciType* java_mirror_type() const;
1110 
1111   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1112 
1113   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1114 
1115   virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
1116 


1117   virtual const TypePtr *add_offset( intptr_t offset ) const;
1118 
1119   // Speculative type helper methods.
1120   virtual const Type* remove_speculative() const;
1121   virtual const TypePtr* with_inline_depth(int depth) const;
1122   virtual const TypePtr* with_instance_id(int instance_id) const;
1123 
1124   // the core of the computation of the meet of 2 types
1125   virtual const Type *xmeet_helper(const Type *t) const;
1126   virtual const TypeInstPtr *xmeet_unloaded( const TypeInstPtr *t ) const;
1127   virtual const Type *xdual() const;    // Compute dual right now.
1128 
1129   // Convenience common pre-built types.
1130   static const TypeInstPtr *NOTNULL;
1131   static const TypeInstPtr *BOTTOM;
1132   static const TypeInstPtr *MIRROR;
1133   static const TypeInstPtr *MARK;
1134   static const TypeInstPtr *KLASS;
1135 #ifndef PRODUCT
1136   virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping


1180   bool      is_stable() const { return _ary->_stable; }
1181 
1182   bool is_autobox_cache() const { return _is_autobox_cache; }
1183 
1184   static const TypeAryPtr *make(PTR ptr, const TypeAry *ary, ciKlass* k, bool xk, int offset,
1185                                 int instance_id = InstanceBot,
1186                                 const TypePtr* speculative = NULL,
1187                                 int inline_depth = InlineDepthBottom);
1188   // Constant pointer to array
1189   static const TypeAryPtr *make(PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, int offset,
1190                                 int instance_id = InstanceBot,
1191                                 const TypePtr* speculative = NULL,
1192                                 int inline_depth = InlineDepthBottom, bool is_autobox_cache = false);
1193 
1194   // Return a 'ptr' version of this type
1195   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1196 
1197   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1198 
1199   virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;


1200 
1201   virtual const TypeAryPtr* cast_to_size(const TypeInt* size) const;
1202   virtual const TypeInt* narrow_size_type(const TypeInt* size) const;
1203 
1204   virtual bool empty(void) const;        // TRUE if type is vacuous
1205   virtual const TypePtr *add_offset( intptr_t offset ) const;
1206 
1207   // Speculative type helper methods.
1208   virtual const Type* remove_speculative() const;
1209   virtual const TypePtr* with_inline_depth(int depth) const;
1210   virtual const TypePtr* with_instance_id(int instance_id) const;
1211 
1212   // the core of the computation of the meet of 2 types
1213   virtual const Type *xmeet_helper(const Type *t) const;
1214   virtual const Type *xdual() const;    // Compute dual right now.
1215 
1216   const TypeAryPtr* cast_to_stable(bool stable, int stable_dimension = 1) const;
1217   int stable_dimension() const;
1218 
1219   const TypeAryPtr* cast_to_autobox_cache(bool cache) const;


< prev index next >