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

Side by Side Diff: src/elements.h

Issue 1221713003: Distinguish slow from fast sloppy arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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/contexts.h ('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 Object* value) = 0; 142 Object* value) = 0;
143 virtual void Reconfigure(Handle<JSObject> object, 143 virtual void Reconfigure(Handle<JSObject> object,
144 Handle<FixedArrayBase> backing_store, uint32_t index, 144 Handle<FixedArrayBase> backing_store, uint32_t index,
145 Handle<Object> value, 145 Handle<Object> value,
146 PropertyAttributes attributes) = 0; 146 PropertyAttributes attributes) = 0;
147 virtual void Add(Handle<JSObject> object, uint32_t index, 147 virtual void Add(Handle<JSObject> object, uint32_t index,
148 Handle<Object> value, PropertyAttributes attributes, 148 Handle<Object> value, PropertyAttributes attributes,
149 uint32_t new_capacity) = 0; 149 uint32_t new_capacity) = 0;
150 150
151 protected: 151 protected:
152 friend class SloppyArgumentsElementsAccessor;
153 friend class LookupIterator; 152 friend class LookupIterator;
154 153
155 static ElementsAccessor* ForArray(FixedArrayBase* array); 154 static ElementsAccessor* ForArray(FixedArrayBase* array);
156 155
157 virtual uint32_t GetCapacity(JSObject* holder, 156 virtual uint32_t GetCapacity(JSObject* holder,
158 FixedArrayBase* backing_store) = 0; 157 FixedArrayBase* backing_store) = 0;
159 158
160 // Element handlers distinguish between indexes and keys when they manipulate 159 // Element handlers distinguish between indexes and keys when they manipulate
161 // elements. Indexes refer to elements in terms of their location in the 160 // elements. Indexes refer to elements in terms of their location in the
162 // underlying storage's backing store representation, and are between 0 and 161 // underlying storage's backing store representation, and are between 0 and
(...skipping 21 matching lines...) Expand all
184 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, 183 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key,
185 bool allow_appending = false); 184 bool allow_appending = false);
186 185
187 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 186 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
188 Handle<JSArray> array, 187 Handle<JSArray> array,
189 Arguments* args); 188 Arguments* args);
190 189
191 } } // namespace v8::internal 190 } } // namespace v8::internal
192 191
193 #endif // V8_ELEMENTS_H_ 192 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698