Mercurial > hg > graal-jvmci-8
comparison src/share/vm/opto/type.hpp @ 14422:2b8e28fdf503
Merge
author | kvn |
---|---|
date | Tue, 05 Nov 2013 17:38:04 -0800 |
parents | 6c2f07d1495f |
children | 5ec7dace41a6 15120a36272d |
comparison
equal
deleted
inserted
replaced
14421:3068270ba476 | 14422:2b8e28fdf503 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
61 class TypePtr; | 61 class TypePtr; |
62 class TypeRawPtr; | 62 class TypeRawPtr; |
63 class TypeOopPtr; | 63 class TypeOopPtr; |
64 class TypeInstPtr; | 64 class TypeInstPtr; |
65 class TypeAryPtr; | 65 class TypeAryPtr; |
66 class TypeKlassPtr; | 66 class TypeKlassPtr; |
67 class TypeMetadataPtr; | 67 class TypeMetadataPtr; |
68 | 68 |
69 //------------------------------Type------------------------------------------- | 69 //------------------------------Type------------------------------------------- |
70 // Basic Type object, represents a set of primitive Values. | 70 // Basic Type object, represents a set of primitive Values. |
71 // Types are hash-cons'd into a private class dictionary, so only one of each | 71 // Types are hash-cons'd into a private class dictionary, so only one of each |
157 // lazily, on demand, and cached in _dual. | 157 // lazily, on demand, and cached in _dual. |
158 const Type *_dual; // Cached dual value | 158 const Type *_dual; // Cached dual value |
159 // Table for efficient dualing of base types | 159 // Table for efficient dualing of base types |
160 static const TYPES dual_type[lastype]; | 160 static const TYPES dual_type[lastype]; |
161 | 161 |
162 #ifdef ASSERT | |
163 // One type is interface, the other is oop | |
164 virtual bool interface_vs_oop_helper(const Type *t) const; | |
165 #endif | |
166 | |
162 protected: | 167 protected: |
163 // Each class of type is also identified by its base. | 168 // Each class of type is also identified by its base. |
164 const TYPES _base; // Enum of Types type | 169 const TYPES _base; // Enum of Types type |
165 | 170 |
166 Type( TYPES t ) : _dual(NULL), _base(t) {} // Simple types | 171 Type( TYPES t ) : _dual(NULL), _base(t) {} // Simple types |
167 // ~Type(); // Use fast deallocation | 172 // ~Type(); // Use fast deallocation |
168 const Type *hashcons(); // Hash-cons the type | 173 const Type *hashcons(); // Hash-cons the type |
169 | 174 |
170 public: | 175 public: |
171 | 176 |
172 inline void* operator new( size_t x ) { | 177 inline void* operator new( size_t x ) throw() { |
173 Compile* compile = Compile::current(); | 178 Compile* compile = Compile::current(); |
174 compile->set_type_last_size(x); | 179 compile->set_type_last_size(x); |
175 void *temp = compile->type_arena()->Amalloc_D(x); | 180 void *temp = compile->type_arena()->Amalloc_D(x); |
176 compile->set_type_hwm(temp); | 181 compile->set_type_hwm(temp); |
177 return temp; | 182 return temp; |
370 relocInfo::relocType reloc() const { return _type_info[_base].reloc; } | 375 relocInfo::relocType reloc() const { return _type_info[_base].reloc; } |
371 | 376 |
372 // Mapping from CI type system to compiler type: | 377 // Mapping from CI type system to compiler type: |
373 static const Type* get_typeflow_type(ciType* type); | 378 static const Type* get_typeflow_type(ciType* type); |
374 | 379 |
380 static const Type* make_from_constant(ciConstant constant, | |
381 bool require_constant = false, | |
382 bool is_autobox_cache = false); | |
383 | |
384 // Speculative type. See TypeInstPtr | |
385 virtual ciKlass* speculative_type() const { return NULL; } | |
386 | |
375 private: | 387 private: |
376 // support arrays | 388 // support arrays |
377 static const BasicType _basic_type[]; | 389 static const BasicType _basic_type[]; |
378 static const Type* _zero_type[T_CONFLICT+1]; | 390 static const Type* _zero_type[T_CONFLICT+1]; |
379 static const Type* _const_basic_type[T_CONFLICT+1]; | 391 static const Type* _const_basic_type[T_CONFLICT+1]; |
578 static const TypeTuple *MEMBAR; | 590 static const TypeTuple *MEMBAR; |
579 static const TypeTuple *STORECONDITIONAL; | 591 static const TypeTuple *STORECONDITIONAL; |
580 static const TypeTuple *START_I2C; | 592 static const TypeTuple *START_I2C; |
581 static const TypeTuple *INT_PAIR; | 593 static const TypeTuple *INT_PAIR; |
582 static const TypeTuple *LONG_PAIR; | 594 static const TypeTuple *LONG_PAIR; |
595 static const TypeTuple *INT_CC_PAIR; | |
596 static const TypeTuple *LONG_CC_PAIR; | |
583 #ifndef PRODUCT | 597 #ifndef PRODUCT |
584 virtual void dump2( Dict &d, uint, outputStream *st ) const; // Specialized per-Type dumping | 598 virtual void dump2( Dict &d, uint, outputStream *st ) const; // Specialized per-Type dumping |
585 #endif | 599 #endif |
586 }; | 600 }; |
587 | 601 |
588 //------------------------------TypeAry---------------------------------------- | 602 //------------------------------TypeAry---------------------------------------- |
589 // Class of Array Types | 603 // Class of Array Types |
590 class TypeAry : public Type { | 604 class TypeAry : public Type { |
591 TypeAry( const Type *elem, const TypeInt *size) : Type(Array), | 605 TypeAry(const Type* elem, const TypeInt* size, bool stable) : Type(Array), |
592 _elem(elem), _size(size) {} | 606 _elem(elem), _size(size), _stable(stable) {} |
593 public: | 607 public: |
594 virtual bool eq( const Type *t ) const; | 608 virtual bool eq( const Type *t ) const; |
595 virtual int hash() const; // Type specific hashing | 609 virtual int hash() const; // Type specific hashing |
596 virtual bool singleton(void) const; // TRUE if type is a singleton | 610 virtual bool singleton(void) const; // TRUE if type is a singleton |
597 virtual bool empty(void) const; // TRUE if type is vacuous | 611 virtual bool empty(void) const; // TRUE if type is vacuous |
598 | 612 |
599 private: | 613 private: |
600 const Type *_elem; // Element type of array | 614 const Type *_elem; // Element type of array |
601 const TypeInt *_size; // Elements in array | 615 const TypeInt *_size; // Elements in array |
616 const bool _stable; // Are elements @Stable? | |
602 friend class TypeAryPtr; | 617 friend class TypeAryPtr; |
603 | 618 |
604 public: | 619 public: |
605 static const TypeAry *make( const Type *elem, const TypeInt *size); | 620 static const TypeAry* make(const Type* elem, const TypeInt* size, bool stable = false); |
606 | 621 |
607 virtual const Type *xmeet( const Type *t ) const; | 622 virtual const Type *xmeet( const Type *t ) const; |
608 virtual const Type *xdual() const; // Compute dual right now. | 623 virtual const Type *xdual() const; // Compute dual right now. |
609 bool ary_must_be_exact() const; // true if arrays of such are never generic | 624 bool ary_must_be_exact() const; // true if arrays of such are never generic |
610 #ifdef ASSERT | 625 #ifdef ASSERT |
776 | 791 |
777 //------------------------------TypeOopPtr------------------------------------- | 792 //------------------------------TypeOopPtr------------------------------------- |
778 // Some kind of oop (Java pointer), either klass or instance or array. | 793 // Some kind of oop (Java pointer), either klass or instance or array. |
779 class TypeOopPtr : public TypePtr { | 794 class TypeOopPtr : public TypePtr { |
780 protected: | 795 protected: |
781 TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id ); | 796 TypeOopPtr(TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id, const TypeOopPtr* speculative); |
782 public: | 797 public: |
783 virtual bool eq( const Type *t ) const; | 798 virtual bool eq( const Type *t ) const; |
784 virtual int hash() const; // Type specific hashing | 799 virtual int hash() const; // Type specific hashing |
785 virtual bool singleton(void) const; // TRUE if type is a singleton | 800 virtual bool singleton(void) const; // TRUE if type is a singleton |
786 enum { | 801 enum { |
802 // If not InstanceTop or InstanceBot, indicates that this is | 817 // If not InstanceTop or InstanceBot, indicates that this is |
803 // a particular instance of this type which is distinct. | 818 // a particular instance of this type which is distinct. |
804 // This is the the node index of the allocation node creating this instance. | 819 // This is the the node index of the allocation node creating this instance. |
805 int _instance_id; | 820 int _instance_id; |
806 | 821 |
822 // Extra type information profiling gave us. We propagate it the | |
823 // same way the rest of the type info is propagated. If we want to | |
824 // use it, then we have to emit a guard: this part of the type is | |
825 // not something we know but something we speculate about the type. | |
826 const TypeOopPtr* _speculative; | |
827 | |
807 static const TypeOopPtr* make_from_klass_common(ciKlass* klass, bool klass_change, bool try_for_exact); | 828 static const TypeOopPtr* make_from_klass_common(ciKlass* klass, bool klass_change, bool try_for_exact); |
808 | 829 |
809 int dual_instance_id() const; | 830 int dual_instance_id() const; |
810 int meet_instance_id(int uid) const; | 831 int meet_instance_id(int uid) const; |
832 | |
833 // utility methods to work on the speculative part of the type | |
834 const TypeOopPtr* dual_speculative() const; | |
835 const TypeOopPtr* meet_speculative(const TypeOopPtr* other) const; | |
836 bool eq_speculative(const TypeOopPtr* other) const; | |
837 int hash_speculative() const; | |
838 const TypeOopPtr* add_offset_speculative(intptr_t offset) const; | |
839 #ifndef PRODUCT | |
840 void dump_speculative(outputStream *st) const; | |
841 #endif | |
811 | 842 |
812 public: | 843 public: |
813 // Creates a type given a klass. Correctly handles multi-dimensional arrays | 844 // Creates a type given a klass. Correctly handles multi-dimensional arrays |
814 // Respects UseUniqueSubclasses. | 845 // Respects UseUniqueSubclasses. |
815 // If the klass is final, the resulting type will be exact. | 846 // If the klass is final, the resulting type will be exact. |
833 static const TypeOopPtr* make_from_constant(ciObject* o, | 864 static const TypeOopPtr* make_from_constant(ciObject* o, |
834 bool require_constant = false, | 865 bool require_constant = false, |
835 bool not_null_elements = false); | 866 bool not_null_elements = false); |
836 | 867 |
837 // Make a generic (unclassed) pointer to an oop. | 868 // Make a generic (unclassed) pointer to an oop. |
838 static const TypeOopPtr* make(PTR ptr, int offset, int instance_id); | 869 static const TypeOopPtr* make(PTR ptr, int offset, int instance_id, const TypeOopPtr* speculative); |
839 | 870 |
840 ciObject* const_oop() const { return _const_oop; } | 871 ciObject* const_oop() const { return _const_oop; } |
841 virtual ciKlass* klass() const { return _klass; } | 872 virtual ciKlass* klass() const { return _klass; } |
842 bool klass_is_exact() const { return _klass_is_exact; } | 873 bool klass_is_exact() const { return _klass_is_exact; } |
843 | 874 |
847 bool is_ptr_to_narrowklass_nv() const { return _is_ptr_to_narrowklass; } | 878 bool is_ptr_to_narrowklass_nv() const { return _is_ptr_to_narrowklass; } |
848 bool is_ptr_to_boxed_value() const { return _is_ptr_to_boxed_value; } | 879 bool is_ptr_to_boxed_value() const { return _is_ptr_to_boxed_value; } |
849 bool is_known_instance() const { return _instance_id > 0; } | 880 bool is_known_instance() const { return _instance_id > 0; } |
850 int instance_id() const { return _instance_id; } | 881 int instance_id() const { return _instance_id; } |
851 bool is_known_instance_field() const { return is_known_instance() && _offset >= 0; } | 882 bool is_known_instance_field() const { return is_known_instance() && _offset >= 0; } |
883 const TypeOopPtr* speculative() const { return _speculative; } | |
852 | 884 |
853 virtual intptr_t get_con() const; | 885 virtual intptr_t get_con() const; |
854 | 886 |
855 virtual const Type *cast_to_ptr_type(PTR ptr) const; | 887 virtual const Type *cast_to_ptr_type(PTR ptr) const; |
856 | 888 |
860 | 892 |
861 // corresponding pointer to klass, for a given instance | 893 // corresponding pointer to klass, for a given instance |
862 const TypeKlassPtr* as_klass_type() const; | 894 const TypeKlassPtr* as_klass_type() const; |
863 | 895 |
864 virtual const TypePtr *add_offset( intptr_t offset ) const; | 896 virtual const TypePtr *add_offset( intptr_t offset ) const; |
865 | 897 // Return same type without a speculative part |
866 virtual const Type *xmeet( const Type *t ) const; | 898 virtual const TypeOopPtr* remove_speculative() const; |
899 | |
900 virtual const Type *xmeet(const Type *t) const; | |
867 virtual const Type *xdual() const; // Compute dual right now. | 901 virtual const Type *xdual() const; // Compute dual right now. |
902 // the core of the computation of the meet for TypeOopPtr and for its subclasses | |
903 virtual const Type *xmeet_helper(const Type *t) const; | |
868 | 904 |
869 // Do not allow interface-vs.-noninterface joins to collapse to top. | 905 // Do not allow interface-vs.-noninterface joins to collapse to top. |
870 virtual const Type *filter( const Type *kills ) const; | 906 virtual const Type *filter( const Type *kills ) const; |
871 | 907 |
872 // Convenience common pre-built type. | 908 // Convenience common pre-built type. |
873 static const TypeOopPtr *BOTTOM; | 909 static const TypeOopPtr *BOTTOM; |
874 #ifndef PRODUCT | 910 #ifndef PRODUCT |
875 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; | 911 virtual void dump2( Dict &d, uint depth, outputStream *st ) const; |
876 #endif | 912 #endif |
913 | |
914 // Return the speculative type if any | |
915 ciKlass* speculative_type() const { | |
916 if (_speculative != NULL) { | |
917 const TypeOopPtr* speculative = _speculative->join(this)->is_oopptr(); | |
918 if (speculative->klass_is_exact()) { | |
919 return speculative->klass(); | |
920 } | |
921 } | |
922 return NULL; | |
923 } | |
877 }; | 924 }; |
878 | 925 |
879 //------------------------------TypeInstPtr------------------------------------ | 926 //------------------------------TypeInstPtr------------------------------------ |
880 // Class of Java object pointers, pointing either to non-array Java instances | 927 // Class of Java object pointers, pointing either to non-array Java instances |
881 // or to a Klass* (including array klasses). | 928 // or to a Klass* (including array klasses). |
882 class TypeInstPtr : public TypeOopPtr { | 929 class TypeInstPtr : public TypeOopPtr { |
883 TypeInstPtr( PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id ); | 930 TypeInstPtr(PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id, const TypeOopPtr* speculative); |
884 virtual bool eq( const Type *t ) const; | 931 virtual bool eq( const Type *t ) const; |
885 virtual int hash() const; // Type specific hashing | 932 virtual int hash() const; // Type specific hashing |
886 | 933 |
887 ciSymbol* _name; // class name | 934 ciSymbol* _name; // class name |
888 | 935 |
891 | 938 |
892 bool is_loaded() const { return _klass->is_loaded(); } | 939 bool is_loaded() const { return _klass->is_loaded(); } |
893 | 940 |
894 // Make a pointer to a constant oop. | 941 // Make a pointer to a constant oop. |
895 static const TypeInstPtr *make(ciObject* o) { | 942 static const TypeInstPtr *make(ciObject* o) { |
896 return make(TypePtr::Constant, o->klass(), true, o, 0); | 943 return make(TypePtr::Constant, o->klass(), true, o, 0, InstanceBot); |
897 } | 944 } |
898 // Make a pointer to a constant oop with offset. | 945 // Make a pointer to a constant oop with offset. |
899 static const TypeInstPtr *make(ciObject* o, int offset) { | 946 static const TypeInstPtr *make(ciObject* o, int offset) { |
900 return make(TypePtr::Constant, o->klass(), true, o, offset); | 947 return make(TypePtr::Constant, o->klass(), true, o, offset, InstanceBot); |
901 } | 948 } |
902 | 949 |
903 // Make a pointer to some value of type klass. | 950 // Make a pointer to some value of type klass. |
904 static const TypeInstPtr *make(PTR ptr, ciKlass* klass) { | 951 static const TypeInstPtr *make(PTR ptr, ciKlass* klass) { |
905 return make(ptr, klass, false, NULL, 0); | 952 return make(ptr, klass, false, NULL, 0, InstanceBot); |
906 } | 953 } |
907 | 954 |
908 // Make a pointer to some non-polymorphic value of exactly type klass. | 955 // Make a pointer to some non-polymorphic value of exactly type klass. |
909 static const TypeInstPtr *make_exact(PTR ptr, ciKlass* klass) { | 956 static const TypeInstPtr *make_exact(PTR ptr, ciKlass* klass) { |
910 return make(ptr, klass, true, NULL, 0); | 957 return make(ptr, klass, true, NULL, 0, InstanceBot); |
911 } | 958 } |
912 | 959 |
913 // Make a pointer to some value of type klass with offset. | 960 // Make a pointer to some value of type klass with offset. |
914 static const TypeInstPtr *make(PTR ptr, ciKlass* klass, int offset) { | 961 static const TypeInstPtr *make(PTR ptr, ciKlass* klass, int offset) { |
915 return make(ptr, klass, false, NULL, offset); | 962 return make(ptr, klass, false, NULL, offset, InstanceBot); |
916 } | 963 } |
917 | 964 |
918 // Make a pointer to an oop. | 965 // Make a pointer to an oop. |
919 static const TypeInstPtr *make(PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id = InstanceBot ); | 966 static const TypeInstPtr *make(PTR ptr, ciKlass* k, bool xk, ciObject* o, int offset, int instance_id = InstanceBot, const TypeOopPtr* speculative = NULL); |
920 | 967 |
921 /** Create constant type for a constant boxed value */ | 968 /** Create constant type for a constant boxed value */ |
922 const Type* get_const_boxed_value() const; | 969 const Type* get_const_boxed_value() const; |
923 | 970 |
924 // If this is a java.lang.Class constant, return the type for it or NULL. | 971 // If this is a java.lang.Class constant, return the type for it or NULL. |
931 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | 978 virtual const Type *cast_to_exactness(bool klass_is_exact) const; |
932 | 979 |
933 virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const; | 980 virtual const TypeOopPtr *cast_to_instance_id(int instance_id) const; |
934 | 981 |
935 virtual const TypePtr *add_offset( intptr_t offset ) const; | 982 virtual const TypePtr *add_offset( intptr_t offset ) const; |
936 | 983 // Return same type without a speculative part |
937 virtual const Type *xmeet( const Type *t ) const; | 984 virtual const TypeOopPtr* remove_speculative() const; |
985 | |
986 // the core of the computation of the meet of 2 types | |
987 virtual const Type *xmeet_helper(const Type *t) const; | |
938 virtual const TypeInstPtr *xmeet_unloaded( const TypeInstPtr *t ) const; | 988 virtual const TypeInstPtr *xmeet_unloaded( const TypeInstPtr *t ) const; |
939 virtual const Type *xdual() const; // Compute dual right now. | 989 virtual const Type *xdual() const; // Compute dual right now. |
940 | 990 |
941 // Convenience common pre-built types. | 991 // Convenience common pre-built types. |
942 static const TypeInstPtr *NOTNULL; | 992 static const TypeInstPtr *NOTNULL; |
951 | 1001 |
952 //------------------------------TypeAryPtr------------------------------------- | 1002 //------------------------------TypeAryPtr------------------------------------- |
953 // Class of Java array pointers | 1003 // Class of Java array pointers |
954 class TypeAryPtr : public TypeOopPtr { | 1004 class TypeAryPtr : public TypeOopPtr { |
955 TypeAryPtr( PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, | 1005 TypeAryPtr( PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, |
956 int offset, int instance_id, bool is_autobox_cache ) | 1006 int offset, int instance_id, bool is_autobox_cache, const TypeOopPtr* speculative) |
957 : TypeOopPtr(AryPtr,ptr,k,xk,o,offset, instance_id), | 1007 : TypeOopPtr(AryPtr,ptr,k,xk,o,offset, instance_id, speculative), |
958 _ary(ary), | 1008 _ary(ary), |
959 _is_autobox_cache(is_autobox_cache) | 1009 _is_autobox_cache(is_autobox_cache) |
960 { | 1010 { |
961 #ifdef ASSERT | 1011 #ifdef ASSERT |
962 if (k != NULL) { | 1012 if (k != NULL) { |
986 // Accessors | 1036 // Accessors |
987 ciKlass* klass() const; | 1037 ciKlass* klass() const; |
988 const TypeAry* ary() const { return _ary; } | 1038 const TypeAry* ary() const { return _ary; } |
989 const Type* elem() const { return _ary->_elem; } | 1039 const Type* elem() const { return _ary->_elem; } |
990 const TypeInt* size() const { return _ary->_size; } | 1040 const TypeInt* size() const { return _ary->_size; } |
1041 bool is_stable() const { return _ary->_stable; } | |
991 | 1042 |
992 bool is_autobox_cache() const { return _is_autobox_cache; } | 1043 bool is_autobox_cache() const { return _is_autobox_cache; } |
993 | 1044 |
994 static const TypeAryPtr *make( PTR ptr, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = InstanceBot); | 1045 static const TypeAryPtr *make( PTR ptr, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = InstanceBot, const TypeOopPtr* speculative = NULL); |
995 // Constant pointer to array | 1046 // Constant pointer to array |
996 static const TypeAryPtr *make( PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = InstanceBot, bool is_autobox_cache = false); | 1047 static const TypeAryPtr *make( PTR ptr, ciObject* o, const TypeAry *ary, ciKlass* k, bool xk, int offset, int instance_id = InstanceBot, const TypeOopPtr* speculative = NULL, bool is_autobox_cache = false); |
997 | 1048 |
998 // Return a 'ptr' version of this type | 1049 // Return a 'ptr' version of this type |
999 virtual const Type *cast_to_ptr_type(PTR ptr) const; | 1050 virtual const Type *cast_to_ptr_type(PTR ptr) const; |
1000 | 1051 |
1001 virtual const Type *cast_to_exactness(bool klass_is_exact) const; | 1052 virtual const Type *cast_to_exactness(bool klass_is_exact) const; |
1005 virtual const TypeAryPtr* cast_to_size(const TypeInt* size) const; | 1056 virtual const TypeAryPtr* cast_to_size(const TypeInt* size) const; |
1006 virtual const TypeInt* narrow_size_type(const TypeInt* size) const; | 1057 virtual const TypeInt* narrow_size_type(const TypeInt* size) const; |
1007 | 1058 |
1008 virtual bool empty(void) const; // TRUE if type is vacuous | 1059 virtual bool empty(void) const; // TRUE if type is vacuous |
1009 virtual const TypePtr *add_offset( intptr_t offset ) const; | 1060 virtual const TypePtr *add_offset( intptr_t offset ) const; |
1010 | 1061 // Return same type without a speculative part |
1011 virtual const Type *xmeet( const Type *t ) const; | 1062 virtual const TypeOopPtr* remove_speculative() const; |
1063 | |
1064 // the core of the computation of the meet of 2 types | |
1065 virtual const Type *xmeet_helper(const Type *t) const; | |
1012 virtual const Type *xdual() const; // Compute dual right now. | 1066 virtual const Type *xdual() const; // Compute dual right now. |
1067 | |
1068 const TypeAryPtr* cast_to_stable(bool stable, int stable_dimension = 1) const; | |
1069 int stable_dimension() const; | |
1013 | 1070 |
1014 // Convenience common pre-built types. | 1071 // Convenience common pre-built types. |
1015 static const TypeAryPtr *RANGE; | 1072 static const TypeAryPtr *RANGE; |
1016 static const TypeAryPtr *OOPS; | 1073 static const TypeAryPtr *OOPS; |
1017 static const TypeAryPtr *NARROWOOPS; | 1074 static const TypeAryPtr *NARROWOOPS; |
1142 virtual const TypePtr *add_offset( intptr_t offset ) const; | 1199 virtual const TypePtr *add_offset( intptr_t offset ) const; |
1143 virtual const Type *xmeet( const Type *t ) const; | 1200 virtual const Type *xmeet( const Type *t ) const; |
1144 virtual const Type *xdual() const; // Compute dual right now. | 1201 virtual const Type *xdual() const; // Compute dual right now. |
1145 | 1202 |
1146 virtual intptr_t get_con() const; | 1203 virtual intptr_t get_con() const; |
1204 | |
1205 // Do not allow interface-vs.-noninterface joins to collapse to top. | |
1206 virtual const Type *filter( const Type *kills ) const; | |
1147 | 1207 |
1148 // Convenience common pre-built types. | 1208 // Convenience common pre-built types. |
1149 static const TypeKlassPtr* OBJECT; // Not-null object klass or below | 1209 static const TypeKlassPtr* OBJECT; // Not-null object klass or below |
1150 static const TypeKlassPtr* OBJECT_OR_NULL; // Maybe-null version of same | 1210 static const TypeKlassPtr* OBJECT_OR_NULL; // Maybe-null version of same |
1151 #ifndef PRODUCT | 1211 #ifndef PRODUCT |