| 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 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1941 return; | 1941 return; |
| 1942 | 1942 |
| 1943 ref_groups->Sort(); | 1943 ref_groups->Sort(); |
| 1944 representative_objects->Sort(); | 1944 representative_objects->Sort(); |
| 1945 | 1945 |
| 1946 int surviving_ref_group_index = 0; | 1946 int surviving_ref_group_index = 0; |
| 1947 int surviving_representative_object_index = 0; | 1947 int surviving_representative_object_index = 0; |
| 1948 | 1948 |
| 1949 int representative_objects_index = 0; | 1949 int representative_objects_index = 0; |
| 1950 UniqueId current_group_id(0); | 1950 UniqueId current_group_id(0); |
| 1951 size_t current_group_start = 0; | 1951 int current_group_start = 0; |
| 1952 for (int i = 0; i <= ref_groups->length(); ++i) { | 1952 for (int i = 0; i <= ref_groups->length(); ++i) { |
| 1953 if (i == 0) | 1953 if (i == 0) |
| 1954 current_group_id = ref_groups->at(i).id; | 1954 current_group_id = ref_groups->at(i).id; |
| 1955 if (i == ref_groups->length() || current_group_id != ref_groups->at(i).id) { | 1955 if (i == ref_groups->length() || current_group_id != ref_groups->at(i).id) { |
| 1956 // Group detected: objects in indices [current_group_start, i[. | 1956 // Group detected: objects in indices [current_group_start, i[. |
| 1957 | 1957 |
| 1958 // Find the representative object for this group. | 1958 // Find the representative object for this group. |
| 1959 while (representative_objects_index < representative_objects->length() && | 1959 while (representative_objects_index < representative_objects->length() && |
| 1960 representative_objects->at(representative_objects_index).id < | 1960 representative_objects->at(representative_objects_index).id < |
| 1961 current_group_id) | 1961 current_group_id) |
| (...skipping 2207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4169 while (buffer != NULL) { | 4169 while (buffer != NULL) { |
| 4170 SlotsBuffer* next_buffer = buffer->next(); | 4170 SlotsBuffer* next_buffer = buffer->next(); |
| 4171 DeallocateBuffer(buffer); | 4171 DeallocateBuffer(buffer); |
| 4172 buffer = next_buffer; | 4172 buffer = next_buffer; |
| 4173 } | 4173 } |
| 4174 *buffer_address = NULL; | 4174 *buffer_address = NULL; |
| 4175 } | 4175 } |
| 4176 | 4176 |
| 4177 | 4177 |
| 4178 } } // namespace v8::internal | 4178 } } // namespace v8::internal |
| OLD | NEW |