Reviewers: danno,
Message:
PTAL
Description:
Mark CheckMaps that can cause migration with ChangesNewSpacePromotion.
BUG=
Please review this at https://chromiumcodereview.appspot.com/22982003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen-instructions.h
M src/hydrogen-instructions.cc
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index
ce3816e865bf06fdf19c59d0c2180a6f2f503379..01ec295b24e21f7237bfaa35f5b76f654c734bbd
100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -2852,7 +2852,7 @@ HCheckMaps* HCheckMaps::New(Zone* zone,
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();
+ if (map->is_migration_target()) check_map->MarkMigrationTarget();
if (map->CanOmitMapChecks() &&
value->IsConstant() &&
HConstant::cast(value)->InstanceOf(map)) {
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index
b4fc65635f47b6db2396208e73b0b3b9e124f996..7bac08c117be5c6b69d97c4f5ff2a4ec24eb0f0c
100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -2553,10 +2553,12 @@ class HCheckMaps: public HTemplateInstruction<2> {
HValue* value, SmallMapList* maps,
HValue *typecheck = NULL) {
HCheckMaps* check_map = new(zone) HCheckMaps(value, zone, typecheck);
+ bool has_migration_target = false;
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();
+ has_migration_target |= maps->at(i)->is_migration_target();
}
+ if (has_migration_target) check_map->MarkMigrationTarget();
check_map->map_set_.Sort();
return check_map;
}
@@ -2599,6 +2601,11 @@ class HCheckMaps: public HTemplateInstruction<2> {
}
private:
+ void MarkMigrationTarget() {
+ 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
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.