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

Side by Side Diff: src/zone.h

Issue 23479015: thread isolate in PreallocatedStorageAllocationPolicy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: forgot explicit dtor Created 7 years, 3 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/string-stream.cc ('k') | test/cctest/test-list.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 // 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 private: 168 private:
169 Zone* zone_; 169 Zone* zone_;
170 }; 170 };
171 171
172 172
173 // The ZoneAllocationPolicy is used to specialize generic data 173 // The ZoneAllocationPolicy is used to specialize generic data
174 // structures to allocate themselves and their elements in the Zone. 174 // structures to allocate themselves and their elements in the Zone.
175 struct ZoneAllocationPolicy { 175 struct ZoneAllocationPolicy {
176 public: 176 public:
177 class Deleter {
178 public:
179 INLINE(explicit Deleter(const ZoneAllocationPolicy&)) {}
180 INLINE(static void Delete(void *pointer)) { }
181 };
177 explicit ZoneAllocationPolicy(Zone* zone) : zone_(zone) { } 182 explicit ZoneAllocationPolicy(Zone* zone) : zone_(zone) { }
178 INLINE(void* New(size_t size)); 183 INLINE(void* New(size_t size));
179 INLINE(static void Delete(void *pointer)) { } 184 INLINE(static void Delete(void *pointer)) { }
180 Zone* zone() { return zone_; } 185 Zone* zone() { return zone_; }
181 186
182 private: 187 private:
183 Zone* zone_; 188 Zone* zone_;
184 }; 189 };
185 190
186 191
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 void operator delete(void* pointer) { UNREACHABLE(); } 257 void operator delete(void* pointer) { UNREACHABLE(); }
253 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); } 258 void operator delete(void* pointer, Zone* zone) { UNREACHABLE(); }
254 }; 259 };
255 260
256 261
257 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap; 262 typedef TemplateHashMapImpl<ZoneAllocationPolicy> ZoneHashMap;
258 263
259 } } // namespace v8::internal 264 } } // namespace v8::internal
260 265
261 #endif // V8_ZONE_H_ 266 #endif // V8_ZONE_H_
OLDNEW
« no previous file with comments | « src/string-stream.cc ('k') | test/cctest/test-list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698