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

Unified Diff: runtime/vm/parser.cc

Issue 3004033002: [VM generic functions reification] Support generic async* and sync* functions. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 80f0c7e37e250e9ddeb36e43c7c22ca47788a1c4..77a3a26b47437eb3232aed9978019ad6ff758f5e 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -3736,6 +3736,12 @@ SequenceNode* Parser::ParseFunc(const Function& func, bool check_semicolon) {
func.end_token_pos() == end_token_pos);
func.set_end_token_pos(end_token_pos);
SequenceNode* body = CloseBlock();
+ if (FLAG_reify_generic_functions && func.IsGeneric() &&
+ !generated_body_closure.IsNull()) {
+ LocalVariable* existing_var = body->scope()->LookupVariable(
+ Symbols::FunctionTypeArgumentsVar(), false);
+ ASSERT((existing_var != NULL) && existing_var->is_captured());
+ }
if (func.IsAsyncFunction()) {
body = CloseAsyncFunction(generated_body_closure, body);
generated_body_closure.set_end_token_pos(end_token_pos);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698