Index: src/ast.h |
diff --git a/src/ast.h b/src/ast.h |
index 68cbb38e8b6902b9ed908c812113a4d6d0019205..07673770e4006773c1af9dac6a96c347210ac12e 100644 |
--- a/src/ast.h |
+++ b/src/ast.h |
@@ -93,6 +93,7 @@ namespace internal { |
V(CountOperation) \ |
V(BinaryOperation) \ |
V(CompareOperation) \ |
+ V(SpreadOperation) \ |
V(ThisFunction) \ |
V(SuperReference) \ |
V(CaseClause) |
@@ -2241,6 +2242,26 @@ class CompareOperation FINAL : public Expression { |
}; |
+class SpreadOperation FINAL : public Expression { |
+ public: |
+ DECLARE_NODE_TYPE(SpreadOperation) |
+ |
+ Expression* expression() const { return expression_; } |
+ |
+ static int num_ids() { return parent_num_ids(); } |
+ |
+ protected: |
+ SpreadOperation(Zone* zone, Expression* expression, int pos) |
+ : Expression(zone, pos), expression_(expression) {} |
+ static int parent_num_ids() { return Expression::num_ids(); } |
+ |
+ private: |
+ int local_id(int n) const { return base_id() + parent_num_ids() + n; } |
+ |
+ Expression* expression_; |
+}; |
+ |
+ |
class Conditional FINAL : public Expression { |
public: |
DECLARE_NODE_TYPE(Conditional) |
@@ -3460,6 +3481,10 @@ class AstNodeFactory FINAL BASE_EMBEDDED { |
return new (zone_) CompareOperation(zone_, op, left, right, pos); |
} |
+ SpreadOperation* NewSpreadOperation(Expression* expression, int pos) { |
+ return new (zone_) SpreadOperation(zone_, expression, pos); |
+ } |
+ |
Conditional* NewConditional(Expression* condition, |
Expression* then_expression, |
Expression* else_expression, |