██╗██████╗ ██╗██████╗ ██╗██╗ ██╗███╗ ███╗
██║██╔══██╗██║██╔══██╗██║██║ ██║████╗ ████║
██║██████╔╝██║██║ ██║██║██║ ██║██╔████╔██║
██║██╔══██╗██║██║ ██║██║██║ ██║██║╚██╔╝██║
██║██║ ██║██║██████╔╝██║╚██████╔╝██║ ╚═╝ ██║
╚═╝╚═╝ ╚═╝╚═╝╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
Iridium IR is the core intermediate representation used by the Iridium Static Analysis Framework for analyzing and optimizing dynamic language systems like JavaScript.
The IR is designed as a dynamic, closure-oriented language with first-class support for asynchronous control flow. It provides a core calculus that dynamic languages such as JavaScript can extend to encode their semantics.
Iridium desugars source programs into primitive operations, constructs logical stack frames, and serializes these into a Lisp-like language for further analysis and code generation.
This documentation outlines the major components of the Iridium IR and their respective roles in static analysis and transformation pipelines.
Iridium IR nodes are grouped into the following categories:
Transitional nodes that require further resolution before becoming concrete. These are used to defer decisions such as binding resolution or control structure interpretation.
For Example,
Bindings
object, which models logical stack frames.Nodes that represent potential invocation sites, including both user-visible and internal calls.
Nodes that represent and manipulate the closure environment in which operations execute.
Bindings
object models a logical stack frame, storing local bindings and tracking captured variables (external environment references).Nodes that control the execution order of a program, including both synchronous and asynchronous patterns.
return
, break
, etc.).await
, promises, and VM-level event handling.Nodes that evaluate to values and are only permitted on the right-hand side of assignments.
High-level structural components that define the organization of an Iridium program.
I write the documentation quickly and have GPT beautify it, sorry if this displeases some readers 🙏