Reviewers: Benedikt Meurer,
Message:
Committed patchset #1 (id:1) manually as 24616 (presubmit successful).
Description:
[turbofan] fix block mapping in code comments
[email protected]
BUG=
Committed: https://code.google.com/p/v8/source/detail?r=24616
Please review this at https://codereview.chromium.org/635213003/
Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+4, -2 lines):
M src/compiler/code-generator.cc
M src/compiler/instruction.h
Index: src/compiler/code-generator.cc
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index
bb0ef1bc19473a2dad38431234a43c71ff1a6ef0..d1faeb07f65a02330a614070c224aa8f0250e003
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<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());
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index
72ea0433d59d536491a7d73f524908bd55e4df5d..fc4778f8949f9be318ead5e53d707cae25bae169
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_;
};
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.