OLD | NEW |
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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 ASSERT(!MarkCompactCollector::IsMarked(table)); | 1169 ASSERT(!MarkCompactCollector::IsMarked(table)); |
1170 collector->SetMark(table, Marking::MarkBitFrom(table)); | 1170 collector->SetMark(table, Marking::MarkBitFrom(table)); |
1171 collector->MarkObject(table->map(), Marking::MarkBitFrom(table->map())); | 1171 collector->MarkObject(table->map(), Marking::MarkBitFrom(table->map())); |
1172 ASSERT(MarkCompactCollector::IsMarked(table->map())); | 1172 ASSERT(MarkCompactCollector::IsMarked(table->map())); |
1173 } | 1173 } |
1174 | 1174 |
1175 static void VisitCode(Map* map, HeapObject* object) { | 1175 static void VisitCode(Map* map, HeapObject* object) { |
1176 Heap* heap = map->GetHeap(); | 1176 Heap* heap = map->GetHeap(); |
1177 Code* code = reinterpret_cast<Code*>(object); | 1177 Code* code = reinterpret_cast<Code*>(object); |
1178 if (FLAG_cleanup_code_caches_at_gc) { | 1178 if (FLAG_cleanup_code_caches_at_gc) { |
1179 TypeFeedbackCells* type_feedback_cells = code->type_feedback_cells(); | 1179 Object* raw_info = code->type_feedback_info(); |
1180 for (int i = 0; i < type_feedback_cells->CellCount(); i++) { | 1180 if (raw_info->IsTypeFeedbackInfo()) { |
1181 ASSERT(type_feedback_cells->AstId(i)->IsSmi()); | 1181 TypeFeedbackCells* type_feedback_cells = |
1182 JSGlobalPropertyCell* cell = type_feedback_cells->Cell(i); | 1182 TypeFeedbackInfo::cast(raw_info)->type_feedback_cells(); |
1183 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); | 1183 for (int i = 0; i < type_feedback_cells->CellCount(); i++) { |
| 1184 ASSERT(type_feedback_cells->AstId(i)->IsSmi()); |
| 1185 JSGlobalPropertyCell* cell = type_feedback_cells->Cell(i); |
| 1186 cell->set_value(TypeFeedbackCells::RawUninitializedSentinel(heap)); |
| 1187 } |
1184 } | 1188 } |
1185 } | 1189 } |
1186 code->CodeIterateBody<StaticMarkingVisitor>(heap); | 1190 code->CodeIterateBody<StaticMarkingVisitor>(heap); |
1187 } | 1191 } |
1188 | 1192 |
1189 // Code flushing support. | 1193 // Code flushing support. |
1190 | 1194 |
1191 // How many collections newly compiled code object will survive before being | 1195 // How many collections newly compiled code object will survive before being |
1192 // flushed. | 1196 // flushed. |
1193 static const int kCodeAgeThreshold = 5; | 1197 static const int kCodeAgeThreshold = 5; |
(...skipping 2917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4111 while (buffer != NULL) { | 4115 while (buffer != NULL) { |
4112 SlotsBuffer* next_buffer = buffer->next(); | 4116 SlotsBuffer* next_buffer = buffer->next(); |
4113 DeallocateBuffer(buffer); | 4117 DeallocateBuffer(buffer); |
4114 buffer = next_buffer; | 4118 buffer = next_buffer; |
4115 } | 4119 } |
4116 *buffer_address = NULL; | 4120 *buffer_address = NULL; |
4117 } | 4121 } |
4118 | 4122 |
4119 | 4123 |
4120 } } // namespace v8::internal | 4124 } } // namespace v8::internal |
OLD | NEW |