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

Side by Side Diff: src/compiler/zone-pool.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/compiler/x64/instruction-selector-x64.cc ('k') | src/d8.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_ZONE_POOL_H_ 5 #ifndef V8_COMPILER_ZONE_POOL_H_
6 #define V8_COMPILER_ZONE_POOL_H_ 6 #define V8_COMPILER_ZONE_POOL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
11 11
12 #include "src/zone.h" 12 #include "src/zone.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 namespace compiler { 16 namespace compiler {
17 17
18 class ZonePool FINAL { 18 class ZonePool final {
19 public: 19 public:
20 class Scope FINAL { 20 class Scope final {
21 public: 21 public:
22 explicit Scope(ZonePool* zone_pool) : zone_pool_(zone_pool), zone_(NULL) {} 22 explicit Scope(ZonePool* zone_pool) : zone_pool_(zone_pool), zone_(NULL) {}
23 ~Scope() { Destroy(); } 23 ~Scope() { Destroy(); }
24 24
25 Zone* zone() { 25 Zone* zone() {
26 if (zone_ == NULL) zone_ = zone_pool_->NewEmptyZone(); 26 if (zone_ == NULL) zone_ = zone_pool_->NewEmptyZone();
27 return zone_; 27 return zone_;
28 } 28 }
29 void Destroy() { 29 void Destroy() {
30 if (zone_ != NULL) zone_pool_->ReturnZone(zone_); 30 if (zone_ != NULL) zone_pool_->ReturnZone(zone_);
31 zone_ = NULL; 31 zone_ = NULL;
32 } 32 }
33 33
34 private: 34 private:
35 ZonePool* const zone_pool_; 35 ZonePool* const zone_pool_;
36 Zone* zone_; 36 Zone* zone_;
37 DISALLOW_COPY_AND_ASSIGN(Scope); 37 DISALLOW_COPY_AND_ASSIGN(Scope);
38 }; 38 };
39 39
40 class StatsScope FINAL { 40 class StatsScope final {
41 public: 41 public:
42 explicit StatsScope(ZonePool* zone_pool); 42 explicit StatsScope(ZonePool* zone_pool);
43 ~StatsScope(); 43 ~StatsScope();
44 44
45 size_t GetMaxAllocatedBytes(); 45 size_t GetMaxAllocatedBytes();
46 size_t GetCurrentAllocatedBytes(); 46 size_t GetCurrentAllocatedBytes();
47 size_t GetTotalAllocatedBytes(); 47 size_t GetTotalAllocatedBytes();
48 48
49 private: 49 private:
50 friend class ZonePool; 50 friend class ZonePool;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 size_t total_deleted_bytes_; 83 size_t total_deleted_bytes_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(ZonePool); 85 DISALLOW_COPY_AND_ASSIGN(ZonePool);
86 }; 86 };
87 87
88 } // namespace compiler 88 } // namespace compiler
89 } // namespace internal 89 } // namespace internal
90 } // namespace v8 90 } // namespace v8
91 91
92 #endif 92 #endif
OLDNEW
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698