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

Side by Side Diff: src/compiler/ast-graph-builder.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, 1 month 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-graph-builder.h" 5 #include "src/compiler/ast-graph-builder.h"
6 6
7 #include "src/compiler.h" 7 #include "src/compiler.h"
8 #include "src/compiler/ast-loop-assignment-analyzer.h" 8 #include "src/compiler/ast-loop-assignment-analyzer.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/js-type-feedback.h" 10 #include "src/compiler/js-type-feedback.h"
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after
1650 } 1650 }
1651 ast_context()->ProduceValue(literal); 1651 ast_context()->ProduceValue(literal);
1652 } 1652 }
1653 1653
1654 1654
1655 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) { 1655 void AstGraphBuilder::VisitNativeFunctionLiteral(NativeFunctionLiteral* expr) {
1656 UNREACHABLE(); 1656 UNREACHABLE();
1657 } 1657 }
1658 1658
1659 1659
1660 void AstGraphBuilder::VisitDoExpression(DoExpression* expr) {
1661 VisitBlock(expr->block());
1662 VisitVariableProxy(expr->result());
1663 }
1664
1665
1660 void AstGraphBuilder::VisitConditional(Conditional* expr) { 1666 void AstGraphBuilder::VisitConditional(Conditional* expr) {
1661 IfBuilder compare_if(this); 1667 IfBuilder compare_if(this);
1662 VisitForTest(expr->condition()); 1668 VisitForTest(expr->condition());
1663 Node* condition = environment()->Pop(); 1669 Node* condition = environment()->Pop();
1664 compare_if.If(condition); 1670 compare_if.If(condition);
1665 compare_if.Then(); 1671 compare_if.Then();
1666 Visit(expr->then_expression()); 1672 Visit(expr->then_expression());
1667 compare_if.Else(); 1673 compare_if.Else();
1668 Visit(expr->else_expression()); 1674 Visit(expr->else_expression());
1669 compare_if.End(); 1675 compare_if.End();
(...skipping 2618 matching lines...) Expand 10 before | Expand all | Expand 10 after
4288 // Phi does not exist yet, introduce one. 4294 // Phi does not exist yet, introduce one.
4289 value = NewPhi(inputs, value, control); 4295 value = NewPhi(inputs, value, control);
4290 value->ReplaceInput(inputs - 1, other); 4296 value->ReplaceInput(inputs - 1, other);
4291 } 4297 }
4292 return value; 4298 return value;
4293 } 4299 }
4294 4300
4295 } // namespace compiler 4301 } // namespace compiler
4296 } // namespace internal 4302 } // namespace internal
4297 } // namespace v8 4303 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698