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

Side by Side Diff: src/mark-compact.cc

Issue 10559032: Implementing weak referencing elements transition maps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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/objects.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 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 if (descriptors->HasEnumCache()) { 1874 if (descriptors->HasEnumCache()) {
1875 Object** enum_cache_slot = descriptors->GetEnumCacheSlot(); 1875 Object** enum_cache_slot = descriptors->GetEnumCacheSlot();
1876 Object* enum_cache = *enum_cache_slot; 1876 Object* enum_cache = *enum_cache_slot;
1877 base_marker()->MarkObjectAndPush( 1877 base_marker()->MarkObjectAndPush(
1878 reinterpret_cast<HeapObject*>(enum_cache)); 1878 reinterpret_cast<HeapObject*>(enum_cache));
1879 mark_compact_collector()->RecordSlot(descriptor_start, 1879 mark_compact_collector()->RecordSlot(descriptor_start,
1880 enum_cache_slot, 1880 enum_cache_slot,
1881 enum_cache); 1881 enum_cache);
1882 } 1882 }
1883 1883
1884 // TODO(verwaest) Make sure we free unused transitions.
1885 if (descriptors->elements_transition_map() != NULL) { 1884 if (descriptors->elements_transition_map() != NULL) {
1886 Object** transitions_slot = descriptors->GetTransitionsSlot(); 1885 Object** transitions_slot = descriptors->GetTransitionsSlot();
1887 Object* transitions = *transitions_slot; 1886 Object* transitions = *transitions_slot;
1888 base_marker()->MarkObjectAndPush(
1889 reinterpret_cast<HeapObject*>(transitions));
1890 mark_compact_collector()->RecordSlot(descriptor_start, 1887 mark_compact_collector()->RecordSlot(descriptor_start,
1891 transitions_slot, 1888 transitions_slot,
1892 transitions); 1889 transitions);
1893 } 1890 }
1894 1891
1895 // If the descriptor contains a transition (value is a Map), we don't mark the 1892 // If the descriptor contains a transition (value is a Map), we don't mark the
1896 // value as live. It might be set to the NULL_DESCRIPTOR in 1893 // value as live. It might be set to the NULL_DESCRIPTOR in
1897 // ClearNonLiveTransitions later. 1894 // ClearNonLiveTransitions later.
1898 for (int i = 0; i < descriptors->number_of_descriptors(); ++i) { 1895 for (int i = 0; i < descriptors->number_of_descriptors(); ++i) {
1899 Object** key_slot = descriptors->GetKeySlot(i); 1896 Object** key_slot = descriptors->GetKeySlot(i);
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after
4122 while (buffer != NULL) { 4119 while (buffer != NULL) {
4123 SlotsBuffer* next_buffer = buffer->next(); 4120 SlotsBuffer* next_buffer = buffer->next();
4124 DeallocateBuffer(buffer); 4121 DeallocateBuffer(buffer);
4125 buffer = next_buffer; 4122 buffer = next_buffer;
4126 } 4123 }
4127 *buffer_address = NULL; 4124 *buffer_address = NULL;
4128 } 4125 }
4129 4126
4130 4127
4131 } } // namespace v8::internal 4128 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698