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

Side by Side Diff: src/zone.h

Issue 9430044: Remove unused class AssertNoZoneAllocation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove assertion. Created 8 years, 10 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/isolate.h ('k') | src/zone-inl.h » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // require the operator to be visible. MSVC requires the delete 156 // require the operator to be visible. MSVC requires the delete
157 // operator to be public. 157 // operator to be public.
158 158
159 // ZoneObjects should never be deleted individually; use 159 // ZoneObjects should never be deleted individually; use
160 // Zone::DeleteAll() to delete all zone objects in one go. 160 // Zone::DeleteAll() to delete all zone objects in one go.
161 void operator delete(void*, size_t) { UNREACHABLE(); } 161 void operator delete(void*, size_t) { UNREACHABLE(); }
162 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } 162 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); }
163 }; 163 };
164 164
165 165
166 class AssertNoZoneAllocation {
167 public:
168 inline AssertNoZoneAllocation();
169 inline ~AssertNoZoneAllocation();
170 private:
171 bool prev_;
172 };
173
174
175 // The ZoneListAllocationPolicy is used to specialize the GenericList 166 // The ZoneListAllocationPolicy is used to specialize the GenericList
176 // implementation to allocate ZoneLists and their elements in the 167 // implementation to allocate ZoneLists and their elements in the
177 // Zone. 168 // Zone.
178 class ZoneListAllocationPolicy { 169 class ZoneListAllocationPolicy {
179 public: 170 public:
180 // Allocate 'size' bytes of memory in the zone. 171 // Allocate 'size' bytes of memory in the zone.
181 static void* New(int size); 172 static void* New(int size);
182 173
183 // De-allocation attempts are silently ignored. 174 // De-allocation attempts are silently ignored.
184 static void Delete(void* p) { } 175 static void Delete(void* p) { }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 public: 235 public:
245 ZoneSplayTree() 236 ZoneSplayTree()
246 : SplayTree<Config, ZoneListAllocationPolicy>() {} 237 : SplayTree<Config, ZoneListAllocationPolicy>() {}
247 ~ZoneSplayTree(); 238 ~ZoneSplayTree();
248 }; 239 };
249 240
250 241
251 } } // namespace v8::internal 242 } } // namespace v8::internal
252 243
253 #endif // V8_ZONE_H_ 244 #endif // V8_ZONE_H_
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/zone-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698