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

Side by Side Diff: src/full-codegen/full-codegen.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast.h" 7 #include "src/ast.h"
8 #include "src/ast-numbering.h" 8 #include "src/ast-numbering.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 795
796 { 796 {
797 EnterBlockScopeIfNeeded block_scope_state( 797 EnterBlockScopeIfNeeded block_scope_state(
798 this, stmt->scope(), stmt->EntryId(), stmt->DeclsId(), stmt->ExitId()); 798 this, stmt->scope(), stmt->EntryId(), stmt->DeclsId(), stmt->ExitId());
799 VisitStatements(stmt->statements()); 799 VisitStatements(stmt->statements());
800 __ bind(nested_block.break_label()); 800 __ bind(nested_block.break_label());
801 } 801 }
802 } 802 }
803 803
804 804
805 void FullCodeGenerator::VisitDoExpression(DoExpression* expr) {
806 Comment cmnt(masm_, "[ Do Expression");
807 NestedStatement nested_block(this);
808 SetExpressionPosition(expr);
809 VisitBlock(expr->block());
810 EmitVariableLoad(expr->result());
811 }
812
813
805 void FullCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) { 814 void FullCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) {
806 Comment cmnt(masm_, "[ ExpressionStatement"); 815 Comment cmnt(masm_, "[ ExpressionStatement");
807 SetStatementPosition(stmt); 816 SetStatementPosition(stmt);
808 VisitForEffect(stmt->expression()); 817 VisitForEffect(stmt->expression());
809 } 818 }
810 819
811 820
812 void FullCodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) { 821 void FullCodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) {
813 Comment cmnt(masm_, "[ EmptyStatement"); 822 Comment cmnt(masm_, "[ EmptyStatement");
814 SetStatementPosition(stmt); 823 SetStatementPosition(stmt);
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
1664 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || 1673 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() ||
1665 var->initializer_position() >= proxy->position(); 1674 var->initializer_position() >= proxy->position();
1666 } 1675 }
1667 1676
1668 1677
1669 #undef __ 1678 #undef __
1670 1679
1671 1680
1672 } // namespace internal 1681 } // namespace internal
1673 } // namespace v8 1682 } // namespace v8
OLDNEW
« src/ast.h ('K') | « src/flag-definitions.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698