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 3015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3026 inline void set_undefined(int index); | 3026 inline void set_undefined(int index); |
3027 inline void set_null(int index); | 3027 inline void set_null(int index); |
3028 inline void set_the_hole(int index); | 3028 inline void set_the_hole(int index); |
3029 | 3029 |
3030 inline Object** GetFirstElementAddress(); | 3030 inline Object** GetFirstElementAddress(); |
3031 inline bool ContainsOnlySmisOrHoles(); | 3031 inline bool ContainsOnlySmisOrHoles(); |
3032 | 3032 |
3033 // Gives access to raw memory which stores the array's data. | 3033 // Gives access to raw memory which stores the array's data. |
3034 inline Object** data_start(); | 3034 inline Object** data_start(); |
3035 | 3035 |
| 3036 inline void FillWithHoles(int from, int to); |
| 3037 |
3036 // Shrink length and insert filler objects. | 3038 // Shrink length and insert filler objects. |
3037 void Shrink(int length); | 3039 void Shrink(int length); |
3038 | 3040 |
3039 // Copy operations. | 3041 // Copy operations. |
3040 MUST_USE_RESULT inline MaybeObject* Copy(); | 3042 MUST_USE_RESULT inline MaybeObject* Copy(); |
3041 MUST_USE_RESULT MaybeObject* CopySize(int new_length, | 3043 MUST_USE_RESULT MaybeObject* CopySize(int new_length, |
3042 PretenureFlag pretenure = NOT_TENURED); | 3044 PretenureFlag pretenure = NOT_TENURED); |
3043 | 3045 |
3044 // Add the elements of a JSArray to this FixedArray. | 3046 // Add the elements of a JSArray to this FixedArray. |
3045 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); | 3047 MUST_USE_RESULT MaybeObject* AddKeysFromJSArray(JSArray* array); |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3134 MUST_USE_RESULT inline MaybeObject* Copy(); | 3136 MUST_USE_RESULT inline MaybeObject* Copy(); |
3135 | 3137 |
3136 // Garbage collection support. | 3138 // Garbage collection support. |
3137 inline static int SizeFor(int length) { | 3139 inline static int SizeFor(int length) { |
3138 return kHeaderSize + length * kDoubleSize; | 3140 return kHeaderSize + length * kDoubleSize; |
3139 } | 3141 } |
3140 | 3142 |
3141 // Gives access to raw memory which stores the array's data. | 3143 // Gives access to raw memory which stores the array's data. |
3142 inline double* data_start(); | 3144 inline double* data_start(); |
3143 | 3145 |
| 3146 inline void FillWithHoles(int from, int to); |
| 3147 |
3144 // Code Generation support. | 3148 // Code Generation support. |
3145 static int OffsetOfElementAt(int index) { return SizeFor(index); } | 3149 static int OffsetOfElementAt(int index) { return SizeFor(index); } |
3146 | 3150 |
3147 inline static bool is_the_hole_nan(double value); | 3151 inline static bool is_the_hole_nan(double value); |
3148 inline static double hole_nan_as_double(); | 3152 inline static double hole_nan_as_double(); |
3149 inline static double canonical_not_the_hole_nan_as_double(); | 3153 inline static double canonical_not_the_hole_nan_as_double(); |
3150 | 3154 |
3151 // Casting. | 3155 // Casting. |
3152 static inline FixedDoubleArray* cast(Object* obj); | 3156 static inline FixedDoubleArray* cast(Object* obj); |
3153 | 3157 |
(...skipping 7632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10786 } else { | 10790 } else { |
10787 value &= ~(1 << bit_position); | 10791 value &= ~(1 << bit_position); |
10788 } | 10792 } |
10789 return value; | 10793 return value; |
10790 } | 10794 } |
10791 }; | 10795 }; |
10792 | 10796 |
10793 } } // namespace v8::internal | 10797 } } // namespace v8::internal |
10794 | 10798 |
10795 #endif // V8_OBJECTS_H_ | 10799 #endif // V8_OBJECTS_H_ |
OLD | NEW |