Class SSADisplay

java.lang.Object
io.github.eutro.wasm2j.core.ssa.display.SSADisplay

public class SSADisplay extends Object
Utilities for displaying the IR to an SVG document, for debugging purposes.
  • Constructor Details

    • SSADisplay

      public SSADisplay()
  • Method Details

    • debugDisplayToFile

      public static void debugDisplayToFile(Document img, String file)
      Output a document to a file.
      Parameters:
      img - The document to output.
      file - The file.
    • displaySSA

      public static Document displaySSA(Function func)
      Display the function to an SVG document.
      Parameters:
      func - The function to display.
      Returns:
      The SVG document.
    • debugDisplayOnError

      public static IRPass<Function,Function> debugDisplayOnError(String prefix, IRPass<Function,Function> pass)
      Returns a function pass that displays to the "build/ssa/{prefix}" if the given pass throws an exception.
      Parameters:
      prefix - {prefix}
      pass - The pass to run.
      Returns:
      The pass described above.