| 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 2270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2281 /** | 2281 /** |
| 2282 * A JavaScript string value (ECMA-262, 4.3.17). | 2282 * A JavaScript string value (ECMA-262, 4.3.17). |
| 2283 */ | 2283 */ |
| 2284 class V8_EXPORT String : public Name { | 2284 class V8_EXPORT String : public Name { |
| 2285 public: | 2285 public: |
| 2286 static const int kMaxLength = (1 << 28) - 16; | 2286 static const int kMaxLength = (1 << 28) - 16; |
| 2287 | 2287 |
| 2288 enum Encoding { | 2288 enum Encoding { |
| 2289 UNKNOWN_ENCODING = 0x1, | 2289 UNKNOWN_ENCODING = 0x1, |
| 2290 TWO_BYTE_ENCODING = 0x0, | 2290 TWO_BYTE_ENCODING = 0x0, |
| 2291 ONE_BYTE_ENCODING = 0x4 | 2291 ONE_BYTE_ENCODING = 0x8 |
| 2292 }; | 2292 }; |
| 2293 /** | 2293 /** |
| 2294 * Returns the number of characters in this string. | 2294 * Returns the number of characters in this string. |
| 2295 */ | 2295 */ |
| 2296 int Length() const; | 2296 int Length() const; |
| 2297 | 2297 |
| 2298 /** | 2298 /** |
| 2299 * Returns the number of bytes in the UTF-8 encoded | 2299 * Returns the number of bytes in the UTF-8 encoded |
| 2300 * representation of this string. | 2300 * representation of this string. |
| 2301 */ | 2301 */ |
| (...skipping 6043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8345 static const int kMapInstanceTypeAndBitFieldOffset = | 8345 static const int kMapInstanceTypeAndBitFieldOffset = |
| 8346 1 * kApiPointerSize + kApiIntSize; | 8346 1 * kApiPointerSize + kApiIntSize; |
| 8347 static const int kStringResourceOffset = 3 * kApiPointerSize; | 8347 static const int kStringResourceOffset = 3 * kApiPointerSize; |
| 8348 | 8348 |
| 8349 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); | 8349 static const int kOddballKindOffset = 4 * kApiPointerSize + sizeof(double); |
| 8350 static const int kForeignAddressOffset = kApiPointerSize; | 8350 static const int kForeignAddressOffset = kApiPointerSize; |
| 8351 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; | 8351 static const int kJSObjectHeaderSize = 3 * kApiPointerSize; |
| 8352 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; | 8352 static const int kFixedArrayHeaderSize = 2 * kApiPointerSize; |
| 8353 static const int kContextHeaderSize = 2 * kApiPointerSize; | 8353 static const int kContextHeaderSize = 2 * kApiPointerSize; |
| 8354 static const int kContextEmbedderDataIndex = 5; | 8354 static const int kContextEmbedderDataIndex = 5; |
| 8355 static const int kFullStringRepresentationMask = 0x07; | 8355 static const int kFullStringRepresentationMask = 0x0f; |
| 8356 static const int kStringEncodingMask = 0x4; | 8356 static const int kStringEncodingMask = 0x8; |
| 8357 static const int kExternalTwoByteRepresentationTag = 0x02; | 8357 static const int kExternalTwoByteRepresentationTag = 0x02; |
| 8358 static const int kExternalOneByteRepresentationTag = 0x06; | 8358 static const int kExternalOneByteRepresentationTag = 0x0a; |
| 8359 | 8359 |
| 8360 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; | 8360 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; |
| 8361 static const int kExternalMemoryOffset = 4 * kApiPointerSize; | 8361 static const int kExternalMemoryOffset = 4 * kApiPointerSize; |
| 8362 static const int kExternalMemoryLimitOffset = | 8362 static const int kExternalMemoryLimitOffset = |
| 8363 kExternalMemoryOffset + kApiInt64Size; | 8363 kExternalMemoryOffset + kApiInt64Size; |
| 8364 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + | 8364 static const int kIsolateRootsOffset = kExternalMemoryLimitOffset + |
| 8365 kApiInt64Size + kApiInt64Size + | 8365 kApiInt64Size + kApiInt64Size + |
| 8366 kApiPointerSize + kApiPointerSize; | 8366 kApiPointerSize + kApiPointerSize; |
| 8367 static const int kUndefinedValueRootIndex = 4; | 8367 static const int kUndefinedValueRootIndex = 4; |
| 8368 static const int kTheHoleValueRootIndex = 5; | 8368 static const int kTheHoleValueRootIndex = 5; |
| (...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9731 */ | 9731 */ |
| 9732 | 9732 |
| 9733 | 9733 |
| 9734 } // namespace v8 | 9734 } // namespace v8 |
| 9735 | 9735 |
| 9736 | 9736 |
| 9737 #undef TYPE_CHECK | 9737 #undef TYPE_CHECK |
| 9738 | 9738 |
| 9739 | 9739 |
| 9740 #endif // INCLUDE_V8_H_ | 9740 #endif // INCLUDE_V8_H_ |
| OLD | NEW |