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 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2820 Heap::MoveBlockToOldSpaceAndUpdateRegionMarks(new_addr, | 2820 Heap::MoveBlockToOldSpaceAndUpdateRegionMarks(new_addr, |
2821 old_addr, | 2821 old_addr, |
2822 obj_size); | 2822 obj_size); |
2823 } | 2823 } |
2824 } | 2824 } |
2825 | 2825 |
2826 ASSERT(!HeapObject::FromAddress(new_addr)->IsCode()); | 2826 ASSERT(!HeapObject::FromAddress(new_addr)->IsCode()); |
2827 | 2827 |
2828 HeapObject* copied_to = HeapObject::FromAddress(new_addr); | 2828 HeapObject* copied_to = HeapObject::FromAddress(new_addr); |
2829 if (copied_to->IsSharedFunctionInfo()) { | 2829 if (copied_to->IsSharedFunctionInfo()) { |
2830 PROFILE(SFIMoveEvent(old_addr, new_addr)); | 2830 PROFILE(SharedFunctionMoveEvent(old_addr, new_addr)); |
2831 } | 2831 } |
2832 HEAP_PROFILE(ObjectMoveEvent(old_addr, new_addr)); | 2832 HEAP_PROFILE(ObjectMoveEvent(old_addr, new_addr)); |
2833 | 2833 |
2834 return obj_size; | 2834 return obj_size; |
2835 } | 2835 } |
2836 | 2836 |
2837 | 2837 |
2838 int MarkCompactCollector::RelocateOldPointerObject(HeapObject* obj) { | 2838 int MarkCompactCollector::RelocateOldPointerObject(HeapObject* obj) { |
2839 return RelocateOldNonCodeObject(obj, Heap::old_pointer_space()); | 2839 return RelocateOldNonCodeObject(obj, Heap::old_pointer_space()); |
2840 } | 2840 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2912 } | 2912 } |
2913 | 2913 |
2914 #ifdef DEBUG | 2914 #ifdef DEBUG |
2915 if (FLAG_gc_verbose) { | 2915 if (FLAG_gc_verbose) { |
2916 PrintF("relocate %p -> %p\n", old_addr, new_addr); | 2916 PrintF("relocate %p -> %p\n", old_addr, new_addr); |
2917 } | 2917 } |
2918 #endif | 2918 #endif |
2919 | 2919 |
2920 HeapObject* copied_to = HeapObject::FromAddress(new_addr); | 2920 HeapObject* copied_to = HeapObject::FromAddress(new_addr); |
2921 if (copied_to->IsSharedFunctionInfo()) { | 2921 if (copied_to->IsSharedFunctionInfo()) { |
2922 PROFILE(SFIMoveEvent(old_addr, new_addr)); | 2922 PROFILE(SharedFunctionMoveEvent(old_addr, new_addr)); |
2923 } | 2923 } |
2924 HEAP_PROFILE(ObjectMoveEvent(old_addr, new_addr)); | 2924 HEAP_PROFILE(ObjectMoveEvent(old_addr, new_addr)); |
2925 | 2925 |
2926 return obj_size; | 2926 return obj_size; |
2927 } | 2927 } |
2928 | 2928 |
2929 | 2929 |
2930 void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj) { | 2930 void MarkCompactCollector::ReportDeleteIfNeeded(HeapObject* obj) { |
2931 #ifdef ENABLE_GDB_JIT_INTERFACE | 2931 #ifdef ENABLE_GDB_JIT_INTERFACE |
2932 if (obj->IsCode()) { | 2932 if (obj->IsCode()) { |
(...skipping 15 matching lines...) Expand all Loading... |
2948 } | 2948 } |
2949 | 2949 |
2950 | 2950 |
2951 void MarkCompactCollector::Initialize() { | 2951 void MarkCompactCollector::Initialize() { |
2952 StaticPointersToNewGenUpdatingVisitor::Initialize(); | 2952 StaticPointersToNewGenUpdatingVisitor::Initialize(); |
2953 StaticMarkingVisitor::Initialize(); | 2953 StaticMarkingVisitor::Initialize(); |
2954 } | 2954 } |
2955 | 2955 |
2956 | 2956 |
2957 } } // namespace v8::internal | 2957 } } // namespace v8::internal |
OLD | NEW |