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

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

Issue 11451038: Fix candidate eviction in code flusher. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | test/cctest/test-heap.cc » ('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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 } 932 }
933 933
934 shared_function_info_candidates_head_ = NULL; 934 shared_function_info_candidates_head_ = NULL;
935 } 935 }
936 936
937 937
938 void CodeFlusher::EvictCandidate(JSFunction* function) { 938 void CodeFlusher::EvictCandidate(JSFunction* function) {
939 ASSERT(!function->next_function_link()->IsUndefined()); 939 ASSERT(!function->next_function_link()->IsUndefined());
940 Object* undefined = isolate_->heap()->undefined_value(); 940 Object* undefined = isolate_->heap()->undefined_value();
941 941
942 // The function is no longer a candidate, make sure it gets visited
943 // again so that previous flushing decisions are revisited.
944 isolate_->heap()->incremental_marking()->RecordWrites(function);
945
942 JSFunction* candidate = jsfunction_candidates_head_; 946 JSFunction* candidate = jsfunction_candidates_head_;
943 JSFunction* next_candidate; 947 JSFunction* next_candidate;
944 if (candidate == function) { 948 if (candidate == function) {
945 next_candidate = GetNextCandidate(function); 949 next_candidate = GetNextCandidate(function);
946 jsfunction_candidates_head_ = next_candidate; 950 jsfunction_candidates_head_ = next_candidate;
947 ClearNextCandidate(function, undefined); 951 ClearNextCandidate(function, undefined);
948 } else { 952 } else {
949 while (candidate != NULL) { 953 while (candidate != NULL) {
950 next_candidate = GetNextCandidate(candidate); 954 next_candidate = GetNextCandidate(candidate);
951 955
(...skipping 2856 matching lines...) Expand 10 before | Expand all | Expand 10 after
3808 while (buffer != NULL) { 3812 while (buffer != NULL) {
3809 SlotsBuffer* next_buffer = buffer->next(); 3813 SlotsBuffer* next_buffer = buffer->next();
3810 DeallocateBuffer(buffer); 3814 DeallocateBuffer(buffer);
3811 buffer = next_buffer; 3815 buffer = next_buffer;
3812 } 3816 }
3813 *buffer_address = NULL; 3817 *buffer_address = NULL;
3814 } 3818 }
3815 3819
3816 3820
3817 } } // namespace v8::internal 3821 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698