| 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 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2123 V8_INLINE ExternalStringResource* GetExternalStringResource() const; | 2123 V8_INLINE ExternalStringResource* GetExternalStringResource() const; |
| 2124 | 2124 |
| 2125 /** | 2125 /** |
| 2126 * Get the ExternalOneByteStringResource for an external one-byte string. | 2126 * Get the ExternalOneByteStringResource for an external one-byte string. |
| 2127 * Returns NULL if IsExternalOneByte() doesn't return true. | 2127 * Returns NULL if IsExternalOneByte() doesn't return true. |
| 2128 */ | 2128 */ |
| 2129 const ExternalOneByteStringResource* GetExternalOneByteStringResource() const; | 2129 const ExternalOneByteStringResource* GetExternalOneByteStringResource() const; |
| 2130 | 2130 |
| 2131 V8_INLINE static String* Cast(v8::Value* obj); | 2131 V8_INLINE static String* Cast(v8::Value* obj); |
| 2132 | 2132 |
| 2133 enum NewStringType { | 2133 enum NewStringType { kNormalString, kInternalizedString }; |
| 2134 kNormalString, kInternalizedString, kUndetectableString | |
| 2135 }; | |
| 2136 | 2134 |
| 2137 /** Allocates a new string from UTF-8 data.*/ | 2135 /** Allocates a new string from UTF-8 data.*/ |
| 2138 static Local<String> NewFromUtf8(Isolate* isolate, | 2136 static Local<String> NewFromUtf8(Isolate* isolate, |
| 2139 const char* data, | 2137 const char* data, |
| 2140 NewStringType type = kNormalString, | 2138 NewStringType type = kNormalString, |
| 2141 int length = -1); | 2139 int length = -1); |
| 2142 | 2140 |
| 2143 /** Allocates a new string from Latin-1 data.*/ | 2141 /** Allocates a new string from Latin-1 data.*/ |
| 2144 static Local<String> NewFromOneByte( | 2142 static Local<String> NewFromOneByte( |
| 2145 Isolate* isolate, | 2143 Isolate* isolate, |
| (...skipping 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6249 4 * kApiPointerSize; | 6247 4 * kApiPointerSize; |
| 6250 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = | 6248 static const int kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset = |
| 6251 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; | 6249 kAmountOfExternalAllocatedMemoryOffset + kApiInt64Size; |
| 6252 static const int kIsolateRootsOffset = | 6250 static const int kIsolateRootsOffset = |
| 6253 kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size + | 6251 kAmountOfExternalAllocatedMemoryAtLastGlobalGCOffset + kApiInt64Size + |
| 6254 kApiPointerSize; | 6252 kApiPointerSize; |
| 6255 static const int kUndefinedValueRootIndex = 5; | 6253 static const int kUndefinedValueRootIndex = 5; |
| 6256 static const int kNullValueRootIndex = 7; | 6254 static const int kNullValueRootIndex = 7; |
| 6257 static const int kTrueValueRootIndex = 8; | 6255 static const int kTrueValueRootIndex = 8; |
| 6258 static const int kFalseValueRootIndex = 9; | 6256 static const int kFalseValueRootIndex = 9; |
| 6259 static const int kEmptyStringRootIndex = 156; | 6257 static const int kEmptyStringRootIndex = 154; |
| 6260 | 6258 |
| 6261 // The external allocation limit should be below 256 MB on all architectures | 6259 // The external allocation limit should be below 256 MB on all architectures |
| 6262 // to avoid that resource-constrained embedders run low on memory. | 6260 // to avoid that resource-constrained embedders run low on memory. |
| 6263 static const int kExternalAllocationLimit = 192 * 1024 * 1024; | 6261 static const int kExternalAllocationLimit = 192 * 1024 * 1024; |
| 6264 | 6262 |
| 6265 static const int kNodeClassIdOffset = 1 * kApiPointerSize; | 6263 static const int kNodeClassIdOffset = 1 * kApiPointerSize; |
| 6266 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; | 6264 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; |
| 6267 static const int kNodeStateMask = 0x7; | 6265 static const int kNodeStateMask = 0x7; |
| 6268 static const int kNodeStateIsWeakValue = 2; | 6266 static const int kNodeStateIsWeakValue = 2; |
| 6269 static const int kNodeStateIsPendingValue = 3; | 6267 static const int kNodeStateIsPendingValue = 3; |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7543 */ | 7541 */ |
| 7544 | 7542 |
| 7545 | 7543 |
| 7546 } // namespace v8 | 7544 } // namespace v8 |
| 7547 | 7545 |
| 7548 | 7546 |
| 7549 #undef TYPE_CHECK | 7547 #undef TYPE_CHECK |
| 7550 | 7548 |
| 7551 | 7549 |
| 7552 #endif // V8_H_ | 7550 #endif // V8_H_ |
| OLD | NEW |