Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenated labels in TASM #220

Open
Sword-Smith opened this issue Aug 15, 2023 · 0 comments
Open

Concatenated labels in TASM #220

Sword-Smith opened this issue Aug 15, 2023 · 0 comments
Labels
✨ enhancement Improvement or new feature 🛠️ tooling Developer tools

Comments

@Sword-Smith
Copy link
Collaborator

Sword-Smith commented Aug 15, 2023

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.

@Sword-Smith Sword-Smith added 🛠️ tooling Developer tools ✨ enhancement Improvement or new feature labels Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Improvement or new feature 🛠️ tooling Developer tools
Projects
None yet
Development

No branches or pull requests

1 participant