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

Unified Diff: src/ast/ast.h

Issue 2286273002: [interpreter] Make the comparison bytecode handlers collect type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix. Created 4 years, 4 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 | src/ast/ast.cc » ('j') | src/globals.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/ast.h
diff --git a/src/ast/ast.h b/src/ast/ast.h
index c66055e2952c4d6a993ed0bc36d0db65c450b4f1..77567567dc47fce49d1617b33878adf1ce23f3d7 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -942,6 +942,16 @@ class CaseClause final : public Expression {
Type* compare_type() { return compare_type_; }
void set_compare_type(Type* type) { compare_type_ = type; }
+ // CaseClause will have both a slot in the feedback vector and the
+ // TypeFeedbackId to record the type information. TypeFeedbackId is used by
+ // full codegen and the feedback vector slot is used by interpreter.
+ void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
+ FeedbackVectorSlotCache* cache);
+
+ FeedbackVectorSlot CompareOperationFeedbackSlot() {
+ return type_feedback_slot_;
+ }
+
private:
friend class AstNodeFactory;
@@ -953,6 +963,7 @@ class CaseClause final : public Expression {
Label body_target_;
ZoneList<Statement*>* statements_;
Type* compare_type_;
+ FeedbackVectorSlot type_feedback_slot_;
};
@@ -2208,6 +2219,16 @@ class CompareOperation final : public Expression {
Type* combined_type() const { return combined_type_; }
void set_combined_type(Type* type) { combined_type_ = type; }
+ // CompareOperation will have both a slot in the feedback vector and the
+ // TypeFeedbackId to record the type information. TypeFeedbackId is used
+ // by full codegen and the feedback vector slot is used by interpreter.
+ void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
+ FeedbackVectorSlotCache* cache);
+
+ FeedbackVectorSlot CompareOperationFeedbackSlot() const {
+ return type_feedback_slot_;
+ }
+
// Match special cases.
bool IsLiteralCompareTypeof(Expression** expr, Handle<String>* check);
bool IsLiteralCompareUndefined(Expression** expr);
@@ -2234,6 +2255,7 @@ class CompareOperation final : public Expression {
Expression* right_;
Type* combined_type_;
+ FeedbackVectorSlot type_feedback_slot_;
};
« no previous file with comments | « no previous file | src/ast/ast.cc » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698