OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, arguments_marker); | 2579 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, arguments_marker); |
2580 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, no_interceptor_result_sentinel); | 2580 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, no_interceptor_result_sentinel); |
2581 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, exception); | 2581 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, exception); |
2582 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, termination_exception); | 2582 ALLOCATE_MAP(ODDBALL_TYPE, Oddball::kSize, termination_exception); |
2583 | 2583 |
2584 for (unsigned i = 0; i < ARRAY_SIZE(string_type_table); i++) { | 2584 for (unsigned i = 0; i < ARRAY_SIZE(string_type_table); i++) { |
2585 const StringTypeTable& entry = string_type_table[i]; | 2585 const StringTypeTable& entry = string_type_table[i]; |
2586 { MaybeObject* maybe_obj = AllocateMap(entry.type, entry.size); | 2586 { MaybeObject* maybe_obj = AllocateMap(entry.type, entry.size); |
2587 if (!maybe_obj->ToObject(&obj)) return false; | 2587 if (!maybe_obj->ToObject(&obj)) return false; |
2588 } | 2588 } |
2589 roots_[entry.index] = Map::cast(obj); | 2589 // Mark cons string maps as unstable, because their objects can change |
| 2590 // maps during GC. |
| 2591 Map* map = Map::cast(obj); |
| 2592 if (StringShape(entry.type).IsCons()) map->mark_unstable(); |
| 2593 roots_[entry.index] = map; |
2590 } | 2594 } |
2591 | 2595 |
2592 ALLOCATE_VARSIZE_MAP(STRING_TYPE, undetectable_string) | 2596 ALLOCATE_VARSIZE_MAP(STRING_TYPE, undetectable_string) |
2593 undetectable_string_map()->set_is_undetectable(); | 2597 undetectable_string_map()->set_is_undetectable(); |
2594 | 2598 |
2595 ALLOCATE_VARSIZE_MAP(ASCII_STRING_TYPE, undetectable_ascii_string); | 2599 ALLOCATE_VARSIZE_MAP(ASCII_STRING_TYPE, undetectable_ascii_string); |
2596 undetectable_ascii_string_map()->set_is_undetectable(); | 2600 undetectable_ascii_string_map()->set_is_undetectable(); |
2597 | 2601 |
2598 ALLOCATE_VARSIZE_MAP(FIXED_DOUBLE_ARRAY_TYPE, fixed_double_array) | 2602 ALLOCATE_VARSIZE_MAP(FIXED_DOUBLE_ARRAY_TYPE, fixed_double_array) |
2599 ALLOCATE_VARSIZE_MAP(BYTE_ARRAY_TYPE, byte_array) | 2603 ALLOCATE_VARSIZE_MAP(BYTE_ARRAY_TYPE, byte_array) |
(...skipping 4124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6724 static_cast<int>(object_sizes_last_time_[index])); | 6728 static_cast<int>(object_sizes_last_time_[index])); |
6725 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6729 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6726 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6730 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6727 | 6731 |
6728 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6732 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6729 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6733 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6730 ClearObjectStats(); | 6734 ClearObjectStats(); |
6731 } | 6735 } |
6732 | 6736 |
6733 } } // namespace v8::internal | 6737 } } // namespace v8::internal |
OLD | NEW |