Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(269)

Side by Side Diff: src/mark-compact.cc

Issue 6683022: [Isolates] Merge 7111:7152 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/log.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after
2895 heap_->MoveBlockToOldSpaceAndUpdateRegionMarks(new_addr, 2895 heap_->MoveBlockToOldSpaceAndUpdateRegionMarks(new_addr,
2896 old_addr, 2896 old_addr,
2897 obj_size); 2897 obj_size);
2898 } 2898 }
2899 } 2899 }
2900 2900
2901 ASSERT(!HeapObject::FromAddress(new_addr)->IsCode()); 2901 ASSERT(!HeapObject::FromAddress(new_addr)->IsCode());
2902 2902
2903 HeapObject* copied_to = HeapObject::FromAddress(new_addr); 2903 HeapObject* copied_to = HeapObject::FromAddress(new_addr);
2904 if (copied_to->IsSharedFunctionInfo()) { 2904 if (copied_to->IsSharedFunctionInfo()) {
2905 PROFILE(SFIMoveEvent(old_addr, new_addr)); 2905 PROFILE(SharedFunctionInfoMoveEvent(old_addr, new_addr));
2906 } 2906 }
2907 HEAP_PROFILE(heap_, ObjectMoveEvent(old_addr, new_addr)); 2907 HEAP_PROFILE(heap_, ObjectMoveEvent(old_addr, new_addr));
2908 2908
2909 return obj_size; 2909 return obj_size;
2910 } 2910 }
2911 2911
2912 2912
2913 int MarkCompactCollector::RelocateOldPointerObject(HeapObject* obj) { 2913 int MarkCompactCollector::RelocateOldPointerObject(HeapObject* obj) {
2914 return RelocateOldNonCodeObject(obj, heap_->old_pointer_space()); 2914 return RelocateOldNonCodeObject(obj, heap_->old_pointer_space());
2915 } 2915 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
2987 } 2987 }
2988 2988
2989 #ifdef DEBUG 2989 #ifdef DEBUG
2990 if (FLAG_gc_verbose) { 2990 if (FLAG_gc_verbose) {
2991 PrintF("relocate %p -> %p\n", old_addr, new_addr); 2991 PrintF("relocate %p -> %p\n", old_addr, new_addr);
2992 } 2992 }
2993 #endif 2993 #endif
2994 2994
2995 HeapObject* copied_to = HeapObject::FromAddress(new_addr); 2995 HeapObject* copied_to = HeapObject::FromAddress(new_addr);
2996 if (copied_to->IsSharedFunctionInfo()) { 2996 if (copied_to->IsSharedFunctionInfo()) {
2997 PROFILE(SFIMoveEvent(old_addr, new_addr)); 2997 PROFILE(SharedFunctionInfoMoveEvent(old_addr, new_addr));
2998 } 2998 }
2999 HEAP_PROFILE(heap_, ObjectMoveEvent(old_addr, new_addr)); 2999 HEAP_PROFILE(heap_, ObjectMoveEvent(old_addr, new_addr));
3000 3000
3001 return obj_size; 3001 return obj_size;
3002 } 3002 }
3003 3003
3004 3004
3005 void MarkCompactCollector::EnableCodeFlushing(bool enable) { 3005 void MarkCompactCollector::EnableCodeFlushing(bool enable) {
3006 if (enable) { 3006 if (enable) {
3007 if (code_flusher_ != NULL) return; 3007 if (code_flusher_ != NULL) return;
(...skipping 27 matching lines...) Expand all
3035 } 3035 }
3036 3036
3037 3037
3038 void MarkCompactCollector::Initialize() { 3038 void MarkCompactCollector::Initialize() {
3039 StaticPointersToNewGenUpdatingVisitor::Initialize(); 3039 StaticPointersToNewGenUpdatingVisitor::Initialize();
3040 StaticMarkingVisitor::Initialize(); 3040 StaticMarkingVisitor::Initialize();
3041 } 3041 }
3042 3042
3043 3043
3044 } } // namespace v8::internal 3044 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698