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 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2709 roots_[entry.index] = map; | 2709 roots_[entry.index] = map; |
2710 } | 2710 } |
2711 | 2711 |
2712 { // Create a separate external one byte string map for native sources. | 2712 { // Create a separate external one byte string map for native sources. |
2713 AllocationResult allocation = AllocateMap(EXTERNAL_ONE_BYTE_STRING_TYPE, | 2713 AllocationResult allocation = AllocateMap(EXTERNAL_ONE_BYTE_STRING_TYPE, |
2714 ExternalOneByteString::kSize); | 2714 ExternalOneByteString::kSize); |
2715 if (!allocation.To(&obj)) return false; | 2715 if (!allocation.To(&obj)) return false; |
2716 set_native_source_string_map(Map::cast(obj)); | 2716 set_native_source_string_map(Map::cast(obj)); |
2717 } | 2717 } |
2718 | 2718 |
2719 ALLOCATE_VARSIZE_MAP(STRING_TYPE, undetectable_string) | |
2720 undetectable_string_map()->set_is_undetectable(); | |
2721 | |
2722 ALLOCATE_VARSIZE_MAP(ONE_BYTE_STRING_TYPE, undetectable_one_byte_string); | |
2723 undetectable_one_byte_string_map()->set_is_undetectable(); | |
2724 | |
2725 ALLOCATE_VARSIZE_MAP(FIXED_DOUBLE_ARRAY_TYPE, fixed_double_array) | 2719 ALLOCATE_VARSIZE_MAP(FIXED_DOUBLE_ARRAY_TYPE, fixed_double_array) |
2726 ALLOCATE_VARSIZE_MAP(BYTE_ARRAY_TYPE, byte_array) | 2720 ALLOCATE_VARSIZE_MAP(BYTE_ARRAY_TYPE, byte_array) |
2727 ALLOCATE_VARSIZE_MAP(FREE_SPACE_TYPE, free_space) | 2721 ALLOCATE_VARSIZE_MAP(FREE_SPACE_TYPE, free_space) |
2728 | 2722 |
2729 #define ALLOCATE_EXTERNAL_ARRAY_MAP(Type, type, TYPE, ctype, size) \ | 2723 #define ALLOCATE_EXTERNAL_ARRAY_MAP(Type, type, TYPE, ctype, size) \ |
2730 ALLOCATE_MAP(EXTERNAL_##TYPE##_ARRAY_TYPE, ExternalArray::kAlignedSize, \ | 2724 ALLOCATE_MAP(EXTERNAL_##TYPE##_ARRAY_TYPE, ExternalArray::kAlignedSize, \ |
2731 external_##type##_array) | 2725 external_##type##_array) |
2732 | 2726 |
2733 TYPED_ARRAYS(ALLOCATE_EXTERNAL_ARRAY_MAP) | 2727 TYPED_ARRAYS(ALLOCATE_EXTERNAL_ARRAY_MAP) |
2734 #undef ALLOCATE_EXTERNAL_ARRAY_MAP | 2728 #undef ALLOCATE_EXTERNAL_ARRAY_MAP |
(...skipping 3797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6532 static_cast<int>(object_sizes_last_time_[index])); | 6526 static_cast<int>(object_sizes_last_time_[index])); |
6533 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6527 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6534 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6528 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6535 | 6529 |
6536 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6530 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6537 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6531 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6538 ClearObjectStats(); | 6532 ClearObjectStats(); |
6539 } | 6533 } |
6540 } | 6534 } |
6541 } // namespace v8::internal | 6535 } // namespace v8::internal |
OLD | NEW |