| 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); |
| 78 cur_addr_ = cur_page->area_start(); | 80 cur_addr_ = cur_page->area_start(); |
| 79 cur_end_ = cur_page->area_end(); | 81 cur_end_ = cur_page->area_end(); |
| 80 DCHECK(cur_page->WasSwept() || cur_page->SweepingCompleted()); | 82 DCHECK(cur_page->WasSwept() || cur_page->SweepingCompleted()); |
| 81 return true; | 83 return true; |
| 82 } | 84 } |
| 83 | 85 |
| 84 | 86 |
| 85 // ----------------------------------------------------------------------------- | 87 // ----------------------------------------------------------------------------- |
| 86 // CodeRange | 88 // CodeRange |
| 87 | 89 |
| (...skipping 3053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3141 object->ShortPrint(); | 3143 object->ShortPrint(); |
| 3142 PrintF("\n"); | 3144 PrintF("\n"); |
| 3143 } | 3145 } |
| 3144 printf(" --------------------------------------\n"); | 3146 printf(" --------------------------------------\n"); |
| 3145 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3147 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3146 } | 3148 } |
| 3147 | 3149 |
| 3148 #endif // DEBUG | 3150 #endif // DEBUG |
| 3149 } // namespace internal | 3151 } // namespace internal |
| 3150 } // namespace v8 | 3152 } // namespace v8 |
| OLD | NEW |