OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_FACTORY_H_ | 5 #ifndef V8_FACTORY_H_ |
6 #define V8_FACTORY_H_ | 6 #define V8_FACTORY_H_ |
7 | 7 |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 uint32_t hash_field); | 227 uint32_t hash_field); |
228 | 228 |
229 Handle<String> NewInternalizedStringImpl(Handle<String> string, int chars, | 229 Handle<String> NewInternalizedStringImpl(Handle<String> string, int chars, |
230 uint32_t hash_field); | 230 uint32_t hash_field); |
231 | 231 |
232 // Compute the matching internalized string map for a string if possible. | 232 // Compute the matching internalized string map for a string if possible. |
233 // Empty handle is returned if string is in new space or not flattened. | 233 // Empty handle is returned if string is in new space or not flattened. |
234 MUST_USE_RESULT MaybeHandle<Map> InternalizedStringMapForString( | 234 MUST_USE_RESULT MaybeHandle<Map> InternalizedStringMapForString( |
235 Handle<String> string); | 235 Handle<String> string); |
236 | 236 |
| 237 // Creates an internalized copy of an external string. |string| must be |
| 238 // of type StringClass. |
| 239 template <class StringClass> |
| 240 Handle<StringClass> InternalizeExternalString(Handle<String> string); |
| 241 |
237 // Allocates and partially initializes an one-byte or two-byte String. The | 242 // Allocates and partially initializes an one-byte or two-byte String. The |
238 // characters of the string are uninitialized. Currently used in regexp code | 243 // characters of the string are uninitialized. Currently used in regexp code |
239 // only, where they are pretenured. | 244 // only, where they are pretenured. |
240 MUST_USE_RESULT MaybeHandle<SeqOneByteString> NewRawOneByteString( | 245 MUST_USE_RESULT MaybeHandle<SeqOneByteString> NewRawOneByteString( |
241 int length, | 246 int length, |
242 PretenureFlag pretenure = NOT_TENURED); | 247 PretenureFlag pretenure = NOT_TENURED); |
243 MUST_USE_RESULT MaybeHandle<SeqTwoByteString> NewRawTwoByteString( | 248 MUST_USE_RESULT MaybeHandle<SeqTwoByteString> NewRawTwoByteString( |
244 int length, | 249 int length, |
245 PretenureFlag pretenure = NOT_TENURED); | 250 PretenureFlag pretenure = NOT_TENURED); |
246 | 251 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 813 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
809 FunctionMode function_mode); | 814 FunctionMode function_mode); |
810 | 815 |
811 void SetClassFunctionInstanceDescriptor(Handle<Map> map); | 816 void SetClassFunctionInstanceDescriptor(Handle<Map> map); |
812 }; | 817 }; |
813 | 818 |
814 } // namespace internal | 819 } // namespace internal |
815 } // namespace v8 | 820 } // namespace v8 |
816 | 821 |
817 #endif // V8_FACTORY_H_ | 822 #endif // V8_FACTORY_H_ |
OLD | NEW |