Commit 7011ddd6 authored by verwaest's avatar verwaest Committed by Commit bot

[LookupIterator] Add fast-path for reloading accessor property information

This is the equivalent of the fast-path in
ApplyTransitionToDataProperty.

BUG=588893, 325923
LOG=n

Review URL: https://codereview.chromium.org/1765633003

Cr-Commit-Position: refs/heads/master@{#34488}
parent b1e34590
......@@ -368,10 +368,18 @@ void LookupIterator::TransitionToAccessorProperty(
Handle<Map> old_map(receiver->map(), isolate_);
Handle<Map> new_map = Map::TransitionToAccessorProperty(
old_map, name_, component, accessor, attributes);
bool simple_transition = new_map->GetBackPointer() == receiver->map();
JSObject::MigrateToMap(receiver, new_map);
ReloadPropertyInformation();
if (simple_transition) {
int number = new_map->LastAdded();
number_ = static_cast<uint32_t>(number);
property_details_ = new_map->GetLastDescriptorDetails();
state_ = ACCESSOR;
return;
}
ReloadPropertyInformation();
if (!new_map->is_dictionary_map()) return;
}
......
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