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

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

Issue 10824201: Verify at method exit that stack size is the same as at entry, except for methods with finally clau… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
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 "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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698