| Index: runtime/vm/precompiler.cc
|
| diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
|
| index 6502f6570746f4c95267ceb68e50973fe83518dc..c9894285d7aa978a173fa767b965439d00babd2a 100644
|
| --- a/runtime/vm/precompiler.cc
|
| +++ b/runtime/vm/precompiler.cc
|
| @@ -618,6 +618,7 @@ void Precompiler::ProcessFunction(const Function& function) {
|
|
|
| ASSERT(function.HasCode());
|
| AddCalleesOf(function);
|
| + AddTypesOf(function);
|
| }
|
|
|
|
|
| @@ -1383,7 +1384,7 @@ void Precompiler::TraceForRetainedFunctions() {
|
| functions = cls.functions();
|
| for (intptr_t j = 0; j < functions.Length(); j++) {
|
| function ^= functions.At(j);
|
| - bool retain = function.HasCode();
|
| + bool retain = functions_to_retain_.Lookup(&function) != NULL;
|
| if (!retain && function.HasImplicitClosureFunction()) {
|
| // It can happen that all uses of an implicit closure inline their
|
| // target function, leaving the target function uncompiled. Keep
|
| @@ -1394,7 +1395,6 @@ void Precompiler::TraceForRetainedFunctions() {
|
| }
|
| if (retain) {
|
| function.DropUncompiledImplicitClosureFunction();
|
| - AddTypesOf(function);
|
| }
|
| }
|
| }
|
| @@ -1403,10 +1403,8 @@ void Precompiler::TraceForRetainedFunctions() {
|
| closures = isolate()->object_store()->closure_functions();
|
| for (intptr_t j = 0; j < closures.Length(); j++) {
|
| function ^= closures.At(j);
|
| - bool retain = function.HasCode();
|
| + bool retain = functions_to_retain_.Lookup(&function) != NULL;
|
| if (retain) {
|
| - AddTypesOf(function);
|
| -
|
| cls = function.Owner();
|
| AddTypesOf(cls);
|
|
|
|
|