| Index: src/ast/ast-numbering.cc
|
| diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc
|
| index 07d60cf84ab6fd5085b861834a4eb48c6ff149ed..ab375b4ffee83662723dfcad352954850b2774bf 100644
|
| --- a/src/ast/ast-numbering.cc
|
| +++ b/src/ast/ast-numbering.cc
|
| @@ -6,15 +6,18 @@
|
|
|
| #include "src/ast/ast.h"
|
| #include "src/ast/scopes.h"
|
| +#include "src/zone/zone-containers.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
|
|
| class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> {
|
| public:
|
| - AstNumberingVisitor(Isolate* isolate, Zone* zone)
|
| + AstNumberingVisitor(Isolate* isolate, Zone* zone,
|
| + ZoneVector<FunctionLiteral*>* eager_inner_functions)
|
| : isolate_(isolate),
|
| zone_(zone),
|
| + eager_inner_functions_(eager_inner_functions),
|
| next_id_(BailoutId::FirstUsable().ToInt()),
|
| yield_count_(0),
|
| properties_(zone),
|
| @@ -71,6 +74,7 @@ class AstNumberingVisitor final : public AstVisitor<AstNumberingVisitor> {
|
|
|
| Isolate* isolate_;
|
| Zone* zone_;
|
| + ZoneVector<FunctionLiteral*>* eager_inner_functions_;
|
| int next_id_;
|
| int yield_count_;
|
| AstProperties properties_;
|
| @@ -593,6 +597,7 @@ void AstNumberingVisitor::VisitArguments(ZoneList<Expression*>* arguments) {
|
| void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
|
| IncrementNodeCount();
|
| node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids()));
|
| + if (node->ShouldEagerCompile()) eager_inner_functions_->push_back(node);
|
| // We don't recurse into the declarations or body of the function literal:
|
| // you have to separately Renumber() each FunctionLiteral that you compile.
|
| }
|
| @@ -648,10 +653,10 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) {
|
| return !HasStackOverflow();
|
| }
|
|
|
| -
|
| -bool AstNumbering::Renumber(Isolate* isolate, Zone* zone,
|
| - FunctionLiteral* function) {
|
| - AstNumberingVisitor visitor(isolate, zone);
|
| +bool AstNumbering::Renumber(
|
| + Isolate* isolate, Zone* zone, FunctionLiteral* function,
|
| + ZoneVector<FunctionLiteral*>* eager_inner_functions) {
|
| + AstNumberingVisitor visitor(isolate, zone, eager_inner_functions);
|
| return visitor.Renumber(function);
|
| }
|
| } // namespace internal
|
|
|