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

Side by Side Diff: src/elements.h

Issue 1207613005: Move reconfiguration into the elements accessor (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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 return elements_accessors_[elements_kind]; 133 return elements_accessors_[elements_kind];
134 } 134 }
135 135
136 static ElementsAccessor* ForArray(Handle<FixedArrayBase> array); 136 static ElementsAccessor* ForArray(Handle<FixedArrayBase> array);
137 137
138 static void InitializeOncePerProcess(); 138 static void InitializeOncePerProcess();
139 static void TearDown(); 139 static void TearDown();
140 140
141 virtual void Set(FixedArrayBase* backing_store, uint32_t key, 141 virtual void Set(FixedArrayBase* backing_store, uint32_t key,
142 Object* value) = 0; 142 Object* value) = 0;
143 virtual void Reconfigure(Handle<JSObject> object,
144 Handle<FixedArrayBase> backing_store, uint32_t index,
145 Handle<Object> value,
146 PropertyAttributes attributes) = 0;
143 147
144 protected: 148 protected:
145 friend class SloppyArgumentsElementsAccessor; 149 friend class SloppyArgumentsElementsAccessor;
146 friend class LookupIterator; 150 friend class LookupIterator;
147 151
148 static ElementsAccessor* ForArray(FixedArrayBase* array); 152 static ElementsAccessor* ForArray(FixedArrayBase* array);
149 153
150 virtual uint32_t GetCapacity(JSObject* holder, 154 virtual uint32_t GetCapacity(JSObject* holder,
151 FixedArrayBase* backing_store) = 0; 155 FixedArrayBase* backing_store) = 0;
152 156
(...skipping 24 matching lines...) Expand all
177 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, 181 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key,
178 bool allow_appending = false); 182 bool allow_appending = false);
179 183
180 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 184 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
181 Handle<JSArray> array, 185 Handle<JSArray> array,
182 Arguments* args); 186 Arguments* args);
183 187
184 } } // namespace v8::internal 188 } } // namespace v8::internal
185 189
186 #endif // V8_ELEMENTS_H_ 190 #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