Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • sac2c sac2c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 403
    • Issues 403
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • sac-group
  • sac2csac2c
  • Wiki
  • Concepts
  • Intermediate Code Macros

Intermediate Code Macros · Changes

Page history
Add file about Intermediate-Code-Macros authored Jun 05, 2025 by Quinten Cabo's avatar Quinten Cabo
Show whitespace changes
Inline Side-by-side
concepts/Intermediate-Code-Macros.md 0 → 100644
View page @ 94f79743
In the large cg:gpl phase of the compiler primitive most of the code is transformed into intermediate code macros.
Later these intermediate code macros are expanded into other macros with named tuples.
Finally these macros which take a named tuple as an argument are expanded into the final code.
Only in this last extension into c code the code seems to differ based on the backend.
There are two types of intermediate code macros:
- Header intermediate code macros. These are just normal c macros that expand into code.
- ... macros, these take the tuples as arguments and expand into code.
The [named tuples](./Named-Tuples.md) are basically literal linked lists.
\ No newline at end of file
Clone repository
  • Styleguide
  • concepts
    • Deprecated Modules
    • Globals
    • Intermediate Code Macros
    • Named Tuples
    • Overloading
    • Preprocessor
    • Primitive functions
    • Runtime Representations
    • input stdin
    • phm xt
    • ref counting methods
    • type famlies
    • type patterns
  • error messages
    • Anthropomorphic error essages
View All Pages