Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/code_generator.h" | 8 #include "vm/code_generator.h" |
| 9 | 9 |
| 10 #include "lib/error.h" | 10 #include "lib/error.h" |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 957 } | 957 } |
| 958 | 958 |
| 959 // If this node sequence is labeled, a break out of the sequence will have | 959 // If this node sequence is labeled, a break out of the sequence will have |
| 960 // taken care of unchaining the context. | 960 // taken care of unchaining the context. |
| 961 if (node_sequence->label() != NULL) { | 961 if (node_sequence->label() != NULL) { |
| 962 __ Bind(node_sequence->label()->break_label()); | 962 __ Bind(node_sequence->label()->break_label()); |
| 963 | 963 |
| 964 // The context saved on entry must be restored. | 964 // The context saved on entry must be restored. |
| 965 if ((node_sequence == parsed_function_.node_sequence()) && | 965 if ((node_sequence == parsed_function_.node_sequence()) && |
| 966 (parsed_function_.saved_context_var() != NULL)) { | 966 (parsed_function_.saved_context_var() != NULL)) { |
| 967 GenerateLoadVariable(CTX, *parsed_function_.saved_context_var()); | 967 // Outermost sequence cannot have a label. |
| 968 UNREACHABLE(); | |
|
regis
2012/04/05 16:03:57
Good point. A break out of the outermost sequence
srdjan
2012/04/05 16:23:11
Done.
| |
| 968 } | 969 } |
| 969 } | 970 } |
| 970 set_context_level(previous_context_level); | 971 set_context_level(previous_context_level); |
| 971 } | 972 } |
| 972 | 973 |
| 973 | 974 |
| 974 void CodeGenerator::VisitArgumentListNode(ArgumentListNode* arguments) { | 975 void CodeGenerator::VisitArgumentListNode(ArgumentListNode* arguments) { |
| 975 for (int i = 0; i < arguments->length(); i++) { | 976 for (int i = 0; i < arguments->length(); i++) { |
| 976 AstNode* argument = arguments->NodeAt(i); | 977 AstNode* argument = arguments->NodeAt(i); |
| 977 argument->Visit(this); | 978 argument->Visit(this); |
| (...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2841 const Error& error = Error::Handle( | 2842 const Error& error = Error::Handle( |
| 2842 Parser::FormatError(script, token_index, "Error", format, args)); | 2843 Parser::FormatError(script, token_index, "Error", format, args)); |
| 2843 va_end(args); | 2844 va_end(args); |
| 2844 Isolate::Current()->long_jump_base()->Jump(1, error); | 2845 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 2845 UNREACHABLE(); | 2846 UNREACHABLE(); |
| 2846 } | 2847 } |
| 2847 | 2848 |
| 2848 } // namespace dart | 2849 } // namespace dart |
| 2849 | 2850 |
| 2850 #endif // defined TARGET_ARCH_IA32 | 2851 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |