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

Unified Diff: src/elements.h

Issue 7657011: Implement UnionOfKeys for NonStrictArguments (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: make more protected Created 9 years, 4 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') | src/elements.cc » ('J')
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 74e4ad665969971843f248e8f5d6a43f9a7b7c8d..2ae584bc068eeeab1c902a03b33c79f880c74a3d 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -41,10 +41,10 @@ class ElementsAccessor {
virtual ~ElementsAccessor() { }
virtual MaybeObject* GetWithReceiver(JSObject* obj,
Object* receiver,
- uint32_t index) = 0;
+ uint32_t key) = 0;
virtual MaybeObject* Delete(JSObject* obj,
- uint32_t index,
+ uint32_t key,
JSReceiver::DeleteMode mode) = 0;
virtual MaybeObject* AddElementsToFixedArray(FixedArrayBase* from,
@@ -56,8 +56,25 @@ class ElementsAccessor {
return elements_accessors_[elements_kind];
}
+ static ElementsAccessor* ForArray(FixedArrayBase* array);
+
static void InitializeOncePerProcess();
+ protected:
+ friend class NonStrictArgumentsElementsAccessor;
+
+ virtual uint32_t GetCapacity(FixedArrayBase* backing_store) = 0;
+
+ // TODO(danno): GetElement should be merged with GetWithReceiver.
+ virtual MaybeObject* GetElement(FixedArrayBase* backing_store,
+ uint32_t key) = 0;
+
+ virtual bool HasElementAtIndex(FixedArrayBase* backing_store,
+ uint32_t index) = 0;
+
+ virtual uint32_t GetKeyForIndex(FixedArrayBase* backing_store,
+ uint32_t index) = 0;
+
private:
static ElementsAccessor** elements_accessors_;
« no previous file with comments | « no previous file | src/elements.cc » ('j') | src/elements.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698