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

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

Issue 61213012: Invalidate embedded objects in optimized code if it was marked for deoptimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
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
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
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