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 2072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2083 map->set_prototype(null_value(), SKIP_WRITE_BARRIER); | 2083 map->set_prototype(null_value(), SKIP_WRITE_BARRIER); |
2084 map->set_constructor(null_value(), SKIP_WRITE_BARRIER); | 2084 map->set_constructor(null_value(), SKIP_WRITE_BARRIER); |
2085 map->set_instance_size(instance_size); | 2085 map->set_instance_size(instance_size); |
2086 map->set_inobject_properties(0); | 2086 map->set_inobject_properties(0); |
2087 map->set_pre_allocated_property_fields(0); | 2087 map->set_pre_allocated_property_fields(0); |
2088 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); | 2088 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); |
2089 map->init_back_pointer(undefined_value()); | 2089 map->init_back_pointer(undefined_value()); |
2090 map->set_unused_property_fields(0); | 2090 map->set_unused_property_fields(0); |
2091 map->set_bit_field(0); | 2091 map->set_bit_field(0); |
2092 map->set_bit_field2(1 << Map::kIsExtensible); | 2092 map->set_bit_field2(1 << Map::kIsExtensible); |
2093 map->set_bit_field3(0); | 2093 int bit_field3 = Map::EnumLengthBits::encode(Map::kInvalidEnumCache); |
| 2094 map->set_bit_field3(bit_field3); |
2094 map->set_elements_kind(elements_kind); | 2095 map->set_elements_kind(elements_kind); |
2095 | 2096 |
2096 // If the map object is aligned fill the padding area with Smi 0 objects. | 2097 // If the map object is aligned fill the padding area with Smi 0 objects. |
2097 if (Map::kPadStart < Map::kSize) { | 2098 if (Map::kPadStart < Map::kSize) { |
2098 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, | 2099 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, |
2099 0, | 2100 0, |
2100 Map::kSize - Map::kPadStart); | 2101 Map::kSize - Map::kPadStart); |
2101 } | 2102 } |
2102 return map; | 2103 return map; |
2103 } | 2104 } |
(...skipping 5179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7283 static_cast<int>(object_sizes_last_time_[index])); | 7284 static_cast<int>(object_sizes_last_time_[index])); |
7284 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7285 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7285 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7286 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7286 | 7287 |
7287 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7288 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7288 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7289 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7289 ClearObjectStats(); | 7290 ClearObjectStats(); |
7290 } | 7291 } |
7291 | 7292 |
7292 } } // namespace v8::internal | 7293 } } // namespace v8::internal |
OLD | NEW |