Index: src/ast/ast.h |
diff --git a/src/ast/ast.h b/src/ast/ast.h |
index 9a87328a7b98ad1cb1fc62a9da26d03d1fdfc5cd..1b5a254759712efd17612b7286976c9c55b2186b 100644 |
--- a/src/ast/ast.h |
+++ b/src/ast/ast.h |
@@ -1900,6 +1900,10 @@ class Call final : public Expression { |
} |
void MarkTail() { bit_field_ = IsTailField::update(bit_field_, true); } |
+ bool only_last_arg_is_spread() { |
+ return !arguments_->is_empty() && arguments_->last()->IsSpread(); |
+ } |
+ |
enum CallType { |
GLOBAL_CALL, |
WITH_CALL, |
@@ -1999,6 +2003,10 @@ class CallNew final : public Expression { |
set_is_monomorphic(true); |
} |
+ bool only_last_arg_is_spread() { |
+ return !arguments_->is_empty() && arguments_->last()->IsSpread(); |
+ } |
+ |
private: |
friend class AstNodeFactory; |