| 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 8903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8914 ExternalArrayType type(); | 8914 ExternalArrayType type(); |
| 8915 size_t element_size(); | 8915 size_t element_size(); |
| 8916 | 8916 |
| 8917 // Dispatched behavior. | 8917 // Dispatched behavior. |
| 8918 DECLARE_PRINTER(JSTypedArray) | 8918 DECLARE_PRINTER(JSTypedArray) |
| 8919 DECLARE_VERIFIER(JSTypedArray) | 8919 DECLARE_VERIFIER(JSTypedArray) |
| 8920 | 8920 |
| 8921 static const int kLengthOffset = kViewSize + kPointerSize; | 8921 static const int kLengthOffset = kViewSize + kPointerSize; |
| 8922 static const int kSize = kLengthOffset + kPointerSize; | 8922 static const int kSize = kLengthOffset + kPointerSize; |
| 8923 | 8923 |
| 8924 static const int kSizeWithInternalFields = |
| 8925 kSize + v8::ArrayBufferView::kInternalFieldCount * kPointerSize; |
| 8926 |
| 8924 private: | 8927 private: |
| 8925 DISALLOW_IMPLICIT_CONSTRUCTORS(JSTypedArray); | 8928 DISALLOW_IMPLICIT_CONSTRUCTORS(JSTypedArray); |
| 8926 }; | 8929 }; |
| 8927 | 8930 |
| 8928 | 8931 |
| 8929 class JSDataView: public JSArrayBufferView { | 8932 class JSDataView: public JSArrayBufferView { |
| 8930 public: | 8933 public: |
| 8931 // Only neuters this DataView | 8934 // Only neuters this DataView |
| 8932 void Neuter(); | 8935 void Neuter(); |
| 8933 | 8936 |
| 8934 // Casting. | 8937 // Casting. |
| 8935 static inline JSDataView* cast(Object* obj); | 8938 static inline JSDataView* cast(Object* obj); |
| 8936 | 8939 |
| 8937 // Dispatched behavior. | 8940 // Dispatched behavior. |
| 8938 DECLARE_PRINTER(JSDataView) | 8941 DECLARE_PRINTER(JSDataView) |
| 8939 DECLARE_VERIFIER(JSDataView) | 8942 DECLARE_VERIFIER(JSDataView) |
| 8940 | 8943 |
| 8941 static const int kSize = kViewSize; | 8944 static const int kSize = kViewSize; |
| 8942 | 8945 |
| 8946 static const int kSizeWithInternalFields = |
| 8947 kSize + v8::ArrayBufferView::kInternalFieldCount * kPointerSize; |
| 8948 |
| 8943 private: | 8949 private: |
| 8944 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataView); | 8950 DISALLOW_IMPLICIT_CONSTRUCTORS(JSDataView); |
| 8945 }; | 8951 }; |
| 8946 | 8952 |
| 8947 | 8953 |
| 8948 // Foreign describes objects pointing from JavaScript to C structures. | 8954 // Foreign describes objects pointing from JavaScript to C structures. |
| 8949 // Since they cannot contain references to JS HeapObjects they can be | 8955 // Since they cannot contain references to JS HeapObjects they can be |
| 8950 // placed in old_data_space. | 8956 // placed in old_data_space. |
| 8951 class Foreign: public HeapObject { | 8957 class Foreign: public HeapObject { |
| 8952 public: | 8958 public: |
| (...skipping 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9746 } else { | 9752 } else { |
| 9747 value &= ~(1 << bit_position); | 9753 value &= ~(1 << bit_position); |
| 9748 } | 9754 } |
| 9749 return value; | 9755 return value; |
| 9750 } | 9756 } |
| 9751 }; | 9757 }; |
| 9752 | 9758 |
| 9753 } } // namespace v8::internal | 9759 } } // namespace v8::internal |
| 9754 | 9760 |
| 9755 #endif // V8_OBJECTS_H_ | 9761 #endif // V8_OBJECTS_H_ |
| OLD | NEW |