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 4518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4529 private: | 4529 private: |
4530 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloat64Array); | 4530 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalFloat64Array); |
4531 }; | 4531 }; |
4532 | 4532 |
4533 | 4533 |
4534 class FixedTypedArrayBase: public FixedArrayBase { | 4534 class FixedTypedArrayBase: public FixedArrayBase { |
4535 public: | 4535 public: |
4536 // [base_pointer]: For now, points to the FixedTypedArrayBase itself. | 4536 // [base_pointer]: For now, points to the FixedTypedArrayBase itself. |
4537 DECL_ACCESSORS(base_pointer, Object) | 4537 DECL_ACCESSORS(base_pointer, Object) |
4538 | 4538 |
| 4539 // [external_pointer]: For now, contains the offset between base_pointer and |
| 4540 // the start of the data. |
| 4541 DECL_ACCESSORS(external_pointer, void) |
| 4542 |
4539 // Dispatched behavior. | 4543 // Dispatched behavior. |
4540 inline void FixedTypedArrayBaseIterateBody(ObjectVisitor* v); | 4544 inline void FixedTypedArrayBaseIterateBody(ObjectVisitor* v); |
4541 | 4545 |
4542 template <typename StaticVisitor> | 4546 template <typename StaticVisitor> |
4543 inline void FixedTypedArrayBaseIterateBody(); | 4547 inline void FixedTypedArrayBaseIterateBody(); |
4544 | 4548 |
4545 DECLARE_CAST(FixedTypedArrayBase) | 4549 DECLARE_CAST(FixedTypedArrayBase) |
4546 | 4550 |
4547 static const int kBasePointerOffset = | 4551 static const int kBasePointerOffset = FixedArrayBase::kHeaderSize; |
4548 FixedArrayBase::kHeaderSize + kPointerSize; | 4552 static const int kExternalPointerOffset = kBasePointerOffset + kPointerSize; |
4549 static const int kHeaderSize = kBasePointerOffset + kPointerSize; | 4553 static const int kHeaderSize = |
| 4554 DOUBLE_POINTER_ALIGN(kExternalPointerOffset + kPointerSize); |
4550 | 4555 |
4551 static const int kDataOffset = DOUBLE_POINTER_ALIGN(kHeaderSize); | 4556 static const int kDataOffset = kHeaderSize; |
4552 | 4557 |
4553 inline int size(); | 4558 inline int size(); |
4554 | 4559 |
4555 static inline int TypedArraySize(InstanceType type, int length); | 4560 static inline int TypedArraySize(InstanceType type, int length); |
4556 inline int TypedArraySize(InstanceType type); | 4561 inline int TypedArraySize(InstanceType type); |
4557 | 4562 |
4558 // Use with care: returns raw pointer into heap. | 4563 // Use with care: returns raw pointer into heap. |
4559 inline void* DataPtr(); | 4564 inline void* DataPtr(); |
4560 | 4565 |
4561 inline int DataSize(); | 4566 inline int DataSize(); |
(...skipping 6233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10795 } else { | 10800 } else { |
10796 value &= ~(1 << bit_position); | 10801 value &= ~(1 << bit_position); |
10797 } | 10802 } |
10798 return value; | 10803 return value; |
10799 } | 10804 } |
10800 }; | 10805 }; |
10801 | 10806 |
10802 } } // namespace v8::internal | 10807 } } // namespace v8::internal |
10803 | 10808 |
10804 #endif // V8_OBJECTS_H_ | 10809 #endif // V8_OBJECTS_H_ |
OLD | NEW |