diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc index bb0ef1bc19..d1faeb07f6 100644 --- a/src/compiler/code-generator.cc +++ b/src/compiler/code-generator.cc @@ -107,8 +107,7 @@ void CodeGenerator::AssembleInstruction(Instruction* instr) { if (FLAG_code_comments) { // TODO(titzer): these code comments are a giant memory leak. Vector buffer = Vector::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()); diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h index 72ea0433d5..fc4778f894 100644 --- a/src/compiler/instruction.h +++ b/src/compiler/instruction.h @@ -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_; };