| Index: src/mark-compact.cc
|
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc
|
| index 32516845dfdef73a30032fdf179127097a71ca52..83cbe78d871efdab599db89e788d863524c3d5b4 100644
|
| --- a/src/mark-compact.cc
|
| +++ b/src/mark-compact.cc
|
| @@ -2369,9 +2369,8 @@ void MarkCompactCollector::ClearNonLiveMapTransitions(Map* map,
|
| void MarkCompactCollector::ClearAndDeoptimizeDependentCodes(Map* map) {
|
| AssertNoAllocation no_allocation_scope;
|
| DependentCodes* codes = map->dependent_codes();
|
| - DependentCodes::GroupStartIndexes starts;
|
| - codes->ComputeGroupStartIndexes(starts);
|
| - int number_of_codes = starts[DependentCodes::kGroupCount];
|
| + DependentCodes::GroupStartIndexes starts(codes);
|
| + int number_of_codes = starts.at(DependentCodes::kGroupCount);
|
| if (number_of_codes == 0) return;
|
| for (int i = 0; i < number_of_codes; i++) {
|
| Code* code = codes->code_at(i);
|
| @@ -2387,15 +2386,14 @@ void MarkCompactCollector::ClearAndDeoptimizeDependentCodes(Map* map) {
|
| void MarkCompactCollector::ClearNonLiveDependentCodes(Map* map) {
|
| AssertNoAllocation no_allocation_scope;
|
| DependentCodes* codes = map->dependent_codes();
|
| - DependentCodes::GroupStartIndexes starts;
|
| - codes->ComputeGroupStartIndexes(starts);
|
| - int number_of_codes = starts[DependentCodes::kGroupCount];
|
| + DependentCodes::GroupStartIndexes starts(codes);
|
| + int number_of_codes = starts.at(DependentCodes::kGroupCount);
|
| if (number_of_codes == 0) return;
|
| int new_number_of_codes = 0;
|
| // Go through all groups, remove dead codes and compact.
|
| for (int g = 0; g < DependentCodes::kGroupCount; g++) {
|
| int group_number_of_codes = 0;
|
| - for (int i = starts[g]; i < starts[g + 1]; i++) {
|
| + for (int i = starts.at(g); i < starts.at(g + 1); i++) {
|
| Code* code = codes->code_at(i);
|
| if (IsMarked(code) && !code->marked_for_deoptimization()) {
|
| if (new_number_of_codes + group_number_of_codes != i) {
|
|
|