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

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

Issue 10823082: Make incremental marking clear type feedback cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 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/incremental-marking.cc ('k') | src/objects-visiting.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 if (!o->IsHeapObject()) continue; 1146 if (!o->IsHeapObject()) continue;
1147 collector->RecordSlot(start, p, o); 1147 collector->RecordSlot(start, p, o);
1148 HeapObject* obj = HeapObject::cast(o); 1148 HeapObject* obj = HeapObject::cast(o);
1149 MarkBit mark = Marking::MarkBitFrom(obj); 1149 MarkBit mark = Marking::MarkBitFrom(obj);
1150 if (mark.Get()) continue; 1150 if (mark.Get()) continue;
1151 VisitUnmarkedObject(collector, obj); 1151 VisitUnmarkedObject(collector, obj);
1152 } 1152 }
1153 return true; 1153 return true;
1154 } 1154 }
1155 1155
1156 static void VisitCode(Map* map, HeapObject* object) {
1157 Heap* heap = map->GetHeap();
1158 Code* code = reinterpret_cast<Code*>(object);
1159 if (FLAG_cleanup_code_caches_at_gc) {
1160 code->ClearTypeFeedbackCells(heap);
1161 }
1162 code->CodeIterateBody<MarkCompactMarkingVisitor>(heap);
1163 }
1164
1165 static void VisitJSWeakMap(Map* map, HeapObject* object) { 1156 static void VisitJSWeakMap(Map* map, HeapObject* object) {
1166 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector(); 1157 MarkCompactCollector* collector = map->GetHeap()->mark_compact_collector();
1167 JSWeakMap* weak_map = reinterpret_cast<JSWeakMap*>(object); 1158 JSWeakMap* weak_map = reinterpret_cast<JSWeakMap*>(object);
1168 1159
1169 // Enqueue weak map in linked list of encountered weak maps. 1160 // Enqueue weak map in linked list of encountered weak maps.
1170 if (weak_map->next() == Smi::FromInt(0)) { 1161 if (weak_map->next() == Smi::FromInt(0)) {
1171 weak_map->set_next(collector->encountered_weak_maps()); 1162 weak_map->set_next(collector->encountered_weak_maps());
1172 collector->set_encountered_weak_maps(weak_map); 1163 collector->set_encountered_weak_maps(weak_map);
1173 } 1164 }
1174 1165
(...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after
4248 while (buffer != NULL) { 4239 while (buffer != NULL) {
4249 SlotsBuffer* next_buffer = buffer->next(); 4240 SlotsBuffer* next_buffer = buffer->next();
4250 DeallocateBuffer(buffer); 4241 DeallocateBuffer(buffer);
4251 buffer = next_buffer; 4242 buffer = next_buffer;
4252 } 4243 }
4253 *buffer_address = NULL; 4244 *buffer_address = NULL;
4254 } 4245 }
4255 4246
4256 4247
4257 } } // namespace v8::internal 4248 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/incremental-marking.cc ('k') | src/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698