OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 2503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 void SwapPairs(FixedArray* numbers, int i, int j); | 2514 void SwapPairs(FixedArray* numbers, int i, int j); |
2515 | 2515 |
2516 // Sort prefix of this array and the numbers array as pairs wrt. the | 2516 // Sort prefix of this array and the numbers array as pairs wrt. the |
2517 // numbers. If the numbers array and the this array are the same | 2517 // numbers. If the numbers array and the this array are the same |
2518 // object, the prefix of this array is sorted. | 2518 // object, the prefix of this array is sorted. |
2519 void SortPairs(FixedArray* numbers, uint32_t len); | 2519 void SortPairs(FixedArray* numbers, uint32_t len); |
2520 | 2520 |
2521 class BodyDescriptor : public FlexibleBodyDescriptor<kHeaderSize> { | 2521 class BodyDescriptor : public FlexibleBodyDescriptor<kHeaderSize> { |
2522 public: | 2522 public: |
2523 static inline int SizeOf(Map* map, HeapObject* object) { | 2523 static inline int SizeOf(Map* map, HeapObject* object) { |
2524 return SizeFor(reinterpret_cast<FixedArray*>(object)->length()); | 2524 return SizeFor( |
| 2525 reinterpret_cast<FixedArray*>(object)->synchronized_length()); |
2525 } | 2526 } |
2526 }; | 2527 }; |
2527 | 2528 |
2528 protected: | 2529 protected: |
2529 // Set operation on FixedArray without using write barriers. Can | 2530 // Set operation on FixedArray without using write barriers. Can |
2530 // only be used for storing old space objects or smis. | 2531 // only be used for storing old space objects or smis. |
2531 static inline void NoWriteBarrierSet(FixedArray* array, | 2532 static inline void NoWriteBarrierSet(FixedArray* array, |
2532 int index, | 2533 int index, |
2533 Object* value); | 2534 Object* value); |
2534 | 2535 |
(...skipping 8537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11072 } else { | 11073 } else { |
11073 value &= ~(1 << bit_position); | 11074 value &= ~(1 << bit_position); |
11074 } | 11075 } |
11075 return value; | 11076 return value; |
11076 } | 11077 } |
11077 }; | 11078 }; |
11078 | 11079 |
11079 } } // namespace v8::internal | 11080 } } // namespace v8::internal |
11080 | 11081 |
11081 #endif // V8_OBJECTS_H_ | 11082 #endif // V8_OBJECTS_H_ |
OLD | NEW |