Avoid unnecessary code target changes during code compaction.
R=ulan@chromium.org Review URL: https://codereview.chromium.org/11198032 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12754 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
a38af4256c
commit
9d43ff71b8
@ -2315,8 +2315,13 @@ class PointersUpdatingVisitor: public ObjectVisitor {
|
||||
void VisitEmbeddedPointer(RelocInfo* rinfo) {
|
||||
ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
|
||||
Object* target = rinfo->target_object();
|
||||
Object* old_target = target;
|
||||
VisitPointer(&target);
|
||||
rinfo->set_target_object(target);
|
||||
// Avoid unnecessary changes that might unnecessary flush the instruction
|
||||
// cache.
|
||||
if (target != old_target) {
|
||||
rinfo->set_target_object(target);
|
||||
}
|
||||
}
|
||||
|
||||
void VisitCodeTarget(RelocInfo* rinfo) {
|
||||
|
Loading…
Reference in New Issue
Block a user