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

Unified Diff: src/elements.h

Issue 1179933002: Revert of Remove GetAttributes from the mix to avoid another virtual dispatch. (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 | src/elements.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.h
diff --git a/src/elements.h b/src/elements.h
index 310891ab1e030be14f8413dcef21680f4471a2cd..60ff130d2998ce59089567e218ee2716de6cae9b 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -58,6 +58,19 @@
inline Handle<Object> Get(Handle<JSObject> holder, uint32_t key) {
return Get(holder, key, handle(holder->elements()));
+ }
+
+ // Returns an element's attributes, or ABSENT if there is no such
+ // element. This method doesn't iterate up the prototype chain. The caller
+ // can optionally pass in the backing store to use for the check, which must
+ // be compatible with the ElementsKind of the ElementsAccessor. If
+ // backing_store is NULL, the holder->elements() is used as the backing store.
+ virtual PropertyAttributes GetAttributes(JSObject* holder, uint32_t key,
+ FixedArrayBase* backing_store) = 0;
+
+ inline PropertyAttributes GetAttributes(Handle<JSObject> holder,
+ uint32_t key) {
+ return GetAttributes(*holder, key, holder->elements());
}
// Returns an element's accessors, or NULL if the element does not exist or
@@ -173,8 +186,7 @@
// the index to a key using the KeyAt method on the NumberDictionary.
virtual uint32_t GetKeyForIndex(FixedArrayBase* backing_store,
uint32_t index) = 0;
- virtual uint32_t GetIndexForKey(JSObject* holder,
- FixedArrayBase* backing_store,
+ virtual uint32_t GetIndexForKey(FixedArrayBase* backing_store,
uint32_t key) = 0;
virtual PropertyDetails GetDetails(FixedArrayBase* backing_store,
uint32_t index) = 0;
« no previous file with comments | « no previous file | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698