| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1454 // NULL as a forwarding address. | 1454 // NULL as a forwarding address. |
| 1455 // The second pass updates pointers to new space in all spaces. It is possible | 1455 // The second pass updates pointers to new space in all spaces. It is possible |
| 1456 // to encounter pointers to dead objects during traversal of dirty regions we | 1456 // to encounter pointers to dead objects during traversal of dirty regions we |
| 1457 // should clear them to avoid encountering them during next dirty regions | 1457 // should clear them to avoid encountering them during next dirty regions |
| 1458 // iteration. | 1458 // iteration. |
| 1459 static void MigrateObject(Address dst, | 1459 static void MigrateObject(Address dst, |
| 1460 Address src, | 1460 Address src, |
| 1461 int size, | 1461 int size, |
| 1462 bool to_old_space) { | 1462 bool to_old_space) { |
| 1463 if (to_old_space) { | 1463 if (to_old_space) { |
| 1464 Heap::CopyBlockToOldSpaceAndUpdateRegionMarks(dst, src, size); | 1464 Heap::CopyBlockToOldSpaceAndUpdateWriteBarrier(dst, src, size); |
| 1465 } else { | 1465 } else { |
| 1466 Heap::CopyBlock(dst, src, size); | 1466 Heap::CopyBlock(dst, src, size); |
| 1467 } | 1467 } |
| 1468 | 1468 |
| 1469 Memory::Address_at(src) = dst; | 1469 Memory::Address_at(src) = dst; |
| 1470 } | 1470 } |
| 1471 | 1471 |
| 1472 | 1472 |
| 1473 class StaticPointersToNewGenUpdatingVisitor : public | 1473 class StaticPointersToNewGenUpdatingVisitor : public |
| 1474 StaticNewSpaceVisitor<StaticPointersToNewGenUpdatingVisitor> { | 1474 StaticNewSpaceVisitor<StaticPointersToNewGenUpdatingVisitor> { |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1913 } | 1913 } |
| 1914 | 1914 |
| 1915 | 1915 |
| 1916 void MarkCompactCollector::Initialize() { | 1916 void MarkCompactCollector::Initialize() { |
| 1917 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 1917 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
| 1918 StaticMarkingVisitor::Initialize(); | 1918 StaticMarkingVisitor::Initialize(); |
| 1919 } | 1919 } |
| 1920 | 1920 |
| 1921 | 1921 |
| 1922 } } // namespace v8::internal | 1922 } } // namespace v8::internal |
| OLD | NEW |