OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 | 653 |
654 | 654 |
655 Handle<Object> Factory::NewNumberFromUint(uint32_t value, | 655 Handle<Object> Factory::NewNumberFromUint(uint32_t value, |
656 PretenureFlag pretenure) { | 656 PretenureFlag pretenure) { |
657 CALL_HEAP_FUNCTION( | 657 CALL_HEAP_FUNCTION( |
658 isolate(), | 658 isolate(), |
659 isolate()->heap()->NumberFromUint32(value, pretenure), Object); | 659 isolate()->heap()->NumberFromUint32(value, pretenure), Object); |
660 } | 660 } |
661 | 661 |
662 | 662 |
| 663 Handle<HeapNumber> Factory::NewHeapNumber(double value, |
| 664 PretenureFlag pretenure) { |
| 665 CALL_HEAP_FUNCTION( |
| 666 isolate(), |
| 667 isolate()->heap()->AllocateHeapNumber(value, pretenure), HeapNumber); |
| 668 } |
| 669 |
| 670 |
663 Handle<JSObject> Factory::NewNeanderObject() { | 671 Handle<JSObject> Factory::NewNeanderObject() { |
664 CALL_HEAP_FUNCTION( | 672 CALL_HEAP_FUNCTION( |
665 isolate(), | 673 isolate(), |
666 isolate()->heap()->AllocateJSObjectFromMap( | 674 isolate()->heap()->AllocateJSObjectFromMap( |
667 isolate()->heap()->neander_map()), | 675 isolate()->heap()->neander_map()), |
668 JSObject); | 676 JSObject); |
669 } | 677 } |
670 | 678 |
671 | 679 |
672 Handle<Object> Factory::NewTypeError(const char* type, | 680 Handle<Object> Factory::NewTypeError(const char* type, |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 return Handle<Object>::null(); | 1556 return Handle<Object>::null(); |
1549 } | 1557 } |
1550 | 1558 |
1551 | 1559 |
1552 Handle<Object> Factory::ToBoolean(bool value) { | 1560 Handle<Object> Factory::ToBoolean(bool value) { |
1553 return value ? true_value() : false_value(); | 1561 return value ? true_value() : false_value(); |
1554 } | 1562 } |
1555 | 1563 |
1556 | 1564 |
1557 } } // namespace v8::internal | 1565 } } // namespace v8::internal |
OLD | NEW |