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 397
    • Issues 397
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • 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
Hide 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
  • concepts
    • Deprecated Modules
    • Globals
    • Intermediate Code Macros
    • Named Tuples
    • Overloading
    • Preprocessor
    • Primitive functions
    • Runetime Representations
    • input stdin
    • phm xt
    • ref counting methods
    • type famlies
    • type patterns
  • error messages
    • Anthropomorphic error essages
    • Colored error messages
View All Pages