| 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 3109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3120 SKIP_WRITE_BARRIER); | 3120 SKIP_WRITE_BARRIER); |
| 3121 } else if (size == 2 * kPointerSize) { | 3121 } else if (size == 2 * kPointerSize) { |
| 3122 filler->set_map_after_allocation( | 3122 filler->set_map_after_allocation( |
| 3123 reinterpret_cast<Map*>(root(kTwoPointerFillerMapRootIndex)), | 3123 reinterpret_cast<Map*>(root(kTwoPointerFillerMapRootIndex)), |
| 3124 SKIP_WRITE_BARRIER); | 3124 SKIP_WRITE_BARRIER); |
| 3125 } else { | 3125 } else { |
| 3126 DCHECK_GT(size, 2 * kPointerSize); | 3126 DCHECK_GT(size, 2 * kPointerSize); |
| 3127 filler->set_map_after_allocation( | 3127 filler->set_map_after_allocation( |
| 3128 reinterpret_cast<Map*>(root(kFreeSpaceMapRootIndex)), | 3128 reinterpret_cast<Map*>(root(kFreeSpaceMapRootIndex)), |
| 3129 SKIP_WRITE_BARRIER); | 3129 SKIP_WRITE_BARRIER); |
| 3130 FreeSpace::cast(filler)->nobarrier_set_size(size); | 3130 FreeSpace::cast(filler)->relaxed_write_size(size); |
| 3131 } | 3131 } |
| 3132 if (mode == ClearRecordedSlots::kYes) { | 3132 if (mode == ClearRecordedSlots::kYes) { |
| 3133 ClearRecordedSlotRange(addr, addr + size); | 3133 ClearRecordedSlotRange(addr, addr + size); |
| 3134 } | 3134 } |
| 3135 | 3135 |
| 3136 // At this point, we may be deserializing the heap from a snapshot, and | 3136 // At this point, we may be deserializing the heap from a snapshot, and |
| 3137 // none of the maps have been created yet and are NULL. | 3137 // none of the maps have been created yet and are NULL. |
| 3138 DCHECK((filler->map() == NULL && !deserialization_complete_) || | 3138 DCHECK((filler->map() == NULL && !deserialization_complete_) || |
| 3139 filler->map()->IsMap()); | 3139 filler->map()->IsMap()); |
| 3140 return filler; | 3140 return filler; |
| (...skipping 3457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6598 case LO_SPACE: | 6598 case LO_SPACE: |
| 6599 return "LO_SPACE"; | 6599 return "LO_SPACE"; |
| 6600 default: | 6600 default: |
| 6601 UNREACHABLE(); | 6601 UNREACHABLE(); |
| 6602 } | 6602 } |
| 6603 return NULL; | 6603 return NULL; |
| 6604 } | 6604 } |
| 6605 | 6605 |
| 6606 } // namespace internal | 6606 } // namespace internal |
| 6607 } // namespace v8 | 6607 } // namespace v8 |
| OLD | NEW |