Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: runtime/vm/hash_map.h

Issue 2300873002: VM: Compute static guarded cid for final instance fields. (Closed)
Patch Set: address comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/handles_impl.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/hash_map.h
diff --git a/runtime/vm/hash_map.h b/runtime/vm/hash_map.h
index 372ff7f38c94607ea90ca4e63ad7c66323e7479c..64f879081495371a85181a8b112d500a38a17ccd 100644
--- a/runtime/vm/hash_map.h
+++ b/runtime/vm/hash_map.h
@@ -168,13 +168,14 @@ typename KeyValueTrait::Value
template<typename KeyValueTrait, typename B, typename Allocator>
typename KeyValueTrait::Pair*
BaseDirectChainedHashMap<KeyValueTrait, B, Allocator>::Iterator::Next() {
- const typename KeyValueTrait::Pair kNoPair = typename KeyValueTrait::Pair();
+ const typename KeyValueTrait::Value kNoValue =
+ KeyValueTrait::ValueOf(typename KeyValueTrait::Pair());
if (array_index_ < map_.array_size_) {
// If we're not in the middle of a list, find the next array slot.
if (list_index_ == kNil) {
- while ((map_.array_[array_index_].kv == kNoPair) &&
- (array_index_ < map_.array_size_)) {
+ while (KeyValueTrait::ValueOf(map_.array_[array_index_].kv) == kNoValue &&
+ array_index_ < map_.array_size_) {
array_index_++;
}
if (array_index_ < map_.array_size_) {
« no previous file with comments | « runtime/vm/handles_impl.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698