CommonIR 1.2.0
dotnet add package CommonIR --version 1.2.0
NuGet\Install-Package CommonIR -Version 1.2.0
<PackageReference Include="CommonIR" Version="1.2.0" />
<PackageVersion Include="CommonIR" Version="1.2.0" />
<PackageReference Include="CommonIR" />
paket add CommonIR --version 1.2.0
#r "nuget: CommonIR, 1.2.0"
#:package CommonIR@1.2.0
#addin nuget:?package=CommonIR&version=1.2.0
#tool nuget:?package=CommonIR&version=1.2.0
CommonIR
Intermediate representation to generate code for various different platforms.
This project has recently just started, and as such, is not yet complete.
Documentation will be added as the project progresses.
For a live demonstration of the IR in use, see the current implimentation in Common C.
For more about how to use CommonIR, see the usage examples.
For more info about target development philosophy, see the general target spec.
Using CommonIR (with examples)
To understand how to use CommonIR, we must first establish the fundamental facts about the IR and how it lowers into target code.
CommonIR consists of a hirearchical structure of objects, which are used to represent the program in a target agnostic way.
- IRModule
- IRFunction
- IRLocal
- IRBlock
- IRInstruction
- IRFunctionImport
- IRGlobal
- IRFunction
Each created instruction will keep its value if used multiple times. To create new values, you must build a new instructions.
To keep things simple, aggregates have their own way of being built. You do not need to manually allocate and construct your own aggregates. This is also to later maintain compliance with ABIs.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- System.Reflection.MetadataLoadContext (>= 10.0.11)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CommonIR:
| Package | Downloads |
|---|---|
|
CommonIR.App
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Implimented support for loops and expanded Usage.md. CommonIR's structure and architecture is now satisfactory enough to be used in compilers. The WASM target is now considered partially complete.