Commit c8a0ea9e authored by dcarney@chromium.org's avatar dcarney@chromium.org

[turbofan] fix block mapping in code comments

R=bmeurer@chromium.org

BUG=

Review URL: https://codereview.chromium.org/635213003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24616 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 93d0e79d
......@@ -107,8 +107,7 @@ void CodeGenerator::AssembleInstruction(Instruction* instr) {
if (FLAG_code_comments) {
// TODO(titzer): these code comments are a giant memory leak.
Vector<char> buffer = Vector<char>::New(32);
// TODO(dcarney): should not be rpo number there
SNPrintF(buffer, "-- B%d (rpo) start --", current_block_.ToInt());
SNPrintF(buffer, "-- B%d start --", block_start->id().ToInt());
masm()->RecordComment(buffer.start());
}
masm()->bind(block_start->label());
......
......@@ -598,6 +598,7 @@ class BlockStartInstruction FINAL : public GapInstruction {
public:
Label* label() { return &label_; }
BasicBlock::RpoNumber rpo_number() const { return rpo_number_; }
BasicBlock::Id id() const { return id_; }
static BlockStartInstruction* New(Zone* zone, BasicBlock* block) {
void* buffer = zone->New(sizeof(BlockStartInstruction));
......@@ -612,8 +613,10 @@ class BlockStartInstruction FINAL : public GapInstruction {
private:
explicit BlockStartInstruction(BasicBlock* block)
: GapInstruction(kBlockStartInstruction),
id_(block->id()),
rpo_number_(block->GetRpoNumber()) {}
BasicBlock::Id id_;
BasicBlock::RpoNumber rpo_number_;
Label label_;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment