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

Side by Side Diff: src/elements.h

Issue 1317053006: Adding ElementsAccessor::Shift (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2015-09-01_array_builtin_cleanup
Patch Set: Only use range checks in builtins Created 5 years, 3 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/builtins.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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 uint32_t start, uint32_t end) = 0; 142 uint32_t start, uint32_t end) = 0;
143 143
144 virtual Handle<JSArray> Splice(Handle<JSArray> receiver, 144 virtual Handle<JSArray> Splice(Handle<JSArray> receiver,
145 Handle<FixedArrayBase> backing_store, 145 Handle<FixedArrayBase> backing_store,
146 uint32_t start, uint32_t delete_count, 146 uint32_t start, uint32_t delete_count,
147 Arguments* args, uint32_t add_count) = 0; 147 Arguments* args, uint32_t add_count) = 0;
148 148
149 virtual Handle<Object> Pop(Handle<JSArray> receiver, 149 virtual Handle<Object> Pop(Handle<JSArray> receiver,
150 Handle<FixedArrayBase> backing_store) = 0; 150 Handle<FixedArrayBase> backing_store) = 0;
151 151
152 virtual Handle<Object> Shift(Handle<JSArray> receiver,
153 Handle<FixedArrayBase> backing_store) = 0;
154
152 protected: 155 protected:
153 friend class LookupIterator; 156 friend class LookupIterator;
154 157
155 static ElementsAccessor* ForArray(FixedArrayBase* array); 158 static ElementsAccessor* ForArray(FixedArrayBase* array);
156 159
157 virtual uint32_t GetCapacity(JSObject* holder, 160 virtual uint32_t GetCapacity(JSObject* holder,
158 FixedArrayBase* backing_store) = 0; 161 FixedArrayBase* backing_store) = 0;
159 162
160 // Element handlers distinguish between entries and indices when they 163 // Element handlers distinguish between entries and indices when they
161 // manipulate elements. Entries refer to elements in terms of their location 164 // manipulate elements. Entries refer to elements in terms of their location
(...skipping 19 matching lines...) Expand all
181 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t index, 184 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t index,
182 bool allow_appending = false); 185 bool allow_appending = false);
183 186
184 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 187 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
185 Handle<JSArray> array, 188 Handle<JSArray> array,
186 Arguments* args); 189 Arguments* args);
187 190
188 } } // namespace v8::internal 191 } } // namespace v8::internal
189 192
190 #endif // V8_ELEMENTS_H_ 193 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698