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

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

Issue 1287673002: Don't delay values and errors from async/await functions. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update comment. Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | runtime/vm/symbols.h » ('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 "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 7003 matching lines...) Expand 10 before | Expand all | Expand 10 after
7014 const Class& future = 7014 const Class& future =
7015 Class::ZoneHandle(Z, I->object_store()->future_class()); 7015 Class::ZoneHandle(Z, I->object_store()->future_class());
7016 ASSERT(!future.IsNull()); 7016 ASSERT(!future.IsNull());
7017 const Function& constructor = Function::ZoneHandle(Z, 7017 const Function& constructor = Function::ZoneHandle(Z,
7018 future.LookupFunction(Symbols::FutureMicrotask())); 7018 future.LookupFunction(Symbols::FutureMicrotask()));
7019 ASSERT(!constructor.IsNull()); 7019 ASSERT(!constructor.IsNull());
7020 const Class& completer = 7020 const Class& completer =
7021 Class::ZoneHandle(Z, I->object_store()->completer_class()); 7021 Class::ZoneHandle(Z, I->object_store()->completer_class());
7022 ASSERT(!completer.IsNull()); 7022 ASSERT(!completer.IsNull());
7023 const Function& completer_constructor = Function::ZoneHandle(Z, 7023 const Function& completer_constructor = Function::ZoneHandle(Z,
7024 completer.LookupFunction(Symbols::CompleterConstructor())); 7024 completer.LookupFunction(Symbols::CompleterSyncConstructor()));
7025 ASSERT(!completer_constructor.IsNull()); 7025 ASSERT(!completer_constructor.IsNull());
7026 7026
7027 LocalVariable* async_completer = current_block_->scope->LookupVariable( 7027 LocalVariable* async_completer = current_block_->scope->LookupVariable(
7028 Symbols::AsyncCompleter(), false); 7028 Symbols::AsyncCompleter(), false);
7029 7029
7030 // Add to AST: 7030 // Add to AST:
7031 // :async_completer = new Completer(); 7031 // :async_completer = new Completer.sync();
7032 ArgumentListNode* empty_args = 7032 ArgumentListNode* empty_args =
7033 new (Z) ArgumentListNode(Scanner::kNoSourcePos); 7033 new (Z) ArgumentListNode(Scanner::kNoSourcePos);
7034 ConstructorCallNode* completer_constructor_node = new (Z) ConstructorCallNode( 7034 ConstructorCallNode* completer_constructor_node = new (Z) ConstructorCallNode(
7035 Scanner::kNoSourcePos, 7035 Scanner::kNoSourcePos,
7036 TypeArguments::ZoneHandle(Z), 7036 TypeArguments::ZoneHandle(Z),
7037 completer_constructor, 7037 completer_constructor,
7038 empty_args); 7038 empty_args);
7039 StoreLocalNode* store_completer = new (Z) StoreLocalNode( 7039 StoreLocalNode* store_completer = new (Z) StoreLocalNode(
7040 Scanner::kNoSourcePos, 7040 Scanner::kNoSourcePos,
7041 async_completer, 7041 async_completer,
(...skipping 7022 matching lines...) Expand 10 before | Expand all | Expand 10 after
14064 void Parser::SkipQualIdent() { 14064 void Parser::SkipQualIdent() {
14065 ASSERT(IsIdentifier()); 14065 ASSERT(IsIdentifier());
14066 ConsumeToken(); 14066 ConsumeToken();
14067 if (CurrentToken() == Token::kPERIOD) { 14067 if (CurrentToken() == Token::kPERIOD) {
14068 ConsumeToken(); // Consume the kPERIOD token. 14068 ConsumeToken(); // Consume the kPERIOD token.
14069 ExpectIdentifier("identifier expected after '.'"); 14069 ExpectIdentifier("identifier expected after '.'");
14070 } 14070 }
14071 } 14071 }
14072 14072
14073 } // namespace dart 14073 } // namespace dart
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698