| Index: src/objects.cc
|
| ===================================================================
|
| --- src/objects.cc (revision 4092)
|
| +++ src/objects.cc (working copy)
|
| @@ -3055,7 +3055,7 @@
|
| }
|
|
|
|
|
| -int Map::IndexInCodeCache(String* name, Code* code) {
|
| +int Map::IndexInCodeCache(Object* name, Code* code) {
|
| // Get the internal index if a code cache exists.
|
| if (!code_cache()->IsFixedArray()) {
|
| return CodeCache::cast(code_cache())->GetIndex(name, code);
|
| @@ -3200,12 +3200,11 @@
|
| }
|
|
|
|
|
| -int CodeCache::GetIndex(String* name, Code* code) {
|
| - // This is not used for normal load/store/call IC's.
|
| +int CodeCache::GetIndex(Object* name, Code* code) {
|
| if (code->type() == NORMAL) {
|
| if (normal_type_cache()->IsUndefined()) return -1;
|
| CodeCacheHashTable* cache = CodeCacheHashTable::cast(normal_type_cache());
|
| - return cache->GetIndex(name, code->flags());
|
| + return cache->GetIndex(String::cast(name), code->flags());
|
| }
|
|
|
| FixedArray* array = default_cache();
|
| @@ -3217,11 +3216,11 @@
|
| }
|
|
|
|
|
| -void CodeCache::RemoveByIndex(String* name, Code* code, int index) {
|
| +void CodeCache::RemoveByIndex(Object* name, Code* code, int index) {
|
| if (code->type() == NORMAL) {
|
| ASSERT(!normal_type_cache()->IsUndefined());
|
| CodeCacheHashTable* cache = CodeCacheHashTable::cast(normal_type_cache());
|
| - ASSERT(cache->GetIndex(name, code->flags()) == index);
|
| + ASSERT(cache->GetIndex(String::cast(name), code->flags()) == index);
|
| cache->RemoveByIndex(index);
|
| } else {
|
| FixedArray* array = default_cache();
|
|
|