| 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_;
|
| };
|
|
|
|
|
|
|