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 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2648 int number_of_entries = starts.number_of_entries(); | 2648 int number_of_entries = starts.number_of_entries(); |
2649 if (number_of_entries == 0) return; | 2649 if (number_of_entries == 0) return; |
2650 for (int i = 0; i < number_of_entries; i++) { | 2650 for (int i = 0; i < number_of_entries; i++) { |
2651 // If the entry is compilation info then the map must be alive, | 2651 // If the entry is compilation info then the map must be alive, |
2652 // and ClearAndDeoptimizeDependentCode shouldn't be called. | 2652 // and ClearAndDeoptimizeDependentCode shouldn't be called. |
2653 ASSERT(entries->is_code_at(i)); | 2653 ASSERT(entries->is_code_at(i)); |
2654 Code* code = entries->code_at(i); | 2654 Code* code = entries->code_at(i); |
2655 | 2655 |
2656 if (IsMarked(code) && !code->marked_for_deoptimization()) { | 2656 if (IsMarked(code) && !code->marked_for_deoptimization()) { |
2657 code->set_marked_for_deoptimization(true); | 2657 code->set_marked_for_deoptimization(true); |
| 2658 code->InvalidateEmbeddedObjects(heap()->undefined_value()); |
2658 have_code_to_deoptimize_ = true; | 2659 have_code_to_deoptimize_ = true; |
2659 } | 2660 } |
2660 entries->clear_at(i); | 2661 entries->clear_at(i); |
2661 } | 2662 } |
2662 } | 2663 } |
2663 | 2664 |
2664 | 2665 |
2665 void MarkCompactCollector::ClearNonLiveDependentCode(DependentCode* entries) { | 2666 void MarkCompactCollector::ClearNonLiveDependentCode(DependentCode* entries) { |
2666 DisallowHeapAllocation no_allocation; | 2667 DisallowHeapAllocation no_allocation; |
2667 DependentCode::GroupStartIndexes starts(entries); | 2668 DependentCode::GroupStartIndexes starts(entries); |
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4362 while (buffer != NULL) { | 4363 while (buffer != NULL) { |
4363 SlotsBuffer* next_buffer = buffer->next(); | 4364 SlotsBuffer* next_buffer = buffer->next(); |
4364 DeallocateBuffer(buffer); | 4365 DeallocateBuffer(buffer); |
4365 buffer = next_buffer; | 4366 buffer = next_buffer; |
4366 } | 4367 } |
4367 *buffer_address = NULL; | 4368 *buffer_address = NULL; |
4368 } | 4369 } |
4369 | 4370 |
4370 | 4371 |
4371 } } // namespace v8::internal | 4372 } } // namespace v8::internal |
OLD | NEW |