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

Unified Diff: vm/code_generator.cc

Issue 10827249: - Register canonical names for internal VM classes and get rid of the method GetSingletonClassName (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 months 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
« no previous file with comments | « vm/code_descriptors.cc ('k') | vm/heap_profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/code_generator.cc
===================================================================
--- vm/code_generator.cc (revision 10528)
+++ vm/code_generator.cc (working copy)
@@ -1663,6 +1663,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()) {
@@ -1692,6 +1696,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);
« no previous file with comments | « vm/code_descriptors.cc ('k') | vm/heap_profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698