Commit 8bc4fe57 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[runtime] Get rid of unnecessary DictionaryDetailsAtPut

Bug: 
Change-Id: I87b2c33dbf537aae949b25b2cd56fd20985e5980
Reviewed-on: https://chromium-review.googlesource.com/538659Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45984}
parent e94a97ff
......@@ -6130,6 +6130,10 @@ void GlobalDictionaryShape::DetailsAtPut(Dictionary* dict, int entry,
Object* raw_value = dict->ValueAt(entry);
DCHECK(raw_value->IsPropertyCell());
PropertyCell* cell = PropertyCell::cast(raw_value);
if (cell->property_details().IsReadOnly() != value.IsReadOnly()) {
cell->dependent_code()->DeoptimizeDependentCodeGroup(
cell->GetIsolate(), DependentCode::kPropertyCellChangedGroup);
}
cell->set_property_details(value);
}
......
......@@ -7689,24 +7689,6 @@ bool JSObject::IsExtensible(Handle<JSObject> object) {
namespace {
template <typename Dictionary>
void DictionaryDetailsAtPut(Isolate* isolate, Handle<Dictionary> dictionary,
int entry, PropertyDetails details) {
dictionary->DetailsAtPut(entry, details);
}
template <>
void DictionaryDetailsAtPut<GlobalDictionary>(
Isolate* isolate, Handle<GlobalDictionary> dictionary, int entry,
PropertyDetails details) {
Object* value = dictionary->ValueAt(entry);
DCHECK(value->IsPropertyCell());
value = PropertyCell::cast(value)->value();
if (value->IsTheHole(isolate)) return;
PropertyCell::PrepareForValue(dictionary, entry, handle(value, isolate),
details);
}
template <typename Dictionary>
void ApplyAttributesToDictionary(Isolate* isolate,
Handle<Dictionary> dictionary,
......@@ -7726,7 +7708,7 @@ void ApplyAttributesToDictionary(Isolate* isolate,
}
details = details.CopyAddAttributes(
static_cast<PropertyAttributes>(attrs));
DictionaryDetailsAtPut<Dictionary>(isolate, dictionary, i, details);
dictionary->DetailsAtPut(i, details);
}
}
}
......
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