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

Unified Diff: src/objects-visiting-inl.h

Issue 17418003: Short-circuit embedded cons strings. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: update reloc target Created 7 years, 6 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 | « src/hydrogen-instructions.cc ('k') | test/mjsunit/regress/regress-embedded-cons-string.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-visiting-inl.h
diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h
index 6c3c9d44fe318d77c141a68dc6d562d86563aceb..b56e6ec2f0308b2c6859d831e8f90b26a23463ea 100644
--- a/src/objects-visiting-inl.h
+++ b/src/objects-visiting-inl.h
@@ -233,13 +233,16 @@ template<typename StaticVisitor>
void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer(
Heap* heap, RelocInfo* rinfo) {
ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
- ASSERT(!rinfo->target_object()->IsConsString());
HeapObject* object = HeapObject::cast(rinfo->target_object());
if (!FLAG_weak_embedded_maps_in_optimized_code || !FLAG_collect_maps ||
rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION ||
!object->IsMap() || !Map::cast(object)->CanTransition()) {
- heap->mark_compact_collector()->RecordRelocSlot(rinfo, object);
- StaticVisitor::MarkObject(heap, object);
+ Object** target_address = rinfo->target_object_address();
Michael Starzinger 2013/06/20 23:25:27 This change is missing the slot recording for the
+ Object* old_target = *target_address;
+ StaticVisitor::VisitPointer(heap, target_address);
+ if (*target_address != old_target) {
+ rinfo->set_target_object(*target_address);
+ }
}
}
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | test/mjsunit/regress/regress-embedded-cons-string.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698