Disable the flag by default because of Chrome crashes.
BUG=172488,172489
R=mstarzinger@chromium.org
Review URL: https://chromiumcodereview.appspot.com/
12091018
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13523
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
"it is adjusted.")
DEFINE_bool(collect_maps, true,
"garbage collect maps from which no objects can be reached")
+DEFINE_bool(weak_embedded_maps_in_optimized_code, false,
+ "make maps embedded in optimized code weak")
DEFINE_bool(flush_code, true,
"flush code that we expect not to use again (during full gc)")
DEFINE_bool(flush_code_incrementally, true,
Handle<Code> code =
CodeGenerator::MakeCodeEpilogue(&assembler, flags, info());
generator.FinishCode(code);
- RegisterDependentCodeForEmbeddedMaps(code);
+ if (FLAG_weak_embedded_maps_in_optimized_code) {
+ RegisterDependentCodeForEmbeddedMaps(code);
+ }
CodeGenerator::PrintCode(code, info());
return code;
}
void VisitEmbeddedPointer(RelocInfo* rinfo) {
ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
- if (rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION ||
+ if (!FLAG_weak_embedded_maps_in_optimized_code ||
+ rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION ||
!rinfo->target_object()->IsMap() ||
!Map::cast(rinfo->target_object())->CanTransition()) {
VisitPointer(rinfo->target_object_address());
ASSERT(rinfo->rmode() == RelocInfo::EMBEDDED_OBJECT);
ASSERT(!rinfo->target_object()->IsConsString());
HeapObject* object = HeapObject::cast(rinfo->target_object());
- if (!FLAG_collect_maps || rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION ||
+ 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);