Changes between Version 32 and Version 33 of PIRCDevelopment
- Timestamp:
- 08/16/09 20:31:02 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PIRCDevelopment
v32 v33 284 284 == Macro layer == 285 285 286 The macro layer is implemented in both the lexer and the scanner. The syntax to define and expand macros is defined in the parser. This is a fundamental difference from how macros are implemented in IMCC. In IMCC, the macro layer is completely implemented in the lexer. 287 288 Currently, basic macros work, but nested macros do not. This needs to be fixed. 289 286 290 == PIRC Parser == 287 291 292 The parser is implemented in [source:/trunk/compilers/pirc/src/pir.y]. This is a parser specification that needs to be processed by the Bison program in order to generate the C file. 293 288 294 == Symbol Management == 295 296 Symbol management is implemented in [source:/trunk/compilers/pirc/src/pirsymbol.c]. Symbols declared using the {{{.local}}} directive are stored in a symbol table. Whenever an identifier is parsed, it will be looked up in this symbol table. 297 298 All uses of PIR registers (e.g. $I42) are registered as well. The first time a PIR register is used, it is assigned a PASM register. This process is called "coloring". The word "color" is often used in the context of register allocation, since the "classic" algorithm to do so is called "graph-coloring". While the vanilla register allocator does not such algorithm, the field "color" is used for storing the actual PASM register number that was assigned. 299 289 300 290 301 == Constant Folding ==