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 4682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4693 public: | 4693 public: |
4694 inline bool is_the_hole(int index) { return false; } | 4694 inline bool is_the_hole(int index) { return false; } |
4695 | 4695 |
4696 // [external_pointer]: The pointer to the external memory area backing this | 4696 // [external_pointer]: The pointer to the external memory area backing this |
4697 // external array. | 4697 // external array. |
4698 DECL_ACCESSORS(external_pointer, void) // Pointer to the data store. | 4698 DECL_ACCESSORS(external_pointer, void) // Pointer to the data store. |
4699 | 4699 |
4700 // Casting. | 4700 // Casting. |
4701 static inline ExternalArray* cast(Object* obj); | 4701 static inline ExternalArray* cast(Object* obj); |
4702 | 4702 |
| 4703 // Maximal acceptable length for an external array. |
| 4704 static const int kMaxLength = 0x3fffffff; |
| 4705 |
4703 // ExternalArray headers are not quadword aligned. | 4706 // ExternalArray headers are not quadword aligned. |
4704 static const int kExternalPointerOffset = | 4707 static const int kExternalPointerOffset = |
4705 POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize); | 4708 POINTER_SIZE_ALIGN(FixedArrayBase::kLengthOffset + kPointerSize); |
4706 static const int kHeaderSize = kExternalPointerOffset + kPointerSize; | 4709 static const int kHeaderSize = kExternalPointerOffset + kPointerSize; |
4707 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); | 4710 static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize); |
4708 | 4711 |
4709 private: | 4712 private: |
4710 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray); | 4713 DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalArray); |
4711 }; | 4714 }; |
4712 | 4715 |
(...skipping 6112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10825 } else { | 10828 } else { |
10826 value &= ~(1 << bit_position); | 10829 value &= ~(1 << bit_position); |
10827 } | 10830 } |
10828 return value; | 10831 return value; |
10829 } | 10832 } |
10830 }; | 10833 }; |
10831 | 10834 |
10832 } } // namespace v8::internal | 10835 } } // namespace v8::internal |
10833 | 10836 |
10834 #endif // V8_OBJECTS_H_ | 10837 #endif // V8_OBJECTS_H_ |
OLD | NEW |