OLD | NEW |
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 2380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2391 inline bool ContainsOnlySmisOrHoles(); | 2391 inline bool ContainsOnlySmisOrHoles(); |
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. | |
2402 // TODO(mstarzinger): Deprecated, use Factory::CopyFixedArrayAndGrow! | |
2403 static Handle<FixedArray> CopySize(Handle<FixedArray> array, | |
2404 int new_length, | |
2405 PretenureFlag pretenure = NOT_TENURED); | |
2406 | |
2407 enum KeyFilter { ALL_KEYS, NON_SYMBOL_KEYS }; | 2401 enum KeyFilter { ALL_KEYS, NON_SYMBOL_KEYS }; |
2408 | 2402 |
2409 // Add the elements of a JSArray to this FixedArray. | 2403 // Add the elements of a JSArray to this FixedArray. |
2410 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromArrayLike( | 2404 MUST_USE_RESULT static MaybeHandle<FixedArray> AddKeysFromArrayLike( |
2411 Handle<FixedArray> content, Handle<JSObject> array, | 2405 Handle<FixedArray> content, Handle<JSObject> array, |
2412 KeyFilter filter = ALL_KEYS); | 2406 KeyFilter filter = ALL_KEYS); |
2413 | 2407 |
2414 // Computes the union of keys and return the result. | 2408 // Computes the union of keys and return the result. |
2415 // Used for implementing "for (n in object) { }" | 2409 // Used for implementing "for (n in object) { }" |
2416 MUST_USE_RESULT static MaybeHandle<FixedArray> UnionOfKeys( | 2410 MUST_USE_RESULT static MaybeHandle<FixedArray> UnionOfKeys( |
(...skipping 8135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10552 } else { | 10546 } else { |
10553 value &= ~(1 << bit_position); | 10547 value &= ~(1 << bit_position); |
10554 } | 10548 } |
10555 return value; | 10549 return value; |
10556 } | 10550 } |
10557 }; | 10551 }; |
10558 | 10552 |
10559 } } // namespace v8::internal | 10553 } } // namespace v8::internal |
10560 | 10554 |
10561 #endif // V8_OBJECTS_H_ | 10555 #endif // V8_OBJECTS_H_ |
OLD | NEW |