| 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 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "vm/bigint_operations.h" | 8 #include "vm/bigint_operations.h" |
| 9 #include "vm/class_finalizer.h" | 9 #include "vm/class_finalizer.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 6188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6199 | 6199 |
| 6200 // Add this individual catch handler to the catch handlers list. | 6200 // Add this individual catch handler to the catch handlers list. |
| 6201 current_block_->statements->Add(catch_clause); | 6201 current_block_->statements->Add(catch_clause); |
| 6202 } | 6202 } |
| 6203 catch_handler_list = CloseBlock(); | 6203 catch_handler_list = CloseBlock(); |
| 6204 TryBlocks* inner_try_block = PopTryBlock(); | 6204 TryBlocks* inner_try_block = PopTryBlock(); |
| 6205 | 6205 |
| 6206 // Finally parse the 'finally' block. | 6206 // Finally parse the 'finally' block. |
| 6207 SequenceNode* finally_block = NULL; | 6207 SequenceNode* finally_block = NULL; |
| 6208 if (CurrentToken() == Token::kFINALLY) { | 6208 if (CurrentToken() == Token::kFINALLY) { |
| 6209 current_function().set_is_optimizable(false); |
| 6209 current_function().set_has_finally(true); | 6210 current_function().set_has_finally(true); |
| 6210 ConsumeToken(); // Consume the 'finally'. | 6211 ConsumeToken(); // Consume the 'finally'. |
| 6211 const intptr_t finally_pos = TokenPos(); | 6212 const intptr_t finally_pos = TokenPos(); |
| 6212 // Add the finally block to the exit points recorded so far. | 6213 // Add the finally block to the exit points recorded so far. |
| 6213 intptr_t node_index = 0; | 6214 intptr_t node_index = 0; |
| 6214 AstNode* node_to_inline = | 6215 AstNode* node_to_inline = |
| 6215 inner_try_block->GetNodeToInlineFinally(node_index); | 6216 inner_try_block->GetNodeToInlineFinally(node_index); |
| 6216 while (node_to_inline != NULL) { | 6217 while (node_to_inline != NULL) { |
| 6217 finally_block = ParseFinallyBlock(); | 6218 finally_block = ParseFinallyBlock(); |
| 6218 InlinedFinallyNode* node = new InlinedFinallyNode(finally_pos, | 6219 InlinedFinallyNode* node = new InlinedFinallyNode(finally_pos, |
| (...skipping 3734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9953 void Parser::SkipQualIdent() { | 9954 void Parser::SkipQualIdent() { |
| 9954 ASSERT(IsIdentifier()); | 9955 ASSERT(IsIdentifier()); |
| 9955 ConsumeToken(); | 9956 ConsumeToken(); |
| 9956 if (CurrentToken() == Token::kPERIOD) { | 9957 if (CurrentToken() == Token::kPERIOD) { |
| 9957 ConsumeToken(); // Consume the kPERIOD token. | 9958 ConsumeToken(); // Consume the kPERIOD token. |
| 9958 ExpectIdentifier("identifier expected after '.'"); | 9959 ExpectIdentifier("identifier expected after '.'"); |
| 9959 } | 9960 } |
| 9960 } | 9961 } |
| 9961 | 9962 |
| 9962 } // namespace dart | 9963 } // namespace dart |
| OLD | NEW |