| 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 "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 5629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5640 // Add this individual catch handler to the catch handlers list. | 5640 // Add this individual catch handler to the catch handlers list. |
| 5641 current_block_->statements->Add(catch_clause); | 5641 current_block_->statements->Add(catch_clause); |
| 5642 } | 5642 } |
| 5643 catch_handler_list = CloseBlock(); | 5643 catch_handler_list = CloseBlock(); |
| 5644 TryBlocks* inner_try_block = PopTryBlock(); | 5644 TryBlocks* inner_try_block = PopTryBlock(); |
| 5645 | 5645 |
| 5646 // Finally parse the 'finally' block. | 5646 // Finally parse the 'finally' block. |
| 5647 SequenceNode* finally_block = NULL; | 5647 SequenceNode* finally_block = NULL; |
| 5648 if (CurrentToken() == Token::kFINALLY) { | 5648 if (CurrentToken() == Token::kFINALLY) { |
| 5649 current_function().set_is_optimizable(false); | 5649 current_function().set_is_optimizable(false); |
| 5650 current_function().set_has_finally(true); |
| 5650 ConsumeToken(); // Consume the 'finally'. | 5651 ConsumeToken(); // Consume the 'finally'. |
| 5651 const intptr_t finally_pos = TokenPos(); | 5652 const intptr_t finally_pos = TokenPos(); |
| 5652 // Add the finally block to the exit points recorded so far. | 5653 // Add the finally block to the exit points recorded so far. |
| 5653 intptr_t node_index = 0; | 5654 intptr_t node_index = 0; |
| 5654 AstNode* node_to_inline = | 5655 AstNode* node_to_inline = |
| 5655 inner_try_block->GetNodeToInlineFinally(node_index); | 5656 inner_try_block->GetNodeToInlineFinally(node_index); |
| 5656 while (node_to_inline != NULL) { | 5657 while (node_to_inline != NULL) { |
| 5657 finally_block = ParseFinallyBlock(); | 5658 finally_block = ParseFinallyBlock(); |
| 5658 InlinedFinallyNode* node = new InlinedFinallyNode(finally_pos, | 5659 InlinedFinallyNode* node = new InlinedFinallyNode(finally_pos, |
| 5659 finally_block, | 5660 finally_block, |
| (...skipping 3283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8943 void Parser::SkipQualIdent() { | 8944 void Parser::SkipQualIdent() { |
| 8944 ASSERT(IsIdentifier()); | 8945 ASSERT(IsIdentifier()); |
| 8945 ConsumeToken(); | 8946 ConsumeToken(); |
| 8946 if (CurrentToken() == Token::kPERIOD) { | 8947 if (CurrentToken() == Token::kPERIOD) { |
| 8947 ConsumeToken(); // Consume the kPERIOD token. | 8948 ConsumeToken(); // Consume the kPERIOD token. |
| 8948 ExpectIdentifier("identifier expected after '.'"); | 8949 ExpectIdentifier("identifier expected after '.'"); |
| 8949 } | 8950 } |
| 8950 } | 8951 } |
| 8951 | 8952 |
| 8952 } // namespace dart | 8953 } // namespace dart |
| OLD | NEW |