Revamp macro arg system

This should significantly improve performance: on pokecrystal builds, perf
reported as much CPU time spent on `yyparse` as on `sym_UseNewMacroArgs`
Measurements show ~6 seconds of improvement on that codebase.

This also fixes #321, as a bonus, due to saner management!
This commit is contained in:
ISSOtm
2020-03-14 14:43:09 +01:00
parent 61897d8b52
commit 2f466c2939
15 changed files with 213 additions and 187 deletions

19
test/asm/unique-id.err Normal file
View File

@@ -0,0 +1,19 @@
warning: unique-id.asm(12) -> unique-id.asm::m(4): [-Wuser]
_0
warning: unique-id.asm(12) -> unique-id.asm::m(5) -> unique-id.asm::m::REPT~1(6): [-Wuser]
_1
warning: unique-id.asm(12) -> unique-id.asm::m(5) -> unique-id.asm::m::REPT~2(6): [-Wuser]
_2
warning: unique-id.asm(12) -> unique-id.asm::m(8): [-Wuser]
_0
warning: unique-id.asm(14) -> unique-id.asm::m(4): [-Wuser]
_3
warning: unique-id.asm(14) -> unique-id.asm::m(5) -> unique-id.asm::m::REPT~1(6): [-Wuser]
_4
warning: unique-id.asm(14) -> unique-id.asm::m(5) -> unique-id.asm::m::REPT~2(6): [-Wuser]
_5
warning: unique-id.asm(14) -> unique-id.asm::m(8): [-Wuser]
_3
ERROR: unique-id.asm(15):
Macro argument '\@' not defined
while expanding symbol "print"