| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // the string are uninitialized. Currently used in regexp code only, where | 99 // the string are uninitialized. Currently used in regexp code only, where |
| 100 // they are pretenured. | 100 // they are pretenured. |
| 101 static Handle<String> NewRawTwoByteString( | 101 static Handle<String> NewRawTwoByteString( |
| 102 int length, | 102 int length, |
| 103 PretenureFlag pretenure = NOT_TENURED); | 103 PretenureFlag pretenure = NOT_TENURED); |
| 104 | 104 |
| 105 // Create a new cons string object which consists of a pair of strings. | 105 // Create a new cons string object which consists of a pair of strings. |
| 106 static Handle<String> NewConsString(Handle<String> first, | 106 static Handle<String> NewConsString(Handle<String> first, |
| 107 Handle<String> second); | 107 Handle<String> second); |
| 108 | 108 |
| 109 // Create a new sliced string object which represents a substring of a | 109 // Create a new string object which holds a substring of a string. |
| 110 // backing string. | 110 static Handle<String> NewSubString(Handle<String> str, |
| 111 static Handle<String> NewStringSlice(Handle<String> str, | 111 int begin, |
| 112 int begin, | 112 int end); |
| 113 int end); | |
| 114 | 113 |
| 115 // Creates a new external String object. There are two String encodings | 114 // Creates a new external String object. There are two String encodings |
| 116 // in the system: ASCII and two byte. Unlike other String types, it does | 115 // in the system: ASCII and two byte. Unlike other String types, it does |
| 117 // not make sense to have a UTF-8 factory function for external strings, | 116 // not make sense to have a UTF-8 factory function for external strings, |
| 118 // because we cannot change the underlying buffer. | 117 // because we cannot change the underlying buffer. |
| 119 static Handle<String> NewExternalStringFromAscii( | 118 static Handle<String> NewExternalStringFromAscii( |
| 120 ExternalAsciiString::Resource* resource); | 119 ExternalAsciiString::Resource* resource); |
| 121 static Handle<String> NewExternalStringFromTwoByte( | 120 static Handle<String> NewExternalStringFromTwoByte( |
| 122 ExternalTwoByteString::Resource* resource); | 121 ExternalTwoByteString::Resource* resource); |
| 123 | 122 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // Update the map cache in the global context with (keys, map) | 382 // Update the map cache in the global context with (keys, map) |
| 384 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 383 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
| 385 Handle<FixedArray> keys, | 384 Handle<FixedArray> keys, |
| 386 Handle<Map> map); | 385 Handle<Map> map); |
| 387 }; | 386 }; |
| 388 | 387 |
| 389 | 388 |
| 390 } } // namespace v8::internal | 389 } } // namespace v8::internal |
| 391 | 390 |
| 392 #endif // V8_FACTORY_H_ | 391 #endif // V8_FACTORY_H_ |
| OLD | NEW |