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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 | 119 |
120 Handle<ObjectHashTable> Factory::NewObjectHashTable(int at_least_space_for) { | 120 Handle<ObjectHashTable> Factory::NewObjectHashTable(int at_least_space_for) { |
121 ASSERT(0 <= at_least_space_for); | 121 ASSERT(0 <= at_least_space_for); |
122 CALL_HEAP_FUNCTION(isolate(), | 122 CALL_HEAP_FUNCTION(isolate(), |
123 ObjectHashTable::Allocate(isolate()->heap(), | 123 ObjectHashTable::Allocate(isolate()->heap(), |
124 at_least_space_for), | 124 at_least_space_for), |
125 ObjectHashTable); | 125 ObjectHashTable); |
126 } | 126 } |
127 | 127 |
128 | 128 |
| 129 Handle<WeakHashTable> Factory::NewWeakHashTable(int at_least_space_for) { |
| 130 ASSERT(0 <= at_least_space_for); |
| 131 CALL_HEAP_FUNCTION( |
| 132 isolate(), |
| 133 WeakHashTable::Allocate(isolate()->heap(), |
| 134 at_least_space_for, |
| 135 WeakHashTable::USE_DEFAULT_MINIMUM_CAPACITY, |
| 136 TENURED), |
| 137 WeakHashTable); |
| 138 } |
| 139 |
| 140 |
129 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, | 141 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, |
130 int slack) { | 142 int slack) { |
131 ASSERT(0 <= number_of_descriptors); | 143 ASSERT(0 <= number_of_descriptors); |
132 CALL_HEAP_FUNCTION(isolate(), | 144 CALL_HEAP_FUNCTION(isolate(), |
133 DescriptorArray::Allocate( | 145 DescriptorArray::Allocate( |
134 isolate(), number_of_descriptors, slack), | 146 isolate(), number_of_descriptors, slack), |
135 DescriptorArray); | 147 DescriptorArray); |
136 } | 148 } |
137 | 149 |
138 | 150 |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 Map); | 603 Map); |
592 } | 604 } |
593 | 605 |
594 | 606 |
595 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { | 607 Handle<FixedArray> Factory::CopyFixedArray(Handle<FixedArray> array) { |
596 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); | 608 CALL_HEAP_FUNCTION(isolate(), array->Copy(), FixedArray); |
597 } | 609 } |
598 | 610 |
599 | 611 |
600 Handle<FixedArray> Factory::CopySizeFixedArray(Handle<FixedArray> array, | 612 Handle<FixedArray> Factory::CopySizeFixedArray(Handle<FixedArray> array, |
601 int new_length) { | 613 int new_length, |
602 CALL_HEAP_FUNCTION(isolate(), array->CopySize(new_length), FixedArray); | 614 PretenureFlag pretenure) { |
| 615 CALL_HEAP_FUNCTION(isolate(), |
| 616 array->CopySize(new_length, pretenure), |
| 617 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 |
612 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( | 627 Handle<JSFunction> Factory::BaseNewFunctionFromSharedFunctionInfo( |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1631 return Handle<Object>::null(); | 1646 return Handle<Object>::null(); |
1632 } | 1647 } |
1633 | 1648 |
1634 | 1649 |
1635 Handle<Object> Factory::ToBoolean(bool value) { | 1650 Handle<Object> Factory::ToBoolean(bool value) { |
1636 return value ? true_value() : false_value(); | 1651 return value ? true_value() : false_value(); |
1637 } | 1652 } |
1638 | 1653 |
1639 | 1654 |
1640 } } // namespace v8::internal | 1655 } } // namespace v8::internal |
OLD | NEW |