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