hotspot/src/share/vm/code/dependencies.hpp
changeset 23187 0f438571f278
parent 22921 ee35d5c0b1dc
child 25936 9b693ed74c13
equal deleted inserted replaced
22930:1c9f21f3fbf4 23187:0f438571f278
   525 
   525 
   526   static void print_statistics() PRODUCT_RETURN;
   526   static void print_statistics() PRODUCT_RETURN;
   527 };
   527 };
   528 
   528 
   529 
   529 
   530 class DependencySignature : public GenericHashtableEntry<DependencySignature, ResourceObj> {
   530 class DependencySignature : public ResourceObj {
   531  private:
   531  private:
   532   int                   _args_count;
   532   int                   _args_count;
   533   uintptr_t             _argument_hash[Dependencies::max_arg_count];
   533   uintptr_t             _argument_hash[Dependencies::max_arg_count];
   534   Dependencies::DepType _type;
   534   Dependencies::DepType _type;
   535 
   535 
   540     for (int i = 0; i < _args_count; i++) {
   540     for (int i = 0; i < _args_count; i++) {
   541       _argument_hash[i] = dep.get_identifier(i);
   541       _argument_hash[i] = dep.get_identifier(i);
   542     }
   542     }
   543   }
   543   }
   544 
   544 
   545   bool equals(DependencySignature* sig) const;
   545   static bool     equals(DependencySignature const& s1, DependencySignature const& s2);
   546   uintptr_t key() const { return _argument_hash[0] >> 2; }
   546   static unsigned hash  (DependencySignature const& s1) { return s1.arg(0) >> 2; }
   547 
   547 
   548   int args_count()             const { return _args_count; }
   548   int args_count()             const { return _args_count; }
   549   uintptr_t arg(int idx)       const { return _argument_hash[idx]; }
   549   uintptr_t arg(int idx)       const { return _argument_hash[idx]; }
   550   Dependencies::DepType type() const { return _type; }
   550   Dependencies::DepType type() const { return _type; }
       
   551 
   551 };
   552 };
   552 
   553 
   553 
   554 
   554 // Every particular DepChange is a sub-class of this class.
   555 // Every particular DepChange is a sub-class of this class.
   555 class DepChange : public StackObj {
   556 class DepChange : public StackObj {