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

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

Issue 6992059: Add a comment about map collection into MarkCompactCollector::MarkUnmarkedObject. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 1053
1054 void MarkCompactCollector::MarkUnmarkedObject(HeapObject* object) { 1054 void MarkCompactCollector::MarkUnmarkedObject(HeapObject* object) {
1055 ASSERT(!object->IsMarked()); 1055 ASSERT(!object->IsMarked());
1056 ASSERT(HEAP->Contains(object)); 1056 ASSERT(HEAP->Contains(object));
1057 if (object->IsMap()) { 1057 if (object->IsMap()) {
1058 Map* map = Map::cast(object); 1058 Map* map = Map::cast(object);
1059 if (FLAG_cleanup_code_caches_at_gc) { 1059 if (FLAG_cleanup_code_caches_at_gc) {
1060 map->ClearCodeCache(heap()); 1060 map->ClearCodeCache(heap());
1061 } 1061 }
1062 SetMark(map); 1062 SetMark(map);
1063
1064 // When map collection is enabled we have to mark through map's transitions
1065 // in a special way to make transition links weak.
1066 // Only maps with instance types between FIRST_JS_OBJECT_TYPE and
1067 // JS_FUNCTION_TYPE can have transitions.
1063 if (FLAG_collect_maps && 1068 if (FLAG_collect_maps &&
1064 map->instance_type() >= FIRST_JS_OBJECT_TYPE && 1069 map->instance_type() >= FIRST_JS_OBJECT_TYPE &&
1065 map->instance_type() <= JS_FUNCTION_TYPE) { 1070 map->instance_type() <= JS_FUNCTION_TYPE) {
1066 MarkMapContents(map); 1071 MarkMapContents(map);
1067 } else { 1072 } else {
1068 marking_stack_.Push(map); 1073 marking_stack_.Push(map);
1069 } 1074 }
1070 } else { 1075 } else {
1071 SetMark(object); 1076 SetMark(object);
1072 marking_stack_.Push(object); 1077 marking_stack_.Push(object);
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
3134 } 3139 }
3135 3140
3136 3141
3137 void MarkCompactCollector::Initialize() { 3142 void MarkCompactCollector::Initialize() {
3138 StaticPointersToNewGenUpdatingVisitor::Initialize(); 3143 StaticPointersToNewGenUpdatingVisitor::Initialize();
3139 StaticMarkingVisitor::Initialize(); 3144 StaticMarkingVisitor::Initialize();
3140 } 3145 }
3141 3146
3142 3147
3143 } } // namespace v8::internal 3148 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698