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

Side by Side Diff: src/compiler/zone-pool.cc

Issue 2344143003: Moved zones and zone related stuff in its own directory. (Closed)
Patch Set: Merge branch 'master' into zonefolder 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 unified diff | Download patch
« no previous file with comments | « src/compiler/zone-pool.h ('k') | src/crankshaft/compilation-phase.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 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 #include "src/compiler/zone-pool.h" 5 #include "src/compiler/zone-pool.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 size_t current_total = GetCurrentAllocatedBytes(); 57 size_t current_total = GetCurrentAllocatedBytes();
58 // Update max. 58 // Update max.
59 max_allocated_bytes_ = std::max(max_allocated_bytes_, current_total); 59 max_allocated_bytes_ = std::max(max_allocated_bytes_, current_total);
60 // Drop zone from initial value map. 60 // Drop zone from initial value map.
61 InitialValues::iterator it = initial_values_.find(zone); 61 InitialValues::iterator it = initial_values_.find(zone);
62 if (it != initial_values_.end()) { 62 if (it != initial_values_.end()) {
63 initial_values_.erase(it); 63 initial_values_.erase(it);
64 } 64 }
65 } 65 }
66 66
67 ZonePool::ZonePool(base::AccountingAllocator* allocator) 67 ZonePool::ZonePool(AccountingAllocator* allocator)
68 : max_allocated_bytes_(0), total_deleted_bytes_(0), allocator_(allocator) {} 68 : max_allocated_bytes_(0), total_deleted_bytes_(0), allocator_(allocator) {}
69 69
70 ZonePool::~ZonePool() { 70 ZonePool::~ZonePool() {
71 DCHECK(used_.empty()); 71 DCHECK(used_.empty());
72 DCHECK(stats_.empty()); 72 DCHECK(stats_.empty());
73 for (Zone* zone : unused_) { 73 for (Zone* zone : unused_) {
74 delete zone; 74 delete zone;
75 } 75 }
76 } 76 }
77 77
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } else { 129 } else {
130 zone->DeleteAll(); 130 zone->DeleteAll();
131 DCHECK_EQ(0u, zone->allocation_size()); 131 DCHECK_EQ(0u, zone->allocation_size());
132 unused_.push_back(zone); 132 unused_.push_back(zone);
133 } 133 }
134 } 134 }
135 135
136 } // namespace compiler 136 } // namespace compiler
137 } // namespace internal 137 } // namespace internal
138 } // namespace v8 138 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/zone-pool.h ('k') | src/crankshaft/compilation-phase.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698