Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index eb537c75a05b301c7a6aedfc5b31243c1259e89d..4b83ef48fd5962f91df54dee20010cabf3e7ad25 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -4302,6 +4302,32 @@ MaybeObject* StringDictionaryShape::AsObject(String* key) { |
| } |
| +bool ObjectDictionaryShape::IsMatch(JSObject* key, Object* other) { |
| + ASSERT(other->IsJSObject()); |
| + return key == JSObject::cast(other); |
| +} |
| + |
| + |
| +uint32_t ObjectDictionaryShape::Hash(JSObject* key) { |
| + MaybeObject* maybe_hash = key->GetIdentityHash(); |
| + if (maybe_hash->IsFailure()) return 0; |
|
Vyacheslav Egorov (Chromium)
2011/07/12 10:42:07
If we are trying to put an object to a dictionary
|
| + return Smi::cast(maybe_hash->ToObjectChecked())->value(); |
| +} |
| + |
| + |
| +uint32_t ObjectDictionaryShape::HashForObject(JSObject* key, Object* other) { |
| + ASSERT(other->IsJSObject()); |
| + MaybeObject* maybe_hash = JSObject::cast(other)->GetIdentityHash(); |
| + if (maybe_hash->IsFailure()) return 0; |
| + return Smi::cast(maybe_hash->ToObjectChecked())->value(); |
| +} |
| + |
| + |
| +MaybeObject* ObjectDictionaryShape::AsObject(JSObject* key) { |
| + return key; |
| +} |
| + |
| + |
| void Map::ClearCodeCache(Heap* heap) { |
| // No write barrier is needed since empty_fixed_array is not in new space. |
| // Please note this function is used during marking: |