Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: src/heap.cc

Issue 10381053: Implement explicit back pointers in transition tree. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed some comments by Vyacheslav Egorov. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/mark-compact.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 map->set_instance_type(instance_type); 2013 map->set_instance_type(instance_type);
2014 map->set_visitor_id( 2014 map->set_visitor_id(
2015 StaticVisitorBase::GetVisitorId(instance_type, instance_size)); 2015 StaticVisitorBase::GetVisitorId(instance_type, instance_size));
2016 map->set_prototype(null_value(), SKIP_WRITE_BARRIER); 2016 map->set_prototype(null_value(), SKIP_WRITE_BARRIER);
2017 map->set_constructor(null_value(), SKIP_WRITE_BARRIER); 2017 map->set_constructor(null_value(), SKIP_WRITE_BARRIER);
2018 map->set_instance_size(instance_size); 2018 map->set_instance_size(instance_size);
2019 map->set_inobject_properties(0); 2019 map->set_inobject_properties(0);
2020 map->set_pre_allocated_property_fields(0); 2020 map->set_pre_allocated_property_fields(0);
2021 map->init_instance_descriptors(); 2021 map->init_instance_descriptors();
2022 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER); 2022 map->set_code_cache(empty_fixed_array(), SKIP_WRITE_BARRIER);
2023 map->set_prototype_transitions(empty_fixed_array(), SKIP_WRITE_BARRIER); 2023 map->init_prototype_transitions(undefined_value());
2024 map->set_unused_property_fields(0); 2024 map->set_unused_property_fields(0);
2025 map->set_bit_field(0); 2025 map->set_bit_field(0);
2026 map->set_bit_field2(1 << Map::kIsExtensible); 2026 map->set_bit_field2(1 << Map::kIsExtensible);
2027 map->set_elements_kind(elements_kind); 2027 map->set_elements_kind(elements_kind);
2028 2028
2029 // If the map object is aligned fill the padding area with Smi 0 objects. 2029 // If the map object is aligned fill the padding area with Smi 0 objects.
2030 if (Map::kPadStart < Map::kSize) { 2030 if (Map::kPadStart < Map::kSize) {
2031 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag, 2031 memset(reinterpret_cast<byte*>(map) + Map::kPadStart - kHeapObjectTag,
2032 0, 2032 0,
2033 Map::kSize - Map::kPadStart); 2033 Map::kSize - Map::kPadStart);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2152 2152
2153 // Allocate the empty descriptor array. 2153 // Allocate the empty descriptor array.
2154 { MaybeObject* maybe_obj = AllocateEmptyFixedArray(); 2154 { MaybeObject* maybe_obj = AllocateEmptyFixedArray();
2155 if (!maybe_obj->ToObject(&obj)) return false; 2155 if (!maybe_obj->ToObject(&obj)) return false;
2156 } 2156 }
2157 set_empty_descriptor_array(DescriptorArray::cast(obj)); 2157 set_empty_descriptor_array(DescriptorArray::cast(obj));
2158 2158
2159 // Fix the instance_descriptors for the existing maps. 2159 // Fix the instance_descriptors for the existing maps.
2160 meta_map()->init_instance_descriptors(); 2160 meta_map()->init_instance_descriptors();
2161 meta_map()->set_code_cache(empty_fixed_array()); 2161 meta_map()->set_code_cache(empty_fixed_array());
2162 meta_map()->set_prototype_transitions(empty_fixed_array()); 2162 meta_map()->init_prototype_transitions(undefined_value());
2163 2163
2164 fixed_array_map()->init_instance_descriptors(); 2164 fixed_array_map()->init_instance_descriptors();
2165 fixed_array_map()->set_code_cache(empty_fixed_array()); 2165 fixed_array_map()->set_code_cache(empty_fixed_array());
2166 fixed_array_map()->set_prototype_transitions(empty_fixed_array()); 2166 fixed_array_map()->init_prototype_transitions(undefined_value());
2167 2167
2168 oddball_map()->init_instance_descriptors(); 2168 oddball_map()->init_instance_descriptors();
2169 oddball_map()->set_code_cache(empty_fixed_array()); 2169 oddball_map()->set_code_cache(empty_fixed_array());
2170 oddball_map()->set_prototype_transitions(empty_fixed_array()); 2170 oddball_map()->init_prototype_transitions(undefined_value());
2171 2171
2172 // Fix prototype object for existing maps. 2172 // Fix prototype object for existing maps.
2173 meta_map()->set_prototype(null_value()); 2173 meta_map()->set_prototype(null_value());
2174 meta_map()->set_constructor(null_value()); 2174 meta_map()->set_constructor(null_value());
2175 2175
2176 fixed_array_map()->set_prototype(null_value()); 2176 fixed_array_map()->set_prototype(null_value());
2177 fixed_array_map()->set_constructor(null_value()); 2177 fixed_array_map()->set_constructor(null_value());
2178 2178
2179 oddball_map()->set_prototype(null_value()); 2179 oddball_map()->set_prototype(null_value());
2180 oddball_map()->set_constructor(null_value()); 2180 oddball_map()->set_constructor(null_value());
(...skipping 4948 matching lines...) Expand 10 before | Expand all | Expand 10 after
7129 } else { 7129 } else {
7130 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died. 7130 p ^= 0x1d1ed & (Page::kPageSize - 1); // I died.
7131 } 7131 }
7132 remembered_unmapped_pages_[remembered_unmapped_pages_index_] = 7132 remembered_unmapped_pages_[remembered_unmapped_pages_index_] =
7133 reinterpret_cast<Address>(p); 7133 reinterpret_cast<Address>(p);
7134 remembered_unmapped_pages_index_++; 7134 remembered_unmapped_pages_index_++;
7135 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages; 7135 remembered_unmapped_pages_index_ %= kRememberedUnmappedPages;
7136 } 7136 }
7137 7137
7138 } } // namespace v8::internal 7138 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698