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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 Handle<Object> NewNumber(double value, | 308 Handle<Object> NewNumber(double value, |
309 PretenureFlag pretenure = NOT_TENURED); | 309 PretenureFlag pretenure = NOT_TENURED); |
310 | 310 |
311 Handle<Object> NewNumberFromInt(int32_t value, | 311 Handle<Object> NewNumberFromInt(int32_t value, |
312 PretenureFlag pretenure = NOT_TENURED); | 312 PretenureFlag pretenure = NOT_TENURED); |
313 Handle<Object> NewNumberFromUint(uint32_t value, | 313 Handle<Object> NewNumberFromUint(uint32_t value, |
314 PretenureFlag pretenure = NOT_TENURED); | 314 PretenureFlag pretenure = NOT_TENURED); |
315 inline Handle<Object> NewNumberFromSize(size_t value, | 315 inline Handle<Object> NewNumberFromSize(size_t value, |
316 PretenureFlag pretenure = NOT_TENURED); | 316 PretenureFlag pretenure = NOT_TENURED); |
317 Handle<HeapNumber> NewHeapNumber(double value, | 317 Handle<HeapNumber> NewHeapNumber(double value, |
| 318 MutableMode mode = IMMUTABLE, |
318 PretenureFlag pretenure = NOT_TENURED); | 319 PretenureFlag pretenure = NOT_TENURED); |
319 | 320 |
320 | |
321 // These objects are used by the api to create env-independent data | 321 // These objects are used by the api to create env-independent data |
322 // structures in the heap. | 322 // structures in the heap. |
323 Handle<JSObject> NewNeanderObject(); | 323 Handle<JSObject> NewNeanderObject(); |
324 | 324 |
325 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); | 325 Handle<JSObject> NewArgumentsObject(Handle<Object> callee, int length); |
326 | 326 |
327 // JS objects are pretenured when allocated by the bootstrapper and | 327 // JS objects are pretenured when allocated by the bootstrapper and |
328 // runtime. | 328 // runtime. |
329 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, | 329 Handle<JSObject> NewJSObject(Handle<JSFunction> constructor, |
330 PretenureFlag pretenure = NOT_TENURED); | 330 PretenureFlag pretenure = NOT_TENURED); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 isolate()); | 627 isolate()); |
628 } else { | 628 } else { |
629 return NewNumber(static_cast<double>(value), pretenure); | 629 return NewNumber(static_cast<double>(value), pretenure); |
630 } | 630 } |
631 } | 631 } |
632 | 632 |
633 | 633 |
634 } } // namespace v8::internal | 634 } } // namespace v8::internal |
635 | 635 |
636 #endif // V8_FACTORY_H_ | 636 #endif // V8_FACTORY_H_ |
OLD | NEW |