| 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 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2320 /** | 2320 /** |
| 2321 * A JavaScript string value (ECMA-262, 4.3.17). | 2321 * A JavaScript string value (ECMA-262, 4.3.17). |
| 2322 */ | 2322 */ |
| 2323 class V8_EXPORT String : public Name { | 2323 class V8_EXPORT String : public Name { |
| 2324 public: | 2324 public: |
| 2325 static const int kMaxLength = (1 << 28) - 16; | 2325 static const int kMaxLength = (1 << 28) - 16; |
| 2326 | 2326 |
| 2327 enum Encoding { | 2327 enum Encoding { |
| 2328 UNKNOWN_ENCODING = 0x1, | 2328 UNKNOWN_ENCODING = 0x1, |
| 2329 TWO_BYTE_ENCODING = 0x0, | 2329 TWO_BYTE_ENCODING = 0x0, |
| 2330 ONE_BYTE_ENCODING = 0x4 | 2330 ONE_BYTE_ENCODING = 0x8 |
| 2331 }; | 2331 }; |
| 2332 /** | 2332 /** |
| 2333 * Returns the number of characters in this string. | 2333 * Returns the number of characters in this string. |
| 2334 */ | 2334 */ |
| 2335 int Length() const; | 2335 int Length() const; |
| 2336 | 2336 |
| 2337 /** | 2337 /** |
| 2338 * Returns the number of bytes in the UTF-8 encoded | 2338 * Returns the number of bytes in the UTF-8 encoded |
| 2339 * representation of this string. | 2339 * representation of this string. |
| 2340 */ | 2340 */ |
| (...skipping 6103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8444 static const int kMapInstanceTypeAndBitFieldOffset = | 8444 static const int kMapInstanceTypeAndBitFieldOffset = |
| 8445 1 * kApiPointerSize + kApiIntSize; | 8445 1 * kApiPointerSize + kApiIntSize; |
| 8446 static const int kStringResourceOffset = 3 * kApiPointerSize; | 8446 static const int kStringResourceOffset = 3 * kApiPointerSize; |
| 8447 | 8447 |
| 8448 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); | 8448 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); |
| 8449 static const int kForeignAddressOffset = kApiPointerSize; | 8449 static const int kForeignAddressOffset = kApiPointerSize; |
| 8450 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; | 8450 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
| 8451 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; | 8451 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
| 8452 static const int kContextHeaderSize = 2 * kApiPointerSize; | 8452 static const int kContextHeaderSize = 2 * kApiPointerSize; |
| 8453 static const int kContextEmbedderDataIndex = 5; | 8453 static const int kContextEmbedderDataIndex = 5; |
| 8454 static const int kFullStringRepresentationMask = 0x07; | 8454 static const int kFullStringRepresentationMask = 0x0f; |
| 8455 static const int kStringEncodingMask = 0x4; | 8455 static const int kStringEncodingMask = 0x8; |
| 8456 static const int kExternalTwoByteRepresentationTag = 0x02; | 8456 static const int kExternalTwoByteRepresentationTag = 0x02; |
| 8457 static const int kExternalOneByteRepresentationTag = 0x06; | 8457 static const int kExternalOneByteRepresentationTag = 0x0a; |
| 8458 | 8458 |
| 8459 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; | 8459 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; |
| 8460 static const int kExternalMemoryOffset = 4 * kApiPointerSize; | 8460 static const int kExternalMemoryOffset = 4 * kApiPointerSize; |
| 8461 static const int kExternalMemoryLimitOffset = | 8461 static const int kExternalMemoryLimitOffset = |
| 8462 kExternalMemoryOffset + kApiInt64Size; | 8462 kExternalMemoryOffset + kApiInt64Size; |
| 8463 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + | 8463 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + |
| 8464 kApiInt64Size + kApiInt64Size + | 8464 kApiInt64Size + kApiInt64Size + |
| 8465 kApiPointerSize + kApiPointerSize; | 8465 kApiPointerSize + kApiPointerSize; |
| 8466 static const int kUndefinedValueRootIndex = 4; | 8466 static const int kUndefinedValueRootIndex = 4; |
| 8467 static const int kTheHoleValueRootIndex = 5; | 8467 static const int kTheHoleValueRootIndex = 5; |
| (...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9849 */ | 9849 */ |
| 9850 | 9850 |
| 9851 | 9851 |
| 9852 } // namespace v8 | 9852 } // namespace v8 |
| 9853 | 9853 |
| 9854 | 9854 |
| 9855 #undef TYPE_CHECK | 9855 #undef TYPE_CHECK |
| 9856 | 9856 |
| 9857 | 9857 |
| 9858 #endif // INCLUDE_V8_H_ | 9858 #endif // INCLUDE_V8_H_ |
| OLD | NEW |