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

Unified Diff: src/ast/ast.h

Issue 2209633002: [Interpreter] Assign feedback slots for binary operations and use them in ignition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased the patch. 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') | no next file with comments »
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 5b2770d59bc43068793af76e9f1ef9bec3ec4863..440cdb0227c7eeb698f2cd59d523d003989884b4 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -2123,6 +2123,16 @@ class BinaryOperation final : public Expression {
static int num_ids() { return parent_num_ids() + 2; }
BailoutId RightId() const { return BailoutId(local_id(0)); }
+ // BinaryOperation 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 BinaryOperationFeedbackSlot() const {
+ return type_feedback_slot_;
+ }
+
TypeFeedbackId BinaryOperationFeedbackId() const {
return TypeFeedbackId(local_id(1));
}
@@ -2160,6 +2170,7 @@ class BinaryOperation final : public Expression {
Expression* left_;
Expression* right_;
Handle<AllocationSite> allocation_site_;
+ FeedbackVectorSlot type_feedback_slot_;
};
@@ -2203,6 +2214,11 @@ class CountOperation final : public Expression {
return TypeFeedbackId(local_id(3));
}
+ // Feedback slot for binary operation is only used by ignition.
+ FeedbackVectorSlot CountBinaryOpFeedbackSlot() const {
+ return binary_operation_slot_;
+ }
+
void AssignFeedbackVectorSlots(Isolate* isolate, FeedbackVectorSpec* spec,
FeedbackVectorSlotCache* cache);
FeedbackVectorSlot CountSlot() const { return slot_; }
@@ -2230,6 +2246,7 @@ class CountOperation final : public Expression {
// Expression's trailing 16-bit field.
uint16_t bit_field_;
FeedbackVectorSlot slot_;
+ FeedbackVectorSlot binary_operation_slot_;
Type* type_;
Expression* expression_;
SmallMapList receiver_types_;
« no previous file with comments | « no previous file | src/ast/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698