| 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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 LoadContextField(context_register(), Context::PREVIOUS_INDEX); | 973 LoadContextField(context_register(), Context::PREVIOUS_INDEX); |
| 974 --context_length; | 974 --context_length; |
| 975 } | 975 } |
| 976 StoreToFrameField(StandardFrameConstants::kContextOffset, | 976 StoreToFrameField(StandardFrameConstants::kContextOffset, |
| 977 context_register()); | 977 context_register()); |
| 978 } | 978 } |
| 979 | 979 |
| 980 __ jmp(current->AsBreakable()->break_label()); | 980 __ jmp(current->AsBreakable()->break_label()); |
| 981 } | 981 } |
| 982 | 982 |
| 983 void FullCodeGenerator::EmitIllegalRedeclaration() { | |
| 984 Comment cmnt(masm_, "[ Declarations"); | |
| 985 Expression* illegal = scope()->GetIllegalRedeclaration(); | |
| 986 SetExpressionAsStatementPosition(illegal); | |
| 987 VisitForEffect(illegal); | |
| 988 } | |
| 989 | |
| 990 void FullCodeGenerator::VisitBreakStatement(BreakStatement* stmt) { | 983 void FullCodeGenerator::VisitBreakStatement(BreakStatement* stmt) { |
| 991 Comment cmnt(masm_, "[ BreakStatement"); | 984 Comment cmnt(masm_, "[ BreakStatement"); |
| 992 SetStatementPosition(stmt); | 985 SetStatementPosition(stmt); |
| 993 EmitBreak(stmt->target()); | 986 EmitBreak(stmt->target()); |
| 994 } | 987 } |
| 995 | 988 |
| 996 void FullCodeGenerator::EmitUnwindAndReturn() { | 989 void FullCodeGenerator::EmitUnwindAndReturn() { |
| 997 NestedStatement* current = nesting_stack_; | 990 NestedStatement* current = nesting_stack_; |
| 998 int context_length = 0; | 991 int context_length = 0; |
| 999 while (current != NULL) { | 992 while (current != NULL) { |
| (...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1945 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1938 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1946 var->initializer_position() >= proxy->position(); | 1939 var->initializer_position() >= proxy->position(); |
| 1947 } | 1940 } |
| 1948 | 1941 |
| 1949 | 1942 |
| 1950 #undef __ | 1943 #undef __ |
| 1951 | 1944 |
| 1952 | 1945 |
| 1953 } // namespace internal | 1946 } // namespace internal |
| 1954 } // namespace v8 | 1947 } // namespace v8 |
| OLD | NEW |