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 11887031: Add sanity check to CodeFlusher::AddCandidate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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 | « src/mark-compact.h ('k') | 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 // 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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after
926 isolate_->heap()->mark_compact_collector()-> 926 isolate_->heap()->mark_compact_collector()->
927 RecordSlot(code_slot, code_slot, *code_slot); 927 RecordSlot(code_slot, code_slot, *code_slot);
928 928
929 candidate = next_candidate; 929 candidate = next_candidate;
930 } 930 }
931 931
932 shared_function_info_candidates_head_ = NULL; 932 shared_function_info_candidates_head_ = NULL;
933 } 933 }
934 934
935 935
936 bool CodeFlusher::ContainsCandidate(SharedFunctionInfo* shared_info) {
937 SharedFunctionInfo* candidate = shared_function_info_candidates_head_;
938 while (candidate != NULL) {
939 if (candidate == shared_info) return true;
940 candidate = GetNextCandidate(candidate);
941 }
942 return false;
943 }
944
945
936 void CodeFlusher::EvictCandidate(SharedFunctionInfo* shared_info) { 946 void CodeFlusher::EvictCandidate(SharedFunctionInfo* shared_info) {
937 // The function is no longer a candidate, make sure it gets visited 947 // The function is no longer a candidate, make sure it gets visited
938 // again so that previous flushing decisions are revisited. 948 // again so that previous flushing decisions are revisited.
939 isolate_->heap()->incremental_marking()->RecordWrites(shared_info); 949 isolate_->heap()->incremental_marking()->RecordWrites(shared_info);
940 950
941 SharedFunctionInfo* candidate = shared_function_info_candidates_head_; 951 SharedFunctionInfo* candidate = shared_function_info_candidates_head_;
942 SharedFunctionInfo* next_candidate; 952 SharedFunctionInfo* next_candidate;
943 if (candidate == shared_info) { 953 if (candidate == shared_info) {
944 next_candidate = GetNextCandidate(shared_info); 954 next_candidate = GetNextCandidate(shared_info);
945 shared_function_info_candidates_head_ = next_candidate; 955 shared_function_info_candidates_head_ = next_candidate;
(...skipping 2897 matching lines...) Expand 10 before | Expand all | Expand 10 after
3843 while (buffer != NULL) { 3853 while (buffer != NULL) {
3844 SlotsBuffer* next_buffer = buffer->next(); 3854 SlotsBuffer* next_buffer = buffer->next();
3845 DeallocateBuffer(buffer); 3855 DeallocateBuffer(buffer);
3846 buffer = next_buffer; 3856 buffer = next_buffer;
3847 } 3857 }
3848 *buffer_address = NULL; 3858 *buffer_address = NULL;
3849 } 3859 }
3850 3860
3851 3861
3852 } } // namespace v8::internal 3862 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698