OLD | NEW |
---|---|
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "factory.h" | 5 #include "factory.h" |
6 | 6 |
7 #include "conversions.h" | 7 #include "conversions.h" |
8 #include "isolate-inl.h" | 8 #include "isolate-inl.h" |
9 #include "macro-assembler.h" | 9 #include "macro-assembler.h" |
10 | 10 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
124 CALL_HEAP_FUNCTION( | 124 CALL_HEAP_FUNCTION( |
125 isolate(), | 125 isolate(), |
126 isolate()->heap()->AllocateConstantPoolArray(number_of_int64_entries, | 126 isolate()->heap()->AllocateConstantPoolArray(number_of_int64_entries, |
127 number_of_code_ptr_entries, | 127 number_of_code_ptr_entries, |
128 number_of_heap_ptr_entries, | 128 number_of_heap_ptr_entries, |
129 number_of_int32_entries), | 129 number_of_int32_entries), |
130 ConstantPoolArray); | 130 ConstantPoolArray); |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 Handle<ConstantPoolArray> Factory::NewExtendedConstantPoolArray( | |
ulan
2014/06/02 12:32:58
Instead of passing this long list arguments around
rmcilroy
2014/06/03 12:32:28
Good idea - done.
| |
135 int small_section_int64_entries, | |
136 int small_section_code_ptr_entries, | |
137 int small_section_heap_ptr_entries, | |
138 int small_section_int32_entries, | |
139 int extended_section_int64_entries, | |
140 int extended_section_code_ptr_entries, | |
141 int extended_section_heap_ptr_entries, | |
142 int extended_section_int32_entries) { | |
143 ASSERT(small_section_int64_entries > 0 || | |
144 small_section_code_ptr_entries > 0 || | |
145 small_section_heap_ptr_entries > 0 || | |
146 small_section_int32_entries > 0 || | |
147 extended_section_int64_entries > 0 || | |
148 extended_section_code_ptr_entries > 0 || | |
149 extended_section_heap_ptr_entries > 0 || | |
150 extended_section_int32_entries > 0); | |
151 CALL_HEAP_FUNCTION( | |
152 isolate(), | |
153 isolate()->heap()->AllocateExtendedConstantPoolArray( | |
154 small_section_int64_entries, | |
155 small_section_code_ptr_entries, | |
156 small_section_heap_ptr_entries, | |
157 small_section_int32_entries, | |
158 extended_section_int64_entries, | |
159 extended_section_code_ptr_entries, | |
160 extended_section_heap_ptr_entries, | |
161 extended_section_int32_entries), | |
162 ConstantPoolArray); | |
163 } | |
164 | |
165 | |
134 Handle<OrderedHashSet> Factory::NewOrderedHashSet() { | 166 Handle<OrderedHashSet> Factory::NewOrderedHashSet() { |
135 return OrderedHashSet::Allocate(isolate(), 4); | 167 return OrderedHashSet::Allocate(isolate(), 4); |
136 } | 168 } |
137 | 169 |
138 | 170 |
139 Handle<OrderedHashMap> Factory::NewOrderedHashMap() { | 171 Handle<OrderedHashMap> Factory::NewOrderedHashMap() { |
140 return OrderedHashMap::Allocate(isolate(), 4); | 172 return OrderedHashMap::Allocate(isolate(), 4); |
141 } | 173 } |
142 | 174 |
143 | 175 |
(...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2331 return Handle<Object>::null(); | 2363 return Handle<Object>::null(); |
2332 } | 2364 } |
2333 | 2365 |
2334 | 2366 |
2335 Handle<Object> Factory::ToBoolean(bool value) { | 2367 Handle<Object> Factory::ToBoolean(bool value) { |
2336 return value ? true_value() : false_value(); | 2368 return value ? true_value() : false_value(); |
2337 } | 2369 } |
2338 | 2370 |
2339 | 2371 |
2340 } } // namespace v8::internal | 2372 } } // namespace v8::internal |
OLD | NEW |