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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 uint32_t hash_field); | 214 uint32_t hash_field); |
215 | 215 |
216 Handle<String> NewInternalizedStringImpl(Handle<String> string, int chars, | 216 Handle<String> NewInternalizedStringImpl(Handle<String> string, int chars, |
217 uint32_t hash_field); | 217 uint32_t hash_field); |
218 | 218 |
219 // Compute the matching internalized string map for a string if possible. | 219 // Compute the matching internalized string map for a string if possible. |
220 // Empty handle is returned if string is in new space or not flattened. | 220 // Empty handle is returned if string is in new space or not flattened. |
221 MUST_USE_RESULT MaybeHandle<Map> InternalizedStringMapForString( | 221 MUST_USE_RESULT MaybeHandle<Map> InternalizedStringMapForString( |
222 Handle<String> string); | 222 Handle<String> string); |
223 | 223 |
| 224 // Creates an internalized copy of an external string. |string| must be |
| 225 // of type StringClass. |
| 226 template <class StringClass> |
| 227 Handle<StringClass> InternalizeExternalString(Handle<String> string); |
| 228 |
224 // Allocates and partially initializes an one-byte or two-byte String. The | 229 // Allocates and partially initializes an one-byte or two-byte String. The |
225 // characters of the string are uninitialized. Currently used in regexp code | 230 // characters of the string are uninitialized. Currently used in regexp code |
226 // only, where they are pretenured. | 231 // only, where they are pretenured. |
227 MUST_USE_RESULT MaybeHandle<SeqOneByteString> NewRawOneByteString( | 232 MUST_USE_RESULT MaybeHandle<SeqOneByteString> NewRawOneByteString( |
228 int length, | 233 int length, |
229 PretenureFlag pretenure = NOT_TENURED); | 234 PretenureFlag pretenure = NOT_TENURED); |
230 MUST_USE_RESULT MaybeHandle<SeqTwoByteString> NewRawTwoByteString( | 235 MUST_USE_RESULT MaybeHandle<SeqTwoByteString> NewRawTwoByteString( |
231 int length, | 236 int length, |
232 PretenureFlag pretenure = NOT_TENURED); | 237 PretenureFlag pretenure = NOT_TENURED); |
233 | 238 |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
811 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, | 816 void SetStrictFunctionInstanceDescriptor(Handle<Map> map, |
812 FunctionMode function_mode); | 817 FunctionMode function_mode); |
813 | 818 |
814 void SetClassFunctionInstanceDescriptor(Handle<Map> map); | 819 void SetClassFunctionInstanceDescriptor(Handle<Map> map); |
815 }; | 820 }; |
816 | 821 |
817 } // namespace internal | 822 } // namespace internal |
818 } // namespace v8 | 823 } // namespace v8 |
819 | 824 |
820 #endif // V8_FACTORY_H_ | 825 #endif // V8_FACTORY_H_ |
OLD | NEW |