| 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 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 MUST_USE_RESULT inline MaybeObject* ResetElements(); | 1567 MUST_USE_RESULT inline MaybeObject* ResetElements(); |
| 1568 inline ElementsKind GetElementsKind(); | 1568 inline ElementsKind GetElementsKind(); |
| 1569 inline ElementsAccessor* GetElementsAccessor(); | 1569 inline ElementsAccessor* GetElementsAccessor(); |
| 1570 // Returns true if an object has elements of FAST_SMI_ELEMENTS ElementsKind. | 1570 // Returns true if an object has elements of FAST_SMI_ELEMENTS ElementsKind. |
| 1571 inline bool HasFastSmiElements(); | 1571 inline bool HasFastSmiElements(); |
| 1572 // Returns true if an object has elements of FAST_ELEMENTS ElementsKind. | 1572 // Returns true if an object has elements of FAST_ELEMENTS ElementsKind. |
| 1573 inline bool HasFastObjectElements(); | 1573 inline bool HasFastObjectElements(); |
| 1574 // Returns true if an object has elements of FAST_ELEMENTS or | 1574 // Returns true if an object has elements of FAST_ELEMENTS or |
| 1575 // FAST_SMI_ONLY_ELEMENTS. | 1575 // FAST_SMI_ONLY_ELEMENTS. |
| 1576 inline bool HasFastSmiOrObjectElements(); | 1576 inline bool HasFastSmiOrObjectElements(); |
| 1577 // Returns true if an object has any of the fast elements kinds. |
| 1578 inline bool HasFastElements(); |
| 1577 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS | 1579 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS |
| 1578 // ElementsKind. | 1580 // ElementsKind. |
| 1579 inline bool HasFastDoubleElements(); | 1581 inline bool HasFastDoubleElements(); |
| 1580 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS | 1582 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS |
| 1581 // ElementsKind. | 1583 // ElementsKind. |
| 1582 inline bool HasFastHoleyElements(); | 1584 inline bool HasFastHoleyElements(); |
| 1583 inline bool HasNonStrictArgumentsElements(); | 1585 inline bool HasNonStrictArgumentsElements(); |
| 1584 inline bool HasDictionaryElements(); | 1586 inline bool HasDictionaryElements(); |
| 1585 inline bool HasExternalPixelElements(); | 1587 inline bool HasExternalPixelElements(); |
| 1586 inline bool HasExternalArrayElements(); | 1588 inline bool HasExternalArrayElements(); |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2377 // TODO(isolates): duplicate. | 2379 // TODO(isolates): duplicate. |
| 2378 inline void set_null(Heap* heap, int index); | 2380 inline void set_null(Heap* heap, int index); |
| 2379 inline void set_the_hole(int index); | 2381 inline void set_the_hole(int index); |
| 2380 | 2382 |
| 2381 // Setters with less debug checks for the GC to use. | 2383 // Setters with less debug checks for the GC to use. |
| 2382 inline void set_unchecked(int index, Smi* value); | 2384 inline void set_unchecked(int index, Smi* value); |
| 2383 inline void set_null_unchecked(Heap* heap, int index); | 2385 inline void set_null_unchecked(Heap* heap, int index); |
| 2384 inline void set_unchecked(Heap* heap, int index, Object* value, | 2386 inline void set_unchecked(Heap* heap, int index, Object* value, |
| 2385 WriteBarrierMode mode); | 2387 WriteBarrierMode mode); |
| 2386 | 2388 |
| 2389 inline Object** GetFirstElementAddress(); |
| 2390 inline bool ContainsOnlySmisOrHoles(); |
| 2391 |
| 2387 // Gives access to raw memory which stores the array's data. | 2392 // Gives access to raw memory which stores the array's data. |
| 2388 inline Object** data_start(); | 2393 inline Object** data_start(); |
| 2389 | 2394 |
| 2390 inline Object** GetFirstElementAddress(); | |
| 2391 inline bool ContainsOnlySmisOrHoles(); | |
| 2392 | |
| 2393 // Copy operations. | 2395 // Copy operations. |
| 2394 MUST_USE_RESULT inline MaybeObject* Copy(); | 2396 MUST_USE_RESULT inline MaybeObject* Copy(); |
| 2395 MUST_USE_RESULT MaybeObject* CopySize(int new_length); | 2397 MUST_USE_RESULT MaybeObject* CopySize(int new_length); |
| 2396 | 2398 |
| 2397 // Add the elements of a JSArray to this FixedArray. | 2399 // Add the elements of a JSArray to this FixedArray. |
| 2398 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); | 2400 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); |
| 2399 | 2401 |
| 2400 // Compute the union of this and other. | 2402 // Compute the union of this and other. |
| 2401 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other); | 2403 MUST_USE_RESULT MaybeObject* UnionOfKeys(FixedArray* other); |
| 2402 | 2404 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2484 inline bool is_the_hole(int index); | 2486 inline bool is_the_hole(int index); |
| 2485 | 2487 |
| 2486 // Copy operations | 2488 // Copy operations |
| 2487 MUST_USE_RESULT inline MaybeObject* Copy(); | 2489 MUST_USE_RESULT inline MaybeObject* Copy(); |
| 2488 | 2490 |
| 2489 // Garbage collection support. | 2491 // Garbage collection support. |
| 2490 inline static int SizeFor(int length) { | 2492 inline static int SizeFor(int length) { |
| 2491 return kHeaderSize + length * kDoubleSize; | 2493 return kHeaderSize + length * kDoubleSize; |
| 2492 } | 2494 } |
| 2493 | 2495 |
| 2496 // Gives access to raw memory which stores the array's data. |
| 2497 inline double* data_start(); |
| 2498 |
| 2494 // Code Generation support. | 2499 // Code Generation support. |
| 2495 static int OffsetOfElementAt(int index) { return SizeFor(index); } | 2500 static int OffsetOfElementAt(int index) { return SizeFor(index); } |
| 2496 | 2501 |
| 2497 inline static bool is_the_hole_nan(double value); | 2502 inline static bool is_the_hole_nan(double value); |
| 2498 inline static double hole_nan_as_double(); | 2503 inline static double hole_nan_as_double(); |
| 2499 inline static double canonical_not_the_hole_nan_as_double(); | 2504 inline static double canonical_not_the_hole_nan_as_double(); |
| 2500 | 2505 |
| 2501 // Casting. | 2506 // Casting. |
| 2502 static inline FixedDoubleArray* cast(Object* obj); | 2507 static inline FixedDoubleArray* cast(Object* obj); |
| 2503 | 2508 |
| (...skipping 6509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9013 } else { | 9018 } else { |
| 9014 value &= ~(1 << bit_position); | 9019 value &= ~(1 << bit_position); |
| 9015 } | 9020 } |
| 9016 return value; | 9021 return value; |
| 9017 } | 9022 } |
| 9018 }; | 9023 }; |
| 9019 | 9024 |
| 9020 } } // namespace v8::internal | 9025 } } // namespace v8::internal |
| 9021 | 9026 |
| 9022 #endif // V8_OBJECTS_H_ | 9027 #endif // V8_OBJECTS_H_ |
| OLD | NEW |