| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 55b4122d71f8cbcccc2d04e8c5d494ef01e508a1..26c187292011337bb265bfa51476aee319b32c4e 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -1216,6 +1216,10 @@ FunctionLiteral* Parser::ParseLazy(Isolate* isolate, ParseInfo* info,
|
| // must produce a FunctionLiteral.
|
| DCHECK(expression->IsFunctionLiteral());
|
| result = expression->AsFunctionLiteral();
|
| + if (scope->has_rest_parameter()) {
|
| + // TODO(caitp): enable optimization of functions with rest params
|
| + result->set_dont_optimize_reason(kRestParameter);
|
| + }
|
| } else {
|
| ok = false;
|
| }
|
|
|