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 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 { |
2134 kNormalString, kInternalizedString, kUndetectableString | 2134 kNormalString, kInternalizedString, kUndetectableString |
2135 }; | 2135 }; |
2136 | 2136 |
2137 /** Allocates a new string from UTF-8 data.*/ | 2137 /** Allocates a new string from UTF-8 data.*/ |
2138 static Local<String> NewFromUtf8(Isolate* isolate, | 2138 static Local<String> NewFromUtf8(Isolate* isolate, const char* data, |
2139 const char* data, | 2139 NewStringType type = kNormalString, |
2140 NewStringType type = kNormalString, | 2140 int length = -1); |
2141 int length = -1); | |
2142 | 2141 |
2143 /** Allocates a new string from Latin-1 data.*/ | 2142 /** Allocates a new string from Latin-1 data.*/ |
2144 static Local<String> NewFromOneByte( | 2143 static Local<String> NewFromOneByte( |
2145 Isolate* isolate, | 2144 Isolate* isolate, |
2146 const uint8_t* data, | 2145 const uint8_t* data, |
2147 NewStringType type = kNormalString, | 2146 NewStringType type = kNormalString, |
2148 int length = -1); | 2147 int length = -1); |
2149 | 2148 |
2150 /** Allocates a new string from UTF-16 data.*/ | 2149 /** Allocates a new string from UTF-16 data.*/ |
2151 static Local<String> NewFromTwoByte( | 2150 static Local<String> NewFromTwoByte( |
(...skipping 5391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7543 */ | 7542 */ |
7544 | 7543 |
7545 | 7544 |
7546 } // namespace v8 | 7545 } // namespace v8 |
7547 | 7546 |
7548 | 7547 |
7549 #undef TYPE_CHECK | 7548 #undef TYPE_CHECK |
7550 | 7549 |
7551 | 7550 |
7552 #endif // V8_H_ | 7551 #endif // V8_H_ |
OLD | NEW |