{"id":16916101,"url":"https://github.com/zesterer/ir","last_synced_at":"2025-03-20T20:55:00.532Z","repository":{"id":66134579,"uuid":"194549271","full_name":"zesterer/ir","owner":"zesterer","description":"An experimental language intermediate representation","archived":false,"fork":false,"pushed_at":"2019-07-10T07:50:09.000Z","size":18,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T21:15:41.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zesterer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-30T18:40:46.000Z","updated_at":"2024-02-14T15:09:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2dee842-31aa-4c0d-abdc-ef659787acdd","html_url":"https://github.com/zesterer/ir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zesterer","download_url":"https://codeload.github.com/zesterer/ir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244688750,"owners_count":20493869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T19:24:58.350Z","updated_at":"2025-03-20T20:55:00.526Z","avatar_url":"https://github.com/zesterer.png","language":"Rust","readme":"IR\n============\n*Name to be determined.*\n\nA simple, flexible, and portable SSA IR for compiled programming languages.\n\n## Example\n\nAll branches are known as \"blocks\". Blocks are like functions by themselves, making them more powerful than an ordinary local label. \nBlocks have dependencies on other blocks for their functionalities. IR will optimize based on the \"shared functionality\" of blocks \nwhen deciding inlining and procedure calls.\n\nBlocks receive any number of inputs through their parameters, but cannot return values. Instead of returning values, blocks mutate their inputs.\n\nThe following is a \"hello world\" example:\n\n```\nBLOCK (impure) _main (argc: I32, argv: \u0026\u0026U8)\n    s0 = \"Hello, world!\"\n    extern_call printf s0 ; C FFI \"printf\"\n    branch _loop(0) ; a jump / procedure call\n\nBLOCK (impure) _loop (i: I32)\n    s0 = \"%i\"\n    extern_call printf s0 i ; printf(\"%i\", i)\n    reloop = i \u003c 10 ; condition evaluates to True or False\n    branch_if reloop _loop(i) _end ; if (reloop) _loop(i) else _end\n\nBLOCK (impure) _end ()\n    branch_end 0 ; return 0\n```\n\n`_main` is the entry point of the program, and has the same function signature as the C entry:\n\n```c\nint main(int argc, char const* argv[])\n```\n\nNote that every block has to end with some kind of `branch_` statement, whether it is a jump, conditional,\nor end of process signal.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzesterer%2Fir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzesterer%2Fir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzesterer%2Fir/lists"}