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

Side by Side Diff: src/unique.h

Issue 1088993003: Replace OVERRIDE->override and FINAL->final since we now require C++11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/typing.h ('k') | src/x64/code-stubs-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_UNIQUE_H_ 5 #ifndef V8_HYDROGEN_UNIQUE_H_
6 #define V8_HYDROGEN_UNIQUE_H_ 6 #define V8_HYDROGEN_UNIQUE_H_
7 7
8 #include <ostream> // NOLINT(readability/streams) 8 #include <ostream> // NOLINT(readability/streams)
9 9
10 #include "src/base/functional.h" 10 #include "src/base/functional.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 friend class SideEffectsTracker; 140 friend class SideEffectsTracker;
141 }; 141 };
142 142
143 template <typename T> 143 template <typename T>
144 inline std::ostream& operator<<(std::ostream& os, Unique<T> uniq) { 144 inline std::ostream& operator<<(std::ostream& os, Unique<T> uniq) {
145 return os << Brief(*uniq.handle()); 145 return os << Brief(*uniq.handle());
146 } 146 }
147 147
148 148
149 template <typename T> 149 template <typename T>
150 class UniqueSet FINAL : public ZoneObject { 150 class UniqueSet final : public ZoneObject {
151 public: 151 public:
152 // Constructor. A new set will be empty. 152 // Constructor. A new set will be empty.
153 UniqueSet() : size_(0), capacity_(0), array_(NULL) { } 153 UniqueSet() : size_(0), capacity_(0), array_(NULL) { }
154 154
155 // Capacity constructor. A new set will be empty. 155 // Capacity constructor. A new set will be empty.
156 UniqueSet(int capacity, Zone* zone) 156 UniqueSet(int capacity, Zone* zone)
157 : size_(0), capacity_(capacity), 157 : size_(0), capacity_(capacity),
158 array_(zone->NewArray<Unique<T> >(capacity)) { 158 array_(zone->NewArray<Unique<T> >(capacity)) {
159 DCHECK(capacity <= kMaxCapacity); 159 DCHECK(capacity <= kMaxCapacity);
160 } 160 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 355 }
356 capacity_ = new_capacity; 356 capacity_ = new_capacity;
357 array_ = new_array; 357 array_ = new_array;
358 } 358 }
359 } 359 }
360 }; 360 };
361 361
362 } } // namespace v8::internal 362 } } // namespace v8::internal
363 363
364 #endif // V8_HYDROGEN_UNIQUE_H_ 364 #endif // V8_HYDROGEN_UNIQUE_H_
OLDNEW
« no previous file with comments | « src/typing.h ('k') | src/x64/code-stubs-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698