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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2606993002: Second try: Fix resolution and canonicalization of typedefs and function types (Closed)
Patch Set: Created 4 years 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
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index 2f1b8f2a7ce029b43c95a813ed8ec33b61f86d47..e5d75e77ec317bfbf199602d5f52d3383231451b 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -3953,7 +3953,7 @@ void DartTypeTranslator::VisitFunctionType(FunctionType* node) {
// So we convert malformed return/parameter types to `dynamic`.
TypeParameterScope scope(this, &node->type_parameters());
- const Function& signature_function = Function::ZoneHandle(
+ Function& signature_function = Function::ZoneHandle(
Z, Function::NewSignatureFunction(*active_class_->klass,
TokenPosition::kNoSource));
@@ -4008,8 +4008,10 @@ void DartTypeTranslator::VisitFunctionType(FunctionType* node) {
if (finalize_) {
signature_type ^= ClassFinalizer::FinalizeType(
*active_class_->klass, signature_type, ClassFinalizer::kCanonicalize);
+ // Do not refer to signature_function anymore, since it may have been
+ // replaced during canonicalization.
+ signature_function = Function::null();
}
- signature_function.SetSignatureType(signature_type);
regis 2016/12/28 22:12:18 This statement was setting the signature type on t
result_ = signature_type.raw();
}
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | runtime/vm/object.h » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698