Mercurial > hg > truffle
diff src/share/vm/code/dependencies.hpp @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | d8041d695d19 |
children | b51e29501f30 4ca6dc0799b6 |
line wrap: on
line diff
--- a/src/share/vm/code/dependencies.hpp Tue Mar 11 15:34:06 2014 +0100 +++ b/src/share/vm/code/dependencies.hpp Wed Mar 12 13:30:08 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 @@ -570,6 +571,9 @@ bool next(); DepType type() { return _type; } + bool has_oop_argument() { return type() == call_site_target_value; } + uintptr_t get_identifier(int i); + int argument_count() { return dep_args(type()); } int argument_index(int i) { assert(0 <= i && i < argument_count(), "oob"); return _xi[i]; } @@ -613,6 +617,30 @@ }; +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(); + _type = dep.type(); + for (int i = 0; i < _args_count; i++) { + _argument_hash[i] = dep.get_identifier(i); + } + } + + 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; } +}; + + // Every particular DepChange is a sub-class of this class. class DepChange : public StackObj { public: