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

✨ Jump Tables #26

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

✨ Jump Tables #26

wants to merge 8 commits into from

Conversation

Philogy
Copy link
Contributor

@Philogy Philogy commented Nov 18, 2024

No description provided.

@wjmelements
Copy link

I don't think codecopy is the best way to do jump tables but maybe that's beside the point.

It seems the purpose of the feature is to allow you to define offsets from a tablestart. But the offsets have to be declared in a separate place from the only place they can be used. It seems redundant.

@@ -0,0 +1,19 @@
#define macro MAIN() = takes(0) returns(0) {
ANOTHER()
asterix:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you used dests instead of offsets, this can be allowed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has nothing to do with that, could allow it regardless, just a choice I made to have tables be more explicit.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table is already explicit enough I think; it doesn't need to be limited

@Philogy
Copy link
Contributor Author

Philogy commented Nov 19, 2024

I don't think codecopy is the best way to do jump tables but maybe that's beside the point.

It seems the purpose of the feature is to allow you to define offsets from a tablestart. But the offsets have to be declared in a separate place from the only place they can be used. It seems redundant.

I somewhat agree, however right now I just want to replicate the features huff-rs had, I can add pushed tables at a later point.

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

Successfully merging this pull request may close these issues.

2 participants