< prev index next >

src/hotspot/share/opto/type.hpp

Print this page




1070                                               bool require_constant = false);
1071 
1072   // Make a generic (unclassed) pointer to an oop.
1073   static const TypeOopPtr* make(PTR ptr, Offset offset, int instance_id,
1074                                 const TypePtr* speculative = NULL,
1075                                 int inline_depth = InlineDepthBottom);
1076 
1077   ciObject* const_oop()    const { return _const_oop; }
1078   virtual ciKlass* klass() const { return _klass;     }
1079   bool klass_is_exact()    const { return _klass_is_exact; }
1080 
1081   // Returns true if this pointer points at memory which contains a
1082   // compressed oop references.
1083   bool is_ptr_to_narrowoop_nv() const { return _is_ptr_to_narrowoop; }
1084   bool is_ptr_to_narrowklass_nv() const { return _is_ptr_to_narrowklass; }
1085   bool is_ptr_to_boxed_value()   const { return _is_ptr_to_boxed_value; }
1086   bool is_known_instance()       const { return _instance_id > 0; }
1087   int  instance_id()             const { return _instance_id; }
1088   bool is_known_instance_field() const { return is_known_instance() && _offset.get() >= 0; }
1089 
1090   bool can_be_value_type() const { return EnableValhalla && (_klass->is_valuetype() || ((_klass->is_java_lang_Object() || _klass->is_interface()) && !klass_is_exact())); }
1091 
1092   virtual intptr_t get_con() const;
1093 
1094   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1095 
1096   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1097 
1098   virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
1099 
1100   // corresponding pointer to klass, for a given instance
1101   const TypeKlassPtr* as_klass_type() const;
1102 
1103   virtual const TypePtr *add_offset( intptr_t offset ) const;
1104 
1105   // Speculative type helper methods.
1106   virtual const Type* remove_speculative() const;
1107   virtual const Type* cleanup_speculative() const;
1108   virtual bool would_improve_type(ciKlass* exact_kls, int inline_depth) const;
1109   virtual const TypePtr* with_inline_depth(int depth) const;
1110 


1278   virtual bool empty(void) const;        // TRUE if type is vacuous
1279   virtual const TypePtr *add_offset( intptr_t offset ) const;
1280 
1281   // Speculative type helper methods.
1282   virtual const Type* remove_speculative() const;
1283   virtual const TypePtr* with_inline_depth(int depth) const;
1284 
1285   // the core of the computation of the meet of 2 types
1286   virtual const Type *xmeet_helper(const Type *t) const;
1287   virtual const Type *xdual() const;    // Compute dual right now.
1288 
1289   const TypeAryPtr* cast_to_stable(bool stable, int stable_dimension = 1) const;
1290   int stable_dimension() const;
1291 
1292   const TypeAryPtr* cast_to_autobox_cache(bool cache) const;
1293 
1294   const int flattened_offset() const;
1295   const Offset field_offset() const { return _field_offset; }
1296   const TypeAryPtr* with_field_offset(int offset) const;
1297   const TypePtr* add_field_offset_and_offset(intptr_t offset) const;


1298 
1299   // Convenience common pre-built types.
1300   static const TypeAryPtr *RANGE;
1301   static const TypeAryPtr *OOPS;
1302   static const TypeAryPtr *NARROWOOPS;
1303   static const TypeAryPtr *BYTES;
1304   static const TypeAryPtr *SHORTS;
1305   static const TypeAryPtr *CHARS;
1306   static const TypeAryPtr *INTS;
1307   static const TypeAryPtr *LONGS;
1308   static const TypeAryPtr *FLOATS;
1309   static const TypeAryPtr *DOUBLES;
1310   // selects one of the above:
1311   static const TypeAryPtr *get_array_body_type(BasicType elem) {
1312     assert((uint)elem <= T_CONFLICT && _array_body_type[elem] != NULL, "bad elem type");
1313     return _array_body_type[elem];
1314   }
1315   static const TypeAryPtr *_array_body_type[T_CONFLICT+1];
1316   // sharpen the type of an int which is used as an array size
1317 #ifdef ASSERT




1070                                               bool require_constant = false);
1071 
1072   // Make a generic (unclassed) pointer to an oop.
1073   static const TypeOopPtr* make(PTR ptr, Offset offset, int instance_id,
1074                                 const TypePtr* speculative = NULL,
1075                                 int inline_depth = InlineDepthBottom);
1076 
1077   ciObject* const_oop()    const { return _const_oop; }
1078   virtual ciKlass* klass() const { return _klass;     }
1079   bool klass_is_exact()    const { return _klass_is_exact; }
1080 
1081   // Returns true if this pointer points at memory which contains a
1082   // compressed oop references.
1083   bool is_ptr_to_narrowoop_nv() const { return _is_ptr_to_narrowoop; }
1084   bool is_ptr_to_narrowklass_nv() const { return _is_ptr_to_narrowklass; }
1085   bool is_ptr_to_boxed_value()   const { return _is_ptr_to_boxed_value; }
1086   bool is_known_instance()       const { return _instance_id > 0; }
1087   int  instance_id()             const { return _instance_id; }
1088   bool is_known_instance_field() const { return is_known_instance() && _offset.get() >= 0; }
1089 
1090   virtual bool can_be_value_type() const { return EnableValhalla && (_klass == NULL || _klass->is_valuetype() || ((_klass->is_java_lang_Object() || _klass->is_interface()) && !klass_is_exact())); }
1091 
1092   virtual intptr_t get_con() const;
1093 
1094   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1095 
1096   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1097 
1098   virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const;
1099 
1100   // corresponding pointer to klass, for a given instance
1101   const TypeKlassPtr* as_klass_type() const;
1102 
1103   virtual const TypePtr *add_offset( intptr_t offset ) const;
1104 
1105   // Speculative type helper methods.
1106   virtual const Type* remove_speculative() const;
1107   virtual const Type* cleanup_speculative() const;
1108   virtual bool would_improve_type(ciKlass* exact_kls, int inline_depth) const;
1109   virtual const TypePtr* with_inline_depth(int depth) const;
1110 


1278   virtual bool empty(void) const;        // TRUE if type is vacuous
1279   virtual const TypePtr *add_offset( intptr_t offset ) const;
1280 
1281   // Speculative type helper methods.
1282   virtual const Type* remove_speculative() const;
1283   virtual const TypePtr* with_inline_depth(int depth) const;
1284 
1285   // the core of the computation of the meet of 2 types
1286   virtual const Type *xmeet_helper(const Type *t) const;
1287   virtual const Type *xdual() const;    // Compute dual right now.
1288 
1289   const TypeAryPtr* cast_to_stable(bool stable, int stable_dimension = 1) const;
1290   int stable_dimension() const;
1291 
1292   const TypeAryPtr* cast_to_autobox_cache(bool cache) const;
1293 
1294   const int flattened_offset() const;
1295   const Offset field_offset() const { return _field_offset; }
1296   const TypeAryPtr* with_field_offset(int offset) const;
1297   const TypePtr* add_field_offset_and_offset(intptr_t offset) const;
1298 
1299   virtual bool can_be_value_type() const { return false; }
1300 
1301   // Convenience common pre-built types.
1302   static const TypeAryPtr *RANGE;
1303   static const TypeAryPtr *OOPS;
1304   static const TypeAryPtr *NARROWOOPS;
1305   static const TypeAryPtr *BYTES;
1306   static const TypeAryPtr *SHORTS;
1307   static const TypeAryPtr *CHARS;
1308   static const TypeAryPtr *INTS;
1309   static const TypeAryPtr *LONGS;
1310   static const TypeAryPtr *FLOATS;
1311   static const TypeAryPtr *DOUBLES;
1312   // selects one of the above:
1313   static const TypeAryPtr *get_array_body_type(BasicType elem) {
1314     assert((uint)elem <= T_CONFLICT && _array_body_type[elem] != NULL, "bad elem type");
1315     return _array_body_type[elem];
1316   }
1317   static const TypeAryPtr *_array_body_type[T_CONFLICT+1];
1318   // sharpen the type of an int which is used as an array size
1319 #ifdef ASSERT


< prev index next >