OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 map->set_instance_type(instance_type); | 1587 map->set_instance_type(instance_type); |
1588 map->set_visitor_id( | 1588 map->set_visitor_id( |
1589 StaticVisitorBase::GetVisitorId(instance_type, instance_size)); | 1589 StaticVisitorBase::GetVisitorId(instance_type, instance_size)); |
1590 map->set_prototype(null_value()); | 1590 map->set_prototype(null_value()); |
1591 map->set_constructor(null_value()); | 1591 map->set_constructor(null_value()); |
1592 map->set_instance_size(instance_size); | 1592 map->set_instance_size(instance_size); |
1593 map->set_inobject_properties(0); | 1593 map->set_inobject_properties(0); |
1594 map->set_pre_allocated_property_fields(0); | 1594 map->set_pre_allocated_property_fields(0); |
1595 map->set_instance_descriptors(empty_descriptor_array()); | 1595 map->set_instance_descriptors(empty_descriptor_array()); |
1596 map->set_code_cache(empty_fixed_array()); | 1596 map->set_code_cache(empty_fixed_array()); |
| 1597 map->set_prototype_transitions(empty_fixed_array()); |
1597 map->set_unused_property_fields(0); | 1598 map->set_unused_property_fields(0); |
1598 map->set_bit_field(0); | 1599 map->set_bit_field(0); |
1599 map->set_bit_field2((1 << Map::kIsExtensible) | (1 << Map::kHasFastElements)); | 1600 map->set_bit_field2((1 << Map::kIsExtensible) | (1 << Map::kHasFastElements)); |
1600 | 1601 |
1601 // If the map object is aligned fill the padding area with Smi 0 objects. | 1602 // If the map object is aligned fill the padding area with Smi 0 objects. |
1602 if (Map::kPadStart < Map::kSize) { | 1603 if (Map::kPadStart < Map::kSize) { |
1603 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, | 1604 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, |
1604 0, | 1605 0, |
1605 Map::kSize - Map::kPadStart); | 1606 Map::kSize - Map::kPadStart); |
1606 } | 1607 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 | 1680 |
1680 // Allocate the empty descriptor array. | 1681 // Allocate the empty descriptor array. |
1681 { MaybeObject* maybe_obj = AllocateEmptyFixedArray(); | 1682 { MaybeObject* maybe_obj = AllocateEmptyFixedArray(); |
1682 if (!maybe_obj->ToObject(&obj)) return false; | 1683 if (!maybe_obj->ToObject(&obj)) return false; |
1683 } | 1684 } |
1684 set_empty_descriptor_array(DescriptorArray::cast(obj)); | 1685 set_empty_descriptor_array(DescriptorArray::cast(obj)); |
1685 | 1686 |
1686 // Fix the instance_descriptors for the existing maps. | 1687 // Fix the instance_descriptors for the existing maps. |
1687 meta_map()->set_instance_descriptors(empty_descriptor_array()); | 1688 meta_map()->set_instance_descriptors(empty_descriptor_array()); |
1688 meta_map()->set_code_cache(empty_fixed_array()); | 1689 meta_map()->set_code_cache(empty_fixed_array()); |
| 1690 meta_map()->set_prototype_transitions(empty_fixed_array()); |
1689 | 1691 |
1690 fixed_array_map()->set_instance_descriptors(empty_descriptor_array()); | 1692 fixed_array_map()->set_instance_descriptors(empty_descriptor_array()); |
1691 fixed_array_map()->set_code_cache(empty_fixed_array()); | 1693 fixed_array_map()->set_code_cache(empty_fixed_array()); |
| 1694 fixed_array_map()->set_prototype_transitions(empty_fixed_array()); |
1692 | 1695 |
1693 oddball_map()->set_instance_descriptors(empty_descriptor_array()); | 1696 oddball_map()->set_instance_descriptors(empty_descriptor_array()); |
1694 oddball_map()->set_code_cache(empty_fixed_array()); | 1697 oddball_map()->set_code_cache(empty_fixed_array()); |
| 1698 oddball_map()->set_prototype_transitions(empty_fixed_array()); |
1695 | 1699 |
1696 // Fix prototype object for existing maps. | 1700 // Fix prototype object for existing maps. |
1697 meta_map()->set_prototype(null_value()); | 1701 meta_map()->set_prototype(null_value()); |
1698 meta_map()->set_constructor(null_value()); | 1702 meta_map()->set_constructor(null_value()); |
1699 | 1703 |
1700 fixed_array_map()->set_prototype(null_value()); | 1704 fixed_array_map()->set_prototype(null_value()); |
1701 fixed_array_map()->set_constructor(null_value()); | 1705 fixed_array_map()->set_constructor(null_value()); |
1702 | 1706 |
1703 oddball_map()->set_prototype(null_value()); | 1707 oddball_map()->set_prototype(null_value()); |
1704 oddball_map()->set_constructor(null_value()); | 1708 oddball_map()->set_constructor(null_value()); |
(...skipping 4150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5855 } | 5859 } |
5856 | 5860 |
5857 | 5861 |
5858 void ExternalStringTable::TearDown() { | 5862 void ExternalStringTable::TearDown() { |
5859 new_space_strings_.Free(); | 5863 new_space_strings_.Free(); |
5860 old_space_strings_.Free(); | 5864 old_space_strings_.Free(); |
5861 } | 5865 } |
5862 | 5866 |
5863 | 5867 |
5864 } } // namespace v8::internal | 5868 } } // namespace v8::internal |
OLD | NEW |