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

Unified Diff: src/compiler/js-inlining-heuristic.cc

Issue 1818043004: Fix JSInliningHeuristic::CandidateCompare predicate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Correct fix Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining-heuristic.cc
diff --git a/src/compiler/js-inlining-heuristic.cc b/src/compiler/js-inlining-heuristic.cc
index cd5637b0c42ba0ffbb3b8e5b8338fe55cf5e5758..0e0508bcd4ccd64f600280580ab002dde1162d6c 100644
--- a/src/compiler/js-inlining-heuristic.cc
+++ b/src/compiler/js-inlining-heuristic.cc
@@ -121,7 +121,10 @@ void JSInliningHeuristic::Finalize() {
bool JSInliningHeuristic::CandidateCompare::operator()(
const Candidate& left, const Candidate& right) const {
- return left.node != right.node && left.calls >= right.calls;
+ if (left.calls != right.calls) {
+ return left.calls > right.calls;
+ }
+ return left.node < right.node;
}
« 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