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 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2067 map->set_prototype(null_value(), SKIP_WRITE_BARRIER); | 2067 map->set_prototype(null_value(), SKIP_WRITE_BARRIER); |
2068 map->set_constructor(null_value(), SKIP_WRITE_BARRIER); | 2068 map->set_constructor(null_value(), SKIP_WRITE_BARRIER); |
2069 map->set_instance_size(instance_size); | 2069 map->set_instance_size(instance_size); |
2070 map->set_inobject_properties(0); | 2070 map->set_inobject_properties(0); |
2071 map->set_pre_allocated_property_fields(0); | 2071 map->set_pre_allocated_property_fields(0); |
2072 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); | 2072 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); |
2073 map->init_back_pointer(undefined_value()); | 2073 map->init_back_pointer(undefined_value()); |
2074 map->set_unused_property_fields(0); | 2074 map->set_unused_property_fields(0); |
2075 map->set_bit_field(0); | 2075 map->set_bit_field(0); |
2076 map->set_bit_field2(1 << Map::kIsExtensible); | 2076 map->set_bit_field2(1 << Map::kIsExtensible); |
2077 map->set_bit_field3(Map::LastAddedBits::encode(Map::kNoneAdded)); | 2077 map->set_bit_field3( |
2078 Map::EnumLengthBits::update( | |
Michael Starzinger
2012/08/06 15:06:22
This is a little convoluted. Better use ...
map->
Toon Verwaest
2012/08/07 10:49:47
Done.
| |
2079 Map::LastAddedBits::encode(Map::kNoneAdded), Map::kInvalidEnumCache)); | |
2078 map->set_elements_kind(elements_kind); | 2080 map->set_elements_kind(elements_kind); |
2079 | 2081 |
2080 // If the map object is aligned fill the padding area with Smi 0 objects. | 2082 // If the map object is aligned fill the padding area with Smi 0 objects. |
2081 if (Map::kPadStart < Map::kSize) { | 2083 if (Map::kPadStart < Map::kSize) { |
2082 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, | 2084 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, |
2083 0, | 2085 0, |
2084 Map::kSize - Map::kPadStart); | 2086 Map::kSize - Map::kPadStart); |
2085 } | 2087 } |
2086 return map; | 2088 return map; |
2087 } | 2089 } |
(...skipping 5140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7228 static_cast<int>(object_sizes_last_time_[index])); | 7230 static_cast<int>(object_sizes_last_time_[index])); |
7229 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7231 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
7230 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7232 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7231 | 7233 |
7232 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7234 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7233 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7235 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7234 ClearObjectStats(); | 7236 ClearObjectStats(); |
7235 } | 7237 } |
7236 | 7238 |
7237 } } // namespace v8::internal | 7239 } } // namespace v8::internal |
OLD | NEW |