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

Side by Side Diff: src/mark-compact.h

Issue 545026: Add some interfaces to the GC that allow us to reserve space. This is needed... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // choosing spaces to compact. 85 // choosing spaces to compact.
86 static void Prepare(GCTracer* tracer); 86 static void Prepare(GCTracer* tracer);
87 87
88 // Performs a global garbage collection. 88 // Performs a global garbage collection.
89 static void CollectGarbage(); 89 static void CollectGarbage();
90 90
91 // True if the last full GC performed heap compaction. 91 // True if the last full GC performed heap compaction.
92 static bool HasCompacted() { return compacting_collection_; } 92 static bool HasCompacted() { return compacting_collection_; }
93 93
94 // True after the Prepare phase if the compaction is taking place. 94 // True after the Prepare phase if the compaction is taking place.
95 static bool IsCompacting() { return compacting_collection_; } 95 static bool IsCompacting() {
96 return state_ != IDLE && compacting_collection_;
97 }
96 98
97 // The count of the number of objects left marked at the end of the last 99 // The count of the number of objects left marked at the end of the last
98 // completed full GC (expected to be zero). 100 // completed full GC (expected to be zero).
99 static int previous_marked_count() { return previous_marked_count_; } 101 static int previous_marked_count() { return previous_marked_count_; }
100 102
101 // During a full GC, there is a stack-allocated GCTracer that is used for 103 // During a full GC, there is a stack-allocated GCTracer that is used for
102 // bookkeeping information. Return a pointer to that tracer. 104 // bookkeeping information. Return a pointer to that tracer.
103 static GCTracer* tracer() { return tracer_; } 105 static GCTracer* tracer() { return tracer_; }
104 106
105 #ifdef DEBUG 107 #ifdef DEBUG
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 427
426 friend class UnmarkObjectVisitor; 428 friend class UnmarkObjectVisitor;
427 static void UnmarkObject(HeapObject* obj); 429 static void UnmarkObject(HeapObject* obj);
428 #endif 430 #endif
429 }; 431 };
430 432
431 433
432 } } // namespace v8::internal 434 } } // namespace v8::internal
433 435
434 #endif // V8_MARK_COMPACT_H_ 436 #endif // V8_MARK_COMPACT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698