| Index: runtime/vm/precompiler.cc
|
| diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
|
| index f7b46ed0a6d64fc531b86d3f467ea78c10f60023..97166ee892ef96e6633765cb1dcc4622b00eaf3b 100644
|
| --- a/runtime/vm/precompiler.cc
|
| +++ b/runtime/vm/precompiler.cc
|
| @@ -1006,9 +1006,10 @@ void Precompiler::AddTypesOf(const Class& cls) {
|
|
|
| void Precompiler::AddTypesOf(const Function& function) {
|
| if (function.IsNull()) return;
|
| - // We don't expect to see a reference to a redicting factory.
|
| - ASSERT(!function.IsRedirectingFactory());
|
| if (functions_to_retain_.HasKey(&function)) return;
|
| + // We don't expect to see a reference to a redirecting factory. Only its
|
| + // target should remain.
|
| + ASSERT(!function.IsRedirectingFactory());
|
| functions_to_retain_.Insert(&Function::ZoneHandle(Z, function.raw()));
|
|
|
| AbstractType& type = AbstractType::Handle(Z);
|
| @@ -1041,6 +1042,12 @@ void Precompiler::AddTypesOf(const Function& function) {
|
| if (!parent.IsNull()) {
|
| AddTypesOf(parent);
|
| }
|
| + if (function.IsSignatureFunction() || function.IsClosureFunction()) {
|
| + type = function.ExistingSignatureType();
|
| + if (!type.IsNull()) {
|
| + AddType(type);
|
| + }
|
| + }
|
| // A class may have all functions inlined except a local function.
|
| const Class& owner = Class::Handle(Z, function.Owner());
|
| AddTypesOf(owner);
|
|
|