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 "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 2065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2076 // Must be called only after |instance_type|, |instance_size| and | 2076 // Must be called only after |instance_type|, |instance_size| and |
2077 // |layout_descriptor| are set. | 2077 // |layout_descriptor| are set. |
2078 map->set_visitor_id(Heap::GetStaticVisitorIdForMap(map)); | 2078 map->set_visitor_id(Heap::GetStaticVisitorIdForMap(map)); |
2079 map->set_bit_field(0); | 2079 map->set_bit_field(0); |
2080 map->set_bit_field2(1 << Map::kIsExtensible); | 2080 map->set_bit_field2(1 << Map::kIsExtensible); |
2081 int bit_field3 = Map::EnumLengthBits::encode(kInvalidEnumCacheSentinel) | | 2081 int bit_field3 = Map::EnumLengthBits::encode(kInvalidEnumCacheSentinel) | |
2082 Map::OwnsDescriptors::encode(true) | | 2082 Map::OwnsDescriptors::encode(true) | |
2083 Map::Counter::encode(Map::kRetainingCounterStart); | 2083 Map::Counter::encode(Map::kRetainingCounterStart); |
2084 map->set_bit_field3(bit_field3); | 2084 map->set_bit_field3(bit_field3); |
2085 map->set_elements_kind(elements_kind); | 2085 map->set_elements_kind(elements_kind); |
| 2086 map->set_new_target_is_base(true); |
2086 | 2087 |
2087 return map; | 2088 return map; |
2088 } | 2089 } |
2089 | 2090 |
2090 | 2091 |
2091 AllocationResult Heap::AllocateFillerObject(int size, bool double_align, | 2092 AllocationResult Heap::AllocateFillerObject(int size, bool double_align, |
2092 AllocationSpace space) { | 2093 AllocationSpace space) { |
2093 HeapObject* obj = nullptr; | 2094 HeapObject* obj = nullptr; |
2094 { | 2095 { |
2095 AllocationAlignment align = double_align ? kDoubleAligned : kWordAligned; | 2096 AllocationAlignment align = double_align ? kDoubleAligned : kWordAligned; |
(...skipping 4001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6097 } | 6098 } |
6098 | 6099 |
6099 | 6100 |
6100 // static | 6101 // static |
6101 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6102 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6102 return StaticVisitorBase::GetVisitorId(map); | 6103 return StaticVisitorBase::GetVisitorId(map); |
6103 } | 6104 } |
6104 | 6105 |
6105 } // namespace internal | 6106 } // namespace internal |
6106 } // namespace v8 | 6107 } // namespace v8 |
OLD | NEW |