Commit d00b37fb authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[runtime] Use Dictionary::Add in Dictionary::AtPut

Bug: 
Change-Id: Ib0090647de77510ce5f3bda67e45c7d7474ac779
Reviewed-on: https://chromium-review.googlesource.com/541337Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46040}
parent b38795f3
......@@ -17773,15 +17773,7 @@ Handle<Derived> Dictionary<Derived, Shape>::AtPut(Handle<Derived> dictionary,
return dictionary;
}
// Check whether the dictionary should be extended.
dictionary = EnsureCapacity(dictionary, 1);
#ifdef DEBUG
USE(Shape::AsHandle(dictionary->GetIsolate(), key));
#endif
PropertyDetails details = PropertyDetails::Empty();
AddEntry(dictionary, key, value, details, dictionary->Hash(key));
return dictionary;
return Add(dictionary, key, value, PropertyDetails::Empty());
}
template <typename Derived, typename Shape>
......@@ -17794,6 +17786,10 @@ Handle<Derived> Dictionary<Derived, Shape>::Add(Handle<Derived> dictionary,
// Check whether the dictionary should be extended.
dictionary = EnsureCapacity(dictionary, 1);
#ifdef DEBUG
USE(Shape::AsHandle(dictionary->GetIsolate(), key));
#endif
int entry = AddEntry(dictionary, key, value, details, dictionary->Hash(key));
if (entry_out) *entry_out = entry;
return dictionary;
......
......@@ -63,8 +63,6 @@ class Dictionary : public HashTable<Derived, Shape> {
int NumberOfEnumerableProperties();
enum SortMode { UNSORTED, SORTED };
// Return the key indices sorted by its enumeration index.
static Handle<FixedArray> IterationIndices(
Handle<Dictionary<Derived, Shape>> dictionary);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment