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

Unified Diff: runtime/vm/kernel_binary_flowgraph.cc

Issue 2958833003: Allocate local variable holding type arguments in generic functions in Kernel. (Closed)
Patch Set: Created 3 years, 6 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 | « runtime/vm/compiler.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_binary_flowgraph.cc
diff --git a/runtime/vm/kernel_binary_flowgraph.cc b/runtime/vm/kernel_binary_flowgraph.cc
index 6b50cea901e7fbb4dd6f33d163e7e60db552f1cc..5a1a3258887e617f7b47f0fe5e637c455b4eef9f 100644
--- a/runtime/vm/kernel_binary_flowgraph.cc
+++ b/runtime/vm/kernel_binary_flowgraph.cc
@@ -109,6 +109,15 @@ ScopeBuildingResult* StreamingScopeBuilder::BuildScopes() {
scope_->set_begin_token_pos(function.token_pos());
scope_->set_end_token_pos(function.end_token_pos());
+ // Add function type arguments variable before current context variable.
+ if (FLAG_reify_generic_functions && function.IsGeneric()) {
+ LocalVariable* type_args_var = MakeVariable(
+ TokenPosition::kNoSource, TokenPosition::kNoSource,
+ Symbols::FunctionTypeArgumentsVar(), AbstractType::dynamic_type());
+ scope_->AddVariable(type_args_var);
+ parsed_function_->set_function_type_arguments(type_args_var);
+ }
+
LocalVariable* context_var = parsed_function->current_context_var();
context_var->set_is_forced_stack();
scope_->AddVariable(context_var);
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698