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 "platform/utils.h" | 8 #include "platform/utils.h" |
9 #include "vm/ast_transformer.h" | 9 #include "vm/ast_transformer.h" |
10 #include "vm/bootstrap.h" | 10 #include "vm/bootstrap.h" |
(...skipping 9252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9263 SequenceNode* async_code = new(Z) SequenceNode(handler_pos, NULL); | 9263 SequenceNode* async_code = new(Z) SequenceNode(handler_pos, NULL); |
9264 const TryStack* try_block = try_stack_->outer_try(); | 9264 const TryStack* try_block = try_stack_->outer_try(); |
9265 if (try_block != NULL) { | 9265 if (try_block != NULL) { |
9266 LocalScope* scope = try_block->try_block()->scope; | 9266 LocalScope* scope = try_block->try_block()->scope; |
9267 if (scope->function_level() == current_block_->scope->function_level()) { | 9267 if (scope->function_level() == current_block_->scope->function_level()) { |
9268 LocalVariable* saved_try_ctx = | 9268 LocalVariable* saved_try_ctx = |
9269 LookupSavedTryContextVar(scope->parent()); | 9269 LookupSavedTryContextVar(scope->parent()); |
9270 LocalVariable* async_saved_try_ctx = | 9270 LocalVariable* async_saved_try_ctx = |
9271 LookupAsyncSavedTryContextVar(scope->parent(), | 9271 LookupAsyncSavedTryContextVar(scope->parent(), |
9272 try_block->try_index()); | 9272 try_block->try_index()); |
9273 current_block_->statements->Add( | 9273 async_code->Add( |
9274 new (Z) StoreLocalNode( | 9274 new (Z) StoreLocalNode( |
9275 Scanner::kNoSourcePos, | 9275 Scanner::kNoSourcePos, |
9276 saved_try_ctx, | 9276 saved_try_ctx, |
9277 new (Z) LoadLocalNode(Scanner::kNoSourcePos, | 9277 new (Z) LoadLocalNode(Scanner::kNoSourcePos, |
9278 async_saved_try_ctx))); | 9278 async_saved_try_ctx))); |
9279 } | 9279 } |
9280 } | 9280 } |
9281 SaveExceptionAndStacktrace(async_code, | 9281 SaveExceptionAndStacktrace(async_code, |
9282 exception_var, | 9282 exception_var, |
9283 stack_trace_var, | 9283 stack_trace_var, |
(...skipping 4196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13480 void Parser::SkipQualIdent() { | 13480 void Parser::SkipQualIdent() { |
13481 ASSERT(IsIdentifier()); | 13481 ASSERT(IsIdentifier()); |
13482 ConsumeToken(); | 13482 ConsumeToken(); |
13483 if (CurrentToken() == Token::kPERIOD) { | 13483 if (CurrentToken() == Token::kPERIOD) { |
13484 ConsumeToken(); // Consume the kPERIOD token. | 13484 ConsumeToken(); // Consume the kPERIOD token. |
13485 ExpectIdentifier("identifier expected after '.'"); | 13485 ExpectIdentifier("identifier expected after '.'"); |
13486 } | 13486 } |
13487 } | 13487 } |
13488 | 13488 |
13489 } // namespace dart | 13489 } // namespace dart |
OLD | NEW |