OLD | NEW |
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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
9 #include "src/full-codegen/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 if (page_mode_ == kOnePageOnly) return false; | 68 if (page_mode_ == kOnePageOnly) return false; |
69 Page* cur_page; | 69 Page* cur_page; |
70 if (cur_addr_ == NULL) { | 70 if (cur_addr_ == NULL) { |
71 cur_page = space_->anchor(); | 71 cur_page = space_->anchor(); |
72 } else { | 72 } else { |
73 cur_page = Page::FromAddress(cur_addr_ - 1); | 73 cur_page = Page::FromAddress(cur_addr_ - 1); |
74 DCHECK(cur_addr_ == cur_page->area_end()); | 74 DCHECK(cur_addr_ == cur_page->area_end()); |
75 } | 75 } |
76 cur_page = cur_page->next_page(); | 76 cur_page = cur_page->next_page(); |
77 if (cur_page == space_->anchor()) return false; | 77 if (cur_page == space_->anchor()) return false; |
78 cur_page->heap()->mark_compact_collector()->SweepOrWaitUntilSweepingCompleted( | |
79 cur_page); | |
80 cur_addr_ = cur_page->area_start(); | 78 cur_addr_ = cur_page->area_start(); |
81 cur_end_ = cur_page->area_end(); | 79 cur_end_ = cur_page->area_end(); |
82 DCHECK(cur_page->WasSwept() || cur_page->SweepingCompleted()); | 80 DCHECK(cur_page->WasSwept() || cur_page->SweepingCompleted()); |
83 return true; | 81 return true; |
84 } | 82 } |
85 | 83 |
86 | 84 |
87 // ----------------------------------------------------------------------------- | 85 // ----------------------------------------------------------------------------- |
88 // CodeRange | 86 // CodeRange |
89 | 87 |
(...skipping 3053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3143 object->ShortPrint(); | 3141 object->ShortPrint(); |
3144 PrintF("\n"); | 3142 PrintF("\n"); |
3145 } | 3143 } |
3146 printf(" --------------------------------------\n"); | 3144 printf(" --------------------------------------\n"); |
3147 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3145 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3148 } | 3146 } |
3149 | 3147 |
3150 #endif // DEBUG | 3148 #endif // DEBUG |
3151 } // namespace internal | 3149 } // namespace internal |
3152 } // namespace v8 | 3150 } // namespace v8 |
OLD | NEW |