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 10005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10016 // Initialize the array with the given capacity. The function may | 10016 // Initialize the array with the given capacity. The function may |
10017 // fail due to out-of-memory situations, but only if the requested | 10017 // fail due to out-of-memory situations, but only if the requested |
10018 // capacity is non-zero. | 10018 // capacity is non-zero. |
10019 static void Initialize(Handle<JSArray> array, int capacity, int length = 0); | 10019 static void Initialize(Handle<JSArray> array, int capacity, int length = 0); |
10020 | 10020 |
10021 // Initializes the array to a certain length. | 10021 // Initializes the array to a certain length. |
10022 inline bool AllowsSetElementsLength(); | 10022 inline bool AllowsSetElementsLength(); |
10023 // Can cause GC. | 10023 // Can cause GC. |
10024 static Handle<Object> SetElementsLength(Handle<JSArray> array, | 10024 static Handle<Object> SetElementsLength(Handle<JSArray> array, |
10025 Handle<Object> length); | 10025 Handle<Object> length); |
10026 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length); | |
10027 | 10026 |
10028 // Set the content of the array to the content of storage. | 10027 // Set the content of the array to the content of storage. |
10029 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage); | 10028 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage); |
10030 | 10029 |
10031 // Casting. | 10030 // Casting. |
10032 static inline JSArray* cast(Object* obj); | 10031 static inline JSArray* cast(Object* obj); |
10033 | 10032 |
10034 // Uses handles. Ensures that the fixed array backing the JSArray has at | 10033 // Uses handles. Ensures that the fixed array backing the JSArray has at |
10035 // least the stated size. | 10034 // least the stated size. |
10036 inline void EnsureSize(int minimum_size_of_backing_fixed_array); | 10035 inline void EnsureSize(int minimum_size_of_backing_fixed_array); |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10789 } else { | 10788 } else { |
10790 value &= ~(1 << bit_position); | 10789 value &= ~(1 << bit_position); |
10791 } | 10790 } |
10792 return value; | 10791 return value; |
10793 } | 10792 } |
10794 }; | 10793 }; |
10795 | 10794 |
10796 } } // namespace v8::internal | 10795 } } // namespace v8::internal |
10797 | 10796 |
10798 #endif // V8_OBJECTS_H_ | 10797 #endif // V8_OBJECTS_H_ |
OLD | NEW |