/// <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(" default="); writer.Write(DefaultTarget); var indentedWriter = DumpHelpers.CreateIndentedTextWriter(writer); for (int i = 0; i < TargetTable.Count; i++) { indentedWriter.WriteLine(); indentedWriter.Write(i); indentedWriter.Write(" -> "); indentedWriter.Write(TargetTable[i]); } writer.WriteLine(); }
/// <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"); }