enso/tools
Pavel Marek f0de43a970
Add org.enso.compiler.dumpIr system prop (#10740)
Working on compiler IR is a daunting task. I have therefore added a new system property `enso.compiler.dumpIr` that will help with that. It dumps the encountered IRs to `ir-dumps` directory in the [GraphViz](www.graphviz.org) format. More info in updated docs.

Note that all the functionality to dump IRs to `dot` files was already implemented. This PR just adds the command line option and updates docs.

# Important Notes
- `--dump-graphs` cmd line option is removed as per [Jaroslav's request](https://github.com/enso-org/enso/pull/10740#pullrequestreview-2216676140).
- To dump graphs, use `-Dgraal.Dump=Truffle:2` system property passed via `JAVA_OPTS` env var.

If you run `env JAVA_OPTS='-Denso.compiler.dumpIr=true' enso --run tmp.enso` where `tmp.enso` is, e.g.:
```
from Standard.Base import all
main = 42
```
You will then have something like:
```
$ ls ir-dumps
Standard.Base.Data.Filter_Condition.dot     Standard.Base.Data.Time.dot              Standard.Base.System.Advanced.dot       Standard.Base.Warning.dot
Standard.Base.Data.Locale.dot               Standard.Base.Enso_Cloud.Enso_File.dot   Standard.Base.System.File.Advanced.dot  tmp.dot
Standard.Base.Data.Numeric.dot              Standard.Base.Errors.dot                 Standard.Base.System.File.dot
Standard.Base.Data.Numeric.Internal.dot     Standard.Base.Network.HTTP.Internal.dot  Standard.Base.System.File.Generic.dot
Standard.Base.Data.Text.Regex.Internal.dot  Standard.Base.Runtime.dot                Standard.Base.System.Internal.dot
```
You can then visualize any of these with `dot -Tsvg -O ir-dumps/tmp.dot`.

An example how that could look like is
![image.svg](https://github.com/user-attachments/assets/26ab8415-72cf-46da-bc63-f475e9fa628e)
2024-08-06 12:00:27 +00:00
..
build-performance Faster dev builds; tooling for measuring build times and app performance. (#3491) 2022-06-02 19:24:18 +00:00
ci Disable linting passes for IDE and repl (#10705) 2024-07-31 08:49:45 +00:00
enso4igv Add org.enso.compiler.dumpIr system prop (#10740) 2024-08-06 12:00:27 +00:00
graphmod Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00
http-test-helper Replace presigned S3 URL with lambda request (#10456) 2024-07-09 09:36:10 +00:00
language-server Bump clap to v4 (#9595) 2024-04-03 11:32:03 +00:00
legal-review Add Initial SQL Server support (#10624) 2024-07-30 11:13:08 +01:00
legal-review-helper Format TS code (#10648) 2024-07-26 17:47:59 +10:00
native-image-config-cleanup Format TS code (#10648) 2024-07-26 17:47:59 +10:00
performance Stop publishing First/Last as constructors and use auto-scoping for take and drop. (#10467) 2024-07-08 10:26:30 +00:00
simple-library-server Format TS code (#10648) 2024-07-26 17:47:59 +10:00
README.md Add a markdown style guide (#1022) 2020-07-21 13:59:40 +01:00

Enso Tools

This folder contains various tools and utilities that aid in the development of the Enso programming language. It should not be used as a dumping ground for things that have better places, but instead is used to hold things that should be part of this repository but do not have another sensible place for them.