| 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/parser.h" | 5 #include "vm/parser.h" |
| 6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
| 7 | 7 |
| 8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 9251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9262 try_stack_ = try_stack_->outer_try(); | 9262 try_stack_ = try_stack_->outer_try(); |
| 9263 return innermost_try; | 9263 return innermost_try; |
| 9264 } | 9264 } |
| 9265 | 9265 |
| 9266 | 9266 |
| 9267 void Parser::AddNodeForFinallyInlining(AstNode* node) { | 9267 void Parser::AddNodeForFinallyInlining(AstNode* node) { |
| 9268 if (node == NULL) { | 9268 if (node == NULL) { |
| 9269 return; | 9269 return; |
| 9270 } | 9270 } |
| 9271 ASSERT(node->IsReturnNode() || node->IsJumpNode()); | 9271 ASSERT(node->IsReturnNode() || node->IsJumpNode()); |
| 9272 const intptr_t func_level = current_block_->scope->function_level(); |
| 9272 TryStack* iterator = try_stack_; | 9273 TryStack* iterator = try_stack_; |
| 9273 while (iterator != NULL) { | 9274 while ((iterator != NULL) && |
| 9275 (iterator->try_block()->scope->function_level() == func_level)) { |
| 9274 // For continue and break node check if the target label is in scope. | 9276 // For continue and break node check if the target label is in scope. |
| 9275 if (node->IsJumpNode()) { | 9277 if (node->IsJumpNode()) { |
| 9276 SourceLabel* label = node->AsJumpNode()->label(); | 9278 SourceLabel* label = node->AsJumpNode()->label(); |
| 9277 ASSERT(label != NULL); | 9279 ASSERT(label != NULL); |
| 9278 LocalScope* try_scope = iterator->try_block()->scope; | 9280 LocalScope* try_scope = iterator->try_block()->scope; |
| 9279 // If the label is defined in a scope which is a child (nested scope) | 9281 // If the label is defined in a scope which is a child (nested scope) |
| 9280 // of the try scope then we are not breaking out of this try block | 9282 // of the try scope then we are not breaking out of this try block |
| 9281 // so we do not need to inline the finally code. Otherwise we need | 9283 // so we do not need to inline the finally code. Otherwise we need |
| 9282 // to inline the finally code of this try block and then move on to the | 9284 // to inline the finally code of this try block and then move on to the |
| 9283 // next outer try block. | 9285 // next outer try block. |
| (...skipping 5216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14500 const ArgumentListNode& function_args, | 14502 const ArgumentListNode& function_args, |
| 14501 const LocalVariable* temp_for_last_arg, | 14503 const LocalVariable* temp_for_last_arg, |
| 14502 bool is_super_invocation) { | 14504 bool is_super_invocation) { |
| 14503 UNREACHABLE(); | 14505 UNREACHABLE(); |
| 14504 return NULL; | 14506 return NULL; |
| 14505 } | 14507 } |
| 14506 | 14508 |
| 14507 } // namespace dart | 14509 } // namespace dart |
| 14508 | 14510 |
| 14509 #endif // DART_PRECOMPILED_RUNTIME | 14511 #endif // DART_PRECOMPILED_RUNTIME |
| OLD | NEW |