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 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 LoadContextField(context_register(), Context::PREVIOUS_INDEX); | 977 LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
978 --context_length; | 978 --context_length; |
979 } | 979 } |
980 StoreToFrameField(StandardFrameConstants::kContextOffset, | 980 StoreToFrameField(StandardFrameConstants::kContextOffset, |
981 context_register()); | 981 context_register()); |
982 } | 982 } |
983 | 983 |
984 __ jmp(current->AsBreakable()->break_label()); | 984 __ jmp(current->AsBreakable()->break_label()); |
985 } | 985 } |
986 | 986 |
| 987 void FullCodeGenerator::EmitIllegalRedeclaration() { |
| 988 Comment cmnt(masm_, "[ Declarations"); |
| 989 Expression* illegal = scope()->GetIllegalRedeclaration(); |
| 990 SetExpressionAsStatementPosition(illegal); |
| 991 VisitForEffect(illegal); |
| 992 } |
| 993 |
987 void FullCodeGenerator::VisitBreakStatement(BreakStatement* stmt) { | 994 void FullCodeGenerator::VisitBreakStatement(BreakStatement* stmt) { |
988 Comment cmnt(masm_, "[ BreakStatement"); | 995 Comment cmnt(masm_, "[ BreakStatement"); |
989 SetStatementPosition(stmt); | 996 SetStatementPosition(stmt); |
990 EmitBreak(stmt->target()); | 997 EmitBreak(stmt->target()); |
991 } | 998 } |
992 | 999 |
993 void FullCodeGenerator::EmitUnwindAndReturn() { | 1000 void FullCodeGenerator::EmitUnwindAndReturn() { |
994 NestedStatement* current = nesting_stack_; | 1001 NestedStatement* current = nesting_stack_; |
995 int context_length = 0; | 1002 int context_length = 0; |
996 while (current != NULL) { | 1003 while (current != NULL) { |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1918 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1925 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1919 var->initializer_position() >= proxy->position(); | 1926 var->initializer_position() >= proxy->position(); |
1920 } | 1927 } |
1921 | 1928 |
1922 | 1929 |
1923 #undef __ | 1930 #undef __ |
1924 | 1931 |
1925 | 1932 |
1926 } // namespace internal | 1933 } // namespace internal |
1927 } // namespace v8 | 1934 } // namespace v8 |
OLD | NEW |