| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/instruction.h" | 5 #include "src/compiler/instruction.h" |
| 6 | 6 |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 if (phi->opcode() != IrOpcode::kPhi) continue; | 443 if (phi->opcode() != IrOpcode::kPhi) continue; |
| 444 os << " phi: v" << phi->id() << " ="; | 444 os << " phi: v" << phi->id() << " ="; |
| 445 Node::Inputs inputs = phi->inputs(); | 445 Node::Inputs inputs = phi->inputs(); |
| 446 for (Node::Inputs::iterator iter(inputs.begin()); iter != inputs.end(); | 446 for (Node::Inputs::iterator iter(inputs.begin()); iter != inputs.end(); |
| 447 ++iter) { | 447 ++iter) { |
| 448 os << " v" << (*iter)->id(); | 448 os << " v" << (*iter)->id(); |
| 449 } | 449 } |
| 450 os << "\n"; | 450 os << "\n"; |
| 451 } | 451 } |
| 452 | 452 |
| 453 Vector<char> buf = Vector<char>::New(32); | 453 ScopedVector<char> buf(32); |
| 454 for (int j = block->first_instruction_index(); | 454 for (int j = block->first_instruction_index(); |
| 455 j <= block->last_instruction_index(); j++) { | 455 j <= block->last_instruction_index(); j++) { |
| 456 // TODO(svenpanne) Add some basic formatting to our streams. | 456 // TODO(svenpanne) Add some basic formatting to our streams. |
| 457 SNPrintF(buf, "%5d", j); | 457 SNPrintF(buf, "%5d", j); |
| 458 os << " " << buf.start() << ": " << *code.InstructionAt(j); | 458 os << " " << buf.start() << ": " << *code.InstructionAt(j); |
| 459 } | 459 } |
| 460 | 460 |
| 461 os << " " << block->control_; | 461 os << " " << block->control_; |
| 462 | 462 |
| 463 if (block->control_input_ != NULL) { | 463 if (block->control_input_ != NULL) { |
| 464 os << " v" << block->control_input_->id(); | 464 os << " v" << block->control_input_->id(); |
| 465 } | 465 } |
| 466 | 466 |
| 467 BasicBlock::Successors successors = block->successors(); | 467 BasicBlock::Successors successors = block->successors(); |
| 468 for (BasicBlock::Successors::iterator iter = successors.begin(); | 468 for (BasicBlock::Successors::iterator iter = successors.begin(); |
| 469 iter != successors.end(); ++iter) { | 469 iter != successors.end(); ++iter) { |
| 470 os << " B" << (*iter)->id(); | 470 os << " B" << (*iter)->id(); |
| 471 } | 471 } |
| 472 os << "\n"; | 472 os << "\n"; |
| 473 } | 473 } |
| 474 return os; | 474 return os; |
| 475 } | 475 } |
| 476 | 476 |
| 477 } // namespace compiler | 477 } // namespace compiler |
| 478 } // namespace internal | 478 } // namespace internal |
| 479 } // namespace v8 | 479 } // namespace v8 |
| OLD | NEW |