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

Side by Side Diff: src/elements.h

Issue 1197133003: Move SetFastElementsCapacity 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 | « src/ast.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"
11 #include "src/objects.h" 11 #include "src/objects.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 // Abstract base class for handles that can operate on objects with differing 16 // Abstract base class for handles that can operate on objects with differing
17 // ElementsKinds. 17 // ElementsKinds.
18 class ElementsAccessor { 18 class ElementsAccessor {
19 public: 19 public:
20 explicit ElementsAccessor(const char* name) : name_(name) { } 20 explicit ElementsAccessor(const char* name) : name_(name) { }
21 virtual ~ElementsAccessor() { } 21 virtual ~ElementsAccessor() { }
22 22
23 virtual ElementsKind kind() const = 0;
24 const char* name() const { return name_; } 23 const char* name() const { return name_; }
25 24
26 // Checks the elements of an object for consistency, asserting when a problem 25 // Checks the elements of an object for consistency, asserting when a problem
27 // is found. 26 // is found.
28 virtual void Validate(Handle<JSObject> obj) = 0; 27 virtual void Validate(Handle<JSObject> obj) = 0;
29 28
30 // Returns true if a holder contains an element with the specified key 29 // Returns true if a holder contains an element with the specified key
31 // without iterating up the prototype chain. The caller can optionally pass 30 // without iterating up the prototype chain. The caller can optionally pass
32 // in the backing store to use for the check, which must be compatible with 31 // in the backing store to use for the check, which must be compatible with
33 // the ElementsKind of the ElementsAccessor. If backing_store is NULL, the 32 // the ElementsKind of the ElementsAccessor. If backing_store is NULL, the
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, 177 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key,
179 bool allow_appending = false); 178 bool allow_appending = false);
180 179
181 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 180 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
182 Handle<JSArray> array, 181 Handle<JSArray> array,
183 Arguments* args); 182 Arguments* args);
184 183
185 } } // namespace v8::internal 184 } } // namespace v8::internal
186 185
187 #endif // V8_ELEMENTS_H_ 186 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « src/ast.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698