Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index d9da23f363ed1e18e363ff3e79b0fe02d348cc29..4e5a434ddbe314b944b680fd681e6f1c88cf59b0 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -9601,9 +9601,15 @@ void DependentCode::DeoptimizeDependentCodeGroup( |
Code* code = code_at(i); |
code->set_marked_for_deoptimization(true); |
} |
+ // Compact the array by moving all subsequent groups to fill in the new holes. |
for (int src = end, dst = start; src < number_of_entries; src++, dst++) { |
set_code_at(dst, code_at(src)); |
} |
+ // Now the holes are at the end of the array, zap them. |
Michael Starzinger
2013/02/25 12:18:22
Maybe we should add a comment saying that this is
|
+ int removed = end - start; |
+ for (int i = number_of_entries - removed; i < number_of_entries; i++) { |
+ clear_code_at(i); |
+ } |
set_number_of_entries(group, 0); |
DeoptimizeDependentCodeFilter filter; |
Deoptimizer::DeoptimizeAllFunctionsWith(&filter); |