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 2406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2417 inline void ValidateElements(); | 2417 inline void ValidateElements(); |
2418 | 2418 |
2419 // Makes sure that this object can contain HeapObject as elements. | 2419 // Makes sure that this object can contain HeapObject as elements. |
2420 static inline void EnsureCanContainHeapObjectElements(Handle<JSObject> obj); | 2420 static inline void EnsureCanContainHeapObjectElements(Handle<JSObject> obj); |
2421 | 2421 |
2422 // Makes sure that this object can contain the specified elements. | 2422 // Makes sure that this object can contain the specified elements. |
2423 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 2423 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
2424 Object** elements, | 2424 Object** elements, |
2425 uint32_t count, | 2425 uint32_t count, |
2426 EnsureElementsMode mode); | 2426 EnsureElementsMode mode); |
| 2427 static inline void EnsureCanContainElements( |
| 2428 Handle<JSObject> object, |
| 2429 Handle<FixedArrayBase> elements, |
| 2430 uint32_t length, |
| 2431 EnsureElementsMode mode); |
2427 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( | 2432 MUST_USE_RESULT inline MaybeObject* EnsureCanContainElements( |
2428 FixedArrayBase* elements, | 2433 FixedArrayBase* elements, |
2429 uint32_t length, | 2434 uint32_t length, |
2430 EnsureElementsMode mode); | 2435 EnsureElementsMode mode); |
2431 static void EnsureCanContainElements( | 2436 static void EnsureCanContainElements( |
2432 Handle<JSObject> object, | 2437 Handle<JSObject> object, |
2433 Arguments* arguments, | 2438 Arguments* arguments, |
2434 uint32_t first_arg, | 2439 uint32_t first_arg, |
2435 uint32_t arg_count, | 2440 uint32_t arg_count, |
2436 EnsureElementsMode mode); | 2441 EnsureElementsMode mode); |
(...skipping 7588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10025 // capacity is non-zero. | 10030 // capacity is non-zero. |
10026 static void Initialize(Handle<JSArray> array, int capacity, int length = 0); | 10031 static void Initialize(Handle<JSArray> array, int capacity, int length = 0); |
10027 | 10032 |
10028 // Initializes the array to a certain length. | 10033 // Initializes the array to a certain length. |
10029 inline bool AllowsSetElementsLength(); | 10034 inline bool AllowsSetElementsLength(); |
10030 // Can cause GC. | 10035 // Can cause GC. |
10031 static Handle<Object> SetElementsLength(Handle<JSArray> array, | 10036 static Handle<Object> SetElementsLength(Handle<JSArray> array, |
10032 Handle<Object> length); | 10037 Handle<Object> length); |
10033 | 10038 |
10034 // Set the content of the array to the content of storage. | 10039 // Set the content of the array to the content of storage. |
10035 MUST_USE_RESULT inline MaybeObject* SetContent(FixedArrayBase* storage); | 10040 static inline void SetContent(Handle<JSArray> array, |
| 10041 Handle<FixedArrayBase> storage); |
10036 | 10042 |
10037 // Casting. | 10043 // Casting. |
10038 static inline JSArray* cast(Object* obj); | 10044 static inline JSArray* cast(Object* obj); |
10039 | 10045 |
10040 // Uses handles. Ensures that the fixed array backing the JSArray has at | 10046 // Uses handles. Ensures that the fixed array backing the JSArray has at |
10041 // least the stated size. | 10047 // least the stated size. |
10042 inline void EnsureSize(int minimum_size_of_backing_fixed_array); | 10048 inline void EnsureSize(int minimum_size_of_backing_fixed_array); |
10043 | 10049 |
10044 // Dispatched behavior. | 10050 // Dispatched behavior. |
10045 DECLARE_PRINTER(JSArray) | 10051 DECLARE_PRINTER(JSArray) |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10795 } else { | 10801 } else { |
10796 value &= ~(1 << bit_position); | 10802 value &= ~(1 << bit_position); |
10797 } | 10803 } |
10798 return value; | 10804 return value; |
10799 } | 10805 } |
10800 }; | 10806 }; |
10801 | 10807 |
10802 } } // namespace v8::internal | 10808 } } // namespace v8::internal |
10803 | 10809 |
10804 #endif // V8_OBJECTS_H_ | 10810 #endif // V8_OBJECTS_H_ |
OLD | NEW |