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

Side by Side Diff: src/elements.h

Issue 2202163002: Revert of [builtins] implement Array.prototype.includes in TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « src/compiler/raw-machine-assembler.cc ('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"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 virtual Handle<Object> Pop(Handle<JSArray> receiver) = 0; 148 virtual Handle<Object> Pop(Handle<JSArray> receiver) = 0;
149 149
150 virtual Handle<Object> Shift(Handle<JSArray> receiver) = 0; 150 virtual Handle<Object> Shift(Handle<JSArray> receiver) = 0;
151 151
152 virtual Handle<SeededNumberDictionary> Normalize(Handle<JSObject> object) = 0; 152 virtual Handle<SeededNumberDictionary> Normalize(Handle<JSObject> object) = 0;
153 153
154 virtual uint32_t GetCapacity(JSObject* holder, 154 virtual uint32_t GetCapacity(JSObject* holder,
155 FixedArrayBase* backing_store) = 0; 155 FixedArrayBase* backing_store) = 0;
156 156
157 // Check an Object's own elements for an element (using SameValueZero
158 // semantics)
159 virtual Maybe<bool> IncludesValue(Isolate* isolate, Handle<JSObject> receiver,
160 Handle<Object> value, uint32_t start,
161 uint32_t length) = 0;
162
163 protected: 157 protected:
164 friend class LookupIterator; 158 friend class LookupIterator;
165 159
166 // Element handlers distinguish between entries and indices when they 160 // Element handlers distinguish between entries and indices when they
167 // manipulate elements. Entries refer to elements in terms of their location 161 // manipulate elements. Entries refer to elements in terms of their location
168 // in the underlying storage's backing store representation, and are between 0 162 // in the underlying storage's backing store representation, and are between 0
169 // and GetCapacity. Indices refer to elements in terms of the value that would 163 // and GetCapacity. Indices refer to elements in terms of the value that would
170 // be specified in JavaScript to access the element. In most implementations, 164 // be specified in JavaScript to access the element. In most implementations,
171 // indices are equivalent to entries. In the NumberDictionary 165 // indices are equivalent to entries. In the NumberDictionary
172 // ElementsAccessor, entries are mapped to an index using the KeyAt method on 166 // ElementsAccessor, entries are mapped to an index using the KeyAt method on
(...skipping 22 matching lines...) Expand all
195 bool allow_appending = false); 189 bool allow_appending = false);
196 190
197 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 191 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
198 Handle<JSArray> array, 192 Handle<JSArray> array,
199 Arguments* args); 193 Arguments* args);
200 194
201 } // namespace internal 195 } // namespace internal
202 } // namespace v8 196 } // namespace v8
203 197
204 #endif // V8_ELEMENTS_H_ 198 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « src/compiler/raw-machine-assembler.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698