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

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

Issue 1430553003: [turbofan] Use sorted set in JSInliningHeuristic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix typo of doom. Created 5 years, 1 month 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 | src/compiler/js-inlining-heuristic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining-heuristic.h
diff --git a/src/compiler/js-inlining-heuristic.h b/src/compiler/js-inlining-heuristic.h
index a4a0ec3b75855a1c197cf27771b943f0800eadb6..c6f04be0455521243b812c11b5412968064e9e8e 100644
--- a/src/compiler/js-inlining-heuristic.h
+++ b/src/compiler/js-inlining-heuristic.h
@@ -37,14 +37,22 @@ class JSInliningHeuristic final : public AdvancedReducer {
int calls; // Number of times the call site was hit.
};
- static bool Compare(const Candidate& left, const Candidate& right);
+ // Comparator for candidates.
+ struct CandidateCompare {
+ bool operator()(const Candidate& left, const Candidate& right) const;
+ };
+
+ // Candidates are kept in a sorted set of unique candidates.
+ typedef ZoneSet<Candidate, CandidateCompare> Candidates;
+
+ // Dumps candidates to console.
void PrintCandidates();
Mode const mode_;
Zone* local_zone_;
JSGraph* jsgraph_;
JSInliner inliner_;
- ZoneVector<Candidate> candidates_;
+ Candidates candidates_;
CompilationInfo* info_;
};
« no previous file with comments | « no previous file | src/compiler/js-inlining-heuristic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698