| Index: src/ast.h
|
| diff --git a/src/ast.h b/src/ast.h
|
| index 661b5f962d86723482c0f08b2c574413787b4f21..a6fc9b1d1ce848cb0b5fd1fe2137e3dec208dbfa 100644
|
| --- a/src/ast.h
|
| +++ b/src/ast.h
|
| @@ -92,6 +92,7 @@ namespace internal {
|
| V(CountOperation) \
|
| V(BinaryOperation) \
|
| V(CompareOperation) \
|
| + V(SpreadOperation) \
|
| V(ThisFunction) \
|
| V(SuperReference) \
|
| V(CaseClause)
|
| @@ -2012,6 +2013,9 @@ class CallRuntime FINAL : public Expression {
|
| return callruntime_feedback_slot_;
|
| }
|
|
|
| + bool IsSuperCall() const { return is_super_call_; }
|
| + void SetIsSuperCall() { is_super_call_ = true; }
|
| +
|
| static int num_ids() { return parent_num_ids() + 1; }
|
| TypeFeedbackId CallRuntimeFeedbackId() const {
|
| return TypeFeedbackId(local_id(0));
|
| @@ -2025,7 +2029,8 @@ class CallRuntime FINAL : public Expression {
|
| raw_name_(name),
|
| function_(function),
|
| arguments_(arguments),
|
| - callruntime_feedback_slot_(FeedbackVectorICSlot::Invalid()) {}
|
| + callruntime_feedback_slot_(FeedbackVectorICSlot::Invalid()),
|
| + is_super_call_(false) {}
|
| static int parent_num_ids() { return Expression::num_ids(); }
|
|
|
| private:
|
| @@ -2035,6 +2040,7 @@ class CallRuntime FINAL : public Expression {
|
| const Runtime::Function* function_;
|
| ZoneList<Expression*>* arguments_;
|
| FeedbackVectorICSlot callruntime_feedback_slot_;
|
| + bool is_super_call_;
|
| };
|
|
|
|
|
| @@ -2241,6 +2247,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)
|
| @@ -3452,6 +3478,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,
|
|
|