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 10036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10047 | 10047 |
10048 // [flags] | 10048 // [flags] |
10049 DECL_ACCESSORS(flag, Smi) | 10049 DECL_ACCESSORS(flag, Smi) |
10050 | 10050 |
10051 inline bool is_external(); | 10051 inline bool is_external(); |
10052 inline void set_is_external(bool value); | 10052 inline void set_is_external(bool value); |
10053 | 10053 |
10054 inline bool should_be_freed(); | 10054 inline bool should_be_freed(); |
10055 inline void set_should_be_freed(bool value); | 10055 inline void set_should_be_freed(bool value); |
10056 | 10056 |
| 10057 inline bool is_shared(); |
| 10058 inline void set_is_shared(bool value); |
| 10059 |
10057 // [weak_next]: linked list of array buffers. | 10060 // [weak_next]: linked list of array buffers. |
10058 DECL_ACCESSORS(weak_next, Object) | 10061 DECL_ACCESSORS(weak_next, Object) |
10059 | 10062 |
10060 // [weak_first_array]: weak linked list of views. | 10063 // [weak_first_array]: weak linked list of views. |
10061 DECL_ACCESSORS(weak_first_view, Object) | 10064 DECL_ACCESSORS(weak_first_view, Object) |
10062 | 10065 |
10063 // Casting. | 10066 // Casting. |
10064 static inline JSArrayBuffer* cast(Object* obj); | 10067 static inline JSArrayBuffer* cast(Object* obj); |
10065 | 10068 |
10066 // Neutering. Only neuters the buffer, not associated typed arrays. | 10069 // Neutering. Only neuters the buffer, not associated typed arrays. |
(...skipping 10 matching lines...) Expand all Loading... |
10077 static const int kWeakFirstViewOffset = kWeakNextOffset + kPointerSize; | 10080 static const int kWeakFirstViewOffset = kWeakNextOffset + kPointerSize; |
10078 static const int kSize = kWeakFirstViewOffset + kPointerSize; | 10081 static const int kSize = kWeakFirstViewOffset + kPointerSize; |
10079 | 10082 |
10080 static const int kSizeWithInternalFields = | 10083 static const int kSizeWithInternalFields = |
10081 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; | 10084 kSize + v8::ArrayBuffer::kInternalFieldCount * kPointerSize; |
10082 | 10085 |
10083 private: | 10086 private: |
10084 // Bit position in a flag | 10087 // Bit position in a flag |
10085 static const int kIsExternalBit = 0; | 10088 static const int kIsExternalBit = 0; |
10086 static const int kShouldBeFreed = 1; | 10089 static const int kShouldBeFreed = 1; |
| 10090 static const int kShared = 2; |
10087 | 10091 |
10088 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); | 10092 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); |
10089 }; | 10093 }; |
10090 | 10094 |
10091 | 10095 |
10092 class JSArrayBufferView: public JSObject { | 10096 class JSArrayBufferView: public JSObject { |
10093 public: | 10097 public: |
10094 // [buffer]: ArrayBuffer that this typed array views. | 10098 // [buffer]: ArrayBuffer that this typed array views. |
10095 DECL_ACCESSORS(buffer, Object) | 10099 DECL_ACCESSORS(buffer, Object) |
10096 | 10100 |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11015 } else { | 11019 } else { |
11016 value &= ~(1 << bit_position); | 11020 value &= ~(1 << bit_position); |
11017 } | 11021 } |
11018 return value; | 11022 return value; |
11019 } | 11023 } |
11020 }; | 11024 }; |
11021 | 11025 |
11022 } } // namespace v8::internal | 11026 } } // namespace v8::internal |
11023 | 11027 |
11024 #endif // V8_OBJECTS_H_ | 11028 #endif // V8_OBJECTS_H_ |
OLD | NEW |