Skip to content

Conversation

@0xAX
Copy link

@0xAX 0xAX commented Oct 16, 2025

Replace "manual" bitmask operations in statestack_get() and statestack_set() with the API provided by bitvector to reduce duplication of bit maipulation logic.

In addition let's make the bit operations in bitvector to use unsigned constants for type consistency with uint data.

Replace "manual" bitmask operations in `statestack_get()` and `statestack_set()`
with the API provided by bitvector to reduce duplication of bit
maipulation logic.

In addition let's make the bit operations in bitvector to use unsigned
constants for type consistency with `uint` data.
@0xAX
Copy link
Author

0xAX commented Oct 16, 2025

ah it fails because of safepoints, sorry for noise. Closing this PR for now as I am not so familiar with the code base and not sure should be bitvector API marked with notsafepoint or not.

@0xAX 0xAX closed this Oct 16, 2025
@vtjnash
Copy link
Member

vtjnash commented Oct 16, 2025

It can be done by annotating bitvector_get as JL_NOTSAFEPOINT

@vtjnash
Copy link
Member

vtjnash commented Oct 16, 2025

Fortunately, those annotations are themselves also checked for correctness, so there is no risk to adding them

@0xAX
Copy link
Author

0xAX commented Oct 16, 2025

It can be done by annotating bitvector_get as JL_NOTSAFEPOINT

So should I re-open PR?

@vtjnash
Copy link
Member

vtjnash commented Oct 16, 2025

Up to you. It seems to be NFC, but it seems a valid simplification.

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