Index: runtime/vm/hash_map.h |
diff --git a/runtime/vm/hash_map.h b/runtime/vm/hash_map.h |
index c9eb941c9a13bcb1bcc26326c57bb6ea4fc7907f..6f568b63aee9352f8cce788774fc06967f1a3e77 100644 |
--- a/runtime/vm/hash_map.h |
+++ b/runtime/vm/hash_map.h |
@@ -39,6 +39,9 @@ class BaseDirectChainedHashMap : public B { |
typename KeyValueTrait::Key key) const; |
typename KeyValueTrait::Pair* Lookup(typename KeyValueTrait::Key key) const; |
+ bool HasKey(typename KeyValueTrait::Key key) const { |
+ return Lookup(key) != NULL; |
+ } |
bool IsEmpty() const { return count_ == 0; } |
@@ -378,6 +381,10 @@ class DirectChainedHashMap |
DirectChainedHashMap() |
: BaseDirectChainedHashMap<KeyValueTrait, ValueObject>( |
ASSERT_NOTNULL(Thread::Current()->zone())) {} |
+ |
+ explicit DirectChainedHashMap(Zone* zone) |
+ : BaseDirectChainedHashMap<KeyValueTrait, ValueObject>( |
+ ASSERT_NOTNULL(zone)) {} |
}; |