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

Side by Side Diff: src/elements.h

Issue 1802733002: Move elements normalization to the ElementsAccessor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/elements.cc » ('j') | src/elements.cc » ('J')
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"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 uint32_t start, uint32_t end) = 0; 141 uint32_t start, uint32_t end) = 0;
142 142
143 virtual Handle<JSArray> Splice(Handle<JSArray> receiver, 143 virtual Handle<JSArray> Splice(Handle<JSArray> receiver,
144 uint32_t start, uint32_t delete_count, 144 uint32_t start, uint32_t delete_count,
145 Arguments* args, uint32_t add_count) = 0; 145 Arguments* args, uint32_t add_count) = 0;
146 146
147 virtual Handle<Object> Pop(Handle<JSArray> receiver) = 0; 147 virtual Handle<Object> Pop(Handle<JSArray> receiver) = 0;
148 148
149 virtual Handle<Object> Shift(Handle<JSArray> receiver) = 0; 149 virtual Handle<Object> Shift(Handle<JSArray> receiver) = 0;
150 150
151 virtual Handle<SeededNumberDictionary> Normalize(
152 Handle<JSObject> object, Handle<FixedArrayBase> store) = 0;
153
151 protected: 154 protected:
152 friend class LookupIterator; 155 friend class LookupIterator;
153 156
154 // Element handlers distinguish between entries and indices when they 157 // Element handlers distinguish between entries and indices when they
155 // manipulate elements. Entries refer to elements in terms of their location 158 // manipulate elements. Entries refer to elements in terms of their location
156 // in the underlying storage's backing store representation, and are between 0 159 // in the underlying storage's backing store representation, and are between 0
157 // and GetCapacity. Indices refer to elements in terms of the value that would 160 // and GetCapacity. Indices refer to elements in terms of the value that would
158 // be specified in JavaScript to access the element. In most implementations, 161 // be specified in JavaScript to access the element. In most implementations,
159 // indices are equivalent to entries. In the NumberDictionary 162 // indices are equivalent to entries. In the NumberDictionary
160 // ElementsAccessor, entries are mapped to an index using the KeyAt method on 163 // ElementsAccessor, entries are mapped to an index using the KeyAt method on
(...skipping 24 matching lines...) Expand all
185 bool allow_appending = false); 188 bool allow_appending = false);
186 189
187 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 190 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
188 Handle<JSArray> array, 191 Handle<JSArray> array,
189 Arguments* args); 192 Arguments* args);
190 193
191 } // namespace internal 194 } // namespace internal
192 } // namespace v8 195 } // namespace v8
193 196
194 #endif // V8_ELEMENTS_H_ 197 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/elements.cc » ('j') | src/elements.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698