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

Unified Diff: src/elements.h

Issue 1144883002: Start adding support for elements to the LookupIterator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 8704fffa70029c004837d2ee297ac4330c3880a9..f4d15fc828b751ab8f4c488e85f1586d4c001fa6 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -175,9 +175,12 @@ class ElementsAccessor {
protected:
friend class SloppyArgumentsElementsAccessor;
+ friend class LookupIterator;
- virtual uint32_t GetCapacity(Handle<JSObject> holder,
- Handle<FixedArrayBase> backing_store) = 0;
+ static ElementsAccessor* ForArray(FixedArrayBase* array);
+
+ virtual uint32_t GetCapacity(JSObject* holder,
+ FixedArrayBase* backing_store) = 0;
// Element handlers distinguish between indexes and keys when they manipulate
// elements. Indexes refer to elements in terms of their location in the
@@ -187,8 +190,12 @@ class ElementsAccessor {
// keys are equivalent to indexes, and GetKeyForIndex returns the same value
// it is passed. In the NumberDictionary ElementsAccessor, GetKeyForIndex maps
// the index to a key using the KeyAt method on the NumberDictionary.
- virtual uint32_t GetKeyForIndex(Handle<FixedArrayBase> backing_store,
+ virtual uint32_t GetKeyForIndex(FixedArrayBase* backing_store,
uint32_t index) = 0;
+ virtual uint32_t GetIndexForKey(FixedArrayBase* backing_store,
+ uint32_t key) = 0;
+ virtual PropertyDetails GetDetails(FixedArrayBase* backing_store,
+ uint32_t index) = 0;
private:
static ElementsAccessor** elements_accessors_;
« 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