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

Unified Diff: runtime/vm/object.cc

Issue 534373003: Fix printing of PcDescriptors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 39784)
+++ runtime/vm/object.cc (working copy)
@@ -10528,21 +10528,23 @@
"%#-*" Px "\t%s\t%" Pd "\t\t%" Pd "\t%" Pd "\n";
// First compute the buffer size required.
intptr_t len = 1; // Trailing '\0'.
- Iterator iter(*this, RawPcDescriptors::kAnyKind);
- while (iter.MoveNext()) {
- len += OS::SNPrint(NULL, 0, kFormat, addr_width,
- iter.Pc(),
- KindAsStr(iter.Kind()),
- iter.DeoptId(),
- iter.TokenPos(),
- iter.TryIndex());
+ {
+ Iterator iter(*this, RawPcDescriptors::kAnyKind);
+ while (iter.MoveNext()) {
+ len += OS::SNPrint(NULL, 0, kFormat, addr_width,
+ iter.Pc(),
+ KindAsStr(iter.Kind()),
+ iter.DeoptId(),
+ iter.TokenPos(),
+ iter.TryIndex());
+ }
}
// Allocate the buffer.
char* buffer = Isolate::Current()->current_zone()->Alloc<char>(len);
// Layout the fields in the buffer.
intptr_t index = 0;
- Iterator iter2(*this, RawPcDescriptors::kAnyKind);
- while (iter2.MoveNext()) {
+ Iterator iter(*this, RawPcDescriptors::kAnyKind);
+ while (iter.MoveNext()) {
index += OS::SNPrint((buffer + index), (len - index), kFormat, addr_width,
iter.Pc(),
KindAsStr(iter.Kind()),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698