| 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 10007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10018 | 10018 |
| 10019 inline bool is_external(); | 10019 inline bool is_external(); |
| 10020 inline void set_is_external(bool value); | 10020 inline void set_is_external(bool value); |
| 10021 | 10021 |
| 10022 inline bool should_be_freed(); | 10022 inline bool should_be_freed(); |
| 10023 inline void set_should_be_freed(bool value); | 10023 inline void set_should_be_freed(bool value); |
| 10024 | 10024 |
| 10025 inline bool is_neuterable(); | 10025 inline bool is_neuterable(); |
| 10026 inline void set_is_neuterable(bool value); | 10026 inline void set_is_neuterable(bool value); |
| 10027 | 10027 |
| 10028 inline bool is_guarded(); |
| 10029 inline void set_is_guarded(bool value); |
| 10030 |
| 10028 // [weak_next]: linked list of array buffers. | 10031 // [weak_next]: linked list of array buffers. |
| 10029 DECL_ACCESSORS(weak_next, Object) | 10032 DECL_ACCESSORS(weak_next, Object) |
| 10030 | 10033 |
| 10031 // [weak_first_array]: weak linked list of views. | 10034 // [weak_first_array]: weak linked list of views. |
| 10032 DECL_ACCESSORS(weak_first_view, Object) | 10035 DECL_ACCESSORS(weak_first_view, Object) |
| 10033 | 10036 |
| 10034 DECLARE_CAST(JSArrayBuffer) | 10037 DECLARE_CAST(JSArrayBuffer) |
| 10035 | 10038 |
| 10036 // Neutering. Only neuters the buffer, not associated typed arrays. | 10039 // Neutering. Only neuters the buffer, not associated typed arrays. |
| 10037 void Neuter(); | 10040 void Neuter(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 10048 static const int kSize = kWeakFirstViewOffset + kPointerSize; | 10051 static const int kSize = kWeakFirstViewOffset + kPointerSize; |
| 10049 | 10052 |
| 10050 static const int kSizeWithInternalFields = | 10053 static const int kSizeWithInternalFields = |
| 10051 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; | 10054 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; |
| 10052 | 10055 |
| 10053 private: | 10056 private: |
| 10054 // Bit position in a flag | 10057 // Bit position in a flag |
| 10055 static const int kIsExternalBit = 0; | 10058 static const int kIsExternalBit = 0; |
| 10056 static const int kShouldBeFreed = 1; | 10059 static const int kShouldBeFreed = 1; |
| 10057 static const int kIsNeuterableBit = 2; | 10060 static const int kIsNeuterableBit = 2; |
| 10061 static const int kIsGuardedBit = 3; |
| 10058 | 10062 |
| 10059 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); | 10063 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); |
| 10060 }; | 10064 }; |
| 10061 | 10065 |
| 10062 | 10066 |
| 10063 class JSArrayBufferView: public JSObject { | 10067 class JSArrayBufferView: public JSObject { |
| 10064 public: | 10068 public: |
| 10065 // [buffer]: ArrayBuffer that this typed array views. | 10069 // [buffer]: ArrayBuffer that this typed array views. |
| 10066 DECL_ACCESSORS(buffer, Object) | 10070 DECL_ACCESSORS(buffer, Object) |
| 10067 | 10071 |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10977 } else { | 10981 } else { |
| 10978 value &= ~(1 << bit_position); | 10982 value &= ~(1 << bit_position); |
| 10979 } | 10983 } |
| 10980 return value; | 10984 return value; |
| 10981 } | 10985 } |
| 10982 }; | 10986 }; |
| 10983 | 10987 |
| 10984 } } // namespace v8::internal | 10988 } } // namespace v8::internal |
| 10985 | 10989 |
| 10986 #endif // V8_OBJECTS_H_ | 10990 #endif // V8_OBJECTS_H_ |
| OLD | NEW |