Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: runtime/vm/parser.cc

Issue 15934013: Enable optimization of try-finally in the VM's optimizing compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6220 matching lines...) Expand 10 before | Expand all | Expand 10 after
6231 6231
6232 // Add this individual catch handler to the catch handlers list. 6232 // Add this individual catch handler to the catch handlers list.
6233 current_block_->statements->Add(catch_clause); 6233 current_block_->statements->Add(catch_clause);
6234 } 6234 }
6235 catch_handler_list = CloseBlock(); 6235 catch_handler_list = CloseBlock();
6236 TryBlocks* inner_try_block = PopTryBlock(); 6236 TryBlocks* inner_try_block = PopTryBlock();
6237 6237
6238 // Finally parse the 'finally' block. 6238 // Finally parse the 'finally' block.
6239 SequenceNode* finally_block = NULL; 6239 SequenceNode* finally_block = NULL;
6240 if (CurrentToken() == Token::kFINALLY) { 6240 if (CurrentToken() == Token::kFINALLY) {
6241 current_function().set_is_optimizable(false);
6242 current_function().set_has_finally(true); 6241 current_function().set_has_finally(true);
6243 ConsumeToken(); // Consume the 'finally'. 6242 ConsumeToken(); // Consume the 'finally'.
6244 const intptr_t finally_pos = TokenPos(); 6243 const intptr_t finally_pos = TokenPos();
6245 // Add the finally block to the exit points recorded so far. 6244 // Add the finally block to the exit points recorded so far.
6246 intptr_t node_index = 0; 6245 intptr_t node_index = 0;
6247 AstNode* node_to_inline = 6246 AstNode* node_to_inline =
6248 inner_try_block->GetNodeToInlineFinally(node_index); 6247 inner_try_block->GetNodeToInlineFinally(node_index);
6249 while (node_to_inline != NULL) { 6248 while (node_to_inline != NULL) {
6250 finally_block = ParseFinallyBlock(); 6249 finally_block = ParseFinallyBlock();
6251 InlinedFinallyNode* node = new InlinedFinallyNode(finally_pos, 6250 InlinedFinallyNode* node = new InlinedFinallyNode(finally_pos,
(...skipping 3730 matching lines...) Expand 10 before | Expand all | Expand 10 after
9982 void Parser::SkipQualIdent() { 9981 void Parser::SkipQualIdent() {
9983 ASSERT(IsIdentifier()); 9982 ASSERT(IsIdentifier());
9984 ConsumeToken(); 9983 ConsumeToken();
9985 if (CurrentToken() == Token::kPERIOD) { 9984 if (CurrentToken() == Token::kPERIOD) {
9986 ConsumeToken(); // Consume the kPERIOD token. 9985 ConsumeToken(); // Consume the kPERIOD token.
9987 ExpectIdentifier("identifier expected after '.'"); 9986 ExpectIdentifier("identifier expected after '.'");
9988 } 9987 }
9989 } 9988 }
9990 9989
9991 } // namespace dart 9990 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-dart2dart.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698