| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 | 197 |
| 198 Handle<String> Factory::NewStringFromAscii(Vector<const char> string, | 198 Handle<String> Factory::NewStringFromAscii(Vector<const char> string, |
| 199 PretenureFlag pretenure) { | 199 PretenureFlag pretenure) { |
| 200 CALL_HEAP_FUNCTION( | 200 CALL_HEAP_FUNCTION( |
| 201 isolate(), | 201 isolate(), |
| 202 isolate()->heap()->AllocateStringFromAscii(string, pretenure), | 202 isolate()->heap()->AllocateStringFromAscii(string, pretenure), |
| 203 String); | 203 String); |
| 204 } | 204 } |
| 205 | 205 |
| 206 Handle<String> Factory::NewStringFromUtf8(Vector<const char> string, | 206 Handle<String> Factory::NewStringFromUtf8(Vector<const char> string, |
| 207 PretenureFlag pretenure, | 207 PretenureFlag pretenure) { |
| 208 String::AsciiHint ascii_hint) { | |
| 209 CALL_HEAP_FUNCTION( | 208 CALL_HEAP_FUNCTION( |
| 210 isolate(), | 209 isolate(), |
| 211 isolate()->heap()->AllocateStringFromUtf8( | 210 isolate()->heap()->AllocateStringFromUtf8(string, pretenure), |
| 212 string, pretenure, ascii_hint), | |
| 213 String); | 211 String); |
| 214 } | 212 } |
| 215 | 213 |
| 216 | |
| 217 Handle<String> Factory::NewStringFromLatin1(Vector<const char> string, | |
| 218 PretenureFlag pretenure, | |
| 219 String::AsciiHint ascii_hint) { | |
| 220 CALL_HEAP_FUNCTION( | |
| 221 isolate(), | |
| 222 isolate()->heap()->AllocateStringFromLatin1( | |
| 223 string, pretenure, ascii_hint), | |
| 224 String); | |
| 225 } | |
| 226 | |
| 227 | 214 |
| 228 Handle<String> Factory::NewStringFromTwoByte(Vector<const uc16> string, | 215 Handle<String> Factory::NewStringFromTwoByte(Vector<const uc16> string, |
| 229 PretenureFlag pretenure) { | 216 PretenureFlag pretenure) { |
| 230 CALL_HEAP_FUNCTION( | 217 CALL_HEAP_FUNCTION( |
| 231 isolate(), | 218 isolate(), |
| 232 isolate()->heap()->AllocateStringFromTwoByte(string, pretenure), | 219 isolate()->heap()->AllocateStringFromTwoByte(string, pretenure), |
| 233 String); | 220 String); |
| 234 } | 221 } |
| 235 | 222 |
| 236 | 223 |
| (...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1422 | 1409 |
| 1423 | 1410 |
| 1424 Handle<Object> Factory::ToBoolean(bool value) { | 1411 Handle<Object> Factory::ToBoolean(bool value) { |
| 1425 return Handle<Object>(value | 1412 return Handle<Object>(value |
| 1426 ? isolate()->heap()->true_value() | 1413 ? isolate()->heap()->true_value() |
| 1427 : isolate()->heap()->false_value()); | 1414 : isolate()->heap()->false_value()); |
| 1428 } | 1415 } |
| 1429 | 1416 |
| 1430 | 1417 |
| 1431 } } // namespace v8::internal | 1418 } } // namespace v8::internal |
| OLD | NEW |