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

Unified Diff: src/lookup-inl.h

Issue 1163033004: Micro-optimize not-found for elements on objects with empty_fixed_array backing store (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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-inl.h
diff --git a/src/lookup-inl.h b/src/lookup-inl.h
index f06ef674397fc5d6fb3fa7a0631e04ee9d9ab48d..e169e288caf7b0d4af05ffc60b3665cc7dd3344d 100644
--- a/src/lookup-inl.h
+++ b/src/lookup-inl.h
@@ -66,6 +66,10 @@ LookupIterator::State LookupIterator::LookupInHolder(Map* const map,
PropertyCellType::kNoCell);
} else {
JSObject* js_object = JSObject::cast(holder);
+ if (js_object->elements() == isolate()->heap()->empty_fixed_array()) {
+ return NOT_FOUND;
+ }
+
ElementsAccessor* accessor = js_object->GetElementsAccessor();
FixedArrayBase* backing_store = js_object->elements();
number_ = accessor->GetIndexForKey(backing_store, index_);
« 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