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

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

Issue 10909007: Sharing of descriptor arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 8 years, 3 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 | « src/ia32/macro-assembler-ia32.cc ('k') | 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 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 base_marker()->MarkObjectAndPush(reinterpret_cast<HeapObject*>(obj)); 1933 base_marker()->MarkObjectAndPush(reinterpret_cast<HeapObject*>(obj));
1934 } 1934 }
1935 } 1935 }
1936 1936
1937 1937
1938 template <class T> 1938 template <class T>
1939 void Marker<T>::MarkTransitionArray(TransitionArray* transitions) { 1939 void Marker<T>::MarkTransitionArray(TransitionArray* transitions) {
1940 if (!base_marker()->MarkObjectWithoutPush(transitions)) return; 1940 if (!base_marker()->MarkObjectWithoutPush(transitions)) return;
1941 Object** transitions_start = transitions->data_start(); 1941 Object** transitions_start = transitions->data_start();
1942 1942
1943 DescriptorArray* descriptors = transitions->descriptors(); 1943 // We don't have to record the descriptors_pointer slot since the cell space
1944 base_marker()->MarkObjectAndPush(descriptors); 1944 // is not compacted.
1945 mark_compact_collector()->RecordSlot( 1945 JSGlobalPropertyCell* descriptors_cell = transitions->descriptors_pointer();
1946 transitions_start, transitions->GetDescriptorsSlot(), descriptors); 1946 base_marker()->MarkObjectAndPush(descriptors_cell);
1947 1947
1948 if (transitions->HasPrototypeTransitions()) { 1948 if (transitions->HasPrototypeTransitions()) {
1949 // Mark prototype transitions array but don't push it into marking stack. 1949 // Mark prototype transitions array but don't push it into marking stack.
1950 // This will make references from it weak. We will clean dead prototype 1950 // This will make references from it weak. We will clean dead prototype
1951 // transitions in ClearNonLiveTransitions. 1951 // transitions in ClearNonLiveTransitions.
1952 Object** proto_trans_slot = transitions->GetPrototypeTransitionsSlot(); 1952 Object** proto_trans_slot = transitions->GetPrototypeTransitionsSlot();
1953 HeapObject* prototype_transitions = HeapObject::cast(*proto_trans_slot); 1953 HeapObject* prototype_transitions = HeapObject::cast(*proto_trans_slot);
1954 base_marker()->MarkObjectWithoutPush(prototype_transitions); 1954 base_marker()->MarkObjectWithoutPush(prototype_transitions);
1955 mark_compact_collector()->RecordSlot( 1955 mark_compact_collector()->RecordSlot(
1956 transitions_start, proto_trans_slot, prototype_transitions); 1956 transitions_start, proto_trans_slot, prototype_transitions);
(...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
4142 while (buffer != NULL) { 4142 while (buffer != NULL) {
4143 SlotsBuffer* next_buffer = buffer->next(); 4143 SlotsBuffer* next_buffer = buffer->next();
4144 DeallocateBuffer(buffer); 4144 DeallocateBuffer(buffer);
4145 buffer = next_buffer; 4145 buffer = next_buffer;
4146 } 4146 }
4147 *buffer_address = NULL; 4147 *buffer_address = NULL;
4148 } 4148 }
4149 4149
4150 4150
4151 } } // namespace v8::internal 4151 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698