--- a/hotspot/src/share/vm/code/dependencies.hpp Wed Feb 19 14:03:09 2014 -0800
+++ b/hotspot/src/share/vm/code/dependencies.hpp Wed Feb 26 11:29:47 2014 +0100
@@ -32,6 +32,7 @@
#include "code/compressedStream.hpp"
#include "code/nmethod.hpp"
#include "utilities/growableArray.hpp"
+#include "utilities/hashtable.hpp"
//** Dependencies represent assertions (approximate invariants) within
// the runtime system, e.g. class hierarchy changes. An example is an
@@ -526,13 +527,12 @@
};
-class DependencySignature : public ResourceObj {
+class DependencySignature : public GenericHashtableEntry<DependencySignature, ResourceObj> {
private:
int _args_count;
uintptr_t _argument_hash[Dependencies::max_arg_count];
Dependencies::DepType _type;
-
public:
DependencySignature(Dependencies::DepStream& dep) {
_args_count = dep.argument_count();
@@ -542,21 +542,14 @@
}
}
- bool equals(const DependencySignature& sig) const;
+ bool equals(DependencySignature* sig) const;
+ uintptr_t key() const { return _argument_hash[0] >> 2; }
int args_count() const { return _args_count; }
uintptr_t arg(int idx) const { return _argument_hash[idx]; }
Dependencies::DepType type() const { return _type; }
};
-class DependencySignatureBuffer : public StackObj {
- private:
- GrowableArray<DependencySignature*>** _signatures;
-
- public:
- DependencySignatureBuffer();
- bool add_if_missing(const DependencySignature& sig);
-};
// Every particular DepChange is a sub-class of this class.
class DepChange : public StackObj {