Reviewers: Michael Starzinger,
Message:
PTAL
Description:
Zap holes in dependent code array after deoptimizing a code group.
BUG=crash on GC stress builder
[email protected]
Please review this at https://chromiumcodereview.appspot.com/12315077/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/objects.cc
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.
+ 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);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.