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 6072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8399 static const int kMapInstanceTypeAndBitFieldOffset = | 8399 static const int kMapInstanceTypeAndBitFieldOffset = |
8400 1 * kApiPointerSize + kApiIntSize; | 8400 1 * kApiPointerSize + kApiIntSize; |
8401 static const int kStringResourceOffset = 3 * kApiPointerSize; | 8401 static const int kStringResourceOffset = 3 * kApiPointerSize; |
8402 | 8402 |
8403 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); | 8403 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); |
8404 static const int kForeignAddressOffset = kApiPointerSize; | 8404 static const int kForeignAddressOffset = kApiPointerSize; |
8405 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; | 8405 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
8406 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; | 8406 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
8407 static const int kContextHeaderSize = 2 * kApiPointerSize; | 8407 static const int kContextHeaderSize = 2 * kApiPointerSize; |
8408 static const int kContextEmbedderDataIndex = 5; | 8408 static const int kContextEmbedderDataIndex = 5; |
8409 static const int kFullStringRepresentationMask = 0x0f; | 8409 static const int kFullStringRepresentationMask = 0x07; |
8410 static const int kStringEncodingMask = 0x8; | 8410 static const int kStringEncodingMask = 0x4; |
8411 static const int kExternalTwoByteRepresentationTag = 0x02; | 8411 static const int kExternalTwoByteRepresentationTag = 0x02; |
8412 static const int kExternalOneByteRepresentationTag = 0x0a; | 8412 static const int kExternalOneByteRepresentationTag = 0x06; |
8413 | 8413 |
8414 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; | 8414 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; |
8415 static const int kExternalMemoryOffset = 4 * kApiPointerSize; | 8415 static const int kExternalMemoryOffset = 4 * kApiPointerSize; |
8416 static const int kExternalMemoryLimitOffset = | 8416 static const int kExternalMemoryLimitOffset = |
8417 kExternalMemoryOffset + kApiInt64Size; | 8417 kExternalMemoryOffset + kApiInt64Size; |
8418 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + | 8418 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + |
8419 kApiInt64Size + kApiInt64Size + | 8419 kApiInt64Size + kApiInt64Size + |
8420 kApiPointerSize + kApiPointerSize; | 8420 kApiPointerSize + kApiPointerSize; |
8421 static const int kUndefinedValueRootIndex = 4; | 8421 static const int kUndefinedValueRootIndex = 4; |
8422 static const int kTheHoleValueRootIndex = 5; | 8422 static const int kTheHoleValueRootIndex = 5; |
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9800 */ | 9800 */ |
9801 | 9801 |
9802 | 9802 |
9803 } // namespace v8 | 9803 } // namespace v8 |
9804 | 9804 |
9805 | 9805 |
9806 #undef TYPE_CHECK | 9806 #undef TYPE_CHECK |
9807 | 9807 |
9808 | 9808 |
9809 #endif // INCLUDE_V8_H_ | 9809 #endif // INCLUDE_V8_H_ |
OLD | NEW |