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

Unified Diff: src/objects-inl.h

Issue 23047002: Improve generalization / migration tracing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't break on names 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 | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 169475791d05ff9672dfff163ba14dde0506bea5..6c1ecbb322ea00211813ba6c9584fcbf8a227b5b 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1567,14 +1567,27 @@ MaybeObject* JSObject::MigrateInstance() {
// Converting any field to the most specific type will cause the
// GeneralizeFieldRepresentation algorithm to create the most general existing
// transition that matches the object. This achieves what is needed.
- return GeneralizeFieldRepresentation(0, Representation::None());
+ Map* original_map = map();
+ MaybeObject* maybe_result = GeneralizeFieldRepresentation(
+ 0, Representation::None());
+ JSObject* result;
+ if (FLAG_trace_migration && maybe_result->To(&result)) {
+ PrintInstanceMigration(stdout, original_map, result->map());
+ }
+ return maybe_result;
}
MaybeObject* JSObject::TryMigrateInstance() {
Map* new_map = map()->CurrentMapForDeprecated();
if (new_map == NULL) return Smi::FromInt(0);
- return MigrateToMap(new_map);
+ Map* original_map = map();
+ MaybeObject* maybe_result = MigrateToMap(new_map);
+ JSObject* result;
+ if (FLAG_trace_migration && maybe_result->To(&result)) {
+ PrintInstanceMigration(stdout, original_map, result->map());
+ }
+ return maybe_result;
}
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698