| Index: vm/code_generator.cc
|
| ===================================================================
|
| --- vm/code_generator.cc (revision 10450)
|
| +++ vm/code_generator.cc (working copy)
|
| @@ -1567,6 +1567,10 @@
|
| #if 0
|
| ASSERT(function.HasCode());
|
| Array& cache = Array::Handle(class_.functions_cache());
|
| + if (cache.IsNull()) {
|
| + class_.InitFunctionsCache();
|
| + cache = class_.functions_cache();
|
| + }
|
| // Search for first free slot. Last entry is always NULL object.
|
| for (intptr_t i = 0; i < (cache.Length() - kNumEntries); i += kNumEntries) {
|
| if (Object::Handle(cache.At(i)).IsNull()) {
|
| @@ -1596,6 +1600,9 @@
|
| int num_arguments,
|
| int num_named_arguments) {
|
| const Array& cache = Array::Handle(class_.functions_cache());
|
| + if (cache.IsNull()) {
|
| + return Code::null(); // Functions cache has not been populated yet.
|
| + }
|
| String& test_name = String::Handle();
|
| for (intptr_t i = 0; i < cache.Length(); i += kNumEntries) {
|
| test_name ^= cache.At(i + FunctionsCache::kFunctionName);
|
|
|