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

Side by Side Diff: runtime/vm/hash_set.h

Issue 11646006: - Fix comments and formatting. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/store_buffer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_HASH_SET_H_ 5 #ifndef VM_HASH_SET_H_
6 #define VM_HASH_SET_H_ 6 #define VM_HASH_SET_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "platform/utils.h" 9 #include "platform/utils.h"
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ASSERT(hash != Hash(value)); 77 ASSERT(hash != Hash(value));
78 } 78 }
79 UNREACHABLE(); 79 UNREACHABLE();
80 } 80 }
81 81
82 private: 82 private:
83 intptr_t Hash(uword value) const { 83 intptr_t Hash(uword value) const {
84 return value & size_mask_; 84 return value & size_mask_;
85 } 85 }
86 86
87 // Returns true if the given slot contains a value. 87 // Returns true if the given slot does not contain a value.
88 bool SlotIsEmpty(intptr_t index) const { 88 bool SlotIsEmpty(intptr_t index) const {
89 return keys_[index] == 0; 89 return keys_[index] == 0;
90 } 90 }
91 91
92 uword* keys_; 92 uword* keys_;
93 intptr_t size_mask_; 93 intptr_t size_mask_;
94 intptr_t growth_limit_; 94 intptr_t growth_limit_;
95 intptr_t count_; 95 intptr_t count_;
96 intptr_t fill_ratio_; 96 intptr_t fill_ratio_;
97 97
98 DISALLOW_IMPLICIT_CONSTRUCTORS(HashSet); 98 DISALLOW_IMPLICIT_CONSTRUCTORS(HashSet);
99 }; 99 };
100 100
101 } // namespace dart 101 } // namespace dart
102 102
103 #endif // VM_HASH_SET_H_ 103 #endif // VM_HASH_SET_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/store_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698