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

Unified Diff: src/zone/zone.h

Issue 2645403002: [Compiler] Enable use of seperate zones for parsing and compiling. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: src/zone/zone.h
diff --git a/src/zone/zone.h b/src/zone/zone.h
index 4e3b96eb206e8ff1a247130600ea3ac5e341e3c8..01ddac18c581de036e7809c5dbb083e29f9d5b64 100644
--- a/src/zone/zone.h
+++ b/src/zone/zone.h
@@ -50,6 +50,9 @@ class V8_EXPORT_PRIVATE Zone final {
return static_cast<T*>(New(length * sizeof(T)));
}
+ // Seals the zone to prevent any further allocation.
+ void Seal() { sealed_ = true; }
+
// Returns true if more memory has been allocated in zones than
// the limit allows.
bool excess_allocation() const {
@@ -114,6 +117,7 @@ class V8_EXPORT_PRIVATE Zone final {
Segment* segment_head_;
const char* name_;
+ bool sealed_;
};
// ZoneObject is an abstraction that helps define classes of objects
« src/crankshaft/hydrogen.h ('K') | « src/crankshaft/hydrogen.cc ('k') | src/zone/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698