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

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

Issue 14703009: Fix bug when optimized code map is evicted. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Resurrect ancient CL. Created 5 years, 5 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 | no next file » | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compilation-cache.h" 10 #include "src/compilation-cache.h"
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 break; 1049 break;
1050 } 1050 }
1051 1051
1052 candidate = next_candidate; 1052 candidate = next_candidate;
1053 } 1053 }
1054 } 1054 }
1055 } 1055 }
1056 1056
1057 1057
1058 void CodeFlusher::EvictOptimizedCodeMap(SharedFunctionInfo* code_map_holder) { 1058 void CodeFlusher::EvictOptimizedCodeMap(SharedFunctionInfo* code_map_holder) {
1059 DCHECK(!FixedArray::cast(code_map_holder->optimized_code_map()) 1059 FixedArray* code_map =
1060 ->get(SharedFunctionInfo::kNextMapIndex) 1060 FixedArray::cast(code_map_holder->optimized_code_map());
1061 ->IsUndefined()); 1061 DCHECK(!code_map->get(SharedFunctionInfo::kNextMapIndex)->IsUndefined());
1062 1062
1063 // Make sure previous flushing decisions are revisited. 1063 // Make sure previous flushing decisions are revisited.
1064 isolate_->heap()->incremental_marking()->RecordWrites(code_map);
1064 isolate_->heap()->incremental_marking()->RecordWrites(code_map_holder); 1065 isolate_->heap()->incremental_marking()->RecordWrites(code_map_holder);
1065 1066
1066 if (FLAG_trace_code_flushing) { 1067 if (FLAG_trace_code_flushing) {
1067 PrintF("[code-flushing abandons code-map: "); 1068 PrintF("[code-flushing abandons code-map: ");
1068 code_map_holder->ShortPrint(); 1069 code_map_holder->ShortPrint();
1069 PrintF("]\n"); 1070 PrintF("]\n");
1070 } 1071 }
1071 1072
1072 SharedFunctionInfo* holder = optimized_code_map_holder_head_; 1073 SharedFunctionInfo* holder = optimized_code_map_holder_head_;
1073 SharedFunctionInfo* next_holder; 1074 SharedFunctionInfo* next_holder;
(...skipping 3560 matching lines...) Expand 10 before | Expand all | Expand 10 after
4634 SlotsBuffer* buffer = *buffer_address; 4635 SlotsBuffer* buffer = *buffer_address;
4635 while (buffer != NULL) { 4636 while (buffer != NULL) {
4636 SlotsBuffer* next_buffer = buffer->next(); 4637 SlotsBuffer* next_buffer = buffer->next();
4637 DeallocateBuffer(buffer); 4638 DeallocateBuffer(buffer);
4638 buffer = next_buffer; 4639 buffer = next_buffer;
4639 } 4640 }
4640 *buffer_address = NULL; 4641 *buffer_address = NULL;
4641 } 4642 }
4642 } // namespace internal 4643 } // namespace internal
4643 } // namespace v8 4644 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698