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

Side by Side Diff: runtime/vm/store_buffer.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 | « runtime/vm/hash_set.h ('k') | no next file » | 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_STORE_BUFFER_H_ 5 #ifndef VM_STORE_BUFFER_H_
6 #define VM_STORE_BUFFER_H_ 6 #define VM_STORE_BUFFER_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/globals.h" 9 #include "vm/globals.h"
10 #include "vm/hash_set.h" 10 #include "vm/hash_set.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 friend class StoreBuffer; 59 friend class StoreBuffer;
60 60
61 DISALLOW_COPY_AND_ASSIGN(StoreBufferBlock); 61 DISALLOW_COPY_AND_ASSIGN(StoreBufferBlock);
62 }; 62 };
63 63
64 64
65 class StoreBuffer { 65 class StoreBuffer {
66 public: 66 public:
67 // Simple linked list element containing a HashSet of old->new pointers. 67 // Simple linked list element containing a HashSet of old->new pointers.
68 class DedupSet { 68 class DedupSet {
69 public: 69 public:
70 enum { 70 enum {
71 kSetSize = 1024, 71 kSetSize = 1024,
72 kFillRatio = 75 72 kFillRatio = 75
73 }; 73 };
74 74
75 explicit DedupSet(DedupSet* next) 75 explicit DedupSet(DedupSet* next)
76 : next_(next), set_(new HashSet(kSetSize, kFillRatio)) {} 76 : next_(next), set_(new HashSet(kSetSize, kFillRatio)) {}
77 ~DedupSet() { 77 ~DedupSet() {
78 delete set_; 78 delete set_;
79 } 79 }
80 80
81 DedupSet* next() const { return next_; } 81 DedupSet* next() const { return next_; }
82 HashSet* set() const { return set_; } 82 HashSet* set() const { return set_; }
83 83
84 private: 84 private:
85 DedupSet* next_; 85 DedupSet* next_;
86 HashSet* set_; 86 HashSet* set_;
87 87
88 DISALLOW_COPY_AND_ASSIGN(DedupSet); 88 DISALLOW_COPY_AND_ASSIGN(DedupSet);
89 }; 89 };
90 90
91 StoreBuffer() : dedup_sets_(new DedupSet(NULL)), count_(1) {} 91 StoreBuffer() : dedup_sets_(new DedupSet(NULL)), count_(1) {}
92 ~StoreBuffer(); 92 ~StoreBuffer();
93 93
94 void Reset(); 94 void Reset();
(...skipping 12 matching lines...) Expand all
107 private: 107 private:
108 DedupSet* dedup_sets_; 108 DedupSet* dedup_sets_;
109 intptr_t count_; 109 intptr_t count_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(StoreBuffer); 111 DISALLOW_COPY_AND_ASSIGN(StoreBuffer);
112 }; 112 };
113 113
114 } // namespace dart 114 } // namespace dart
115 115
116 #endif // VM_STORE_BUFFER_H_ 116 #endif // VM_STORE_BUFFER_H_
OLDNEW
« no previous file with comments | « runtime/vm/hash_set.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698