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 833 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
844 } else { | 844 } else { |
845 // This expression cannot throw a reference error at the top level. | 845 // This expression cannot throw a reference error at the top level. |
846 VisitInDuplicateContext(expr); | 846 VisitInDuplicateContext(expr); |
847 } | 847 } |
848 } | 848 } |
849 | 849 |
850 | 850 |
851 void FullCodeGenerator::VisitBlock(Block* stmt) { | 851 void FullCodeGenerator::VisitBlock(Block* stmt) { |
852 Comment cmnt(masm_, "[ Block"); | 852 Comment cmnt(masm_, "[ Block"); |
853 NestedBlock nested_block(this, stmt); | 853 NestedBlock nested_block(this, stmt); |
854 SetStatementPosition(stmt); | |
855 | 854 |
856 { | 855 { |
857 EnterBlockScopeIfNeeded block_scope_state( | 856 EnterBlockScopeIfNeeded block_scope_state( |
858 this, stmt->scope(), stmt->EntryId(), stmt->DeclsId(), stmt->ExitId()); | 857 this, stmt->scope(), stmt->EntryId(), stmt->DeclsId(), stmt->ExitId()); |
859 VisitStatements(stmt->statements()); | 858 VisitStatements(stmt->statements()); |
860 __ bind(nested_block.break_label()); | 859 __ bind(nested_block.break_label()); |
861 } | 860 } |
862 } | 861 } |
863 | 862 |
864 | 863 |
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1919 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1918 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1920 var->initializer_position() >= proxy->position(); | 1919 var->initializer_position() >= proxy->position(); |
1921 } | 1920 } |
1922 | 1921 |
1923 | 1922 |
1924 #undef __ | 1923 #undef __ |
1925 | 1924 |
1926 | 1925 |
1927 } // namespace internal | 1926 } // namespace internal |
1928 } // namespace v8 | 1927 } // namespace v8 |
OLD | NEW |