| 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 176       FixedArrayBase); | 176       FixedArrayBase); | 
| 177 } | 177 } | 
| 178 | 178 | 
| 179 | 179 | 
| 180 Handle<FixedArrayBase> Factory::NewFixedDoubleArrayWithHoles( | 180 Handle<FixedArrayBase> Factory::NewFixedDoubleArrayWithHoles( | 
| 181     int size, | 181     int size, | 
| 182     PretenureFlag pretenure) { | 182     PretenureFlag pretenure) { | 
| 183   DCHECK(0 <= size); | 183   DCHECK(0 <= size); | 
| 184   Handle<FixedArrayBase> array = NewFixedDoubleArray(size, pretenure); | 184   Handle<FixedArrayBase> array = NewFixedDoubleArray(size, pretenure); | 
| 185   if (size > 0) { | 185   if (size > 0) { | 
| 186     Handle<FixedDoubleArray> double_array = | 186     Handle<FixedDoubleArray>::cast(array)->FillWithHoles(0, size); | 
| 187         Handle<FixedDoubleArray>::cast(array); |  | 
| 188     for (int i = 0; i < size; ++i) { |  | 
| 189       double_array->set_the_hole(i); |  | 
| 190     } |  | 
| 191   } | 187   } | 
| 192   return array; | 188   return array; | 
| 193 } | 189 } | 
| 194 | 190 | 
| 195 Handle<FrameArray> Factory::NewFrameArray(int number_of_frames, | 191 Handle<FrameArray> Factory::NewFrameArray(int number_of_frames, | 
| 196                                           PretenureFlag pretenure) { | 192                                           PretenureFlag pretenure) { | 
| 197   DCHECK_LE(0, number_of_frames); | 193   DCHECK_LE(0, number_of_frames); | 
| 198   Handle<FixedArray> result = | 194   Handle<FixedArray> result = | 
| 199       NewFixedArrayWithHoles(FrameArray::LengthFor(number_of_frames)); | 195       NewFixedArrayWithHoles(FrameArray::LengthFor(number_of_frames)); | 
| 200   result->set(FrameArray::kFrameCountIndex, Smi::kZero); | 196   result->set(FrameArray::kFrameCountIndex, Smi::kZero); | 
| (...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2726       Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); | 2722       Handle<JSFixedArrayIterator>::cast(NewJSObjectFromMap(map)); | 
| 2727   iterator->set_initial_next(*next); | 2723   iterator->set_initial_next(*next); | 
| 2728   iterator->set_array(*array); | 2724   iterator->set_array(*array); | 
| 2729   iterator->set_index(0); | 2725   iterator->set_index(0); | 
| 2730   iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); | 2726   iterator->InObjectPropertyAtPut(JSFixedArrayIterator::kNextIndex, *next); | 
| 2731   return iterator; | 2727   return iterator; | 
| 2732 } | 2728 } | 
| 2733 | 2729 | 
| 2734 }  // namespace internal | 2730 }  // namespace internal | 
| 2735 }  // namespace v8 | 2731 }  // namespace v8 | 
| OLD | NEW | 
|---|