Skip to content

Conversation

@jacob-shops
Copy link
Contributor

@jacob-shops jacob-shops commented Nov 3, 2025

ZJIT and YJIT often require the use of magic numbers that correspond to C macro definitions. This PR adds internal/args.h to enforce a single source of truth.

Additionally, extract KW_SPECIFIED_BITS_MAX to internal/args.h.

@launchable-app

This comment has been minimized.

@jacob-shops jacob-shops marked this pull request as ready for review November 3, 2025 20:59
@matzbot matzbot requested a review from a team November 3, 2025 20:59
Copy link
Member

@XrXr XrXr left a comment

Choose a reason for hiding this comment

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

A bit overkill to add a new header for this. Let's put it next to VM_ARGC_STACK_MAX in vm_core.h

@tekknolagi
Copy link
Contributor

I suggested new header because vm_args otherwise doesn't include anything. If that's ok, we can move to core

@XrXr
Copy link
Member

XrXr commented Nov 4, 2025

vm_args.c is included into vm.c to make vm.o, so it itself is kinda sorta a header or fragment of a translation unit, that's why it didn't have a header. It's more natural for stuff related to it to be in headers for the VM translation unit because of that topology, I think. I'll put up comments about these files. I put a comment at the top of these files b6f0070

@tekknolagi
Copy link
Contributor

Thanks for the info! Sounds great (and easier)

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.

3 participants