Commit 3938956b authored by ulan's avatar ulan Committed by Commit bot

Remove the --collect-maps flag. Maps should be always collected.

Reasons:
- It is not used.
- It complicates code in GC.

BUG=chromium:499713
LOG=NO

Review URL: https://codereview.chromium.org/1184723002

Cr-Commit-Position: refs/heads/master@{#29027}
parent 982b46ae
......@@ -613,8 +613,6 @@ DEFINE_INT(trace_allocation_stack_interval, -1,
DEFINE_BOOL(trace_fragmentation, false, "report fragmentation for old space")
DEFINE_BOOL(trace_fragmentation_verbose, false,
"report fragmentation for old space (detailed)")
DEFINE_BOOL(collect_maps, true,
"garbage collect maps from which no objects can be reached")
DEFINE_BOOL(weak_embedded_maps_in_optimized_code, true,
"make maps embedded in optimized code weak")
DEFINE_BOOL(weak_embedded_objects_in_optimized_code, true,
......
......@@ -1294,7 +1294,7 @@ void V8HeapExplorer::ExtractMapReferences(int entry, Map* map) {
TransitionArray::cast(raw_transitions_or_prototype_info);
int transitions_entry = GetEntry(transitions)->index();
if (FLAG_collect_maps && map->CanTransition()) {
if (map->CanTransition()) {
if (transitions->HasPrototypeTransitions()) {
FixedArray* prototype_transitions =
transitions->GetPrototypeTransitions();
......
......@@ -345,7 +345,7 @@ void MarkCompactCollector::CollectGarbage() {
// arrays are cleared or contain only live code objects.
ProcessAndClearWeakCells();
if (FLAG_collect_maps) ClearNonLiveReferences();
ClearNonLiveReferences();
ClearWeakCollections();
......@@ -369,7 +369,7 @@ void MarkCompactCollector::CollectGarbage() {
#ifdef VERIFY_HEAP
VerifyWeakEmbeddedObjectsInCode();
if (FLAG_collect_maps && FLAG_omit_map_checks_for_leaf_maps) {
if (FLAG_omit_map_checks_for_leaf_maps) {
VerifyOmittedMapChecks();
}
#endif
......
......@@ -302,7 +302,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitMap(Map* map,
// When map collection is enabled we have to mark through map's transitions
// and back pointers in a special way to make these links weak.
if (FLAG_collect_maps && map_object->CanTransition()) {
if (map_object->CanTransition()) {
MarkMapContents(heap, map_object);
} else {
StaticVisitor::VisitPointers(
......
......@@ -4867,7 +4867,6 @@ Object* Code::GetObjectFromEntryAddress(Address location_of_address) {
bool Code::IsWeakObjectInOptimizedCode(Object* object) {
if (!FLAG_collect_maps) return false;
if (object->IsMap()) {
return Map::cast(object)->CanTransition() &&
FLAG_weak_embedded_maps_in_optimized_code;
......
......@@ -3407,7 +3407,6 @@ TEST(TransitionArraySimpleToFull) {
TEST(Regress2143a) {
i::FLAG_collect_maps = true;
i::FLAG_incremental_marking = true;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
......@@ -3447,7 +3446,6 @@ TEST(Regress2143a) {
TEST(Regress2143b) {
i::FLAG_collect_maps = true;
i::FLAG_incremental_marking = true;
i::FLAG_allow_natives_syntax = true;
CcTest::InitializeVM();
......
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