| 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.h" | 9 #include "src/full-codegen.h" |
| 10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
| (...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 } | 1353 } |
| 1354 if (!to_space_.AdvancePage()) { | 1354 if (!to_space_.AdvancePage()) { |
| 1355 // Failed to get a new page in to-space. | 1355 // Failed to get a new page in to-space. |
| 1356 return false; | 1356 return false; |
| 1357 } | 1357 } |
| 1358 | 1358 |
| 1359 // Clear remainder of current page. | 1359 // Clear remainder of current page. |
| 1360 Address limit = NewSpacePage::FromLimit(top)->area_end(); | 1360 Address limit = NewSpacePage::FromLimit(top)->area_end(); |
| 1361 if (heap()->gc_state() == Heap::SCAVENGE) { | 1361 if (heap()->gc_state() == Heap::SCAVENGE) { |
| 1362 heap()->promotion_queue()->SetNewLimit(limit); | 1362 heap()->promotion_queue()->SetNewLimit(limit); |
| 1363 heap()->promotion_queue()->ActivateGuardIfOnTheSamePage(); | |
| 1364 } | 1363 } |
| 1365 | 1364 |
| 1366 int remaining_in_page = static_cast<int>(limit - top); | 1365 int remaining_in_page = static_cast<int>(limit - top); |
| 1367 heap()->CreateFillerObjectAt(top, remaining_in_page); | 1366 heap()->CreateFillerObjectAt(top, remaining_in_page); |
| 1368 pages_used_++; | 1367 pages_used_++; |
| 1369 UpdateAllocationInfo(); | 1368 UpdateAllocationInfo(); |
| 1370 | 1369 |
| 1371 return true; | 1370 return true; |
| 1372 } | 1371 } |
| 1373 | 1372 |
| (...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3098 object->ShortPrint(); | 3097 object->ShortPrint(); |
| 3099 PrintF("\n"); | 3098 PrintF("\n"); |
| 3100 } | 3099 } |
| 3101 printf(" --------------------------------------\n"); | 3100 printf(" --------------------------------------\n"); |
| 3102 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3101 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3103 } | 3102 } |
| 3104 | 3103 |
| 3105 #endif // DEBUG | 3104 #endif // DEBUG |
| 3106 } | 3105 } |
| 3107 } // namespace v8::internal | 3106 } // namespace v8::internal |
| OLD | NEW |