Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Unified Diff: src/lookup.cc

Issue 1765633003: [LookupIterator] Add fast-path for reloading accessor property information (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.cc
diff --git a/src/lookup.cc b/src/lookup.cc
index 1cbff613def4d48aed00f521eb007863fbe8c18a..c6421b997d66f9bc6ac975ef25ea449165b63cbe 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -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();
jochen (gone - plz use gerrit) 2016/03/04 09:58:03 why's LastAdded not return uint32_t?
+ number_ = static_cast<uint32_t>(number);
+ property_details_ = new_map->GetLastDescriptorDetails();
+ state_ = ACCESSOR;
+ return;
+ }
+ ReloadPropertyInformation();
if (!new_map->is_dictionary_map()) return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698