865 return _array_body_type[elem];
866 }
867 static const TypeAryPtr *_array_body_type[T_CONFLICT+1];
868 // sharpen the type of an int which is used as an array size
869 #ifndef PRODUCT
870 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
871 #endif
872 };
873
874 //------------------------------TypeKlassPtr-----------------------------------
875 // Class of Java Klass pointers
876 class TypeKlassPtr : public TypeOopPtr {
877 TypeKlassPtr( PTR ptr, ciKlass* klass, int offset );
878
879 virtual bool eq( const Type *t ) const;
880 virtual int hash() const; // Type specific hashing
881
882 public:
883 ciSymbol* name() const { return _klass->name(); }
884
885 // ptr to klass 'k'
886 static const TypeKlassPtr *make( ciKlass* k ) { return make( TypePtr::Constant, k, 0); }
887 // ptr to klass 'k' with offset
888 static const TypeKlassPtr *make( ciKlass* k, int offset ) { return make( TypePtr::Constant, k, offset); }
889 // ptr to klass 'k' or sub-klass
890 static const TypeKlassPtr *make( PTR ptr, ciKlass* k, int offset);
891
892 virtual const Type *cast_to_ptr_type(PTR ptr) const;
893
894 virtual const Type *cast_to_exactness(bool klass_is_exact) const;
895
896 // corresponding pointer to instance, for a given class
897 const TypeOopPtr* as_instance_type() const;
898
899 virtual const TypePtr *add_offset( intptr_t offset ) const;
900 virtual const Type *xmeet( const Type *t ) const;
901 virtual const Type *xdual() const; // Compute dual right now.
902
903 // Convenience common pre-built types.
904 static const TypeKlassPtr* OBJECT; // Not-null object klass or below
|
865 return _array_body_type[elem];
866 }
867 static const TypeAryPtr *_array_body_type[T_CONFLICT+1];
868 // sharpen the type of an int which is used as an array size
869 #ifndef PRODUCT
870 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; // Specialized per-Type dumping
871 #endif
872 };
873
874 //------------------------------TypeKlassPtr-----------------------------------
875 // Class of Java Klass pointers
876 class TypeKlassPtr : public TypeOopPtr {
877 TypeKlassPtr( PTR ptr, ciKlass* klass, int offset );
878
879 virtual bool eq( const Type *t ) const;
880 virtual int hash() const; // Type specific hashing
881
882 public:
883 ciSymbol* name() const { return _klass->name(); }
884
885 bool is_loaded() const { return _klass->is_loaded(); }
886
887 // ptr to klass 'k'
888 static const TypeKlassPtr *make( ciKlass* k ) { return make( TypePtr::Constant, k, 0); }
889 // ptr to klass 'k' with offset
890 static const TypeKlassPtr *make( ciKlass* k, int offset ) { return make( TypePtr::Constant, k, offset); }
891 // ptr to klass 'k' or sub-klass
892 static const TypeKlassPtr *make( PTR ptr, ciKlass* k, int offset);
893
894 virtual const Type *cast_to_ptr_type(PTR ptr) const;
895
896 virtual const Type *cast_to_exactness(bool klass_is_exact) const;
897
898 // corresponding pointer to instance, for a given class
899 const TypeOopPtr* as_instance_type() const;
900
901 virtual const TypePtr *add_offset( intptr_t offset ) const;
902 virtual const Type *xmeet( const Type *t ) const;
903 virtual const Type *xdual() const; // Compute dual right now.
904
905 // Convenience common pre-built types.
906 static const TypeKlassPtr* OBJECT; // Not-null object klass or below
|