Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: src/ast-numbering.cc

Issue 1053773006: [es6] implement default/optional parameters (WIP / comments) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ast-numbering.cc
diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc
index 1d5420990fc8d150f1999d9cc8607653afdc7037..80c238750998abbebf25ed0d27567688eb167932 100644
--- a/src/ast-numbering.cc
+++ b/src/ast-numbering.cc
@@ -523,6 +523,10 @@ void AstNumberingVisitor::VisitArguments(ZoneList<Expression*>* arguments) {
void AstNumberingVisitor::VisitFunctionLiteral(FunctionLiteral* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(FunctionLiteral::num_ids()));
+ if (node->default_values()->length()) {
+ VisitArguments(node->default_values());
arv (Not doing code reviews) 2015/04/10 15:08:48 How are the default_values arguments?
caitp (gmail) 2015/04/10 15:28:00 They aren't, VisitArguments() will visit each elem
+ }
+
// We don't recurse into the declarations or body of the function literal:
// you have to separately Renumber() each FunctionLiteral that you compile.
}

Powered by Google App Engine
This is Rietveld 408576698