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

Side by Side Diff: src/elements.h

Issue 203333004: Handlification of JSArray::SetElementsLength(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing review notes Created 6 years, 9 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 | « src/accessors.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 Object* receiver, 102 Object* receiver,
103 JSObject* holder, 103 JSObject* holder,
104 uint32_t key, 104 uint32_t key,
105 FixedArrayBase* backing_store = NULL) = 0; 105 FixedArrayBase* backing_store = NULL) = 0;
106 106
107 // Modifies the length data property as specified for JSArrays and resizes the 107 // Modifies the length data property as specified for JSArrays and resizes the
108 // underlying backing store accordingly. The method honors the semantics of 108 // underlying backing store accordingly. The method honors the semantics of
109 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that 109 // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that
110 // have non-deletable elements can only be shrunk to the size of highest 110 // have non-deletable elements can only be shrunk to the size of highest
111 // element that is non-deletable. 111 // element that is non-deletable.
112 MUST_USE_RESULT virtual Handle<Object> SetLength(
113 Handle<JSArray> holder,
114 Handle<Object> new_length) = 0;
112 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* holder, 115 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* holder,
113 Object* new_length) = 0; 116 Object* new_length) = 0;
114 117
115 // Modifies both the length and capacity of a JSArray, resizing the underlying 118 // Modifies both the length and capacity of a JSArray, resizing the underlying
116 // backing store as necessary. This method does NOT honor the semantics of 119 // backing store as necessary. This method does NOT honor the semantics of
117 // EcmaScript 5.1 15.4.5.2, arrays can be shrunk beyond non-deletable 120 // EcmaScript 5.1 15.4.5.2, arrays can be shrunk beyond non-deletable
118 // elements. This method should only be called for array expansion OR by 121 // elements. This method should only be called for array expansion OR by
119 // runtime JavaScript code that use InternalArrays and don't care about 122 // runtime JavaScript code that use InternalArrays and don't care about
120 // EcmaScript 5.1 semantics. 123 // EcmaScript 5.1 semantics.
121 MUST_USE_RESULT virtual MaybeObject* SetCapacityAndLength(JSArray* array, 124 MUST_USE_RESULT virtual MaybeObject* SetCapacityAndLength(JSArray* array,
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 202
200 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, 203 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key,
201 bool allow_appending = false); 204 bool allow_appending = false);
202 205
203 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, 206 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array,
204 Arguments* args); 207 Arguments* args);
205 208
206 } } // namespace v8::internal 209 } } // namespace v8::internal
207 210
208 #endif // V8_ELEMENTS_H_ 211 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698