src/hotspot/share/opto/type.cpp
changeset 47765 b7c7428eaab9
parent 47583 2dcbf51d0431
child 49594 898ef81cbc0e
equal deleted inserted replaced
47764:029d5efaaa6c 47765:b7c7428eaab9
  1501 }
  1501 }
  1502 
  1502 
  1503 //------------------------------hash-------------------------------------------
  1503 //------------------------------hash-------------------------------------------
  1504 // Type-specific hashing function.
  1504 // Type-specific hashing function.
  1505 int TypeInt::hash(void) const {
  1505 int TypeInt::hash(void) const {
  1506   return java_add(java_add(_lo, _hi), java_add(_widen, (int)Type::Int));
  1506   return java_add(java_add(_lo, _hi), java_add((jint)_widen, (jint)Type::Int));
  1507 }
  1507 }
  1508 
  1508 
  1509 //------------------------------is_finite--------------------------------------
  1509 //------------------------------is_finite--------------------------------------
  1510 // Has a finite value
  1510 // Has a finite value
  1511 bool TypeInt::is_finite() const {
  1511 bool TypeInt::is_finite() const {
  2503 }
  2503 }
  2504 
  2504 
  2505 //------------------------------hash-------------------------------------------
  2505 //------------------------------hash-------------------------------------------
  2506 // Type-specific hashing function.
  2506 // Type-specific hashing function.
  2507 int TypePtr::hash(void) const {
  2507 int TypePtr::hash(void) const {
  2508   return java_add(java_add(_ptr, _offset), java_add( hash_speculative(), _inline_depth));
  2508   return java_add(java_add((jint)_ptr, (jint)_offset), java_add((jint)hash_speculative(), (jint)_inline_depth));
  2509 ;
  2509 ;
  2510 }
  2510 }
  2511 
  2511 
  2512 /**
  2512 /**
  2513  * Return same type without a speculative part
  2513  * Return same type without a speculative part
  3336 
  3336 
  3337 //------------------------------hash-------------------------------------------
  3337 //------------------------------hash-------------------------------------------
  3338 // Type-specific hashing function.
  3338 // Type-specific hashing function.
  3339 int TypeOopPtr::hash(void) const {
  3339 int TypeOopPtr::hash(void) const {
  3340   return
  3340   return
  3341     java_add(java_add(const_oop() ? const_oop()->hash() : 0, _klass_is_exact),
  3341     java_add(java_add((jint)(const_oop() ? const_oop()->hash() : 0), (jint)_klass_is_exact),
  3342              java_add(_instance_id, TypePtr::hash()));
  3342              java_add((jint)_instance_id, (jint)TypePtr::hash()));
  3343 }
  3343 }
  3344 
  3344 
  3345 //------------------------------dump2------------------------------------------
  3345 //------------------------------dump2------------------------------------------
  3346 #ifndef PRODUCT
  3346 #ifndef PRODUCT
  3347 void TypeOopPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
  3347 void TypeOopPtr::dump2( Dict &d, uint depth, outputStream *st ) const {
  3944 }
  3944 }
  3945 
  3945 
  3946 //------------------------------hash-------------------------------------------
  3946 //------------------------------hash-------------------------------------------
  3947 // Type-specific hashing function.
  3947 // Type-specific hashing function.
  3948 int TypeInstPtr::hash(void) const {
  3948 int TypeInstPtr::hash(void) const {
  3949   int hash = java_add(klass()->hash(), TypeOopPtr::hash());
  3949   int hash = java_add((jint)klass()->hash(), (jint)TypeOopPtr::hash());
  3950   return hash;
  3950   return hash;
  3951 }
  3951 }
  3952 
  3952 
  3953 //------------------------------dump2------------------------------------------
  3953 //------------------------------dump2------------------------------------------
  3954 // Dump oop Type
  3954 // Dump oop Type
  4869 }
  4869 }
  4870 
  4870 
  4871 //------------------------------hash-------------------------------------------
  4871 //------------------------------hash-------------------------------------------
  4872 // Type-specific hashing function.
  4872 // Type-specific hashing function.
  4873 int TypeKlassPtr::hash(void) const {
  4873 int TypeKlassPtr::hash(void) const {
  4874   return java_add(klass()->hash(), TypePtr::hash());
  4874   return java_add((jint)klass()->hash(), (jint)TypePtr::hash());
  4875 }
  4875 }
  4876 
  4876 
  4877 //------------------------------singleton--------------------------------------
  4877 //------------------------------singleton--------------------------------------
  4878 // TRUE if Type is a singleton type, FALSE otherwise.   Singletons are simple
  4878 // TRUE if Type is a singleton type, FALSE otherwise.   Singletons are simple
  4879 // constants
  4879 // constants