Add sanity check to CodeFlusher::AddCandidate.
R=hpayer@chromium.org BUG=chromium:169209 Review URL: https://codereview.chromium.org/11887031 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13380 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2fcc7d7098
commit
90ec61152c
@ -933,6 +933,16 @@ void CodeFlusher::ProcessSharedFunctionInfoCandidates() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool CodeFlusher::ContainsCandidate(SharedFunctionInfo* shared_info) {
|
||||||
|
SharedFunctionInfo* candidate = shared_function_info_candidates_head_;
|
||||||
|
while (candidate != NULL) {
|
||||||
|
if (candidate == shared_info) return true;
|
||||||
|
candidate = GetNextCandidate(candidate);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CodeFlusher::EvictCandidate(SharedFunctionInfo* shared_info) {
|
void CodeFlusher::EvictCandidate(SharedFunctionInfo* shared_info) {
|
||||||
// The function is no longer a candidate, make sure it gets visited
|
// The function is no longer a candidate, make sure it gets visited
|
||||||
// again so that previous flushing decisions are revisited.
|
// again so that previous flushing decisions are revisited.
|
||||||
|
@ -423,6 +423,10 @@ class CodeFlusher {
|
|||||||
if (GetNextCandidate(shared_info) == NULL) {
|
if (GetNextCandidate(shared_info) == NULL) {
|
||||||
SetNextCandidate(shared_info, shared_function_info_candidates_head_);
|
SetNextCandidate(shared_info, shared_function_info_candidates_head_);
|
||||||
shared_function_info_candidates_head_ = shared_info;
|
shared_function_info_candidates_head_ = shared_info;
|
||||||
|
} else {
|
||||||
|
// TODO(mstarzinger): Active in release mode to flush out problems.
|
||||||
|
// Should be turned back into an ASSERT or removed completely.
|
||||||
|
CHECK(ContainsCandidate(shared_info));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,6 +438,8 @@ class CodeFlusher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ContainsCandidate(SharedFunctionInfo* shared_info);
|
||||||
|
|
||||||
void EvictCandidate(SharedFunctionInfo* shared_info);
|
void EvictCandidate(SharedFunctionInfo* shared_info);
|
||||||
void EvictCandidate(JSFunction* function);
|
void EvictCandidate(JSFunction* function);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user