triton-vm
triton-vm copied to clipboard
Concatenated labels in TASM
A lot of code in tasm-lib
creates labels this way:
let entrypoint = self.entrypoint_name();
let code = format!("
{entrypoint}:
call {entrypoint}_inner
return
{entrypoint}_inner:
...
...
return
")
Which works fine for string concatenation. But when you do the same with the triton_asm!
macro, the macro inserts a space between the entrypoint
string and _inner
forcing you to pre-declare all labels which, in my opinion, reduces readability.