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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) { | 126 Handle<ObjectHashSet> Factory::NewObjectHashSet(int at_least_space_for) { |
127 ASSERT(0 <= at_least_space_for); | 127 ASSERT(0 <= at_least_space_for); |
128 CALL_HEAP_FUNCTION(isolate(), | 128 CALL_HEAP_FUNCTION(isolate(), |
129 ObjectHashSet::Allocate(isolate()->heap(), | 129 ObjectHashSet::Allocate(isolate()->heap(), |
130 at_least_space_for), | 130 at_least_space_for), |
131 ObjectHashSet); | 131 ObjectHashSet); |
132 } | 132 } |
133 | 133 |
134 | 134 |
135 Handle<ObjectHashTable> Factory::NewObjectHashTable(int at_least_space_for) { | 135 Handle<ObjectHashTable> Factory::NewObjectHashTable( |
| 136 int at_least_space_for, |
| 137 MinimumCapacity capacity_option) { |
136 ASSERT(0 <= at_least_space_for); | 138 ASSERT(0 <= at_least_space_for); |
137 CALL_HEAP_FUNCTION(isolate(), | 139 CALL_HEAP_FUNCTION(isolate(), |
138 ObjectHashTable::Allocate(isolate()->heap(), | 140 ObjectHashTable::Allocate(isolate()->heap(), |
139 at_least_space_for), | 141 at_least_space_for, |
| 142 capacity_option), |
140 ObjectHashTable); | 143 ObjectHashTable); |
141 } | 144 } |
142 | 145 |
143 | 146 |
144 Handle<WeakHashTable> Factory::NewWeakHashTable(int at_least_space_for) { | 147 Handle<WeakHashTable> Factory::NewWeakHashTable(int at_least_space_for) { |
145 ASSERT(0 <= at_least_space_for); | 148 ASSERT(0 <= at_least_space_for); |
146 CALL_HEAP_FUNCTION( | 149 CALL_HEAP_FUNCTION( |
147 isolate(), | 150 isolate(), |
148 WeakHashTable::Allocate(isolate()->heap(), | 151 WeakHashTable::Allocate(isolate()->heap(), |
149 at_least_space_for, | 152 at_least_space_for, |
150 WeakHashTable::USE_DEFAULT_MINIMUM_CAPACITY, | 153 USE_DEFAULT_MINIMUM_CAPACITY, |
151 TENURED), | 154 TENURED), |
152 WeakHashTable); | 155 WeakHashTable); |
153 } | 156 } |
154 | 157 |
155 | 158 |
156 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, | 159 Handle<DescriptorArray> Factory::NewDescriptorArray(int number_of_descriptors, |
157 int slack) { | 160 int slack) { |
158 ASSERT(0 <= number_of_descriptors); | 161 ASSERT(0 <= number_of_descriptors); |
159 CALL_HEAP_FUNCTION(isolate(), | 162 CALL_HEAP_FUNCTION(isolate(), |
160 DescriptorArray::Allocate( | 163 DescriptorArray::Allocate( |
(...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1741 return Handle<Object>::null(); | 1744 return Handle<Object>::null(); |
1742 } | 1745 } |
1743 | 1746 |
1744 | 1747 |
1745 Handle<Object> Factory::ToBoolean(bool value) { | 1748 Handle<Object> Factory::ToBoolean(bool value) { |
1746 return value ? true_value() : false_value(); | 1749 return value ? true_value() : false_value(); |
1747 } | 1750 } |
1748 | 1751 |
1749 | 1752 |
1750 } } // namespace v8::internal | 1753 } } // namespace v8::internal |
OLD | NEW |