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

Unified Diff: src/hydrogen.h

Issue 16128004: Reorder switch clauses using newly-introduced execution counters in (Closed) Base URL: gh:v8/v8.git@master
Patch Set: tweak heuristic Created 7 years, 7 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 | « src/ast.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 7a57448c444199d16f2a58bfe8564cd4d298998d..06f364dc95f80c6ebc3112312738458d6305d9ef 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -1395,6 +1395,22 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
BreakAndContinueScope* next_;
};
+ class ClauseMapping : public ZoneObject {
+ public:
+ ClauseMapping(int index, CaseClause* clause) : index_(index),
+ clause_(clause) {
+ }
+
+ inline int index() const { return index_; }
+ inline CaseClause* clause() const { return clause_; }
+
+ static int HitCountOrder(ClauseMapping* const* a, ClauseMapping* const* b);
+
+ private:
+ int index_;
+ CaseClause* clause_;
+ };
+
explicit HOptimizedGraphBuilder(CompilationInfo* info);
virtual bool BuildGraph();
@@ -1406,6 +1422,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
bool inline_bailout() { return inline_bailout_; }
void AddSoftDeoptimize();
+ HDeoptCounter* AddDeoptCounter(int initial_value, int max_value);
void Bailout(const char* reason);
@@ -1792,6 +1809,7 @@ class HOptimizedGraphBuilder: public HGraphBuilder, public AstVisitor {
BreakAndContinueScope* break_scope_;
int inlined_count_;
+ int deopt_counter_count_;
ZoneList<Handle<Object> > globals_;
bool inline_bailout_;
« no previous file with comments | « src/ast.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698