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.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 | 872 |
873 void FullCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) { | 873 void FullCodeGenerator::VisitExpressionStatement(ExpressionStatement* stmt) { |
874 Comment cmnt(masm_, "[ ExpressionStatement"); | 874 Comment cmnt(masm_, "[ ExpressionStatement"); |
875 SetStatementPosition(stmt); | 875 SetStatementPosition(stmt); |
876 VisitForEffect(stmt->expression()); | 876 VisitForEffect(stmt->expression()); |
877 } | 877 } |
878 | 878 |
879 | 879 |
880 void FullCodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) { | 880 void FullCodeGenerator::VisitEmptyStatement(EmptyStatement* stmt) { |
881 Comment cmnt(masm_, "[ EmptyStatement"); | 881 Comment cmnt(masm_, "[ EmptyStatement"); |
| 882 SetStatementPosition(stmt); |
882 } | 883 } |
883 | 884 |
884 | 885 |
885 void FullCodeGenerator::VisitIfStatement(IfStatement* stmt) { | 886 void FullCodeGenerator::VisitIfStatement(IfStatement* stmt) { |
886 Comment cmnt(masm_, "[ IfStatement"); | 887 Comment cmnt(masm_, "[ IfStatement"); |
887 SetStatementPosition(stmt); | 888 SetStatementPosition(stmt); |
888 Label then_part, else_part, done; | 889 Label then_part, else_part, done; |
889 | 890 |
890 if (stmt->HasElseStatement()) { | 891 if (stmt->HasElseStatement()) { |
891 VisitForControl(stmt->condition(), &then_part, &else_part, &then_part); | 892 VisitForControl(stmt->condition(), &then_part, &else_part, &then_part); |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1929 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1929 var->initializer_position() >= proxy->position(); | 1930 var->initializer_position() >= proxy->position(); |
1930 } | 1931 } |
1931 | 1932 |
1932 | 1933 |
1933 #undef __ | 1934 #undef __ |
1934 | 1935 |
1935 | 1936 |
1936 } // namespace internal | 1937 } // namespace internal |
1937 } // namespace v8 | 1938 } // namespace v8 |
OLD | NEW |