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 "src/factory.h" | 5 #include "src/factory.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/allocation-site-scopes.h" | 8 #include "src/allocation-site-scopes.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 if (size > 0) { | 170 if (size > 0) { |
171 Handle<FixedDoubleArray> double_array = | 171 Handle<FixedDoubleArray> double_array = |
172 Handle<FixedDoubleArray>::cast(array); | 172 Handle<FixedDoubleArray>::cast(array); |
173 for (int i = 0; i < size; ++i) { | 173 for (int i = 0; i < size; ++i) { |
174 double_array->set_the_hole(i); | 174 double_array->set_the_hole(i); |
175 } | 175 } |
176 } | 176 } |
177 return array; | 177 return array; |
178 } | 178 } |
179 | 179 |
| 180 Handle<FrameArray> Factory::NewFrameArray(int number_of_frames, |
| 181 PretenureFlag pretenure) { |
| 182 DCHECK_LE(0, number_of_frames); |
| 183 Handle<FixedArray> result = |
| 184 NewFixedArrayWithHoles(FrameArray::LengthFor(number_of_frames)); |
| 185 result->set(FrameArray::kFrameCountIndex, Smi::FromInt(0)); |
| 186 return Handle<FrameArray>::cast(result); |
| 187 } |
180 | 188 |
181 Handle<OrderedHashSet> Factory::NewOrderedHashSet() { | 189 Handle<OrderedHashSet> Factory::NewOrderedHashSet() { |
182 return OrderedHashSet::Allocate(isolate(), OrderedHashSet::kMinCapacity); | 190 return OrderedHashSet::Allocate(isolate(), OrderedHashSet::kMinCapacity); |
183 } | 191 } |
184 | 192 |
185 | 193 |
186 Handle<OrderedHashMap> Factory::NewOrderedHashMap() { | 194 Handle<OrderedHashMap> Factory::NewOrderedHashMap() { |
187 return OrderedHashMap::Allocate(isolate(), OrderedHashMap::kMinCapacity); | 195 return OrderedHashMap::Allocate(isolate(), OrderedHashMap::kMinCapacity); |
188 } | 196 } |
189 | 197 |
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2496 Handle<AccessorInfo> prototype = | 2504 Handle<AccessorInfo> prototype = |
2497 Accessors::FunctionPrototypeInfo(isolate(), attribs); | 2505 Accessors::FunctionPrototypeInfo(isolate(), attribs); |
2498 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), | 2506 AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())), |
2499 prototype, attribs); | 2507 prototype, attribs); |
2500 map->AppendDescriptor(&d); | 2508 map->AppendDescriptor(&d); |
2501 } | 2509 } |
2502 } | 2510 } |
2503 | 2511 |
2504 } // namespace internal | 2512 } // namespace internal |
2505 } // namespace v8 | 2513 } // namespace v8 |
OLD | NEW |