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

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

Issue 10332010: Implement ClearFunctionTypeFeedback for test cases. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | 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 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 if (!table_mark.Get()) collector->SetMark(table, table_mark); 1179 if (!table_mark.Get()) collector->SetMark(table, table_mark);
1180 // Recording the map slot can be skipped, because maps are not compacted. 1180 // Recording the map slot can be skipped, because maps are not compacted.
1181 collector->MarkObject(table->map(), Marking::MarkBitFrom(table->map())); 1181 collector->MarkObject(table->map(), Marking::MarkBitFrom(table->map()));
1182 ASSERT(MarkCompactCollector::IsMarked(table->map())); 1182 ASSERT(MarkCompactCollector::IsMarked(table->map()));
1183 } 1183 }
1184 1184
1185 static void VisitCode(Map* map, HeapObject* object) { 1185 static void VisitCode(Map* map, HeapObject* object) {
1186 Heap* heap = map->GetHeap(); 1186 Heap* heap = map->GetHeap();
1187 Code* code = reinterpret_cast<Code*>(object); 1187 Code* code = reinterpret_cast<Code*>(object);
1188 if (FLAG_cleanup_code_caches_at_gc) { 1188 if (FLAG_cleanup_code_caches_at_gc) {
1189 Object* raw_info = code->type_feedback_info(); 1189 code->ClearTypeFeedbackCells(heap);
1190 if (raw_info->IsTypeFeedbackInfo()) {
1191 TypeFeedbackCells* type_feedback_cells =
1192 TypeFeedbackInfo::cast(raw_info)->type_feedback_cells();
1193 for (int i = 0; i < type_feedback_cells->CellCount(); i++) {
1194 ASSERT(type_feedback_cells->AstId(i)->IsSmi());
1195 JSGlobalPropertyCell* cell = type_feedback_cells->Cell(i);
1196 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap));
1197 }
1198 }
1199 } 1190 }
1200 code->CodeIterateBody<StaticMarkingVisitor>(heap); 1191 code->CodeIterateBody<StaticMarkingVisitor>(heap);
1201 } 1192 }
1202 1193
1203 // Code flushing support. 1194 // Code flushing support.
1204 1195
1205 // How many collections newly compiled code object will survive before being 1196 // How many collections newly compiled code object will survive before being
1206 // flushed. 1197 // flushed.
1207 static const int kCodeAgeThreshold = 5; 1198 static const int kCodeAgeThreshold = 5;
1208 1199
(...skipping 2935 matching lines...) Expand 10 before | Expand all | Expand 10 after
4144 while (buffer != NULL) { 4135 while (buffer != NULL) {
4145 SlotsBuffer* next_buffer = buffer->next(); 4136 SlotsBuffer* next_buffer = buffer->next();
4146 DeallocateBuffer(buffer); 4137 DeallocateBuffer(buffer);
4147 buffer = next_buffer; 4138 buffer = next_buffer;
4148 } 4139 }
4149 *buffer_address = NULL; 4140 *buffer_address = NULL;
4150 } 4141 }
4151 4142
4152 4143
4153 } } // namespace v8::internal 4144 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698