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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 CALL_HEAP_FUNCTION(isolate(), | 193 CALL_HEAP_FUNCTION(isolate(), |
194 isolate()->heap()->LookupTwoByteSymbol(string), | 194 isolate()->heap()->LookupTwoByteSymbol(string), |
195 String); | 195 String); |
196 } | 196 } |
197 | 197 |
198 | 198 |
199 Handle<String> Factory::NewStringFromAscii(Vector<const char> string, | 199 Handle<String> Factory::NewStringFromAscii(Vector<const char> string, |
200 PretenureFlag pretenure) { | 200 PretenureFlag pretenure) { |
201 CALL_HEAP_FUNCTION( | 201 CALL_HEAP_FUNCTION( |
202 isolate(), | 202 isolate(), |
203 isolate()->heap()->AllocateStringFromAscii(string, pretenure), | 203 isolate()->heap()->AllocateStringFromOneByte(string, pretenure), |
204 String); | 204 String); |
205 } | 205 } |
206 | 206 |
207 Handle<String> Factory::NewStringFromUtf8(Vector<const char> string, | 207 Handle<String> Factory::NewStringFromUtf8(Vector<const char> string, |
208 PretenureFlag pretenure) { | 208 PretenureFlag pretenure) { |
209 CALL_HEAP_FUNCTION( | 209 CALL_HEAP_FUNCTION( |
210 isolate(), | 210 isolate(), |
211 isolate()->heap()->AllocateStringFromUtf8(string, pretenure), | 211 isolate()->heap()->AllocateStringFromUtf8(string, pretenure), |
212 String); | 212 String); |
213 } | 213 } |
214 | 214 |
215 | 215 |
216 Handle<String> Factory::NewStringFromTwoByte(Vector<const uc16> string, | 216 Handle<String> Factory::NewStringFromTwoByte(Vector<const uc16> string, |
217 PretenureFlag pretenure) { | 217 PretenureFlag pretenure) { |
218 CALL_HEAP_FUNCTION( | 218 CALL_HEAP_FUNCTION( |
219 isolate(), | 219 isolate(), |
220 isolate()->heap()->AllocateStringFromTwoByte(string, pretenure), | 220 isolate()->heap()->AllocateStringFromTwoByte(string, pretenure), |
221 String); | 221 String); |
222 } | 222 } |
223 | 223 |
224 | 224 |
225 Handle<SeqOneByteString> Factory::NewRawOneByteString(int length, | 225 Handle<SeqOneByteString> Factory::NewRawOneByteString(int length, |
226 PretenureFlag pretenure) { | 226 PretenureFlag pretenure) { |
227 CALL_HEAP_FUNCTION( | 227 CALL_HEAP_FUNCTION( |
228 isolate(), | 228 isolate(), |
229 isolate()->heap()->AllocateRawAsciiString(length, pretenure), | 229 isolate()->heap()->AllocateRawOneByteString(length, pretenure), |
230 SeqOneByteString); | 230 SeqOneByteString); |
231 } | 231 } |
232 | 232 |
233 | 233 |
234 Handle<SeqTwoByteString> Factory::NewRawTwoByteString(int length, | 234 Handle<SeqTwoByteString> Factory::NewRawTwoByteString(int length, |
235 PretenureFlag pretenure) { | 235 PretenureFlag pretenure) { |
236 CALL_HEAP_FUNCTION( | 236 CALL_HEAP_FUNCTION( |
237 isolate(), | 237 isolate(), |
238 isolate()->heap()->AllocateRawTwoByteString(length, pretenure), | 238 isolate()->heap()->AllocateRawTwoByteString(length, pretenure), |
239 SeqTwoByteString); | 239 SeqTwoByteString); |
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 | 1440 |
1441 | 1441 |
1442 Handle<Object> Factory::ToBoolean(bool value) { | 1442 Handle<Object> Factory::ToBoolean(bool value) { |
1443 return Handle<Object>(value | 1443 return Handle<Object>(value |
1444 ? isolate()->heap()->true_value() | 1444 ? isolate()->heap()->true_value() |
1445 : isolate()->heap()->false_value()); | 1445 : isolate()->heap()->false_value()); |
1446 } | 1446 } |
1447 | 1447 |
1448 | 1448 |
1449 } } // namespace v8::internal | 1449 } } // namespace v8::internal |
OLD | NEW |