aboutsummaryrefslogtreecommitdiff
path: root/crates/ncount/src/main.rs
diff options
context:
space:
mode:
authorMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-05 16:34:52 +0100
committerMiquel Sabaté Solà <mikisabate@gmail.com>2025-01-07 00:50:30 +0100
commitf3c6b02fb2f2957b9b896c34d05abe75263c3f60 (patch)
tree5b2f0e6bbea80260cca156ff10882901b008b46b /crates/ncount/src/main.rs
parentcb8af87b54c475ec5adcb6058f6656d4f27d4b13 (diff)
downloadtools.nes-f3c6b02fb2f2957b9b896c34d05abe75263c3f60.tar.gz
tools.nes-f3c6b02fb2f2957b9b896c34d05abe75263c3f60.zip
Store a reference for macros instead of an index
It is not safe to store a node index for macros since the list of nodes that is passed down during assembly might change depending on whether an inner block is being evaluated. Hence, the previous implementation would break on a simple macro call inside of a .proc. This also raised some concerns on the design around the API, since the lifetime of references for internal assembler data needed an explicit lifetime now, and as a side-effect functions like `assemble` had to be moved out of the inner impl Assembler. This is in retrospect also a better design choice. Fixes: ec8b709fa24c ("Implement block bodies inside of the assembler"). Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'crates/ncount/src/main.rs')
0 files changed, 0 insertions, 0 deletions