/// <summary> /// Writes a string representation of this instruction to the given text writer. /// </summary> /// <param name="writer"> /// The writer to which a representation of this instruction is written. /// </param> public override void Dump(TextWriter writer) { Op.Dump(writer); writer.Write(" (result: "); DumpHelpers.DumpWasmType(Type, writer); writer.Write(")"); var indentedWriter = DumpHelpers.CreateIndentedTextWriter(writer); foreach (var instr in IfBranch) { indentedWriter.WriteLine(); instr.Dump(indentedWriter); } writer.WriteLine(); if (HasElseBranch) { writer.Write("else"); foreach (var instr in ElseBranch) { indentedWriter.WriteLine(); instr.Dump(indentedWriter); } writer.WriteLine(); } writer.Write("end"); }
/// <summary> /// Writes a string representation of this operator to the given text writer. /// </summary> /// <param name="Writer"> /// The writer to which a representation of this operator is written. /// </param> public virtual void Dump(TextWriter Writer) { if (HasDeclaringType) { DumpHelpers.DumpWasmType(DeclaringType, Writer); Writer.Write("."); } Writer.Write(Mnemonic); }
/// <summary> /// Writes a string representation of this instruction to the given text writer. /// </summary> /// <param name="Writer"> /// The writer to which a representation of this instruction is written. /// </param> public override void Dump(TextWriter Writer) { Op.Dump(Writer); Writer.Write(" (result: "); DumpHelpers.DumpWasmType(Type, Writer); Writer.Write(")"); var indentedWriter = DumpHelpers.CreateIndentedTextWriter(Writer); foreach (var instr in Contents) { indentedWriter.WriteLine(); instr.Dump(indentedWriter); } Writer.WriteLine(); Writer.Write("end"); }