| OLD | NEW |
| 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/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 EnterBlockScopeIfNeeded block_scope_state( | 848 EnterBlockScopeIfNeeded block_scope_state( |
| 849 this, stmt->scope(), stmt->EntryId(), stmt->DeclsId(), stmt->ExitId()); | 849 this, stmt->scope(), stmt->EntryId(), stmt->DeclsId(), stmt->ExitId()); |
| 850 VisitStatements(stmt->statements()); | 850 VisitStatements(stmt->statements()); |
| 851 __ bind(nested_block.break_label()); | 851 __ bind(nested_block.break_label()); |
| 852 } | 852 } |
| 853 } | 853 } |
| 854 | 854 |
| 855 | 855 |
| 856 void FullCodeGenerator::VisitDoExpression(DoExpression* expr) { | 856 void FullCodeGenerator::VisitDoExpression(DoExpression* expr) { |
| 857 Comment cmnt(masm_, "[ Do Expression"); | 857 Comment cmnt(masm_, "[ Do Expression"); |
| 858 NestedStatement nested_block(this); | |
| 859 SetExpressionPosition(expr); | 858 SetExpressionPosition(expr); |
| 860 VisitBlock(expr->block()); | 859 VisitBlock(expr->block()); |
| 861 EmitVariableLoad(expr->result()); | 860 EmitVariableLoad(expr->result()); |
| 862 } | 861 } |
| 863 | 862 |
| 864 | 863 |
| 865 void FullCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) { | 864 void FullCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) { |
| 866 Comment cmnt(masm_, "[ ExpressionStatement"); | 865 Comment cmnt(masm_, "[ ExpressionStatement"); |
| 867 SetStatementPosition(stmt); | 866 SetStatementPosition(stmt); |
| 868 VisitForEffect(stmt->expression()); | 867 VisitForEffect(stmt->expression()); |
| (...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1943 return var->scope()->is_nonlinear() || | 1942 return var->scope()->is_nonlinear() || |
| 1944 var->initializer_position() >= proxy->position(); | 1943 var->initializer_position() >= proxy->position(); |
| 1945 } | 1944 } |
| 1946 | 1945 |
| 1947 | 1946 |
| 1948 #undef __ | 1947 #undef __ |
| 1949 | 1948 |
| 1950 | 1949 |
| 1951 } // namespace internal | 1950 } // namespace internal |
| 1952 } // namespace v8 | 1951 } // namespace v8 |
| OLD | NEW |