| 699 | } |
| 700 | case NativeCompilerIR.Kind.Comments: |
| 701 | case NativeCompilerIR.Kind.ProgramCounterInfo: |
| 702 | case NativeCompilerIR.Kind.BuilderStub: |
| 703 | case NativeCompilerIR.Kind.BoilerplatePrologue: |
| 704 | case NativeCompilerIR.Kind.BoilerplateEpilogue: |
| 705 | return output; |
| 706 | } |
| 707 | } |
| 708 | |
| 709 | export function IRtoString(irs: NativeCompilerIR.Base[]): string { |
| 710 | const writer = new OutputWriter(); |
| 711 | const irWriter = new IRStringWriter(writer); |
| 712 | |
| 713 | for (const ir of irs) { |
| 714 | const writtenLength = writer.writtenLength; |
| 715 | outputIR(ir, irWriter); |
| 716 | if (writtenLength !== writer.writtenLength) { |
| 717 | writer.append('\n'); |