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

Side by Side Diff: src/elements.h

Issue 649603003: Keyed stores to super with numeric keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Refactoring of GetElementAttributeWithInterceptor Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/elements.cc » ('j') | src/objects.h » ('J')
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 Handle<FixedArrayBase> backing_store) = 0; 75 Handle<FixedArrayBase> backing_store) = 0;
76 76
77 MUST_USE_RESULT inline PropertyAttributes GetAttributes( 77 MUST_USE_RESULT inline PropertyAttributes GetAttributes(
78 Handle<Object> receiver, 78 Handle<Object> receiver,
79 Handle<JSObject> holder, 79 Handle<JSObject> holder,
80 uint32_t key) { 80 uint32_t key) {
81 return GetAttributes(receiver, holder, key, handle(holder->elements())); 81 return GetAttributes(receiver, holder, key, handle(holder->elements()));
82 } 82 }
83 83
84 // Returns an element's accessors, or NULL if the element does not exist or 84 // Returns an element's accessors, or NULL if the element does not exist or
85 // is plain. This method doesn't iterate up the prototype chain. The caller 85 // is plain. The returned object represents callbacks to be executed for
86 // element access, and can be one of:
87 // - AccessorPair
88 // - ExecutableAccessorPair
89 // - DeclaredAccessorInfo.
90 // This method doesn't iterate up the prototype chain. The caller
86 // can optionally pass in the backing store to use for the check, which must 91 // can optionally pass in the backing store to use for the check, which must
87 // be compatible with the ElementsKind of the ElementsAccessor. If 92 // be compatible with the ElementsKind of the ElementsAccessor. If
88 // backing_store is NULL, the holder->elements() is used as the backing store. 93 // backing_store is NULL, the holder->elements() is used as the backing store.
89 MUST_USE_RESULT virtual MaybeHandle<AccessorPair> GetAccessorPair( 94 // todo(dslomov): Update comment
90 Handle<Object> receiver, 95 MUST_USE_RESULT virtual MaybeHandle<Object> GetStructure(
91 Handle<JSObject> holder, 96 Handle<Object> receiver, Handle<JSObject> holder, uint32_t key,
92 uint32_t key,
93 Handle<FixedArrayBase> backing_store) = 0; 97 Handle<FixedArrayBase> backing_store) = 0;
94 98
95 MUST_USE_RESULT inline MaybeHandle<AccessorPair> GetAccessorPair( 99 MUST_USE_RESULT inline MaybeHandle<Object> GetStructure(
96 Handle<Object> receiver, 100 Handle<Object> receiver, Handle<JSObject> holder, uint32_t key) {
97 Handle<JSObject> holder, 101 return GetStructure(receiver, holder, key, handle(holder->elements()));
98 uint32_t key) {
99 return GetAccessorPair(receiver, holder, key, handle(holder->elements()));
100 } 102 }
101 103
102 // Modifies the length data property as specified for JSArrays and resizes the 104 // Modifies the length data property as specified for JSArrays and resizes the
103 // underlying backing store accordingly. The method honors the semantics of 105 // underlying backing store accordingly. The method honors the semantics of
104 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that 106 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that
105 // have non-deletable elements can only be shrunk to the size of highest 107 // have non-deletable elements can only be shrunk to the size of highest
106 // element that is non-deletable. 108 // element that is non-deletable.
107 MUST_USE_RESULT virtual MaybeHandle<Object> SetLength( 109 MUST_USE_RESULT virtual MaybeHandle<Object> SetLength(
108 Handle<JSArray> holder, 110 Handle<JSArray> holder,
109 Handle<Object> new_length) = 0; 111 Handle<Object> new_length) = 0;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key, 219 void CheckArrayAbuse(Handle<JSObject> obj, const char* op, uint32_t key,
218 bool allow_appending = false); 220 bool allow_appending = false);
219 221
220 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements( 222 MUST_USE_RESULT MaybeHandle<Object> ArrayConstructInitializeElements(
221 Handle<JSArray> array, 223 Handle<JSArray> array,
222 Arguments* args); 224 Arguments* args);
223 225
224 } } // namespace v8::internal 226 } } // namespace v8::internal
225 227
226 #endif // V8_ELEMENTS_H_ 228 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/elements.cc » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698