Revision: 8900
Author: [email protected]
Date: Thu Aug 11 06:59:29 2011
Log: Output missing comments after the last disassembled instruction.
Review URL: http://codereview.chromium.org/7623014
http://code.google.com/p/v8/source/detail?r=8900
Modified:
/branches/bleeding_edge/src/disassembler.cc
/branches/bleeding_edge/src/full-codegen.cc
=======================================
--- /branches/bleeding_edge/src/disassembler.cc Thu Aug 11 05:52:37 2011
+++ /branches/bleeding_edge/src/disassembler.cc Thu Aug 11 06:59:29 2011
@@ -122,6 +122,7 @@
v8::internal::EmbeddedVector<char, 128> decode_buffer;
v8::internal::EmbeddedVector<char, kOutBufferSize> out_buffer;
+ StringBuilder out(out_buffer.start(), out_buffer.length());
byte* pc = begin;
disasm::Disassembler d(converter);
RelocIterator* it = NULL;
@@ -183,8 +184,6 @@
it->next();
}
}
-
- StringBuilder out(out_buffer.start(), out_buffer.length());
// Comments.
for (int i = 0; i < comments.length(); i++) {
@@ -301,6 +300,17 @@
}
DumpBuffer(f, &out);
}
+
+ // Emit comments following the last instruction (if any).
+ if (it != NULL) {
+ for ( ; !it->done(); it->next()) {
+ if (RelocInfo::IsComment(it->rinfo()->rmode())) {
+ out.AddFormatted(" %s",
+ reinterpret_cast<const
char*>(it->rinfo()->data()));
+ DumpBuffer(f, &out);
+ }
+ }
+ }
delete it;
return static_cast<int>(pc - begin);
=======================================
--- /branches/bleeding_edge/src/full-codegen.cc Thu Jul 28 03:17:41 2011
+++ /branches/bleeding_edge/src/full-codegen.cc Thu Aug 11 06:59:29 2011
@@ -317,7 +317,6 @@
// field, and then a sequence of entries. Each entry is a pair of AST id
// and code-relative pc offset.
masm()->Align(kIntSize);
- masm()->RecordComment("[ Stack check table");
unsigned offset = masm()->pc_offset();
unsigned length = stack_checks_.length();
__ dd(length);
@@ -325,7 +324,6 @@
__ dd(stack_checks_[i].id);
__ dd(stack_checks_[i].pc_and_state);
}
- masm()->RecordComment("]");
return offset;
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev