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