Commit fe0582c2 authored by ulan@chromium.org's avatar ulan@chromium.org

Put making embedded maps in optimized code weak behind a flag.

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
parent fe8e9779
......@@ -402,6 +402,8 @@ DEFINE_bool(trace_external_memory, false,
"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,
......
......@@ -429,7 +429,9 @@ Handle<Code> LChunk::Codegen(Code::Kind kind) {
Handle<Code> code =
CodeGenerator::MakeCodeEpilogue(&assembler, flags, info());
generator.FinishCode(code);
if (FLAG_weak_embedded_maps_in_optimized_code) {
RegisterDependentCodeForEmbeddedMaps(code);
}
CodeGenerator::PrintCode(code, info());
return code;
}
......
......@@ -85,7 +85,8 @@ class VerifyMarkingVisitor: public ObjectVisitor {
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());
......
......@@ -175,7 +175,8 @@ void StaticMarkingVisitor<StaticVisitor>::VisitEmbeddedPointer(
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment