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

Unified Diff: src/objects.cc

Issue 1682873003: [builtins] Speedup Object.keys by adding a fast path for objects without elements, interceptors, ... (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 | « src/builtins.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index c1f072145094776375392053f929bc7f798c5713..cb1222e56e39ab5cdf1658f344f0d1ed8fb81e34 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -8742,7 +8742,8 @@ static Maybe<bool> GetKeysFromJSObject(Isolate* isolate,
bool cache_enum_length =
((object->map()->GetConstructor() != *arguments_function) &&
!object->IsJSValue() && !object->IsAccessCheckNeeded() &&
- !object->HasNamedInterceptor() && !object->HasIndexedInterceptor());
+ !object->HasNamedInterceptor() && !object->HasIndexedInterceptor() &&
+ !object->map()->has_hidden_prototype());
// Compute the property keys and cache them if possible.
Handle<FixedArray> enum_keys =
JSObject::GetEnumPropertyKeys(object, cache_enum_length);
« no previous file with comments | « src/builtins.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698