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

Unified Diff: src/zone.h

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | src/zone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/zone.h
diff --git a/src/zone.h b/src/zone.h
index 6d94754e4b47b3212dee5ec215cf186d9e2bcef6..5545e3cede6dc6b80ed3a2a517b771256a5f6790 100644
--- a/src/zone.h
+++ b/src/zone.h
@@ -39,13 +39,6 @@ namespace v8 {
namespace internal {
-// Zone scopes are in one of two modes. Either they delete the zone
-// on exit or they do not.
-enum ZoneScopeMode {
- DELETE_ON_EXIT,
- DONT_DELETE_ON_EXIT
-};
-
class Segment;
class Isolate;
@@ -65,7 +58,7 @@ class Isolate;
class Zone {
public:
explicit Zone(Isolate* isolate);
- ~Zone() { DeleteKeptSegment(); }
+ ~Zone();
// Allocate 'size' bytes of memory in the Zone; expands the Zone by
// allocating new segments of memory on demand using malloc().
inline void* New(int size);
@@ -73,13 +66,6 @@ class Zone {
template <typename T>
inline T* NewArray(int length);
- // Deletes all objects and free all memory allocated in the Zone. Keeps one
- // small (size <= kMaximumKeptSegmentSize) segment around if it finds one.
- void DeleteAll();
-
- // Deletes the last small segment kept around by DeleteAll().
- void DeleteKeptSegment();
-
// Returns true if more memory has been allocated in zones than
// the limit allows.
inline bool excess_allocation();
@@ -92,7 +78,6 @@ class Zone {
private:
friend class Isolate;
- friend class ZoneScope;
// All pointers returned from New() have this alignment. In addition, if the
// object being allocated has a size that is divisible by 8 then its alignment
@@ -105,11 +90,8 @@ class Zone {
// Never allocate segments larger than this size in bytes.
static const int kMaximumSegmentSize = 1 * MB;
- // Never keep segments larger than this size in bytes around.
- static const int kMaximumKeptSegmentSize = 64 * KB;
-
// Report zone excess when allocation exceeds this limit.
- int zone_excess_limit_;
+ static const int kExcessLimit = 256 * MB;
// The number of bytes allocated in this zone so far.
unsigned allocation_size_;
@@ -138,8 +120,6 @@ class Zone {
Address position_;
Address limit_;
- int scope_nesting_;
-
Segment* segment_head_;
Isolate* isolate_;
};
@@ -232,31 +212,6 @@ class ZoneList: public List<T, ZoneAllocationPolicy> {
};
-// ZoneScopes keep track of the current parsing and compilation
-// nesting and cleans up generated ASTs in the Zone when exiting the
-// outer-most scope.
-class ZoneScope BASE_EMBEDDED {
- public:
- INLINE(ZoneScope(Zone* zone, ZoneScopeMode mode));
-
- virtual ~ZoneScope();
-
- inline bool ShouldDeleteOnExit();
-
- // For ZoneScopes that do not delete on exit by default, call this
- // method to request deletion on exit.
- void DeleteOnExit() {
- mode_ = DELETE_ON_EXIT;
- }
-
- inline static int nesting();
-
- private:
- Zone* zone_;
- ZoneScopeMode mode_;
-};
-
-
// A zone splay tree. The config type parameter encapsulates the
// different configurations of a concrete splay tree (see splay-tree.h).
// The tree itself and all its elements are allocated in the Zone.
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | src/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698