Index: src/elements.cc |
diff --git a/src/elements.cc b/src/elements.cc |
index ef55d54abd73f8b65e357461af6022b27b953f1d..fd2b6d248a34b2f59458188092c9ed7f677538bc 100644 |
--- a/src/elements.cc |
+++ b/src/elements.cc |
@@ -134,6 +134,22 @@ class ElementsAccessorBase : public ElementsAccessor { |
JSObject* obj, |
Object* length); |
+ virtual MaybeObject* SetCapacityAndLength(JSArray* array, |
+ int capacity, |
+ int length) { |
+ return ElementsAccessorSubclass::SetFastElementsCapacityAndLength( |
+ array, |
+ capacity, |
+ length); |
+ } |
+ |
+ static MaybeObject* SetFastElementsCapacityAndLength(JSObject* obj, |
+ int capacity, |
+ int length) { |
+ UNIMPLEMENTED(); |
+ return obj; |
+ } |
+ |
virtual MaybeObject* Delete(JSObject* obj, |
uint32_t key, |
JSReceiver::DeleteMode mode) = 0; |
@@ -376,11 +392,6 @@ class FastObjectElementsAccessor |
return heap->true_value(); |
} |
- protected: |
- friend class FastElementsAccessor<FastObjectElementsAccessor, |
- FixedArray, |
- kPointerSize>; |
- |
static MaybeObject* SetFastElementsCapacityAndLength(JSObject* obj, |
uint32_t capacity, |
uint32_t length) { |
@@ -393,6 +404,11 @@ class FastObjectElementsAccessor |
set_capacity_mode); |
} |
+ protected: |
+ friend class FastElementsAccessor<FastObjectElementsAccessor, |
+ FixedArray, |
+ kPointerSize>; |
+ |
virtual MaybeObject* Delete(JSObject* obj, |
uint32_t key, |
JSReceiver::DeleteMode mode) { |
@@ -405,6 +421,12 @@ class FastDoubleElementsAccessor |
: public FastElementsAccessor<FastDoubleElementsAccessor, |
FixedDoubleArray, |
kDoubleSize> { |
+ static MaybeObject* SetFastElementsCapacityAndLength(JSObject* obj, |
+ uint32_t capacity, |
+ uint32_t length) { |
+ return obj->SetFastDoubleElementsCapacityAndLength(capacity, length); |
+ } |
+ |
protected: |
friend class ElementsAccessorBase<FastDoubleElementsAccessor, |
FixedDoubleArray>; |
@@ -412,12 +434,6 @@ class FastDoubleElementsAccessor |
FixedDoubleArray, |
kDoubleSize>; |
- static MaybeObject* SetFastElementsCapacityAndLength(JSObject* obj, |
- uint32_t capacity, |
- uint32_t length) { |
- return obj->SetFastDoubleElementsCapacityAndLength(capacity, length); |
- } |
- |
virtual MaybeObject* Delete(JSObject* obj, |
uint32_t key, |
JSReceiver::DeleteMode mode) { |