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 4675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4686 public: | 4686 public: |
4687 inline bool is_the_hole(int index) { return false; } | 4687 inline bool is_the_hole(int index) { return false; } |
4688 | 4688 |
4689 // [external_pointer]: The pointer to the external memory area backing this | 4689 // [external_pointer]: The pointer to the external memory area backing this |
4690 // external array. | 4690 // external array. |
4691 DECL_ACCESSORS(external_pointer, void) // Pointer to the data store. | 4691 DECL_ACCESSORS(external_pointer, void) // Pointer to the data store. |
4692 | 4692 |
4693 // Casting. | 4693 // Casting. |
4694 static inline ExternalArray* cast(Object* obj); | 4694 static inline ExternalArray* cast(Object* obj); |
4695 | 4695 |
4696 // Maximal acceptable length for an external array. | |
4697 static const int kMaxLength = 0x3fffffff; | |
4698 | |
4699 // ExternalArray headers are not quadword aligned. | 4696 // ExternalArray headers are not quadword aligned. |
4700 static const int kExternalPointerOffset = | 4697 static const int kExternalPointerOffset = |
4701 POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize); | 4698 POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize); |
4702 static const int kHeaderSize = kExternalPointerOffset + kPointerSize; | 4699 static const int kHeaderSize = kExternalPointerOffset + kPointerSize; |
4703 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); | 4700 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); |
4704 | 4701 |
4705 private: | 4702 private: |
4706 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray); | 4703 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray); |
4707 }; | 4704 }; |
4708 | 4705 |
(...skipping 6110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10819 } else { | 10816 } else { |
10820 value &= ~(1 << bit_position); | 10817 value &= ~(1 << bit_position); |
10821 } | 10818 } |
10822 return value; | 10819 return value; |
10823 } | 10820 } |
10824 }; | 10821 }; |
10825 | 10822 |
10826 } } // namespace v8::internal | 10823 } } // namespace v8::internal |
10827 | 10824 |
10828 #endif // V8_OBJECTS_H_ | 10825 #endif // V8_OBJECTS_H_ |
OLD | NEW |