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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2306 /** | 2306 /** |
2307 * A JavaScript string value (ECMA-262, 4.3.17). | 2307 * A JavaScript string value (ECMA-262, 4.3.17). |
2308 */ | 2308 */ |
2309 class V8_EXPORT String : public Name { | 2309 class V8_EXPORT String : public Name { |
2310 public: | 2310 public: |
2311 static const int kMaxLength = (1 << 28) - 16; | 2311 static const int kMaxLength = (1 << 28) - 16; |
2312 | 2312 |
2313 enum Encoding { | 2313 enum Encoding { |
2314 UNKNOWN_ENCODING = 0x1, | 2314 UNKNOWN_ENCODING = 0x1, |
2315 TWO_BYTE_ENCODING = 0x0, | 2315 TWO_BYTE_ENCODING = 0x0, |
2316 ONE_BYTE_ENCODING = 0x8 | 2316 ONE_BYTE_ENCODING = 0x4 |
2317 }; | 2317 }; |
2318 /** | 2318 /** |
2319 * Returns the number of characters in this string. | 2319 * Returns the number of characters in this string. |
2320 */ | 2320 */ |
2321 int Length() const; | 2321 int Length() const; |
2322 | 2322 |
2323 /** | 2323 /** |
2324 * Returns the number of bytes in the UTF-8 encoded | 2324 * Returns the number of bytes in the UTF-8 encoded |
2325 * representation of this string. | 2325 * representation of this string. |
2326 */ | 2326 */ |
(...skipping 6078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8405 static const int kMapInstanceTypeAndBitFieldOffset = | 8405 static const int kMapInstanceTypeAndBitFieldOffset = |
8406 1 * kApiPointerSize + kApiIntSize; | 8406 1 * kApiPointerSize + kApiIntSize; |
8407 static const int kStringResourceOffset = 3 * kApiPointerSize; | 8407 static const int kStringResourceOffset = 3 * kApiPointerSize; |
8408 | 8408 |
8409 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); | 8409 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); |
8410 static const int kForeignAddressOffset = kApiPointerSize; | 8410 static const int kForeignAddressOffset = kApiPointerSize; |
8411 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; | 8411 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
8412 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; | 8412 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
8413 static const int kContextHeaderSize = 2 * kApiPointerSize; | 8413 static const int kContextHeaderSize = 2 * kApiPointerSize; |
8414 static const int kContextEmbedderDataIndex = 5; | 8414 static const int kContextEmbedderDataIndex = 5; |
8415 static const int kFullStringRepresentationMask = 0x0f; | 8415 static const int kFullStringRepresentationMask = 0x07; |
8416 static const int kStringEncodingMask = 0x8; | 8416 static const int kStringEncodingMask = 0x4; |
8417 static const int kExternalTwoByteRepresentationTag = 0x02; | 8417 static const int kExternalTwoByteRepresentationTag = 0x02; |
8418 static const int kExternalOneByteRepresentationTag = 0x0a; | 8418 static const int kExternalOneByteRepresentationTag = 0x06; |
8419 | 8419 |
8420 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; | 8420 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; |
8421 static const int kExternalMemoryOffset = 4 * kApiPointerSize; | 8421 static const int kExternalMemoryOffset = 4 * kApiPointerSize; |
8422 static const int kExternalMemoryLimitOffset = | 8422 static const int kExternalMemoryLimitOffset = |
8423 kExternalMemoryOffset + kApiInt64Size; | 8423 kExternalMemoryOffset + kApiInt64Size; |
8424 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + | 8424 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + |
8425 kApiInt64Size + kApiInt64Size + | 8425 kApiInt64Size + kApiInt64Size + |
8426 kApiPointerSize + kApiPointerSize; | 8426 kApiPointerSize + kApiPointerSize; |
8427 static const int kUndefinedValueRootIndex = 4; | 8427 static const int kUndefinedValueRootIndex = 4; |
8428 static const int kTheHoleValueRootIndex = 5; | 8428 static const int kTheHoleValueRootIndex = 5; |
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9806 */ | 9806 */ |
9807 | 9807 |
9808 | 9808 |
9809 } // namespace v8 | 9809 } // namespace v8 |
9810 | 9810 |
9811 | 9811 |
9812 #undef TYPE_CHECK | 9812 #undef TYPE_CHECK |
9813 | 9813 |
9814 | 9814 |
9815 #endif // INCLUDE_V8_H_ | 9815 #endif // INCLUDE_V8_H_ |
OLD | NEW |