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

Side by Side Diff: src/zone.h

Issue 9297052: Include what you use for the files zone* (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « no previous file | src/zone.cc » ('j') | src/zone.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 10 matching lines...) Expand all
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_ZONE_H_ 28 #ifndef V8_ZONE_H_
29 #define V8_ZONE_H_ 29 #define V8_ZONE_H_
30 30
31 #include <stddef.h>
Kevin Millikin (Chromium) 2012/01/30 09:25:45 globals.h includes ../include/v8stdint.h, which in
32
31 #include "allocation.h" 33 #include "allocation.h"
34 #include "checks.h"
35 #include "globals.h"
36 #include "list.h"
37 #include "splay-tree.h"
32 38
33 namespace v8 { 39 namespace v8 {
34 namespace internal { 40 namespace internal {
35 41
36 42
37 // Zone scopes are in one of two modes. Either they delete the zone 43 // Zone scopes are in one of two modes. Either they delete the zone
38 // on exit or they do not. 44 // on exit or they do not.
39 enum ZoneScopeMode { 45 enum ZoneScopeMode {
40 DELETE_ON_EXIT, 46 DELETE_ON_EXIT,
41 DONT_DELETE_ON_EXIT 47 DONT_DELETE_ON_EXIT
42 }; 48 };
43 49
44 class Segment; 50 class Segment;
51 class Isolate;
45 52
46 // The Zone supports very fast allocation of small chunks of 53 // The Zone supports very fast allocation of small chunks of
47 // memory. The chunks cannot be deallocated individually, but instead 54 // memory. The chunks cannot be deallocated individually, but instead
48 // the Zone supports deallocating all chunks in one fast 55 // the Zone supports deallocating all chunks in one fast
49 // operation. The Zone is used to hold temporary data structures like 56 // operation. The Zone is used to hold temporary data structures like
50 // the abstract syntax tree, which is deallocated after compilation. 57 // the abstract syntax tree, which is deallocated after compilation.
51 58
52 // Note: There is no need to initialize the Zone; the first time an 59 // Note: There is no need to initialize the Zone; the first time an
53 // allocation is attempted, a segment of memory will be requested 60 // allocation is attempted, a segment of memory will be requested
54 // through a call to malloc(). 61 // through a call to malloc().
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 public: 246 public:
240 ZoneSplayTree() 247 ZoneSplayTree()
241 : SplayTree<Config, ZoneListAllocationPolicy>() {} 248 : SplayTree<Config, ZoneListAllocationPolicy>() {}
242 ~ZoneSplayTree(); 249 ~ZoneSplayTree();
243 }; 250 };
244 251
245 252
246 } } // namespace v8::internal 253 } } // namespace v8::internal
247 254
248 #endif // V8_ZONE_H_ 255 #endif // V8_ZONE_H_
OLDNEW
« no previous file with comments | « no previous file | src/zone.cc » ('j') | src/zone.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698