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

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: Disable CrankShaft 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 Visit(expr->block());
82 Visit(expr->result());
83 }
84
85
80 void ALAA::VisitExpressionStatement(ExpressionStatement* stmt) { 86 void ALAA::VisitExpressionStatement(ExpressionStatement* stmt) {
81 Visit(stmt->expression()); 87 Visit(stmt->expression());
82 } 88 }
83 89
84 90
85 void ALAA::VisitIfStatement(IfStatement* stmt) { 91 void ALAA::VisitIfStatement(IfStatement* stmt) {
86 Visit(stmt->condition()); 92 Visit(stmt->condition());
87 Visit(stmt->then_statement()); 93 Visit(stmt->then_statement());
88 Visit(stmt->else_statement()); 94 Visit(stmt->else_statement());
89 } 95 }
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 int count = 0; 304 int count = 0;
299 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var); 305 int var_index = AstLoopAssignmentAnalyzer::GetVariableIndex(scope, var);
300 for (size_t i = 0; i < list_.size(); i++) { 306 for (size_t i = 0; i < list_.size(); i++) {
301 if (list_[i].second->Contains(var_index)) count++; 307 if (list_[i].second->Contains(var_index)) count++;
302 } 308 }
303 return count; 309 return count;
304 } 310 }
305 } // namespace compiler 311 } // namespace compiler
306 } // namespace internal 312 } // namespace internal
307 } // namespace v8 313 } // namespace v8
OLDNEW
« src/ast.h ('K') | « src/compiler/ast-graph-builder.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698