From: verwaest@chromium.org Date: Tue, 13 Aug 2013 09:38:46 +0000 (+0000) Subject: Mark CheckMaps that can cause migration with ChangesNewSpacePromotion. X-Git-Tag: upstream/4.7.83~12964 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8d6f441834bcbbb6b7fc7457a31834b9e409244;p=platform%2Fupstream%2Fv8.git Mark CheckMaps that can cause migration with ChangesNewSpacePromotion. BUG= R=danno@chromium.org Review URL: https://chromiumcodereview.appspot.com/22982003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16166 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index ce3816e..f74d3a3 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -2851,8 +2851,7 @@ HCheckMaps* HCheckMaps::New(Zone* zone, CompilationInfo* info, HValue* typecheck) { HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); - check_map->map_set_.Add(map, zone); - check_map->has_migration_target_ = map->is_migration_target(); + check_map->Add(map, zone); if (map->CanOmitMapChecks() && value->IsConstant() && HConstant::cast(value)->InstanceOf(map)) { diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index b4fc656..257233b 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -2554,8 +2554,7 @@ class HCheckMaps: public HTemplateInstruction<2> { HValue *typecheck = NULL) { HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck); for (int i = 0; i < maps->length(); i++) { - check_map->map_set_.Add(maps->at(i), zone); - check_map->has_migration_target_ |= maps->at(i)->is_migration_target(); + check_map->Add(maps->at(i), zone); } check_map->map_set_.Sort(); return check_map; @@ -2599,6 +2598,14 @@ class HCheckMaps: public HTemplateInstruction<2> { } private: + void Add(Handle map, Zone* zone) { + map_set_.Add(map, zone); + if (!has_migration_target_ && map->is_migration_target()) { + has_migration_target_ = true; + SetGVNFlag(kChangesNewSpacePromotion); + } + } + // Clients should use one of the static New* methods above. HCheckMaps(HValue* value, Zone *zone, HValue* typecheck) : HTemplateInstruction<2>(value->type()),