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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 2761933002: Add Genericity enum in VM to distinguish how a type is uninstantiated. (Closed)
Patch Set: sync Created 3 years, 9 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/intermediate_language.h ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index 054111505811a1f05621d64b4635ae89881dd4d3..3c12a3c625a521852fb61fa4f38baa1e5f52fd41 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -2069,6 +2069,8 @@ Definition* AssertAssignableInstr::Canonicalize(FlowGraph* flow_graph) {
// are constant, instantiate the target type here.
if (dst_type().IsInstantiated()) return this;
+ // TODO(regis): Only try to instantiate here if function_type_args is constant
+ // or null and dst_type does not refer to parent function type parameters.
ConstantInstr* constant_type_args =
instantiator_type_arguments()->definition()->AsConstant();
if (constant_type_args != NULL && !constant_type_args->value().IsNull() &&
@@ -2078,7 +2080,8 @@ Definition* AssertAssignableInstr::Canonicalize(FlowGraph* flow_graph) {
Error& bound_error = Error::Handle();
AbstractType& new_dst_type =
AbstractType::Handle(dst_type().InstantiateFrom(
- instantiator_type_args, &bound_error, NULL, NULL, Heap::kOld));
+ instantiator_type_args, /* function_type_args, */
+ &bound_error, NULL, NULL, Heap::kOld));
if (new_dst_type.IsMalformedOrMalbounded() || !bound_error.IsNull()) {
return this;
}
@@ -2096,6 +2099,7 @@ Definition* AssertAssignableInstr::Canonicalize(FlowGraph* flow_graph) {
ConstantInstr* null_constant = flow_graph->constant_null();
instantiator_type_arguments()->BindTo(null_constant);
+ // TODO(regis): function_type_arguments()->BindTo(null_constant);
}
return this;
}
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698