| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/heap/heap.h" | 5 #include "src/heap/heap.h" |
| 6 | 6 |
| 7 #include <unordered_map> | 7 #include <unordered_map> |
| 8 #include <unordered_set> | 8 #include <unordered_set> |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 4010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4021 } | 4021 } |
| 4022 | 4022 |
| 4023 result->set_map_after_allocation(fixed_array_map(), SKIP_WRITE_BARRIER); | 4023 result->set_map_after_allocation(fixed_array_map(), SKIP_WRITE_BARRIER); |
| 4024 FixedArray* array = FixedArray::cast(result); | 4024 FixedArray* array = FixedArray::cast(result); |
| 4025 array->set_length(length); | 4025 array->set_length(length); |
| 4026 MemsetPointer(array->data_start(), filler, length); | 4026 MemsetPointer(array->data_start(), filler, length); |
| 4027 return array; | 4027 return array; |
| 4028 } | 4028 } |
| 4029 | 4029 |
| 4030 | 4030 |
| 4031 AllocationResult Heap::AllocateFixedArray(int length, PretenureFlag pretenure) { | |
| 4032 return AllocateFixedArrayWithFiller(length, pretenure, undefined_value()); | |
| 4033 } | |
| 4034 | |
| 4035 | |
| 4036 AllocationResult Heap::AllocateUninitializedFixedArray(int length) { | 4031 AllocationResult Heap::AllocateUninitializedFixedArray(int length) { |
| 4037 if (length == 0) return empty_fixed_array(); | 4032 if (length == 0) return empty_fixed_array(); |
| 4038 | 4033 |
| 4039 HeapObject* obj = nullptr; | 4034 HeapObject* obj = nullptr; |
| 4040 { | 4035 { |
| 4041 AllocationResult allocation = AllocateRawFixedArray(length, NOT_TENURED); | 4036 AllocationResult allocation = AllocateRawFixedArray(length, NOT_TENURED); |
| 4042 if (!allocation.To(&obj)) return allocation; | 4037 if (!allocation.To(&obj)) return allocation; |
| 4043 } | 4038 } |
| 4044 | 4039 |
| 4045 obj->set_map_after_allocation(fixed_array_map(), SKIP_WRITE_BARRIER); | 4040 obj->set_map_after_allocation(fixed_array_map(), SKIP_WRITE_BARRIER); |
| (...skipping 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6721 return dst == src && type == CODE_TYPE; | 6716 return dst == src && type == CODE_TYPE; |
| 6722 case MAP_SPACE: | 6717 case MAP_SPACE: |
| 6723 case LO_SPACE: | 6718 case LO_SPACE: |
| 6724 return false; | 6719 return false; |
| 6725 } | 6720 } |
| 6726 UNREACHABLE(); | 6721 UNREACHABLE(); |
| 6727 } | 6722 } |
| 6728 | 6723 |
| 6729 } // namespace internal | 6724 } // namespace internal |
| 6730 } // namespace v8 | 6725 } // namespace v8 |
| OLD | NEW |