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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 Handle<FixedDoubleArray> Factory::NewFixedDoubleArray(int size, | 72 Handle<FixedDoubleArray> Factory::NewFixedDoubleArray(int size, |
73 PretenureFlag pretenure) { | 73 PretenureFlag pretenure) { |
74 ASSERT(0 <= size); | 74 ASSERT(0 <= size); |
75 CALL_HEAP_FUNCTION( | 75 CALL_HEAP_FUNCTION( |
76 isolate(), | 76 isolate(), |
77 isolate()->heap()->AllocateUninitializedFixedDoubleArray(size, pretenure), | 77 isolate()->heap()->AllocateUninitializedFixedDoubleArray(size, pretenure), |
78 FixedDoubleArray); | 78 FixedDoubleArray); |
79 } | 79 } |
80 | 80 |
81 | 81 |
| 82 Handle<ConstantPoolArray> Factory::NewConstantPoolArray( |
| 83 int number_of_int64_entries, |
| 84 int number_of_ptr_entries, |
| 85 int number_of_int32_entries) { |
| 86 ASSERT(number_of_int64_entries > 0 || number_of_ptr_entries > 0 || |
| 87 number_of_int32_entries > 0); |
| 88 CALL_HEAP_FUNCTION( |
| 89 isolate(), |
| 90 isolate()->heap()->AllocateConstantPoolArray(number_of_int64_entries, |
| 91 number_of_ptr_entries, |
| 92 number_of_int32_entries), |
| 93 ConstantPoolArray); |
| 94 } |
| 95 |
| 96 |
82 Handle<NameDictionary> Factory::NewNameDictionary(int at_least_space_for) { | 97 Handle<NameDictionary> Factory::NewNameDictionary(int at_least_space_for) { |
83 ASSERT(0 <= at_least_space_for); | 98 ASSERT(0 <= at_least_space_for); |
84 CALL_HEAP_FUNCTION(isolate(), | 99 CALL_HEAP_FUNCTION(isolate(), |
85 NameDictionary::Allocate(isolate()->heap(), | 100 NameDictionary::Allocate(isolate()->heap(), |
86 at_least_space_for), | 101 at_least_space_for), |
87 NameDictionary); | 102 NameDictionary); |
88 } | 103 } |
89 | 104 |
90 | 105 |
91 Handle<SeededNumberDictionary> Factory::NewSeededNumberDictionary( | 106 Handle<SeededNumberDictionary> Factory::NewSeededNumberDictionary( |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 CALL_HEAP_FUNCTION(isolate(), array->CopySize(new_length), FixedArray); | 617 CALL_HEAP_FUNCTION(isolate(), array->CopySize(new_length), FixedArray); |
603 } | 618 } |
604 | 619 |
605 | 620 |
606 Handle<FixedDoubleArray> Factory::CopyFixedDoubleArray( | 621 Handle<FixedDoubleArray> Factory::CopyFixedDoubleArray( |
607 Handle<FixedDoubleArray> array) { | 622 Handle<FixedDoubleArray> array) { |
608 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedDoubleArray); | 623 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedDoubleArray); |
609 } | 624 } |
610 | 625 |
611 | 626 |
| 627 Handle<ConstantPoolArray> Factory::CopyConstantPoolArray( |
| 628 Handle<ConstantPoolArray> array) { |
| 629 CALL_HEAP_FUNCTION(isolate(), array->Copy(), ConstantPoolArray); |
| 630 } |
| 631 |
| 632 |
612 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( | 633 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( |
613 Handle<SharedFunctionInfo> function_info, | 634 Handle<SharedFunctionInfo> function_info, |
614 Handle<Map> function_map, | 635 Handle<Map> function_map, |
615 PretenureFlag pretenure) { | 636 PretenureFlag pretenure) { |
616 CALL_HEAP_FUNCTION( | 637 CALL_HEAP_FUNCTION( |
617 isolate(), | 638 isolate(), |
618 isolate()->heap()->AllocateFunction(*function_map, | 639 isolate()->heap()->AllocateFunction(*function_map, |
619 *function_info, | 640 *function_info, |
620 isolate()->heap()->the_hole_value(), | 641 isolate()->heap()->the_hole_value(), |
621 pretenure), | 642 pretenure), |
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1631 return Handle<Object>::null(); | 1652 return Handle<Object>::null(); |
1632 } | 1653 } |
1633 | 1654 |
1634 | 1655 |
1635 Handle<Object> Factory::ToBoolean(bool value) { | 1656 Handle<Object> Factory::ToBoolean(bool value) { |
1636 return value ? true_value() : false_value(); | 1657 return value ? true_value() : false_value(); |
1637 } | 1658 } |
1638 | 1659 |
1639 | 1660 |
1640 } } // namespace v8::internal | 1661 } } // namespace v8::internal |
OLD | NEW |