Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: src/hydrogen-instructions.h

Issue 22982003: Mark CheckMaps that can cause migration with ChangesNewSpacePromotion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
danno 2013/08/13 09:17:41 Why not choke-point the Add method, looking for ma
- 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()),
« no previous file with comments | « no previous file | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698