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

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

Issue 868883002: Remove the dependency of Zone on Isolate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation issues Created 5 years, 11 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/linkage-x64.cc ('k') | src/compiler/zone-pool.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>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 typedef std::map<Zone*, size_t> InitialValues; 53 typedef std::map<Zone*, size_t> InitialValues;
54 54
55 ZonePool* const zone_pool_; 55 ZonePool* const zone_pool_;
56 InitialValues initial_values_; 56 InitialValues initial_values_;
57 size_t total_allocated_bytes_at_start_; 57 size_t total_allocated_bytes_at_start_;
58 size_t max_allocated_bytes_; 58 size_t max_allocated_bytes_;
59 59
60 DISALLOW_COPY_AND_ASSIGN(StatsScope); 60 DISALLOW_COPY_AND_ASSIGN(StatsScope);
61 }; 61 };
62 62
63 explicit ZonePool(Isolate* isolate); 63 ZonePool();
64 ~ZonePool(); 64 ~ZonePool();
65 65
66 size_t GetMaxAllocatedBytes(); 66 size_t GetMaxAllocatedBytes();
67 size_t GetTotalAllocatedBytes(); 67 size_t GetTotalAllocatedBytes();
68 size_t GetCurrentAllocatedBytes(); 68 size_t GetCurrentAllocatedBytes();
69 69
70 private: 70 private:
71 Zone* NewEmptyZone(); 71 Zone* NewEmptyZone();
72 void ReturnZone(Zone* zone); 72 void ReturnZone(Zone* zone);
73 73
74 static const size_t kMaxUnusedSize = 3; 74 static const size_t kMaxUnusedSize = 3;
75 typedef std::vector<Zone*> Unused; 75 typedef std::vector<Zone*> Unused;
76 typedef std::vector<Zone*> Used; 76 typedef std::vector<Zone*> Used;
77 typedef std::vector<StatsScope*> Stats; 77 typedef std::vector<StatsScope*> Stats;
78 78
79 Isolate* const isolate_;
80 Unused unused_; 79 Unused unused_;
81 Used used_; 80 Used used_;
82 Stats stats_; 81 Stats stats_;
83 size_t max_allocated_bytes_; 82 size_t max_allocated_bytes_;
84 size_t total_deleted_bytes_; 83 size_t total_deleted_bytes_;
85 84
86 DISALLOW_COPY_AND_ASSIGN(ZonePool); 85 DISALLOW_COPY_AND_ASSIGN(ZonePool);
87 }; 86 };
88 87
89 } // namespace compiler 88 } // namespace compiler
90 } // namespace internal 89 } // namespace internal
91 } // namespace v8 90 } // namespace v8
92 91
93 #endif 92 #endif
OLDNEW
« no previous file with comments | « src/compiler/x64/linkage-x64.cc ('k') | src/compiler/zone-pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698