[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
This commit is contained in:
parent
93d0e79d6e
commit
c8a0ea9e3a
@ -107,8 +107,7 @@ void CodeGenerator::AssembleInstruction(Instruction* instr) {
|
|||||||
if (FLAG_code_comments) {
|
if (FLAG_code_comments) {
|
||||||
// TODO(titzer): these code comments are a giant memory leak.
|
// TODO(titzer): these code comments are a giant memory leak.
|
||||||
Vector<char> buffer = Vector<char>::New(32);
|
Vector<char> buffer = Vector<char>::New(32);
|
||||||
// TODO(dcarney): should not be rpo number there
|
SNPrintF(buffer, "-- B%d start --", block_start->id().ToInt());
|
||||||
SNPrintF(buffer, "-- B%d (rpo) start --", current_block_.ToInt());
|
|
||||||
masm()->RecordComment(buffer.start());
|
masm()->RecordComment(buffer.start());
|
||||||
}
|
}
|
||||||
masm()->bind(block_start->label());
|
masm()->bind(block_start->label());
|
||||||
|
@ -598,6 +598,7 @@ class BlockStartInstruction FINAL : public GapInstruction {
|
|||||||
public:
|
public:
|
||||||
Label* label() { return &label_; }
|
Label* label() { return &label_; }
|
||||||
BasicBlock::RpoNumber rpo_number() const { return rpo_number_; }
|
BasicBlock::RpoNumber rpo_number() const { return rpo_number_; }
|
||||||
|
BasicBlock::Id id() const { return id_; }
|
||||||
|
|
||||||
static BlockStartInstruction* New(Zone* zone, BasicBlock* block) {
|
static BlockStartInstruction* New(Zone* zone, BasicBlock* block) {
|
||||||
void* buffer = zone->New(sizeof(BlockStartInstruction));
|
void* buffer = zone->New(sizeof(BlockStartInstruction));
|
||||||
@ -612,8 +613,10 @@ class BlockStartInstruction FINAL : public GapInstruction {
|
|||||||
private:
|
private:
|
||||||
explicit BlockStartInstruction(BasicBlock* block)
|
explicit BlockStartInstruction(BasicBlock* block)
|
||||||
: GapInstruction(kBlockStartInstruction),
|
: GapInstruction(kBlockStartInstruction),
|
||||||
|
id_(block->id()),
|
||||||
rpo_number_(block->GetRpoNumber()) {}
|
rpo_number_(block->GetRpoNumber()) {}
|
||||||
|
|
||||||
|
BasicBlock::Id id_;
|
||||||
BasicBlock::RpoNumber rpo_number_;
|
BasicBlock::RpoNumber rpo_number_;
|
||||||
Label label_;
|
Label label_;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user