< prev index next >

src/hotspot/share/opto/type.hpp

Print this page




1301   static const TypeAryPtr *DOUBLES;
1302   // selects one of the above:
1303   static const TypeAryPtr *get_array_body_type(BasicType elem) {
1304     assert((uint)elem <= T_CONFLICT && _array_body_type[elem] != NULL, "bad elem type");
1305     return _array_body_type[elem];
1306   }
1307   static const TypeAryPtr *_array_body_type[T_CONFLICT+1];
1308   // sharpen the type of an int which is used as an array size
1309 #ifdef ASSERT
1310   // One type is interface, the other is oop
1311   virtual bool interface_vs_oop(const Type *t) const;
1312 #endif
1313 #ifndef PRODUCT
1314   virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
1315 #endif
1316 };
1317 
1318 //------------------------------TypeValueTypePtr-------------------------------------
1319 // Class of value type pointers
1320 class TypeValueTypePtr : public TypeOopPtr {
1321   TypeValueTypePtr(const TypeValueType* vt, PTR ptr, ciObject* o, Offset offset, int instance_id, const TypePtr* speculative, int inline_depth)
1322     : TypeOopPtr(ValueTypePtr, ptr, vt->value_klass(), true, o, offset, Offset::bottom, instance_id, speculative, inline_depth) {
1323     _vt = vt;
1324   }
1325 
1326   const TypeValueType* _vt;    // Value type we point to
1327 
1328 public:
1329   // Make a pointer to a value type
1330   static const TypeValueTypePtr* make(const TypeValueType* vt, PTR ptr = TypePtr::BotPTR, ciObject* o = NULL, Offset offset = Offset(0),
1331                                       int instance_id = InstanceBot, const TypePtr* speculative = NULL, int inline_depth = InlineDepthBottom, bool narrow = false);
1332   // Make a pointer to a value type
1333   static const TypeValueTypePtr* make(PTR ptr, ciValueKlass* vk, ciObject* o = NULL) { return make(TypeValueType::make(vk), ptr, o); }
1334   // Make a pointer to a constant value type
1335   static const TypeValueTypePtr* make(ciObject* o) { return make(TypePtr::Constant, o->klass()->as_value_klass(), o);  }
1336 
1337   const TypeValueType* value_type() const { return _vt; }
1338 
1339   virtual const TypePtr* add_offset(intptr_t offset) const;
1340 
1341   virtual const Type* cast_to_ptr_type(PTR ptr) const;
1342   virtual const TypeOopPtr* cast_to_instance_id(int instance_id) const;
1343 
1344   virtual bool eq(const Type* t) const;
1345   virtual int  hash() const;             // Type specific hashing
1346   bool is__Value() const;
1347 
1348   virtual const Type* xmeet_helper(const Type* t) const;
1349   virtual const Type* xdual() const;
1350 
1351   static const TypeValueTypePtr* NOTNULL;
1352 
1353 #ifndef PRODUCT
1354   virtual void dump2(Dict &d, uint depth, outputStream* st) const; // Specialized per-Type dumping
1355 #endif
1356 };
1357 




1301   static const TypeAryPtr *DOUBLES;
1302   // selects one of the above:
1303   static const TypeAryPtr *get_array_body_type(BasicType elem) {
1304     assert((uint)elem <= T_CONFLICT && _array_body_type[elem] != NULL, "bad elem type");
1305     return _array_body_type[elem];
1306   }
1307   static const TypeAryPtr *_array_body_type[T_CONFLICT+1];
1308   // sharpen the type of an int which is used as an array size
1309 #ifdef ASSERT
1310   // One type is interface, the other is oop
1311   virtual bool interface_vs_oop(const Type *t) const;
1312 #endif
1313 #ifndef PRODUCT
1314   virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
1315 #endif
1316 };
1317 
1318 //------------------------------TypeValueTypePtr-------------------------------------
1319 // Class of value type pointers
1320 class TypeValueTypePtr : public TypeOopPtr {
1321   TypeValueTypePtr(PTR ptr, ciValueKlass* vk, ciObject* o, Offset offset, int instance_id, const TypePtr* speculative, int inline_depth)
1322     : TypeOopPtr(ValueTypePtr, ptr, vk, true, o, offset, Offset::bottom, instance_id, speculative, inline_depth) {

1323   }
1324 


1325 public:
1326   // Make a pointer to a value type
1327   static const TypeValueTypePtr* make(PTR ptr, ciValueKlass* vk, ciObject* o = NULL, Offset offset = Offset(0),
1328                                       int instance_id = InstanceBot, const TypePtr* speculative = NULL, int inline_depth = InlineDepthBottom, bool narrow = false);


1329   // Make a pointer to a constant value type
1330   static const TypeValueTypePtr* make(ciObject* o) { return make(TypePtr::Constant, o->klass()->as_value_klass(), o); }
1331 
1332   ciValueKlass* value_klass() const { return klass()->as_value_klass(); }
1333 
1334   virtual const TypePtr* add_offset(intptr_t offset) const;
1335 
1336   virtual const Type* cast_to_ptr_type(PTR ptr) const;
1337   virtual const TypeOopPtr* cast_to_instance_id(int instance_id) const;
1338 
1339   virtual bool eq(const Type* t) const;
1340   virtual int  hash() const;             // Type specific hashing
1341   bool is__Value() const;
1342 
1343   virtual const Type* xmeet_helper(const Type* t) const;
1344   virtual const Type* xdual() const;
1345 
1346   static const TypeValueTypePtr* NOTNULL;
1347 
1348 #ifndef PRODUCT
1349   virtual void dump2(Dict &d, uint depth, outputStream* st) const; // Specialized per-Type dumping
1350 #endif
1351 };
1352 


< prev index next >