| 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 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1121 */ | 1121 */ |
| 1122 bool IsTypedArray() const; | 1122 bool IsTypedArray() const; |
| 1123 | 1123 |
| 1124 /** | 1124 /** |
| 1125 * Returns true if this value is an Uint8Array. | 1125 * Returns true if this value is an Uint8Array. |
| 1126 * This is an experimental feature. | 1126 * This is an experimental feature. |
| 1127 */ | 1127 */ |
| 1128 bool IsUint8Array() const; | 1128 bool IsUint8Array() const; |
| 1129 | 1129 |
| 1130 /** | 1130 /** |
| 1131 * Returns true if this value is an Uint8ClampedArray. |
| 1132 * This is an experimental feature. |
| 1133 */ |
| 1134 bool IsUint8ClampedArray() const; |
| 1135 |
| 1136 /** |
| 1131 * Returns true if this value is an Int8Array. | 1137 * Returns true if this value is an Int8Array. |
| 1132 * This is an experimental feature. | 1138 * This is an experimental feature. |
| 1133 */ | 1139 */ |
| 1134 bool IsInt8Array() const; | 1140 bool IsInt8Array() const; |
| 1135 | 1141 |
| 1136 /** | 1142 /** |
| 1137 * Returns true if this value is an Uint16Array. | 1143 * Returns true if this value is an Uint16Array. |
| 1138 * This is an experimental feature. | 1144 * This is an experimental feature. |
| 1139 */ | 1145 */ |
| 1140 bool IsUint16Array() const; | 1146 bool IsUint16Array() const; |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2153 size_t byte_offset, size_t length); | 2159 size_t byte_offset, size_t length); |
| 2154 V8_INLINE(static Uint8Array* Cast(Value* obj)); | 2160 V8_INLINE(static Uint8Array* Cast(Value* obj)); |
| 2155 | 2161 |
| 2156 private: | 2162 private: |
| 2157 Uint8Array(); | 2163 Uint8Array(); |
| 2158 static void CheckCast(Value* obj); | 2164 static void CheckCast(Value* obj); |
| 2159 }; | 2165 }; |
| 2160 | 2166 |
| 2161 | 2167 |
| 2162 /** | 2168 /** |
| 2169 * An instance of Uint8ClampedArray constructor (ES6 draft 15.13.6). |
| 2170 * This API is experimental and may change significantly. |
| 2171 */ |
| 2172 class V8EXPORT Uint8ClampedArray : public TypedArray { |
| 2173 public: |
| 2174 static Local<Uint8ClampedArray> New(Handle<ArrayBuffer> array_buffer, |
| 2175 size_t byte_offset, size_t length); |
| 2176 V8_INLINE(static Uint8ClampedArray* Cast(Value* obj)); |
| 2177 |
| 2178 private: |
| 2179 Uint8ClampedArray(); |
| 2180 static void CheckCast(Value* obj); |
| 2181 }; |
| 2182 |
| 2183 /** |
| 2163 * An instance of Int8Array constructor (ES6 draft 15.13.6). | 2184 * An instance of Int8Array constructor (ES6 draft 15.13.6). |
| 2164 * This API is experimental and may change significantly. | 2185 * This API is experimental and may change significantly. |
| 2165 */ | 2186 */ |
| 2166 class V8EXPORT Int8Array : public TypedArray { | 2187 class V8EXPORT Int8Array : public TypedArray { |
| 2167 public: | 2188 public: |
| 2168 static Local<Int8Array> New(Handle<ArrayBuffer> array_buffer, | 2189 static Local<Int8Array> New(Handle<ArrayBuffer> array_buffer, |
| 2169 size_t byte_offset, size_t length); | 2190 size_t byte_offset, size_t length); |
| 2170 V8_INLINE(static Int8Array* Cast(Value* obj)); | 2191 V8_INLINE(static Int8Array* Cast(Value* obj)); |
| 2171 | 2192 |
| 2172 private: | 2193 private: |
| (...skipping 2588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4761 // the implementation of v8. | 4782 // the implementation of v8. |
| 4762 static const int kHeapObjectMapOffset = 0; | 4783 static const int kHeapObjectMapOffset = 0; |
| 4763 static const int kMapInstanceTypeOffset = 1 * kApiPointerSize + kApiIntSize; | 4784 static const int kMapInstanceTypeOffset = 1 * kApiPointerSize + kApiIntSize; |
| 4764 static const int kStringResourceOffset = 3 * kApiPointerSize; | 4785 static const int kStringResourceOffset = 3 * kApiPointerSize; |
| 4765 | 4786 |
| 4766 static const int kOddballKindOffset = 3 * kApiPointerSize; | 4787 static const int kOddballKindOffset = 3 * kApiPointerSize; |
| 4767 static const int kForeignAddressOffset = kApiPointerSize; | 4788 static const int kForeignAddressOffset = kApiPointerSize; |
| 4768 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; | 4789 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
| 4769 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; | 4790 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
| 4770 static const int kContextHeaderSize = 2 * kApiPointerSize; | 4791 static const int kContextHeaderSize = 2 * kApiPointerSize; |
| 4771 static const int kContextEmbedderDataIndex = 64; | 4792 static const int kContextEmbedderDataIndex = 65; |
| 4772 static const int kFullStringRepresentationMask = 0x07; | 4793 static const int kFullStringRepresentationMask = 0x07; |
| 4773 static const int kStringEncodingMask = 0x4; | 4794 static const int kStringEncodingMask = 0x4; |
| 4774 static const int kExternalTwoByteRepresentationTag = 0x02; | 4795 static const int kExternalTwoByteRepresentationTag = 0x02; |
| 4775 static const int kExternalAsciiRepresentationTag = 0x06; | 4796 static const int kExternalAsciiRepresentationTag = 0x06; |
| 4776 | 4797 |
| 4777 static const int kIsolateStateOffset = 0; | 4798 static const int kIsolateStateOffset = 0; |
| 4778 static const int kIsolateEmbedderDataOffset = 1 * kApiPointerSize; | 4799 static const int kIsolateEmbedderDataOffset = 1 * kApiPointerSize; |
| 4779 static const int kIsolateRootsOffset = 3 * kApiPointerSize; | 4800 static const int kIsolateRootsOffset = 3 * kApiPointerSize; |
| 4780 static const int kUndefinedValueRootIndex = 5; | 4801 static const int kUndefinedValueRootIndex = 5; |
| 4781 static const int kNullValueRootIndex = 7; | 4802 static const int kNullValueRootIndex = 7; |
| (...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5640 | 5661 |
| 5641 | 5662 |
| 5642 } // namespace v8 | 5663 } // namespace v8 |
| 5643 | 5664 |
| 5644 | 5665 |
| 5645 #undef V8EXPORT | 5666 #undef V8EXPORT |
| 5646 #undef TYPE_CHECK | 5667 #undef TYPE_CHECK |
| 5647 | 5668 |
| 5648 | 5669 |
| 5649 #endif // V8_H_ | 5670 #endif // V8_H_ |
| OLD | NEW |