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 CALL_HEAP_FUNCTION(isolate(), | |
Vitaly Repeshko
2011/06/22 12:45:41
Assert it's a strict substring?
sandholm
2011/06/22 14:05:41
Done.
| |
221 isolate()->heap()->AllocateSubString(*str, begin, end), | |
222 String); | |
223 } | |
224 | |
225 | |
217 Handle<String> Factory::NewExternalStringFromAscii( | 226 Handle<String> Factory::NewExternalStringFromAscii( |
218 ExternalAsciiString::Resource* resource) { | 227 ExternalAsciiString::Resource* resource) { |
219 CALL_HEAP_FUNCTION( | 228 CALL_HEAP_FUNCTION( |
220 isolate(), | 229 isolate(), |
221 isolate()->heap()->AllocateExternalStringFromAscii(resource), | 230 isolate()->heap()->AllocateExternalStringFromAscii(resource), |
222 String); | 231 String); |
223 } | 232 } |
224 | 233 |
225 | 234 |
226 Handle<String> Factory::NewExternalStringFromTwoByte( | 235 Handle<String> Factory::NewExternalStringFromTwoByte( |
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1230 Execution::ConfigureInstance(instance, | 1239 Execution::ConfigureInstance(instance, |
1231 instance_template, | 1240 instance_template, |
1232 pending_exception); | 1241 pending_exception); |
1233 } else { | 1242 } else { |
1234 *pending_exception = false; | 1243 *pending_exception = false; |
1235 } | 1244 } |
1236 } | 1245 } |
1237 | 1246 |
1238 | 1247 |
1239 } } // namespace v8::internal | 1248 } } // namespace v8::internal |
OLD | NEW |