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

Unified Diff: src/ast.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/arm/lithium-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 4e851f217c8279d6173fd4259ed3fff25fc2dd4c..e63f9c59d02619350c0c4e67be25d1192f94c1e8 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -1005,6 +1005,7 @@ class CaseClause: public ZoneObject {
}
Label* body_target() { return &body_target_; }
ZoneList<Statement*>* statements() const { return statements_; }
+ int hit_count() { return hit_count_; }
int position() const { return position_; }
void set_position(int pos) { position_ = pos; }
@@ -1013,6 +1014,7 @@ class CaseClause: public ZoneObject {
// Type feedback information.
TypeFeedbackId CompareId() { return compare_id_; }
+ TypeFeedbackId CounterId() { return counter_id_; }
void RecordTypeFeedback(TypeFeedbackOracle* oracle);
bool IsSmiCompare() { return compare_type_ == SMI_ONLY; }
bool IsNameCompare() { return compare_type_ == NAME_ONLY; }
@@ -1032,7 +1034,9 @@ class CaseClause: public ZoneObject {
OBJECT_ONLY
};
CompareTypeFeedback compare_type_;
+ int hit_count_;
const TypeFeedbackId compare_id_;
+ const TypeFeedbackId counter_id_;
const BailoutId entry_id_;
};
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698