Index: src/compiler/instruction.cc |
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc |
index e3aa1e797af01be469c8bb68b9db11d55c28d154..37c81d91fee8b3c5f63cd43376ad20db44e2518a 100644 |
--- a/src/compiler/instruction.cc |
+++ b/src/compiler/instruction.cc |
@@ -59,6 +59,22 @@ FlagsCondition CommuteFlagsCondition(FlagsCondition condition) { |
} |
+void InstructionOperand::Print(const RegisterConfiguration* config) const { |
+ OFStream os(stdout); |
+ PrintableInstructionOperand wrapper; |
+ wrapper.register_configuration_ = config; |
+ wrapper.op_ = *this; |
+ os << wrapper << std::endl; |
+} |
+ |
+ |
+void InstructionOperand::Print() const { |
+ const RegisterConfiguration* config = |
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN); |
+ Print(config); |
+} |
+ |
+ |
std::ostream& operator<<(std::ostream& os, |
const PrintableInstructionOperand& printable) { |
const InstructionOperand& op = printable.op_; |
@@ -152,6 +168,24 @@ std::ostream& operator<<(std::ostream& os, |
} |
+void MoveOperands::Print(const RegisterConfiguration* config) const { |
+ OFStream os(stdout); |
+ PrintableInstructionOperand wrapper; |
+ wrapper.register_configuration_ = config; |
+ wrapper.op_ = destination(); |
+ os << wrapper << " = "; |
+ wrapper.op_ = source(); |
+ os << wrapper << std::endl; |
+} |
+ |
+ |
+void MoveOperands::Print() const { |
+ const RegisterConfiguration* config = |
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN); |
+ Print(config); |
+} |
+ |
+ |
std::ostream& operator<<(std::ostream& os, |
const PrintableMoveOperands& printable) { |
const MoveOperands& mo = *printable.move_operands_; |
@@ -254,6 +288,22 @@ bool Instruction::AreMovesRedundant() const { |
} |
+void Instruction::Print(const RegisterConfiguration* config) const { |
+ OFStream os(stdout); |
+ PrintableInstruction wrapper; |
+ wrapper.instr_ = this; |
+ wrapper.register_configuration_ = config; |
+ os << wrapper << std::endl; |
+} |
+ |
+ |
+void Instruction::Print() const { |
+ const RegisterConfiguration* config = |
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN); |
+ Print(config); |
+} |
+ |
+ |
std::ostream& operator<<(std::ostream& os, |
const PrintableParallelMove& printable) { |
const ParallelMove& pm = *printable.parallel_move_; |
@@ -744,6 +794,22 @@ void InstructionSequence::SetSourcePosition(const Instruction* instr, |
} |
+void InstructionSequence::Print(const RegisterConfiguration* config) const { |
+ OFStream os(stdout); |
+ PrintableInstructionSequence wrapper; |
+ wrapper.register_configuration_ = config; |
+ wrapper.sequence_ = this; |
+ os << wrapper << std::endl; |
+} |
+ |
+ |
+void InstructionSequence::Print() const { |
+ const RegisterConfiguration* config = |
+ RegisterConfiguration::ArchDefault(RegisterConfiguration::TURBOFAN); |
+ Print(config); |
+} |
+ |
+ |
FrameStateDescriptor::FrameStateDescriptor( |
Zone* zone, FrameStateType type, BailoutId bailout_id, |
OutputFrameStateCombine state_combine, size_t parameters_count, |