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

Side by Side Diff: src/objects.h

Issue 1255173006: Introduce safe interface to "copy and grow" FixedArray. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed nits. Created 5 years, 4 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/heap/heap.cc ('k') | src/objects.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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 2392
2393 // Gives access to raw memory which stores the array's data. 2393 // Gives access to raw memory which stores the array's data.
2394 inline Object** data_start(); 2394 inline Object** data_start();
2395 2395
2396 inline void FillWithHoles(int from, int to); 2396 inline void FillWithHoles(int from, int to);
2397 2397
2398 // Shrink length and insert filler objects. 2398 // Shrink length and insert filler objects.
2399 void Shrink(int length); 2399 void Shrink(int length);
2400 2400
2401 // Copy operation. 2401 // Copy operation.
2402 // TODO(mstarzinger): Deprecated, use Factory::CopyFixedArrayAndGrow!
2402 static Handle<FixedArray> CopySize(Handle<FixedArray> array, 2403 static Handle<FixedArray> CopySize(Handle<FixedArray> array,
2403 int new_length, 2404 int new_length,
2404 PretenureFlag pretenure = NOT_TENURED); 2405 PretenureFlag pretenure = NOT_TENURED);
2405 2406
2406 enum KeyFilter { ALL_KEYS, NON_SYMBOL_KEYS }; 2407 enum KeyFilter { ALL_KEYS, NON_SYMBOL_KEYS };
2407 2408
2408 // Add the elements of a JSArray to this FixedArray. 2409 // Add the elements of a JSArray to this FixedArray.
2409 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromArrayLike( 2410 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromArrayLike(
2410 Handle<FixedArray> content, Handle<JSObject> array, 2411 Handle<FixedArray> content, Handle<JSObject> array,
2411 KeyFilter filter = ALL_KEYS); 2412 KeyFilter filter = ALL_KEYS);
(...skipping 8143 matching lines...) Expand 10 before | Expand all | Expand 10 after
10555 } else { 10556 } else {
10556 value &= ~(1 << bit_position); 10557 value &= ~(1 << bit_position);
10557 } 10558 }
10558 return value; 10559 return value;
10559 } 10560 }
10560 }; 10561 };
10561 10562
10562 } } // namespace v8::internal 10563 } } // namespace v8::internal
10563 10564
10564 #endif // V8_OBJECTS_H_ 10565 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698