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

Side by Side Diff: src/elements.h

Issue 1193343002: Move SetFastDoubleElementsCapacity into GrowCapacityAndConvert (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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') | 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 int copy_size) = 0; 114 int copy_size) = 0;
115 115
116 inline void CopyElements( 116 inline void CopyElements(
117 Handle<JSObject> from_holder, 117 Handle<JSObject> from_holder,
118 Handle<FixedArrayBase> to, 118 Handle<FixedArrayBase> to,
119 ElementsKind from_kind) { 119 ElementsKind from_kind) {
120 CopyElements( 120 CopyElements(
121 *from_holder, 0, from_kind, to, 0, kCopyToEndAndInitializeToHole); 121 *from_holder, 0, from_kind, to, 0, kCopyToEndAndInitializeToHole);
122 } 122 }
123 123
124 virtual void GrowCapacityAndConvert(Handle<JSObject> object,
125 uint32_t capacity) = 0;
126
124 virtual Handle<FixedArray> AddElementsToFixedArray( 127 virtual Handle<FixedArray> AddElementsToFixedArray(
125 Handle<JSObject> receiver, Handle<FixedArray> to, 128 Handle<JSObject> receiver, Handle<FixedArray> to,
126 FixedArray::KeyFilter filter) = 0; 129 FixedArray::KeyFilter filter) = 0;
127 130
128 // Returns a shared ElementsAccessor for the specified ElementsKind. 131 // Returns a shared ElementsAccessor for the specified ElementsKind.
129 static ElementsAccessor* ForKind(ElementsKind elements_kind) { 132 static ElementsAccessor* ForKind(ElementsKind elements_kind) {
130 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount); 133 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount);
131 return elements_accessors_[elements_kind]; 134 return elements_accessors_[elements_kind];
132 } 135 }
133 136
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, 178 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key,
176 bool allow_appending = false); 179 bool allow_appending = false);
177 180
178 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 181 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
179 Handle<JSArray> array, 182 Handle<JSArray> array,
180 Arguments* args); 183 Arguments* args);
181 184
182 } } // namespace v8::internal 185 } } // namespace v8::internal
183 186
184 #endif // V8_ELEMENTS_H_ 187 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698