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

Unified Diff: src/elements.h

Issue 1397063002: [runtime] Fancify KeyAccumulator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adding KeyAccumulator destructor Created 5 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/objects.h » ('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 c238a7a2178b9b3753685ae97dac52f621e0d52a..48190cbfeaec906b9bd2498a7947131075832b1b 100644
--- a/src/elements.h
+++ b/src/elements.h
@@ -32,10 +32,12 @@ class ElementsAccessor {
// the ElementsKind of the ElementsAccessor. If backing_store is NULL, the
// holder->elements() is used as the backing store.
virtual bool HasElement(Handle<JSObject> holder, uint32_t index,
- Handle<FixedArrayBase> backing_store) = 0;
+ Handle<FixedArrayBase> backing_store,
+ PropertyAttributes filter = NONE) = 0;
Igor Sheludko 2015/10/15 09:51:43 Please add a comment about filter parameter. How e
- inline bool HasElement(Handle<JSObject> holder, uint32_t index) {
- return HasElement(holder, index, handle(holder->elements()));
+ inline bool HasElement(Handle<JSObject> holder, uint32_t index,
+ PropertyAttributes filter = NONE) {
+ return HasElement(holder, index, handle(holder->elements()), filter);
}
// Returns true if the backing store is compact in the given range
@@ -102,7 +104,7 @@ class ElementsAccessor {
virtual void AddElementsToKeyAccumulator(Handle<JSObject> receiver,
KeyAccumulator* accumulator,
- KeyFilter filter) = 0;
+ AddKeyConversion convert) = 0;
// Returns a shared ElementsAccessor for the specified ElementsKind.
static ElementsAccessor* ForKind(ElementsKind elements_kind) {
@@ -153,13 +155,14 @@ class ElementsAccessor {
virtual Handle<Object> Shift(Handle<JSArray> receiver,
Handle<FixedArrayBase> backing_store) = 0;
+ virtual uint32_t GetCapacity(JSObject* holder,
+ FixedArrayBase* backing_store) = 0;
+
protected:
friend class LookupIterator;
static ElementsAccessor* ForArray(FixedArrayBase* array);
- virtual uint32_t GetCapacity(JSObject* holder,
- FixedArrayBase* backing_store) = 0;
// Element handlers distinguish between entries and indices when they
// manipulate elements. Entries refer to elements in terms of their location
« no previous file with comments | « no previous file | src/elements.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698