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 8363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8374 MUST_USE_RESULT MaybeObject* JSArrayUpdateLengthFromIndex(uint32_t index, | 8374 MUST_USE_RESULT MaybeObject* JSArrayUpdateLengthFromIndex(uint32_t index, |
8375 Object* value); | 8375 Object* value); |
8376 | 8376 |
8377 // Initialize the array with the given capacity. The function may | 8377 // Initialize the array with the given capacity. The function may |
8378 // fail due to out-of-memory situations, but only if the requested | 8378 // fail due to out-of-memory situations, but only if the requested |
8379 // capacity is non-zero. | 8379 // capacity is non-zero. |
8380 MUST_USE_RESULT MaybeObject* Initialize(int capacity); | 8380 MUST_USE_RESULT MaybeObject* Initialize(int capacity); |
8381 | 8381 |
8382 // Initializes the array to a certain length. | 8382 // Initializes the array to a certain length. |
8383 inline bool AllowsSetElementsLength(); | 8383 inline bool AllowsSetElementsLength(); |
| 8384 // Can cause GC. |
8384 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length); | 8385 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length); |
8385 | 8386 |
8386 // Set the content of the array to the content of storage. | 8387 // Set the content of the array to the content of storage. |
8387 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage); | 8388 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage); |
8388 | 8389 |
8389 // Casting. | 8390 // Casting. |
8390 static inline JSArray* cast(Object* obj); | 8391 static inline JSArray* cast(Object* obj); |
8391 | 8392 |
8392 // Uses handles. Ensures that the fixed array backing the JSArray has at | 8393 // Uses handles. Ensures that the fixed array backing the JSArray has at |
8393 // least the stated size. | 8394 // least the stated size. |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9036 } else { | 9037 } else { |
9037 value &= ~(1 << bit_position); | 9038 value &= ~(1 << bit_position); |
9038 } | 9039 } |
9039 return value; | 9040 return value; |
9040 } | 9041 } |
9041 }; | 9042 }; |
9042 | 9043 |
9043 } } // namespace v8::internal | 9044 } } // namespace v8::internal |
9044 | 9045 |
9045 #endif // V8_OBJECTS_H_ | 9046 #endif // V8_OBJECTS_H_ |
OLD | NEW |