| 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 = 0x4 | 2316 ONE_BYTE_ENCODING = 0x8 |
| 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 6103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8430 static const int kMapInstanceTypeAndBitFieldOffset = | 8430 static const int kMapInstanceTypeAndBitFieldOffset = |
| 8431 1 * kApiPointerSize + kApiIntSize; | 8431 1 * kApiPointerSize + kApiIntSize; |
| 8432 static const int kStringResourceOffset = 3 * kApiPointerSize; | 8432 static const int kStringResourceOffset = 3 * kApiPointerSize; |
| 8433 | 8433 |
| 8434 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); | 8434 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); |
| 8435 static const int kForeignAddressOffset = kApiPointerSize; | 8435 static const int kForeignAddressOffset = kApiPointerSize; |
| 8436 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; | 8436 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
| 8437 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; | 8437 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
| 8438 static const int kContextHeaderSize = 2 * kApiPointerSize; | 8438 static const int kContextHeaderSize = 2 * kApiPointerSize; |
| 8439 static const int kContextEmbedderDataIndex = 5; | 8439 static const int kContextEmbedderDataIndex = 5; |
| 8440 static const int kFullStringRepresentationMask = 0x07; | 8440 static const int kFullStringRepresentationMask = 0x0f; |
| 8441 static const int kStringEncodingMask = 0x4; | 8441 static const int kStringEncodingMask = 0x8; |
| 8442 static const int kExternalTwoByteRepresentationTag = 0x02; | 8442 static const int kExternalTwoByteRepresentationTag = 0x02; |
| 8443 static const int kExternalOneByteRepresentationTag = 0x06; | 8443 static const int kExternalOneByteRepresentationTag = 0x0a; |
| 8444 | 8444 |
| 8445 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; | 8445 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; |
| 8446 static const int kExternalMemoryOffset = 4 * kApiPointerSize; | 8446 static const int kExternalMemoryOffset = 4 * kApiPointerSize; |
| 8447 static const int kExternalMemoryLimitOffset = | 8447 static const int kExternalMemoryLimitOffset = |
| 8448 kExternalMemoryOffset + kApiInt64Size; | 8448 kExternalMemoryOffset + kApiInt64Size; |
| 8449 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + | 8449 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + |
| 8450 kApiInt64Size + kApiInt64Size + | 8450 kApiInt64Size + kApiInt64Size + |
| 8451 kApiPointerSize + kApiPointerSize; | 8451 kApiPointerSize + kApiPointerSize; |
| 8452 static const int kUndefinedValueRootIndex = 4; | 8452 static const int kUndefinedValueRootIndex = 4; |
| 8453 static const int kTheHoleValueRootIndex = 5; | 8453 static const int kTheHoleValueRootIndex = 5; |
| (...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9831 */ | 9831 */ |
| 9832 | 9832 |
| 9833 | 9833 |
| 9834 } // namespace v8 | 9834 } // namespace v8 |
| 9835 | 9835 |
| 9836 | 9836 |
| 9837 #undef TYPE_CHECK | 9837 #undef TYPE_CHECK |
| 9838 | 9838 |
| 9839 | 9839 |
| 9840 #endif // INCLUDE_V8_H_ | 9840 #endif // INCLUDE_V8_H_ |
| OLD | NEW |