< prev index next >

src/share/vm/opto/type.hpp

Print this page




1423   static const TypeKlassPtr* make(ciKlass* k, Offset offset) { return make( TypePtr::Constant, k, offset); }
1424   // ptr to klass 'k' or sub-klass
1425   static const TypeKlassPtr* make(PTR ptr, ciKlass* k, Offset offset);
1426 
1427   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1428 
1429   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1430 
1431   // corresponding pointer to instance, for a given class
1432   const TypeOopPtr* as_instance_type() const;
1433 
1434   virtual const TypePtr *add_offset( intptr_t offset ) const;
1435   virtual const Type    *xmeet( const Type *t ) const;
1436   virtual const Type    *xdual() const;      // Compute dual right now.
1437 
1438   virtual intptr_t get_con() const;
1439 
1440   // Convenience common pre-built types.
1441   static const TypeKlassPtr* OBJECT; // Not-null object klass or below
1442   static const TypeKlassPtr* OBJECT_OR_NULL; // Maybe-null version of same

1443   static const TypeKlassPtr* BOTTOM;
1444 #ifndef PRODUCT
1445   virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
1446 #endif
1447 };
1448 
1449 class TypeNarrowPtr : public Type {
1450 protected:
1451   const TypePtr* _ptrtype; // Could be TypePtr::NULL_PTR
1452 
1453   TypeNarrowPtr(TYPES t, const TypePtr* ptrtype): _ptrtype(ptrtype),
1454                                                   Type(t) {
1455     assert(ptrtype->offset() == 0 ||
1456            ptrtype->offset() == OffsetBot ||
1457            ptrtype->offset() == OffsetTop, "no real offsets");
1458   }
1459 
1460   virtual const TypeNarrowPtr *isa_same_narrowptr(const Type *t) const = 0;
1461   virtual const TypeNarrowPtr *is_same_narrowptr(const Type *t) const = 0;
1462   virtual const TypeNarrowPtr *make_same_narrowptr(const TypePtr *t) const = 0;




1423   static const TypeKlassPtr* make(ciKlass* k, Offset offset) { return make( TypePtr::Constant, k, offset); }
1424   // ptr to klass 'k' or sub-klass
1425   static const TypeKlassPtr* make(PTR ptr, ciKlass* k, Offset offset);
1426 
1427   virtual const Type *cast_to_ptr_type(PTR ptr) const;
1428 
1429   virtual const Type *cast_to_exactness(bool klass_is_exact) const;
1430 
1431   // corresponding pointer to instance, for a given class
1432   const TypeOopPtr* as_instance_type() const;
1433 
1434   virtual const TypePtr *add_offset( intptr_t offset ) const;
1435   virtual const Type    *xmeet( const Type *t ) const;
1436   virtual const Type    *xdual() const;      // Compute dual right now.
1437 
1438   virtual intptr_t get_con() const;
1439 
1440   // Convenience common pre-built types.
1441   static const TypeKlassPtr* OBJECT; // Not-null object klass or below
1442   static const TypeKlassPtr* OBJECT_OR_NULL; // Maybe-null version of same
1443   static const TypeKlassPtr* VALUE;
1444   static const TypeKlassPtr* BOTTOM;
1445 #ifndef PRODUCT
1446   virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
1447 #endif
1448 };
1449 
1450 class TypeNarrowPtr : public Type {
1451 protected:
1452   const TypePtr* _ptrtype; // Could be TypePtr::NULL_PTR
1453 
1454   TypeNarrowPtr(TYPES t, const TypePtr* ptrtype): _ptrtype(ptrtype),
1455                                                   Type(t) {
1456     assert(ptrtype->offset() == 0 ||
1457            ptrtype->offset() == OffsetBot ||
1458            ptrtype->offset() == OffsetTop, "no real offsets");
1459   }
1460 
1461   virtual const TypeNarrowPtr *isa_same_narrowptr(const Type *t) const = 0;
1462   virtual const TypeNarrowPtr *is_same_narrowptr(const Type *t) const = 0;
1463   virtual const TypeNarrowPtr *make_same_narrowptr(const TypePtr *t) const = 0;


< prev index next >