Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 8254ee7e9efcab696058f80d976d832c5bb27f9e..0fbefd066554f8ef8730919de84259fdf16d70a0 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -17626,23 +17626,11 @@ Handle<CompilationCacheTable> CompilationCacheTable::Put( |
Isolate* isolate = cache->GetIsolate(); |
Handle<SharedFunctionInfo> shared(context->closure()->shared()); |
StringSharedKey key(src, shared, language_mode, RelocInfo::kNoPosition); |
- { |
- Handle<Object> k = key.AsHandle(isolate); |
- DisallowHeapAllocation no_allocation_scope; |
- int entry = cache->FindEntry(&key); |
- if (entry != kNotFound) { |
- cache->set(EntryToIndex(entry), *k); |
- cache->set(EntryToIndex(entry) + 1, *value); |
- return cache; |
- } |
- } |
- |
+ Handle<Object> k = key.AsHandle(isolate); |
cache = EnsureCapacity(cache, 1, &key); |
int entry = cache->FindInsertionEntry(key.Hash()); |
- Handle<Object> k = |
- isolate->factory()->NewNumber(static_cast<double>(key.Hash())); |
cache->set(EntryToIndex(entry), *k); |
- cache->set(EntryToIndex(entry) + 1, Smi::FromInt(kHashGenerations)); |
+ cache->set(EntryToIndex(entry) + 1, *value); |
cache->ElementAdded(); |
return cache; |
} |