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

Side by Side Diff: src/elements.h

Issue 204603003: ElementsAccessor::SetLength() handlified. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/builtins.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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 112 MUST_USE_RESULT virtual Handle<Object> SetLength(
113 Handle<JSArray> holder, 113 Handle<JSArray> holder,
114 Handle<Object> new_length) = 0; 114 Handle<Object> new_length) = 0;
115 MUST_USE_RESULT virtual MaybeObject* SetLength(JSArray* holder,
116 Object* new_length) = 0;
117 115
118 // Modifies both the length and capacity of a JSArray, resizing the underlying 116 // Modifies both the length and capacity of a JSArray, resizing the underlying
119 // backing store as necessary. This method does NOT honor the semantics of 117 // backing store as necessary. This method does NOT honor the semantics of
120 // EcmaScript 5.1 15.4.5.2, arrays can be shrunk beyond non-deletable 118 // EcmaScript 5.1 15.4.5.2, arrays can be shrunk beyond non-deletable
121 // elements. This method should only be called for array expansion OR by 119 // elements. This method should only be called for array expansion OR by
122 // runtime JavaScript code that use InternalArrays and don't care about 120 // runtime JavaScript code that use InternalArrays and don't care about
123 // EcmaScript 5.1 semantics. 121 // EcmaScript 5.1 semantics.
124 MUST_USE_RESULT virtual MaybeObject* SetCapacityAndLength(JSArray* array, 122 MUST_USE_RESULT virtual MaybeObject* SetCapacityAndLength(JSArray* array,
125 int capacity, 123 int capacity,
126 int length) = 0; 124 int length) = 0;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 200
203 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key, 201 void CheckArrayAbuse(JSObject* obj, const char* op, uint32_t key,
204 bool allow_appending = false); 202 bool allow_appending = false);
205 203
206 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array, 204 Handle<Object> ArrayConstructInitializeElements(Handle<JSArray> array,
207 Arguments* args); 205 Arguments* args);
208 206
209 } } // namespace v8::internal 207 } } // namespace v8::internal
210 208
211 #endif // V8_ELEMENTS_H_ 209 #endif // V8_ELEMENTS_H_
OLDNEW
« no previous file with comments | « src/builtins.cc ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698