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

Side by Side Diff: src/zone.h

Issue 490173002: Take ast node id counting away from Isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « src/scopes.cc ('k') | test/cctest/test-ast.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_ZONE_H_ 5 #ifndef V8_ZONE_H_
6 #define V8_ZONE_H_ 6 #define V8_ZONE_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Deletes the last small segment kept around by DeleteAll(). You 56 // Deletes the last small segment kept around by DeleteAll(). You
57 // may no longer allocate in the Zone after a call to this method. 57 // may no longer allocate in the Zone after a call to this method.
58 void DeleteKeptSegment(); 58 void DeleteKeptSegment();
59 59
60 // Returns true if more memory has been allocated in zones than 60 // Returns true if more memory has been allocated in zones than
61 // the limit allows. 61 // the limit allows.
62 inline bool excess_allocation(); 62 inline bool excess_allocation();
63 63
64 inline void adjust_segment_bytes_allocated(int delta); 64 inline void adjust_segment_bytes_allocated(int delta);
65 65
66 inline unsigned allocation_size() { return allocation_size_; } 66 inline unsigned allocation_size() const { return allocation_size_; }
67 67
68 inline Isolate* isolate() { return isolate_; } 68 inline Isolate* isolate() const { return isolate_; }
69 69
70 private: 70 private:
71 friend class Isolate; 71 friend class Isolate;
72 72
73 // All pointers returned from New() have this alignment. In addition, if the 73 // All pointers returned from New() have this alignment. In addition, if the
74 // object being allocated has a size that is divisible by 8 then its alignment 74 // object being allocated has a size that is divisible by 8 then its alignment
75 // will be 8. ASan requires 8-byte alignment. 75 // will be 8. ASan requires 8-byte alignment.
76 #ifdef V8_USE_ADDRESS_SANITIZER 76 #ifdef V8_USE_ADDRESS_SANITIZER
77 static const int kAlignment = 8; 77 static const int kAlignment = 8;
78 STATIC_ASSERT(kPointerSize <= 8); 78 STATIC_ASSERT(kPointerSize <= 8);
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 void operator delete(void* pointer) { UNREACHABLE(); } 240 void operator delete(void* pointer) { UNREACHABLE(); }
241 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } 241 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); }
242 }; 242 };
243 243
244 244
245 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; 245 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap;
246 246
247 } } // namespace v8::internal 247 } } // namespace v8::internal
248 248
249 #endif // V8_ZONE_H_ 249 #endif // V8_ZONE_H_
OLDNEW
« no previous file with comments | « src/scopes.cc ('k') | test/cctest/test-ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698