| 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 6094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6105 // Create and return a new future that executes a closure with the current | 6105 // Create and return a new future that executes a closure with the current |
| 6106 // body. | 6106 // body. |
| 6107 | 6107 |
| 6108 // No need to capture parameters or other variables, since they have already | 6108 // No need to capture parameters or other variables, since they have already |
| 6109 // been captured in the corresponding scope as the body has been parsed within | 6109 // been captured in the corresponding scope as the body has been parsed within |
| 6110 // a nested block (contained in the async funtion's block). | 6110 // a nested block (contained in the async funtion's block). |
| 6111 const Class& future = | 6111 const Class& future = |
| 6112 Class::ZoneHandle(I, I->object_store()->future_class()); | 6112 Class::ZoneHandle(I, I->object_store()->future_class()); |
| 6113 ASSERT(!future.IsNull()); | 6113 ASSERT(!future.IsNull()); |
| 6114 const Function& constructor = Function::ZoneHandle(I, | 6114 const Function& constructor = Function::ZoneHandle(I, |
| 6115 future.LookupFunction(Symbols::FutureConstructor())); | 6115 future.LookupFunction(Symbols::FutureMicrotask())); |
| 6116 ASSERT(!constructor.IsNull()); | 6116 ASSERT(!constructor.IsNull()); |
| 6117 const Class& completer = | 6117 const Class& completer = |
| 6118 Class::ZoneHandle(I, I->object_store()->completer_class()); | 6118 Class::ZoneHandle(I, I->object_store()->completer_class()); |
| 6119 ASSERT(!completer.IsNull()); | 6119 ASSERT(!completer.IsNull()); |
| 6120 const Function& completer_constructor = Function::ZoneHandle(I, | 6120 const Function& completer_constructor = Function::ZoneHandle(I, |
| 6121 completer.LookupFunction(Symbols::CompleterConstructor())); | 6121 completer.LookupFunction(Symbols::CompleterConstructor())); |
| 6122 ASSERT(!completer_constructor.IsNull()); | 6122 ASSERT(!completer_constructor.IsNull()); |
| 6123 | 6123 |
| 6124 LocalVariable* async_completer = current_block_->scope->LookupVariable( | 6124 LocalVariable* async_completer = current_block_->scope->LookupVariable( |
| 6125 Symbols::AsyncCompleter(), false); | 6125 Symbols::AsyncCompleter(), false); |
| (...skipping 6040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12166 void Parser::SkipQualIdent() { | 12166 void Parser::SkipQualIdent() { |
| 12167 ASSERT(IsIdentifier()); | 12167 ASSERT(IsIdentifier()); |
| 12168 ConsumeToken(); | 12168 ConsumeToken(); |
| 12169 if (CurrentToken() == Token::kPERIOD) { | 12169 if (CurrentToken() == Token::kPERIOD) { |
| 12170 ConsumeToken(); // Consume the kPERIOD token. | 12170 ConsumeToken(); // Consume the kPERIOD token. |
| 12171 ExpectIdentifier("identifier expected after '.'"); | 12171 ExpectIdentifier("identifier expected after '.'"); |
| 12172 } | 12172 } |
| 12173 } | 12173 } |
| 12174 | 12174 |
| 12175 } // namespace dart | 12175 } // namespace dart |
| OLD | NEW |