OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 | 207 |
208 Handle<String> Factory::NewSubString(Handle<String> str, | 208 Handle<String> Factory::NewSubString(Handle<String> str, |
209 int begin, | 209 int begin, |
210 int end) { | 210 int end) { |
211 CALL_HEAP_FUNCTION(isolate(), | 211 CALL_HEAP_FUNCTION(isolate(), |
212 str->SubString(begin, end), | 212 str->SubString(begin, end), |
213 String); | 213 String); |
214 } | 214 } |
215 | 215 |
216 | 216 |
| 217 Handle<String> Factory::NewStrictSubString(Handle<String> str, |
| 218 int begin, |
| 219 int end) { |
| 220 ASSERT(begin > 0 || end < str->length()); |
| 221 CALL_HEAP_FUNCTION(isolate(), |
| 222 isolate()->heap()->AllocateSubString(*str, begin, end), |
| 223 String); |
| 224 } |
| 225 |
| 226 |
217 Handle<String> Factory::NewExternalStringFromAscii( | 227 Handle<String> Factory::NewExternalStringFromAscii( |
218 ExternalAsciiString::Resource* resource) { | 228 ExternalAsciiString::Resource* resource) { |
219 CALL_HEAP_FUNCTION( | 229 CALL_HEAP_FUNCTION( |
220 isolate(), | 230 isolate(), |
221 isolate()->heap()->AllocateExternalStringFromAscii(resource), | 231 isolate()->heap()->AllocateExternalStringFromAscii(resource), |
222 String); | 232 String); |
223 } | 233 } |
224 | 234 |
225 | 235 |
226 Handle<String> Factory::NewExternalStringFromTwoByte( | 236 Handle<String> Factory::NewExternalStringFromTwoByte( |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1230 Execution::ConfigureInstance(instance, | 1240 Execution::ConfigureInstance(instance, |
1231 instance_template, | 1241 instance_template, |
1232 pending_exception); | 1242 pending_exception); |
1233 } else { | 1243 } else { |
1234 *pending_exception = false; | 1244 *pending_exception = false; |
1235 } | 1245 } |
1236 } | 1246 } |
1237 | 1247 |
1238 | 1248 |
1239 } } // namespace v8::internal | 1249 } } // namespace v8::internal |
OLD | NEW |