Class SSADisplay
java.lang.Object
io.github.eutro.wasm2j.core.ssa.display.SSADisplay
Utilities for displaying the IR to an SVG document, for debugging purposes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondebugDisplayOnError(String prefix, IRPass<Function, Function> pass) Returns a function pass that displays to the "build/ssa/{prefix}" if the given pass throws an exception.static voiddebugDisplayToFile(Document img, String file) Output a document to a file.static DocumentdisplaySSA(Function func) Display the function to an SVG document.
-
Constructor Details
-
SSADisplay
public SSADisplay()
-
-
Method Details
-
debugDisplayToFile
Output a document to a file.- Parameters:
img- The document to output.file- The file.
-
displaySSA
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.
-