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

Unified Diff: src/ast-numbering.cc

Issue 1399893002: [es7] implement |do| expressions proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix AST numbering issue + add simple TF impl Created 5 years, 2 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 c328ef1efd38ea1cc64fb62670724f70608f5abb..0acd44c2bda61d78fa8e34f40f8df77854338ae8 100644
--- a/src/ast-numbering.cc
+++ b/src/ast-numbering.cc
@@ -132,6 +132,17 @@ void AstNumberingVisitor::VisitNativeFunctionLiteral(
}
+void AstNumberingVisitor::VisitDoExpression(DoExpression* node) {
+ IncrementNodeCount();
+ node->set_base_id(ReserveIdRange(DoExpression::num_ids()));
+ if (node->result()->is_assigned()) {
+ Visit(node->result());
+ }
+ VisitDeclarations(node->scope()->declarations());
+ VisitStatements(node->statements());
+}
+
+
void AstNumberingVisitor::VisitLiteral(Literal* node) {
IncrementNodeCount();
node->set_base_id(ReserveIdRange(Literal::num_ids()));

Powered by Google App Engine
This is Rietveld 408576698