| OLD | NEW |
| 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 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 MUST_USE_RESULT inline MaybeObject* ResetElements(); | 1560 MUST_USE_RESULT inline MaybeObject* ResetElements(); |
| 1561 inline ElementsKind GetElementsKind(); | 1561 inline ElementsKind GetElementsKind(); |
| 1562 inline ElementsAccessor* GetElementsAccessor(); | 1562 inline ElementsAccessor* GetElementsAccessor(); |
| 1563 // Returns true if an object has elements of FAST_SMI_ELEMENTS ElementsKind. | 1563 // Returns true if an object has elements of FAST_SMI_ELEMENTS ElementsKind. |
| 1564 inline bool HasFastSmiElements(); | 1564 inline bool HasFastSmiElements(); |
| 1565 // Returns true if an object has elements of FAST_ELEMENTS ElementsKind. | 1565 // Returns true if an object has elements of FAST_ELEMENTS ElementsKind. |
| 1566 inline bool HasFastObjectElements(); | 1566 inline bool HasFastObjectElements(); |
| 1567 // Returns true if an object has elements of FAST_ELEMENTS or | 1567 // Returns true if an object has elements of FAST_ELEMENTS or |
| 1568 // FAST_SMI_ONLY_ELEMENTS. | 1568 // FAST_SMI_ONLY_ELEMENTS. |
| 1569 inline bool HasFastSmiOrObjectElements(); | 1569 inline bool HasFastSmiOrObjectElements(); |
| 1570 // Returns true if an object has any of the fast elements kinds. |
| 1571 inline bool HasFastElements(); |
| 1570 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS | 1572 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS |
| 1571 // ElementsKind. | 1573 // ElementsKind. |
| 1572 inline bool HasFastDoubleElements(); | 1574 inline bool HasFastDoubleElements(); |
| 1573 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS | 1575 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS |
| 1574 // ElementsKind. | 1576 // ElementsKind. |
| 1575 inline bool HasFastHoleyElements(); | 1577 inline bool HasFastHoleyElements(); |
| 1576 inline bool HasNonStrictArgumentsElements(); | 1578 inline bool HasNonStrictArgumentsElements(); |
| 1577 inline bool HasDictionaryElements(); | 1579 inline bool HasDictionaryElements(); |
| 1578 inline bool HasExternalPixelElements(); | 1580 inline bool HasExternalPixelElements(); |
| 1579 inline bool HasExternalArrayElements(); | 1581 inline bool HasExternalArrayElements(); |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2365 // TODO(isolates): duplicate. | 2367 // TODO(isolates): duplicate. |
| 2366 inline void set_null(Heap* heap, int index); | 2368 inline void set_null(Heap* heap, int index); |
| 2367 inline void set_the_hole(int index); | 2369 inline void set_the_hole(int index); |
| 2368 | 2370 |
| 2369 // Setters with less debug checks for the GC to use. | 2371 // Setters with less debug checks for the GC to use. |
| 2370 inline void set_unchecked(int index, Smi* value); | 2372 inline void set_unchecked(int index, Smi* value); |
| 2371 inline void set_null_unchecked(Heap* heap, int index); | 2373 inline void set_null_unchecked(Heap* heap, int index); |
| 2372 inline void set_unchecked(Heap* heap, int index, Object* value, | 2374 inline void set_unchecked(Heap* heap, int index, Object* value, |
| 2373 WriteBarrierMode mode); | 2375 WriteBarrierMode mode); |
| 2374 | 2376 |
| 2377 inline Object** GetFirstElementAddress(); |
| 2378 inline bool ContainsOnlySmisOrHoles(); |
| 2379 |
| 2375 // Gives access to raw memory which stores the array's data. | 2380 // Gives access to raw memory which stores the array's data. |
| 2376 inline Object** data_start(); | 2381 inline Object** data_start(); |
| 2377 | 2382 |
| 2378 inline Object** GetFirstElementAddress(); | |
| 2379 inline bool ContainsOnlySmisOrHoles(); | |
| 2380 | |
| 2381 // Copy operations. | 2383 // Copy operations. |
| 2382 MUST_USE_RESULT inline MaybeObject* Copy(); | 2384 MUST_USE_RESULT inline MaybeObject* Copy(); |
| 2383 MUST_USE_RESULT MaybeObject* CopySize(int new_length); | 2385 MUST_USE_RESULT MaybeObject* CopySize(int new_length); |
| 2384 | 2386 |
| 2385 // Add the elements of a JSArray to this FixedArray. | 2387 // Add the elements of a JSArray to this FixedArray. |
| 2386 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); | 2388 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); |
| 2387 | 2389 |
| 2388 // Compute the union of this and other. | 2390 // Compute the union of this and other. |
| 2389 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other); | 2391 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other); |
| 2390 | 2392 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2472 inline bool is_the_hole(int index); | 2474 inline bool is_the_hole(int index); |
| 2473 | 2475 |
| 2474 // Copy operations | 2476 // Copy operations |
| 2475 MUST_USE_RESULT inline MaybeObject* Copy(); | 2477 MUST_USE_RESULT inline MaybeObject* Copy(); |
| 2476 | 2478 |
| 2477 // Garbage collection support. | 2479 // Garbage collection support. |
| 2478 inline static int SizeFor(int length) { | 2480 inline static int SizeFor(int length) { |
| 2479 return kHeaderSize + length * kDoubleSize; | 2481 return kHeaderSize + length * kDoubleSize; |
| 2480 } | 2482 } |
| 2481 | 2483 |
| 2484 // Gives access to raw memory which stores the array's data. |
| 2485 inline double* data_start(); |
| 2486 |
| 2482 // Code Generation support. | 2487 // Code Generation support. |
| 2483 static int OffsetOfElementAt(int index) { return SizeFor(index); } | 2488 static int OffsetOfElementAt(int index) { return SizeFor(index); } |
| 2484 | 2489 |
| 2485 inline static bool is_the_hole_nan(double value); | 2490 inline static bool is_the_hole_nan(double value); |
| 2486 inline static double hole_nan_as_double(); | 2491 inline static double hole_nan_as_double(); |
| 2487 inline static double canonical_not_the_hole_nan_as_double(); | 2492 inline static double canonical_not_the_hole_nan_as_double(); |
| 2488 | 2493 |
| 2489 // Casting. | 2494 // Casting. |
| 2490 static inline FixedDoubleArray* cast(Object* obj); | 2495 static inline FixedDoubleArray* cast(Object* obj); |
| 2491 | 2496 |
| (...skipping 6544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9036 } else { | 9041 } else { |
| 9037 value &= ~(1 << bit_position); | 9042 value &= ~(1 << bit_position); |
| 9038 } | 9043 } |
| 9039 return value; | 9044 return value; |
| 9040 } | 9045 } |
| 9041 }; | 9046 }; |
| 9042 | 9047 |
| 9043 } } // namespace v8::internal | 9048 } } // namespace v8::internal |
| 9044 | 9049 |
| 9045 #endif // V8_OBJECTS_H_ | 9050 #endif // V8_OBJECTS_H_ |
| OLD | NEW |