Revision: 24616
Author:   [email protected]
Date:     Wed Oct 15 08:23:24 2014 UTC
Log:      [turbofan] fix block mapping in code comments

[email protected]

BUG=

Review URL: https://codereview.chromium.org/635213003
https://code.google.com/p/v8/source/detail?r=24616

Modified:
 /branches/bleeding_edge/src/compiler/code-generator.cc
 /branches/bleeding_edge/src/compiler/instruction.h

=======================================
--- /branches/bleeding_edge/src/compiler/code-generator.cc Tue Oct 14 08:51:22 2014 UTC +++ /branches/bleeding_edge/src/compiler/code-generator.cc Wed Oct 15 08:23:24 2014 UTC
@@ -107,8 +107,7 @@
     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());
=======================================
--- /branches/bleeding_edge/src/compiler/instruction.h Tue Oct 14 08:51:22 2014 UTC +++ /branches/bleeding_edge/src/compiler/instruction.h Wed Oct 15 08:23:24 2014 UTC
@@ -598,6 +598,7 @@
  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 @@
  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.

Reply via email to