| 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 2625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2636 int number_of_entries = starts.number_of_entries(); | 2636 int number_of_entries = starts.number_of_entries(); |
| 2637 if (number_of_entries == 0) return; | 2637 if (number_of_entries == 0) return; |
| 2638 for (int i = 0; i < number_of_entries; i++) { | 2638 for (int i = 0; i < number_of_entries; i++) { |
| 2639 // If the entry is compilation info then the map must be alive, | 2639 // If the entry is compilation info then the map must be alive, |
| 2640 // and ClearAndDeoptimizeDependentCode shouldn't be called. | 2640 // and ClearAndDeoptimizeDependentCode shouldn't be called. |
| 2641 ASSERT(entries->is_code_at(i)); | 2641 ASSERT(entries->is_code_at(i)); |
| 2642 Code* code = entries->code_at(i); | 2642 Code* code = entries->code_at(i); |
| 2643 | 2643 |
| 2644 if (IsMarked(code) && !code->marked_for_deoptimization()) { | 2644 if (IsMarked(code) && !code->marked_for_deoptimization()) { |
| 2645 code->set_marked_for_deoptimization(true); | 2645 code->set_marked_for_deoptimization(true); |
| 2646 code->InvalidateEmbeddedObjects(); |
| 2646 have_code_to_deoptimize_ = true; | 2647 have_code_to_deoptimize_ = true; |
| 2647 } | 2648 } |
| 2648 entries->clear_at(i); | 2649 entries->clear_at(i); |
| 2649 } | 2650 } |
| 2650 } | 2651 } |
| 2651 | 2652 |
| 2652 | 2653 |
| 2653 void MarkCompactCollector::ClearNonLiveDependentCode(DependentCode* entries) { | 2654 void MarkCompactCollector::ClearNonLiveDependentCode(DependentCode* entries) { |
| 2654 DisallowHeapAllocation no_allocation; | 2655 DisallowHeapAllocation no_allocation; |
| 2655 DependentCode::GroupStartIndexes starts(entries); | 2656 DependentCode::GroupStartIndexes starts(entries); |
| (...skipping 1696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4352 while (buffer != NULL) { | 4353 while (buffer != NULL) { |
| 4353 SlotsBuffer* next_buffer = buffer->next(); | 4354 SlotsBuffer* next_buffer = buffer->next(); |
| 4354 DeallocateBuffer(buffer); | 4355 DeallocateBuffer(buffer); |
| 4355 buffer = next_buffer; | 4356 buffer = next_buffer; |
| 4356 } | 4357 } |
| 4357 *buffer_address = NULL; | 4358 *buffer_address = NULL; |
| 4358 } | 4359 } |
| 4359 | 4360 |
| 4360 | 4361 |
| 4361 } } // namespace v8::internal | 4362 } } // namespace v8::internal |
| OLD | NEW |