Mercurial > hg > truffle
comparison src/share/vm/opto/type.hpp @ 221:1e026f8da827
6710487: More than half of JDI Regression tests hang with COOPs in -Xcomp mode
Summary: Remove DecodeNNode::decode() and EncodePNode::encode() methods.
Reviewed-by: rasbold, never
author | kvn |
---|---|
date | Tue, 24 Jun 2008 10:43:29 -0700 |
parents | 885ed790ecf0 |
children | 1dd146f17531 |
comparison
equal
deleted
inserted
replaced
220:30369db7f5d2 | 221:1e026f8da827 |
---|---|
223 const TypeAryPtr *isa_aryptr() const; // Returns NULL if not AryPtr | 223 const TypeAryPtr *isa_aryptr() const; // Returns NULL if not AryPtr |
224 const TypeAryPtr *is_aryptr() const; // Array oop | 224 const TypeAryPtr *is_aryptr() const; // Array oop |
225 virtual bool is_finite() const; // Has a finite value | 225 virtual bool is_finite() const; // Has a finite value |
226 virtual bool is_nan() const; // Is not a number (NaN) | 226 virtual bool is_nan() const; // Is not a number (NaN) |
227 | 227 |
228 // Returns this ptr type or the equivalent ptr type for this compressed pointer. | |
229 const TypePtr* make_ptr() const; | |
230 // Returns this compressed pointer or the equivalent compressed version | |
231 // of this pointer type. | |
232 const TypeNarrowOop* make_narrowoop() const; | |
233 | |
228 // Special test for register pressure heuristic | 234 // Special test for register pressure heuristic |
229 bool is_floatingpoint() const; // True if Float or Double base type | 235 bool is_floatingpoint() const; // True if Float or Double base type |
230 | 236 |
231 // Do you have memory, directly or through a tuple? | 237 // Do you have memory, directly or through a tuple? |
232 bool has_memory( ) const; | 238 bool has_memory( ) const; |
716 // corresponding pointer to klass, for a given instance | 722 // corresponding pointer to klass, for a given instance |
717 const TypeKlassPtr* as_klass_type() const; | 723 const TypeKlassPtr* as_klass_type() const; |
718 | 724 |
719 virtual const TypePtr *add_offset( int offset ) const; | 725 virtual const TypePtr *add_offset( int offset ) const; |
720 | 726 |
721 // returns the equivalent compressed version of this pointer type | |
722 virtual const TypeNarrowOop* make_narrowoop() const; | |
723 | |
724 virtual const Type *xmeet( const Type *t ) const; | 727 virtual const Type *xmeet( const Type *t ) const; |
725 virtual const Type *xdual() const; // Compute dual right now. | 728 virtual const Type *xdual() const; // Compute dual right now. |
726 | 729 |
727 // Do not allow interface-vs.-noninterface joins to collapse to top. | 730 // Do not allow interface-vs.-noninterface joins to collapse to top. |
728 virtual const Type *filter( const Type *kills ) const; | 731 virtual const Type *filter( const Type *kills ) const; |
909 // the underlying type. It's only real purpose is to track the | 912 // the underlying type. It's only real purpose is to track the |
910 // oopness of the compressed oop value when we expose the conversion | 913 // oopness of the compressed oop value when we expose the conversion |
911 // between the normal and the compressed form. | 914 // between the normal and the compressed form. |
912 class TypeNarrowOop : public Type { | 915 class TypeNarrowOop : public Type { |
913 protected: | 916 protected: |
914 const TypePtr* _ooptype; | 917 const TypePtr* _ooptype; // Could be TypePtr::NULL_PTR |
915 | 918 |
916 TypeNarrowOop( const TypePtr* ooptype): Type(NarrowOop), | 919 TypeNarrowOop( const TypePtr* ooptype): Type(NarrowOop), |
917 _ooptype(ooptype) { | 920 _ooptype(ooptype) { |
918 assert(ooptype->offset() == 0 || | 921 assert(ooptype->offset() == 0 || |
919 ooptype->offset() == OffsetBot || | 922 ooptype->offset() == OffsetBot || |
938 | 941 |
939 static const TypeNarrowOop* make_from_constant(ciObject* con) { | 942 static const TypeNarrowOop* make_from_constant(ciObject* con) { |
940 return make(TypeOopPtr::make_from_constant(con)); | 943 return make(TypeOopPtr::make_from_constant(con)); |
941 } | 944 } |
942 | 945 |
943 // returns the equivalent oopptr type for this compressed pointer | 946 // returns the equivalent ptr type for this compressed pointer |
944 virtual const TypePtr *make_oopptr() const { | 947 const TypePtr *make_oopptr() const { |
945 return _ooptype; | 948 return _ooptype; |
946 } | 949 } |
947 | 950 |
948 static const TypeNarrowOop *BOTTOM; | 951 static const TypeNarrowOop *BOTTOM; |
949 static const TypeNarrowOop *NULL_PTR; | 952 static const TypeNarrowOop *NULL_PTR; |
1124 } | 1127 } |
1125 | 1128 |
1126 inline const TypeKlassPtr *Type::is_klassptr() const { | 1129 inline const TypeKlassPtr *Type::is_klassptr() const { |
1127 assert( _base == KlassPtr, "Not a klass pointer" ); | 1130 assert( _base == KlassPtr, "Not a klass pointer" ); |
1128 return (TypeKlassPtr*)this; | 1131 return (TypeKlassPtr*)this; |
1132 } | |
1133 | |
1134 inline const TypePtr* Type::make_ptr() const { | |
1135 return (_base == NarrowOop) ? is_narrowoop()->make_oopptr() : | |
1136 (isa_ptr() ? is_ptr() : NULL); | |
1137 } | |
1138 | |
1139 inline const TypeNarrowOop* Type::make_narrowoop() const { | |
1140 return (_base == NarrowOop) ? is_narrowoop() : | |
1141 (isa_ptr() ? TypeNarrowOop::make(is_ptr()) : NULL); | |
1129 } | 1142 } |
1130 | 1143 |
1131 inline bool Type::is_floatingpoint() const { | 1144 inline bool Type::is_floatingpoint() const { |
1132 if( (_base == FloatCon) || (_base == FloatBot) || | 1145 if( (_base == FloatCon) || (_base == FloatBot) || |
1133 (_base == DoubleCon) || (_base == DoubleBot) ) | 1146 (_base == DoubleCon) || (_base == DoubleBot) ) |