Index: src/elements.h |
diff --git a/src/elements.h b/src/elements.h |
index 511b636c3de8082ed2c5dfe16251e7d5e8da08c1..f1ef0becbcc848d16c017391820fbac7c5e5585e 100644 |
--- a/src/elements.h |
+++ b/src/elements.h |
@@ -60,6 +60,9 @@ class ElementsAccessor { |
// destination array with the hole. |
static const int kCopyToEndAndInitializeToHole = -2; |
+ static const int kDirectionForward = 1; |
+ static const int kDirectionReverse = -1; |
+ |
// Copy elements from one backing store to another. Typically, callers specify |
// the source JSObject or JSArray in source_holder. If the holder's backing |
// store is available, it can be passed in source and source_holder is |
@@ -112,14 +115,26 @@ class ElementsAccessor { |
virtual void Set(FixedArrayBase* backing_store, uint32_t entry, |
Object* value) = 0; |
+ |
virtual void Reconfigure(Handle<JSObject> object, |
Handle<FixedArrayBase> backing_store, uint32_t entry, |
Handle<Object> value, |
PropertyAttributes attributes) = 0; |
+ |
virtual void Add(Handle<JSObject> object, uint32_t index, |
Handle<Object> value, PropertyAttributes attributes, |
uint32_t new_capacity) = 0; |
+ virtual uint32_t Push(Handle<JSArray> receiver, |
+ Handle<FixedArrayBase> backing_store, Object** objects, |
Jakob Kummerow
2015/07/31 12:24:14
as discussed, maybe leave a comment here:
// TODO(
|
+ uint32_t start, int direction) = 0; |
+ |
+ inline uint32_t Push(Handle<JSArray> receiver, Object** objects, |
Jakob Kummerow
2015/07/31 12:24:14
This overload doesn't have any callers, does it? W
|
+ uint32_t push_size) { |
+ return Push(receiver, handle(receiver->elements()), objects, push_size, |
+ kDirectionForward); |
+ } |
+ |
protected: |
friend class LookupIterator; |