Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(927)

Unified Diff: src/objects.cc

Issue 148493004: Check forwarding pointer when marking objects for deoptimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 132c72cf81ad31afef8b413e01e19d2d1a17e52d..fe791f308738b326c9d2dfd2ca56a0fa7fdf7a9d 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11745,14 +11745,23 @@ bool DependentCode::MarkCodeForDeoptimization(
// 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();
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698