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

Unified Diff: src/elements.h

Issue 8352046: Refactor how elements are redefined by the runtime. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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 851c8c3d97f89d7aab4f0e910ead6c4780b18b5e..95b79d917017d5bb54e0c0ef36f4fe16410c6aac 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -44,6 +44,11 @@ class ElementsAccessor {
JSObject* holder,
Object* receiver) = 0;
+ virtual MaybeObject* Set(JSObject* holder,
+ uint32_t key,
+ Object* value,
+ PropertyAttributes attributes = ABSENT) = 0;
+
virtual MaybeObject* Delete(JSObject* holder,
uint32_t key,
JSReceiver::DeleteMode mode) = 0;
@@ -84,6 +89,14 @@ class ElementsAccessor {
virtual uint32_t GetKeyForIndex(FixedArrayBase* backing_store,
uint32_t index) = 0;
+ // Internal element setter which does not update the objects backing store
+ // containing the elements, but returns the new backing store. The caller
+ // is responsible for updating the object reference to the backing store.
danno 2011/10/24 21:09:02 The separation of responsibility seems clear in th
+ virtual MaybeObject* SetInternal(FixedArrayBase* backing_store,
+ uint32_t index,
+ Object* value,
+ PropertyAttributes attributes) = 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