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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 static Handle<String> NewStringFromAscii( | 88 static Handle<String> NewStringFromAscii( |
89 Vector<const char> str, | 89 Vector<const char> str, |
90 PretenureFlag pretenure = NOT_TENURED); | 90 PretenureFlag pretenure = NOT_TENURED); |
91 | 91 |
92 // UTF8 strings are pretenured when used for regexp literal patterns and | 92 // UTF8 strings are pretenured when used for regexp literal patterns and |
93 // flags in the parser. | 93 // flags in the parser. |
94 static Handle<String> NewStringFromUtf8( | 94 static Handle<String> NewStringFromUtf8( |
95 Vector<const char> str, | 95 Vector<const char> str, |
96 PretenureFlag pretenure = NOT_TENURED); | 96 PretenureFlag pretenure = NOT_TENURED); |
97 | 97 |
98 static Handle<String> NewStringFromTwoByte(Vector<const uc16> str, | 98 static Handle<String> NewStringFromTwoByte( |
| 99 Vector<const uc16> str, |
99 PretenureFlag pretenure = NOT_TENURED); | 100 PretenureFlag pretenure = NOT_TENURED); |
100 | 101 |
101 // Allocates and partially initializes a TwoByte String. The characters of | 102 // Allocates and partially initializes an ASCII or TwoByte String. The |
102 // the string are uninitialized. Currently used in regexp code only, where | 103 // characters of the string are uninitialized. Currently used in regexp code |
103 // they are pretenured. | 104 // only, where they are pretenured. |
| 105 static Handle<String> NewRawAsciiString( |
| 106 int length, |
| 107 PretenureFlag pretenure = NOT_TENURED); |
104 static Handle<String> NewRawTwoByteString( | 108 static Handle<String> NewRawTwoByteString( |
105 int length, | 109 int length, |
106 PretenureFlag pretenure = NOT_TENURED); | 110 PretenureFlag pretenure = NOT_TENURED); |
107 | 111 |
108 // Create a new cons string object which consists of a pair of strings. | 112 // Create a new cons string object which consists of a pair of strings. |
109 static Handle<String> NewConsString(Handle<String> first, | 113 static Handle<String> NewConsString(Handle<String> first, |
110 Handle<String> second); | 114 Handle<String> second); |
111 | 115 |
112 // Create a new string object which holds a substring of a string. | 116 // Create a new string object which holds a substring of a string. |
113 static Handle<String> NewSubString(Handle<String> str, | 117 static Handle<String> NewSubString(Handle<String> str, |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 // Update the map cache in the global context with (keys, map) | 402 // Update the map cache in the global context with (keys, map) |
399 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 403 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
400 Handle<FixedArray> keys, | 404 Handle<FixedArray> keys, |
401 Handle<Map> map); | 405 Handle<Map> map); |
402 }; | 406 }; |
403 | 407 |
404 | 408 |
405 } } // namespace v8::internal | 409 } } // namespace v8::internal |
406 | 410 |
407 #endif // V8_FACTORY_H_ | 411 #endif // V8_FACTORY_H_ |
OLD | NEW |