| 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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1555 if (new_addr == NULL) { | 1555 if (new_addr == NULL) { |
| 1556 // We encountered pointer to a dead object. Clear it so we will | 1556 // We encountered pointer to a dead object. Clear it so we will |
| 1557 // not visit it again during next iteration of dirty regions. | 1557 // not visit it again during next iteration of dirty regions. |
| 1558 *p = NULL; | 1558 *p = NULL; |
| 1559 } else { | 1559 } else { |
| 1560 *p = HeapObject::FromAddress(new_addr); | 1560 *p = HeapObject::FromAddress(new_addr); |
| 1561 } | 1561 } |
| 1562 } | 1562 } |
| 1563 | 1563 |
| 1564 | 1564 |
| 1565 static String* UpdateNewSpaceReferenceInExternalStringTableEntry(Object **p) { | 1565 static String* UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap, |
| 1566 Object** p) { |
| 1566 Address old_addr = HeapObject::cast(*p)->address(); | 1567 Address old_addr = HeapObject::cast(*p)->address(); |
| 1567 Address new_addr = Memory::Address_at(old_addr); | 1568 Address new_addr = Memory::Address_at(old_addr); |
| 1568 return String::cast(HeapObject::FromAddress(new_addr)); | 1569 return String::cast(HeapObject::FromAddress(new_addr)); |
| 1569 } | 1570 } |
| 1570 | 1571 |
| 1571 | 1572 |
| 1572 static bool TryPromoteObject(Heap* heap, HeapObject* object, int object_size) { | 1573 static bool TryPromoteObject(Heap* heap, HeapObject* object, int object_size) { |
| 1573 Object* result; | 1574 Object* result; |
| 1574 | 1575 |
| 1575 if (object_size > heap->MaxObjectSizeInPagedSpace()) { | 1576 if (object_size > heap->MaxObjectSizeInPagedSpace()) { |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2696 } | 2697 } |
| 2697 | 2698 |
| 2698 | 2699 |
| 2699 void MarkCompactCollector::Initialize() { | 2700 void MarkCompactCollector::Initialize() { |
| 2700 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 2701 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
| 2701 StaticMarkingVisitor::Initialize(); | 2702 StaticMarkingVisitor::Initialize(); |
| 2702 } | 2703 } |
| 2703 | 2704 |
| 2704 | 2705 |
| 2705 } } // namespace v8::internal | 2706 } } // namespace v8::internal |
| OLD | NEW |