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

Side by Side Diff: src/elements.h

Issue 1232463005: Use entry rather than index in ElementsAccessor::Set (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment 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 | « 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 static ElementsAccessor* ForKind(ElementsKind elements_kind) { 112 static ElementsAccessor* ForKind(ElementsKind elements_kind) {
113 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount); 113 DCHECK(static_cast<int>(elements_kind) < kElementsKindCount);
114 return elements_accessors_[elements_kind]; 114 return elements_accessors_[elements_kind];
115 } 115 }
116 116
117 static ElementsAccessor* ForArray(Handle<FixedArrayBase> array); 117 static ElementsAccessor* ForArray(Handle<FixedArrayBase> array);
118 118
119 static void InitializeOncePerProcess(); 119 static void InitializeOncePerProcess();
120 static void TearDown(); 120 static void TearDown();
121 121
122 virtual void Set(FixedArrayBase* backing_store, uint32_t index, 122 virtual void Set(FixedArrayBase* backing_store, uint32_t entry,
123 Object* value) = 0; 123 Object* value) = 0;
124 virtual void Reconfigure(Handle<JSObject> object, 124 virtual void Reconfigure(Handle<JSObject> object,
125 Handle<FixedArrayBase> backing_store, uint32_t entry, 125 Handle<FixedArrayBase> backing_store, uint32_t entry,
126 Handle<Object> value, 126 Handle<Object> value,
127 PropertyAttributes attributes) = 0; 127 PropertyAttributes attributes) = 0;
128 virtual void Add(Handle<JSObject> object, uint32_t entry, 128 virtual void Add(Handle<JSObject> object, uint32_t index,
129 Handle<Object> value, PropertyAttributes attributes, 129 Handle<Object> value, PropertyAttributes attributes,
130 uint32_t new_capacity) = 0; 130 uint32_t new_capacity) = 0;
131 131
132 protected: 132 protected:
133 friend class LookupIterator; 133 friend class LookupIterator;
134 134
135 static ElementsAccessor* ForArray(FixedArrayBase* array); 135 static ElementsAccessor* ForArray(FixedArrayBase* array);
136 136
137 virtual uint32_t GetCapacity(JSObject* holder, 137 virtual uint32_t GetCapacity(JSObject* holder,
138 FixedArrayBase* backing_store) = 0; 138 FixedArrayBase* backing_store) = 0;
(...skipping 22 matching lines...) Expand all
161 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t index, 161 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t index,
162 bool allow_appending = false); 162 bool allow_appending = false);
163 163
164 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 164 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
165 Handle<JSArray> array, 165 Handle<JSArray> array,
166 Arguments* args); 166 Arguments* args);
167 167
168 } } // namespace v8::internal 168 } } // namespace v8::internal
169 169
170 #endif // V8_ELEMENTS_H_ 170 #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