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

Data only patch #16

Open
avncharlie opened this issue Jan 16, 2025 · 2 comments
Open

Data only patch #16

avncharlie opened this issue Jan 16, 2025 · 2 comments

Comments

@avncharlie
Copy link

Is there a way to insert a data-only patch? It appears that a patch requires at least one instruction currently.

@jranieri-grammatech
Copy link
Collaborator

RewritingContext.insert_at and RewritingContext.replace_at have overloads that accept a bytes object in addition to a Patch object when targeting DataBlocks. Is this sufficient for what you're after? Or is there a reason it needs to be a Patch?

@avncharlie
Copy link
Author

Specifically, I would like to add data with symbols (i.e labelled data) that my later patches reference, which I don't think I could achieve by just adding bytes to an existing DataBlock. Using a Patch allows me to define labelled data, which is added to the IR as DataBlocks and Symbols referencing those DataBocks. Is this possible without using a Patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants