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 8750 matching lines...) Loading... |
8761 | 8761 |
8762 | 8762 |
8763 class JSArrayBuffer: public JSObject { | 8763 class JSArrayBuffer: public JSObject { |
8764 public: | 8764 public: |
8765 // [backing_store]: backing memory for this array | 8765 // [backing_store]: backing memory for this array |
8766 DECL_ACCESSORS(backing_store, void) | 8766 DECL_ACCESSORS(backing_store, void) |
8767 | 8767 |
8768 // [byte_length]: length in bytes | 8768 // [byte_length]: length in bytes |
8769 DECL_ACCESSORS(byte_length, Object) | 8769 DECL_ACCESSORS(byte_length, Object) |
8770 | 8770 |
| 8771 // [flags] |
| 8772 DECL_ACCESSORS(flag, Smi) |
| 8773 |
| 8774 inline bool is_external(); |
| 8775 inline void set_is_external(bool value); |
| 8776 |
8771 // Casting. | 8777 // Casting. |
8772 static inline JSArrayBuffer* cast(Object* obj); | 8778 static inline JSArrayBuffer* cast(Object* obj); |
8773 | 8779 |
8774 // Dispatched behavior. | 8780 // Dispatched behavior. |
8775 DECLARE_PRINTER(JSArrayBuffer) | 8781 DECLARE_PRINTER(JSArrayBuffer) |
8776 DECLARE_VERIFIER(JSArrayBuffer) | 8782 DECLARE_VERIFIER(JSArrayBuffer) |
8777 | 8783 |
8778 static const int kBackingStoreOffset = JSObject::kHeaderSize; | 8784 static const int kBackingStoreOffset = JSObject::kHeaderSize; |
8779 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; | 8785 static const int kByteLengthOffset = kBackingStoreOffset + kPointerSize; |
8780 static const int kSize = kByteLengthOffset + kPointerSize; | 8786 static const int kFlagOffset = kByteLengthOffset + kPointerSize; |
| 8787 static const int kSize = kFlagOffset + kPointerSize; |
8781 | 8788 |
8782 private: | 8789 private: |
| 8790 // Bit position in a flag |
| 8791 static const int kIsExternalBit = 0; |
| 8792 |
8783 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); | 8793 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArrayBuffer); |
8784 }; | 8794 }; |
8785 | 8795 |
8786 | 8796 |
8787 class JSTypedArray: public JSObject { | 8797 class JSTypedArray: public JSObject { |
8788 public: | 8798 public: |
8789 // [buffer]: ArrayBuffer that this typed array views. | 8799 // [buffer]: ArrayBuffer that this typed array views. |
8790 DECL_ACCESSORS(buffer, Object) | 8800 DECL_ACCESSORS(buffer, Object) |
8791 | 8801 |
8792 // [byte_length]: offset of typed array in bytes. | 8802 // [byte_length]: offset of typed array in bytes. |
(...skipping 827 matching lines...) Loading... |
9620 } else { | 9630 } else { |
9621 value &= ~(1 << bit_position); | 9631 value &= ~(1 << bit_position); |
9622 } | 9632 } |
9623 return value; | 9633 return value; |
9624 } | 9634 } |
9625 }; | 9635 }; |
9626 | 9636 |
9627 } } // namespace v8::internal | 9637 } } // namespace v8::internal |
9628 | 9638 |
9629 #endif // V8_OBJECTS_H_ | 9639 #endif // V8_OBJECTS_H_ |
OLD | NEW |