[runtime] Get rid of unnecessary DictionaryDetailsAtPut
Bug: Change-Id: I87b2c33dbf537aae949b25b2cd56fd20985e5980 Reviewed-on: https://chromium-review.googlesource.com/538659 Reviewed-by: Camillo Bruni <cbruni@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#45984}
This commit is contained in:
parent
e94a97ffb8
commit
8bc4fe57a4
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user