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

Side by Side Diff: src/elements.h

Issue 1707743002: [key-accumulator] Starting to reimplement the key-accumulator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use proper type Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « BUILD.gn ('k') | src/elements.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ELEMENTS_H_ 5 #ifndef V8_ELEMENTS_H_
6 #define V8_ELEMENTS_H_ 6 #define V8_ELEMENTS_H_
7 7
8 #include "src/elements-kind.h" 8 #include "src/elements-kind.h"
9 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
10 #include "src/isolate.h" 10 #include "src/isolate.h"
11 #include "src/key-accumulator.h" 11 #include "src/keys.h"
12 #include "src/objects.h" 12 #include "src/objects.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 // Abstract base class for handles that can operate on objects with differing 17 // Abstract base class for handles that can operate on objects with differing
18 // ElementsKinds. 18 // ElementsKinds.
19 class ElementsAccessor { 19 class ElementsAccessor {
20 public: 20 public:
21 explicit ElementsAccessor(const char* name) : name_(name) { } 21 explicit ElementsAccessor(const char* name) : name_(name) { }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 inline void CollectElementIndices(Handle<JSObject> object, 93 inline void CollectElementIndices(Handle<JSObject> object,
94 KeyAccumulator* keys, 94 KeyAccumulator* keys,
95 uint32_t range = kMaxUInt32, 95 uint32_t range = kMaxUInt32,
96 PropertyFilter filter = ALL_PROPERTIES, 96 PropertyFilter filter = ALL_PROPERTIES,
97 uint32_t offset = 0) { 97 uint32_t offset = 0) {
98 CollectElementIndices(object, handle(object->elements()), keys, range, 98 CollectElementIndices(object, handle(object->elements()), keys, range,
99 filter, offset); 99 filter, offset);
100 } 100 }
101 101
102 //
103 virtual Handle<FixedArray> PrependElementIndices(
104 Handle<JSObject> object, Handle<FixedArrayBase> backing_store,
105 Handle<FixedArray> keys, GetKeysConversion convert,
106 PropertyFilter filter = ALL_PROPERTIES) = 0;
107
108 inline Handle<FixedArray> PrependElementIndices(
109 Handle<JSObject> object, Handle<FixedArray> keys,
110 GetKeysConversion convert, PropertyFilter filter = ALL_PROPERTIES) {
111 return PrependElementIndices(object, handle(object->elements()), keys,
112 convert, filter);
113 }
114
102 virtual void AddElementsToKeyAccumulator(Handle<JSObject> receiver, 115 virtual void AddElementsToKeyAccumulator(Handle<JSObject> receiver,
103 KeyAccumulator* accumulator, 116 KeyAccumulator* accumulator,
104 AddKeyConversion convert) = 0; 117 AddKeyConversion convert) = 0;
105 118
106 virtual void GrowCapacityAndConvert(Handle<JSObject> object, 119 virtual void GrowCapacityAndConvert(Handle<JSObject> object,
107 uint32_t capacity) = 0; 120 uint32_t capacity) = 0;
108 121
109 static void InitializeOncePerProcess(); 122 static void InitializeOncePerProcess();
110 static void TearDown(); 123 static void TearDown();
111 124
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 bool allow_appending = false); 196 bool allow_appending = false);
184 197
185 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 198 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
186 Handle<JSArray> array, 199 Handle<JSArray> array,
187 Arguments* args); 200 Arguments* args);
188 201
189 } // namespace internal 202 } // namespace internal
190 } // namespace v8 203 } // namespace v8
191 204
192 #endif // V8_ELEMENTS_H_ 205 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698