Chromium Code Reviews| Index: src/elements.h |
| diff --git a/src/elements.h b/src/elements.h |
| index 036df5f709459aa81f6cfadbe6553357740c9382..8d6ece67bdf629138594c8dc470e40e8eff9fb14 100644 |
| --- a/src/elements.h |
| +++ b/src/elements.h |
| @@ -29,6 +29,8 @@ |
| #define V8_ELEMENTS_H_ |
| #include "objects.h" |
| +#include "heap.h" |
| +#include "isolate.h" |
| namespace v8 { |
| namespace internal { |
| @@ -40,7 +42,8 @@ class ElementsAccessor { |
| explicit ElementsAccessor(const char* name) : name_(name) { } |
| virtual ~ElementsAccessor() { } |
| - virtual const char* name() const { return name_; } |
| + virtual ElementsKind kind() const = 0; |
| + const char* name() const { return name_; } |
| // Returns true if a holder contains an element with the specified key |
| // without iterating up the prototype chain. The caller can optionally pass |
| @@ -85,6 +88,21 @@ class ElementsAccessor { |
| uint32_t key, |
| JSReceiver::DeleteMode mode) = 0; |
| + virtual MaybeObject* CopyElements(JSObject* from_holder, |
| + uint32_t from_start, |
| + FixedArrayBase* to, |
| + ElementsKind to_kind, |
| + uint32_t to_start, |
| + int copy_size, |
| + FixedArrayBase* from = NULL) = 0; |
|
Sven Panne
2012/03/09 08:15:18
Reading only this header, it is a bit confusing wh
danno
2012/03/09 12:12:35
Done.
|
| + |
| + MaybeObject* CopyElements(JSObject* from_holder, |
| + FixedArrayBase* to, |
| + ElementsKind to_kind, |
| + FixedArrayBase* from = NULL) { |
| + return CopyElements(from_holder, 0, to, to_kind, 0, -1, from); |
| + } |
| + |
| virtual MaybeObject* AddElementsToFixedArray(Object* receiver, |
| JSObject* holder, |
| FixedArray* to, |
| @@ -123,6 +141,17 @@ class ElementsAccessor { |
| DISALLOW_COPY_AND_ASSIGN(ElementsAccessor); |
| }; |
| + |
| +void CopyObjectToObjectElements(AssertNoAllocation* no_gc, |
|
Sven Panne
2012/03/09 08:15:18
Hmmm, the first parameter is actually a phantom ty
danno
2012/03/09 12:12:35
Done.
|
| + FixedArray* from_obj, |
| + ElementsKind from_kind, |
| + uint32_t from_start, |
| + FixedArray* to_obj, |
| + ElementsKind to_kind, |
| + uint32_t to_start, |
| + int copy_size); |
| + |
| + |
| } } // namespace v8::internal |
| #endif // V8_ELEMENTS_H_ |