1.1 KiB
Enso Compiler IR
Enso IR, currently implemented in Scala, with base class
org.enso.compiler.core.IR
, is created from the output of the native
parser. The IR is an immutable annotated AST subjected to
multiple passes. Every pass is a class implementing the
org.enso.compiler.pass.IRPass
interface.
See Runtime roadmap - static analysis for future goals.
Visualization
The IR can be visualized using --vm.D=enso.compiler.dumpIr
system property.
This will output a .dot
file in GraphViz format in the
ir-dumps
directory for each IR in the program. The dot file format is a
minimal textual format, that can be converted to a graphical representation
using the dot
command from the GraphViz package. For example, on Ubuntu,
install dot
with sudo apt install graphviz
. Then, convert the .dot
file to
a .svg
image with dot -Tsvg -o <output>.svg <input>.dot
. An example is:
See org.enso.compiler.dump.IRDumper
.