Chromium Code Reviews| Index: runtime/vm/compiler.cc |
| =================================================================== |
| --- runtime/vm/compiler.cc (revision 28179) |
| +++ runtime/vm/compiler.cc (working copy) |
| @@ -857,6 +857,7 @@ |
| ASSERT(cls.IsDynamicClass()); |
| return error.raw(); |
| } |
| + // Compile all the regular functions. |
| for (int i = 0; i < functions.Length(); i++) { |
| func ^= functions.At(i); |
| ASSERT(!func.IsNull()); |
| @@ -869,6 +870,24 @@ |
| } |
| } |
| } |
| + // Inner functions get added to the closures array. As part of compilation |
| + // more closures can be added to the end of the array. Compile all the |
| + // closures until we have reached the end of the "worklist". |
| + GrowableObjectArray& closures = |
| + GrowableObjectArray::Handle(cls.closures()); |
| + if (!closures.IsNull()) { |
| + for (int i = 0; i < closures.Length(); i++) { |
| + func ^= closures.At(i); |
| + if (!func.HasCode() && |
| + !func.is_abstract() && |
| + !func.IsRedirectingFactory()) { |
|
hausner
2013/10/04 16:06:23
Can we really have abstract functions or redirecti
Ivan Posva
2013/10/04 20:50:02
Copy & Pasterr.
|
| + error = CompileFunction(func); |
| + if (!error.IsNull()) { |
| + return error.raw(); |
| + } |
| + } |
| + } |
| + } |
| return error.raw(); |
| } |