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

Unified Diff: src/zone.h

Issue 10534006: Remove TLS access for current Zone. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review. Created 8 years, 6 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/regexp-macro-assembler-x64.cc ('k') | src/zone-inl.h » ('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 699374e18dc45509a40ba149dc4c248c22bb87c8..1bc4984aa2520b0b8d84831290741252e189ee69 100644
--- a/src/zone.h
+++ b/src/zone.h
@@ -148,7 +148,6 @@ class Zone {
class ZoneObject {
public:
// Allocate a new ZoneObject of 'size' bytes in the Zone.
- INLINE(void* operator new(size_t size));
INLINE(void* operator new(size_t size, Zone* zone));
// Ideally, the delete operator should be private instead of
@@ -168,7 +167,7 @@ class ZoneObject {
// structures to allocate themselves and their elements in the Zone.
struct ZoneAllocationPolicy {
public:
- explicit ZoneAllocationPolicy(Zone* zone = NULL) : zone_(zone) { }
+ explicit ZoneAllocationPolicy(Zone* zone) : zone_(zone) { }
INLINE(void* New(size_t size));
INLINE(static void Delete(void *pointer)) { }
@@ -186,14 +185,13 @@ class ZoneList: public List<T, ZoneAllocationPolicy> {
public:
// Construct a new ZoneList with the given capacity; the length is
// always zero. The capacity must be non-negative.
- explicit ZoneList(int capacity, Zone* zone = NULL)
+ ZoneList(int capacity, Zone* zone)
: List<T, ZoneAllocationPolicy>(capacity, ZoneAllocationPolicy(zone)) { }
INLINE(void* operator new(size_t size, Zone* zone));
- INLINE(void* operator new(size_t size));
// Construct a new ZoneList by copying the elements of the given ZoneList.
- explicit ZoneList(const ZoneList<T>& other, Zone* zone = NULL)
+ ZoneList(const ZoneList<T>& other, Zone* zone)
: List<T, ZoneAllocationPolicy>(other.length(),
ZoneAllocationPolicy(zone)) {
AddAll(other, ZoneAllocationPolicy(zone));
@@ -201,28 +199,28 @@ class ZoneList: public List<T, ZoneAllocationPolicy> {
// We add some convenience wrappers so that we can pass in a Zone
// instead of a (less convenient) ZoneAllocationPolicy.
- INLINE(void Add(const T& element, Zone* zone = NULL)) {
+ INLINE(void Add(const T& element, Zone* zone)) {
List<T, ZoneAllocationPolicy>::Add(element, ZoneAllocationPolicy(zone));
}
INLINE(void AddAll(const List<T, ZoneAllocationPolicy>& other,
- Zone* zone = NULL)) {
+ Zone* zone)) {
List<T, ZoneAllocationPolicy>::AddAll(other, ZoneAllocationPolicy(zone));
}
- INLINE(void AddAll(const Vector<T>& other, Zone* zone = NULL)) {
+ INLINE(void AddAll(const Vector<T>& other, Zone* zone)) {
List<T, ZoneAllocationPolicy>::AddAll(other, ZoneAllocationPolicy(zone));
}
- INLINE(void InsertAt(int index, const T& element, Zone* zone = NULL)) {
+ INLINE(void InsertAt(int index, const T& element, Zone* zone)) {
List<T, ZoneAllocationPolicy>::InsertAt(index, element,
ZoneAllocationPolicy(zone));
}
- INLINE(Vector<T> AddBlock(T value, int count, Zone* zone = NULL)) {
+ INLINE(Vector<T> AddBlock(T value, int count, Zone* zone)) {
return List<T, ZoneAllocationPolicy>::AddBlock(value, count,
ZoneAllocationPolicy(zone));
}
- INLINE(void Allocate(int length, Zone* zone = NULL)) {
+ INLINE(void Allocate(int length, Zone* zone)) {
List<T, ZoneAllocationPolicy>::Allocate(length, ZoneAllocationPolicy(zone));
}
- INLINE(void Initialize(int capacity, Zone* zone = NULL)) {
+ INLINE(void Initialize(int capacity, Zone* zone)) {
List<T, ZoneAllocationPolicy>::Initialize(capacity,
ZoneAllocationPolicy(zone));
}
@@ -263,8 +261,8 @@ class ZoneScope BASE_EMBEDDED {
template <typename Config>
class ZoneSplayTree: public SplayTree<Config, ZoneAllocationPolicy> {
public:
- ZoneSplayTree()
- : SplayTree<Config, ZoneAllocationPolicy>() {}
+ explicit ZoneSplayTree(Zone* zone)
+ : SplayTree<Config, ZoneAllocationPolicy>(ZoneAllocationPolicy(zone)) {}
~ZoneSplayTree();
};
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.cc ('k') | src/zone-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698