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

Side by Side Diff: src/compiler/ast-loop-assignment-analyzer.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/ast-loop-assignment-analyzer.h" 5 #include "src/compiler/ast-loop-assignment-analyzer.h"
6 #include "src/compiler.h" 6 #include "src/compiler.h"
7 #include "src/parser.h" 7 #include "src/parser.h"
8 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void ALAA::VisitSuperPropertyReference(SuperPropertyReference* leaf) {} 70 void ALAA::VisitSuperPropertyReference(SuperPropertyReference* leaf) {}
71 void ALAA::VisitSuperCallReference(SuperCallReference* leaf) {} 71 void ALAA::VisitSuperCallReference(SuperCallReference* leaf) {}
72 72
73 73
74 // --------------------------------------------------------------------------- 74 // ---------------------------------------------------------------------------
75 // -- Pass-through nodes------------------------------------------------------ 75 // -- Pass-through nodes------------------------------------------------------
76 // --------------------------------------------------------------------------- 76 // ---------------------------------------------------------------------------
77 void ALAA::VisitBlock(Block* stmt) { VisitStatements(stmt->statements()); } 77 void ALAA::VisitBlock(Block* stmt) { VisitStatements(stmt->statements()); }
78 78
79 79
80 void ALAA::VisitDoExpression(DoExpression* expr) {
81 VisitStatements(expr->statements());
82 }
83
84
80 void ALAA::VisitExpressionStatement(ExpressionStatement* stmt) { 85 void ALAA::VisitExpressionStatement(ExpressionStatement* stmt) {
81 Visit(stmt->expression()); 86 Visit(stmt->expression());
82 } 87 }
83 88
84 89
85 void ALAA::VisitIfStatement(IfStatement* stmt) { 90 void ALAA::VisitIfStatement(IfStatement* stmt) {
86 Visit(stmt->condition()); 91 Visit(stmt->condition());
87 Visit(stmt->then_statement()); 92 Visit(stmt->then_statement());
88 Visit(stmt->else_statement()); 93 Visit(stmt->else_statement());
89 } 94 }
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 int count = 0; 303 int count = 0;
299 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var); 304 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var);
300 for (size_t i = 0; i < list_.size(); i++) { 305 for (size_t i = 0; i < list_.size(); i++) {
301 if (list_[i].second->Contains(var_index)) count++; 306 if (list_[i].second->Contains(var_index)) count++;
302 } 307 }
303 return count; 308 return count;
304 } 309 }
305 } // namespace compiler 310 } // namespace compiler
306 } // namespace internal 311 } // namespace internal
307 } // namespace v8 312 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698