Revision: 18973
Author: [email protected]
Date: Fri Jan 31 09:07:30 2014 UTC
Log: Check forwarding pointer when marking objects for deoptimization.
BUG=
[email protected], [email protected]
Review URL: https://codereview.chromium.org/148493004
http://code.google.com/p/v8/source/detail?r=18973
Modified:
/branches/bleeding_edge/src/objects.cc
=======================================
--- /branches/bleeding_edge/src/objects.cc Wed Jan 29 17:03:57 2014 UTC
+++ /branches/bleeding_edge/src/objects.cc Fri Jan 31 09:07:30 2014 UTC
@@ -11745,14 +11745,23 @@
// Mark all the code that needs to be deoptimized.
bool marked = false;
for (int i = start; i < end; i++) {
- if (is_code_at(i)) {
- Code* code = code_at(i);
+ Object* object = object_at(i);
+ // TODO(hpayer): This is a temporary hack. Foreign objects move after
+ // new space evacuation. Since pretenuring may mark these objects as
aborted
+ // we have to follow the forwarding pointer in that case.
+ MapWord map_word = HeapObject::cast(object)->map_word();
+ if (map_word.IsForwardingAddress()) {
+ object = map_word.ToForwardingAddress();
+ }
+ if (object->IsCode()) {
+ Code* code = Code::cast(object);
if (!code->marked_for_deoptimization()) {
code->set_marked_for_deoptimization(true);
marked = true;
}
} else {
- CompilationInfo* info = compilation_info_at(i);
+ CompilationInfo* info = reinterpret_cast<CompilationInfo*>(
+ Foreign::cast(object)->foreign_address());
info->AbortDueToDependencyChange();
}
}
--
--
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.