OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Allocates and partially initializes a TwoByte String. The characters of | 92 // Allocates and partially initializes a TwoByte String. The characters of |
93 // the string are uninitialized. Currently used in regexp code only, where | 93 // the string are uninitialized. Currently used in regexp code only, where |
94 // they are pretenured. | 94 // they are pretenured. |
95 static Handle<String> NewRawTwoByteString( | 95 static Handle<String> NewRawTwoByteString( |
96 int length, | 96 int length, |
97 PretenureFlag pretenure = NOT_TENURED); | 97 PretenureFlag pretenure = NOT_TENURED); |
98 | 98 |
99 // Create a new cons string object which consists of a pair of strings. | 99 // Create a new cons string object which consists of a pair of strings. |
100 static Handle<String> NewConsString(Handle<String> first, | 100 static Handle<String> NewConsString(Handle<String> first, |
101 Handle<String> second); | 101 StringShape first_shape, |
| 102 Handle<String> second, |
| 103 StringShape second_shape); |
102 | 104 |
103 // Create a new sliced string object which represents a substring of a | 105 // Create a new sliced string object which represents a substring of a |
104 // backing string. | 106 // backing string. |
105 static Handle<String> NewStringSlice(Handle<String> str, int begin, int end); | 107 static Handle<String> NewStringSlice(Handle<String> str, |
| 108 StringShape shape, |
| 109 int begin, |
| 110 int end); |
106 | 111 |
107 // Creates a new external String object. There are two String encodings | 112 // Creates a new external String object. There are two String encodings |
108 // in the system: ASCII and two byte. Unlike other String types, it does | 113 // in the system: ASCII and two byte. Unlike other String types, it does |
109 // not make sense to have a UTF-8 factory function for external strings, | 114 // not make sense to have a UTF-8 factory function for external strings, |
110 // because we cannot change the underlying buffer. | 115 // because we cannot change the underlying buffer. |
111 static Handle<String> NewExternalStringFromAscii( | 116 static Handle<String> NewExternalStringFromAscii( |
112 ExternalAsciiString::Resource* resource); | 117 ExternalAsciiString::Resource* resource); |
113 static Handle<String> NewExternalStringFromTwoByte( | 118 static Handle<String> NewExternalStringFromTwoByte( |
114 ExternalTwoByteString::Resource* resource); | 119 ExternalTwoByteString::Resource* resource); |
115 | 120 |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 // Update the map cache in the global context with (keys, map) | 344 // Update the map cache in the global context with (keys, map) |
340 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 345 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
341 Handle<FixedArray> keys, | 346 Handle<FixedArray> keys, |
342 Handle<Map> map); | 347 Handle<Map> map); |
343 }; | 348 }; |
344 | 349 |
345 | 350 |
346 } } // namespace v8::internal | 351 } } // namespace v8::internal |
347 | 352 |
348 #endif // V8_FACTORY_H_ | 353 #endif // V8_FACTORY_H_ |
OLD | NEW |