| 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 10240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10251 | 10251 |
| 10252 inline bool is_external(); | 10252 inline bool is_external(); |
| 10253 inline void set_is_external(bool value); | 10253 inline void set_is_external(bool value); |
| 10254 | 10254 |
| 10255 inline bool is_neuterable(); | 10255 inline bool is_neuterable(); |
| 10256 inline void set_is_neuterable(bool value); | 10256 inline void set_is_neuterable(bool value); |
| 10257 | 10257 |
| 10258 inline bool was_neutered(); | 10258 inline bool was_neutered(); |
| 10259 inline void set_was_neutered(bool value); | 10259 inline void set_was_neutered(bool value); |
| 10260 | 10260 |
| 10261 // [weak_next]: linked list of array buffers. |
| 10262 DECL_ACCESSORS(weak_next, Object) |
| 10263 |
| 10261 DECLARE_CAST(JSArrayBuffer) | 10264 DECLARE_CAST(JSArrayBuffer) |
| 10262 | 10265 |
| 10263 void Neuter(); | 10266 void Neuter(); |
| 10264 | 10267 |
| 10265 // Dispatched behavior. | 10268 // Dispatched behavior. |
| 10266 DECLARE_PRINTER(JSArrayBuffer) | 10269 DECLARE_PRINTER(JSArrayBuffer) |
| 10267 DECLARE_VERIFIER(JSArrayBuffer) | 10270 DECLARE_VERIFIER(JSArrayBuffer) |
| 10268 | 10271 |
| 10269 static const int kBackingStoreOffset = JSObject::kHeaderSize; | 10272 static const int kBackingStoreOffset = JSObject::kHeaderSize; |
| 10270 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; | 10273 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; |
| 10271 static const int kBitFieldSlot = kByteLengthOffset + kPointerSize; | 10274 static const int kBitFieldSlot = kByteLengthOffset + kPointerSize; |
| 10272 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT | 10275 #if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT |
| 10273 static const int kBitFieldOffset = kBitFieldSlot; | 10276 static const int kBitFieldOffset = kBitFieldSlot; |
| 10274 #else | 10277 #else |
| 10275 static const int kBitFieldOffset = kBitFieldSlot + kIntSize; | 10278 static const int kBitFieldOffset = kBitFieldSlot + kIntSize; |
| 10276 #endif | 10279 #endif |
| 10277 static const int kSize = kBitFieldSlot + kPointerSize; | 10280 static const int kWeakNextOffset = kBitFieldSlot + kPointerSize; |
| 10281 static const int kSize = kWeakNextOffset + kPointerSize; |
| 10278 | 10282 |
| 10279 static const int kSizeWithInternalFields = | 10283 static const int kSizeWithInternalFields = |
| 10280 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; | 10284 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; |
| 10281 | 10285 |
| 10282 class IsExternal : public BitField<bool, 1, 1> {}; | 10286 class IsExternal : public BitField<bool, 1, 1> {}; |
| 10283 class IsNeuterable : public BitField<bool, 2, 1> {}; | 10287 class IsNeuterable : public BitField<bool, 2, 1> {}; |
| 10284 class WasNeutered : public BitField<bool, 3, 1> {}; | 10288 class WasNeutered : public BitField<bool, 3, 1> {}; |
| 10285 | 10289 |
| 10286 private: | 10290 private: |
| 10287 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); | 10291 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11103 } else { | 11107 } else { |
| 11104 value &= ~(1 << bit_position); | 11108 value &= ~(1 << bit_position); |
| 11105 } | 11109 } |
| 11106 return value; | 11110 return value; |
| 11107 } | 11111 } |
| 11108 }; | 11112 }; |
| 11109 | 11113 |
| 11110 } } // namespace v8::internal | 11114 } } // namespace v8::internal |
| 11111 | 11115 |
| 11112 #endif // V8_OBJECTS_H_ | 11116 #endif // V8_OBJECTS_H_ |
| OLD | NEW |