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/v8.h" | 5 #include "src/v8.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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 2375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2386 map->set_instance_descriptors(empty_descriptor_array()); | 2386 map->set_instance_descriptors(empty_descriptor_array()); |
2387 if (FLAG_unbox_double_fields) { | 2387 if (FLAG_unbox_double_fields) { |
2388 map->set_layout_descriptor(LayoutDescriptor::FastPointerLayout()); | 2388 map->set_layout_descriptor(LayoutDescriptor::FastPointerLayout()); |
2389 } | 2389 } |
2390 // Must be called only after |instance_type|, |instance_size| and | 2390 // Must be called only after |instance_type|, |instance_size| and |
2391 // |layout_descriptor| are set. | 2391 // |layout_descriptor| are set. |
2392 map->set_visitor_id(StaticVisitorBase::GetVisitorId(map)); | 2392 map->set_visitor_id(StaticVisitorBase::GetVisitorId(map)); |
2393 map->set_bit_field(0); | 2393 map->set_bit_field(0); |
2394 map->set_bit_field2(1 << Map::kIsExtensible); | 2394 map->set_bit_field2(1 << Map::kIsExtensible); |
2395 int bit_field3 = Map::EnumLengthBits::encode(kInvalidEnumCacheSentinel) | | 2395 int bit_field3 = Map::EnumLengthBits::encode(kInvalidEnumCacheSentinel) | |
2396 Map::OwnsDescriptors::encode(true); | 2396 Map::OwnsDescriptors::encode(true) | |
| 2397 Map::Counter::encode(Map::kRetainingCounterStart); |
2397 map->set_bit_field3(bit_field3); | 2398 map->set_bit_field3(bit_field3); |
2398 map->set_elements_kind(elements_kind); | 2399 map->set_elements_kind(elements_kind); |
2399 | 2400 |
2400 return map; | 2401 return map; |
2401 } | 2402 } |
2402 | 2403 |
2403 | 2404 |
2404 AllocationResult Heap::AllocateFillerObject(int size, bool double_align, | 2405 AllocationResult Heap::AllocateFillerObject(int size, bool double_align, |
2405 AllocationSpace space) { | 2406 AllocationSpace space) { |
2406 HeapObject* obj; | 2407 HeapObject* obj; |
(...skipping 3963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6370 static_cast<int>(object_sizes_last_time_[index])); | 6371 static_cast<int>(object_sizes_last_time_[index])); |
6371 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6372 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6372 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6373 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6373 | 6374 |
6374 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6375 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6375 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6376 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6376 ClearObjectStats(); | 6377 ClearObjectStats(); |
6377 } | 6378 } |
6378 } | 6379 } |
6379 } // namespace v8::internal | 6380 } // namespace v8::internal |
OLD | NEW |