Revision: 16166
Author:   [email protected]
Date:     Tue Aug 13 02:38:46 2013
Log: Mark CheckMaps that can cause migration with ChangesNewSpacePromotion.

BUG=
[email protected]

Review URL: https://chromiumcodereview.appspot.com/22982003
http://code.google.com/p/v8/source/detail?r=16166

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.cc
 /branches/bleeding_edge/src/hydrogen-instructions.h

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Fri Aug 9 07:04:47 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Tue Aug 13 02:38:46 2013
@@ -2851,8 +2851,7 @@
                             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)) {
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Mon Aug 12 02:26:18 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Tue Aug 13 02:38:46 2013
@@ -2554,8 +2554,7 @@
                          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 @@
   }

  private:
+  void Add(Handle<Map> 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()),

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to