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

Side by Side Diff: src/spaces.h

Issue 416403011: Fix bogus assert in HeapIterator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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/heap.cc ('k') | src/spaces.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_SPACES_H_ 5 #ifndef V8_SPACES_H_
6 #define V8_SPACES_H_ 6 #define V8_SPACES_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/base/platform/mutex.h" 10 #include "src/base/platform/mutex.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 void set_parallel_sweeping(ParallelSweepingState state) { 471 void set_parallel_sweeping(ParallelSweepingState state) {
472 base::Release_Store(&parallel_sweeping_, state); 472 base::Release_Store(&parallel_sweeping_, state);
473 } 473 }
474 474
475 bool TryParallelSweeping() { 475 bool TryParallelSweeping() {
476 return base::Acquire_CompareAndSwap( 476 return base::Acquire_CompareAndSwap(
477 &parallel_sweeping_, SWEEPING_PENDING, SWEEPING_IN_PROGRESS) == 477 &parallel_sweeping_, SWEEPING_PENDING, SWEEPING_IN_PROGRESS) ==
478 SWEEPING_PENDING; 478 SWEEPING_PENDING;
479 } 479 }
480 480
481 bool SweepingCompleted() { return parallel_sweeping() <= SWEEPING_FINALIZE; }
482
481 // Manage live byte count (count of bytes known to be live, 483 // Manage live byte count (count of bytes known to be live,
482 // because they are marked black). 484 // because they are marked black).
483 void ResetLiveBytes() { 485 void ResetLiveBytes() {
484 if (FLAG_gc_verbose) { 486 if (FLAG_gc_verbose) {
485 PrintF("ResetLiveBytes:%p:%x->0\n", 487 PrintF("ResetLiveBytes:%p:%x->0\n",
486 static_cast<void*>(this), live_byte_count_); 488 static_cast<void*>(this), live_byte_count_);
487 } 489 }
488 live_byte_count_ = 0; 490 live_byte_count_ = 0;
489 } 491 }
490 void IncrementLiveBytes(int by) { 492 void IncrementLiveBytes(int by) {
(...skipping 2534 matching lines...) Expand 10 before | Expand all | Expand 10 after
3025 } 3027 }
3026 // Must be small, since an iteration is used for lookup. 3028 // Must be small, since an iteration is used for lookup.
3027 static const int kMaxComments = 64; 3029 static const int kMaxComments = 64;
3028 }; 3030 };
3029 #endif 3031 #endif
3030 3032
3031 3033
3032 } } // namespace v8::internal 3034 } } // namespace v8::internal
3033 3035
3034 #endif // V8_SPACES_H_ 3036 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698