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

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: 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/ast/ast.cc » ('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 85f15fb2d0a00a32a1959f49acf482711fcaebf8..8bf0313f61b28041a901028cf488544ef69e9a3d 100644
--- a/src/ast/ast.h
+++ b/src/ast/ast.h
@@ -2122,6 +2122,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));
}
@@ -2159,6 +2169,7 @@ class BinaryOperation final : public Expression {
Expression* left_;
Expression* right_;
Handle<AllocationSite> allocation_site_;
+ FeedbackVectorSlot type_feedback_slot_;
};
@@ -2202,6 +2213,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_; }
@@ -2229,6 +2245,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_;
@@ -2370,6 +2387,11 @@ class Assignment final : public Expression {
static int num_ids() { return parent_num_ids() + 2; }
BailoutId AssignmentId() const { return BailoutId(local_id(0)); }
+ // Type feedback vector slot. Used only by ignition.
+ FeedbackVectorSlot BinaryOperationFeedbackSlot() const {
+ return binary_operation_slot_;
+ }
+
// Type feedback information.
TypeFeedbackId AssignmentFeedbackId() { return TypeFeedbackId(local_id(1)); }
bool IsUninitialized() const {
@@ -2418,6 +2440,7 @@ class Assignment final : public Expression {
// Expression's trailing 16-bit field.
uint16_t bit_field_;
FeedbackVectorSlot slot_;
+ FeedbackVectorSlot binary_operation_slot_;
Expression* target_;
Expression* value_;
BinaryOperation* binary_operation_;
« no previous file with comments | « no previous file | src/ast/ast.cc » ('j') | src/ast/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698