8000 Add support for a new [%atomic.loc r.field] construct by glittershark · Pull Request #4229 · oxcaml/oxcaml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for a new [%atomic.loc r.field] construct #4229

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

Draft
wants to merge 3 commits into
base: aspsmith/atomic-fields-use-atomic-prims
Choose a base branch
from

Conversation

glittershark
Copy link
Member

Add support for a new [%atomic.lock r.field] contstruct, which gets typed into a
new Texp_atomic_loc typedtree expression node, which in turn turns into a block
allocation containing the record r, and the field index of the field field
in that record, with type 'a atomic_loc, where 'a' is the type of that
field:

Γ ⊢ e₁ : τ₁ @ m,
     τ₁ = { ... f : τ₂ ... }
——————————————————————————————————————————– ATOMIC_LOC
Γ ⊢ [%atomic.loc e₁.f] : τ₂ atomic_loc @ m

Add support for a new [%atomic.lock r.field] contstruct, which gets typed into a
new Texp_atomic_loc typedtree expression node, which in turn turns into a block
allocation containing the record `r`, and the field index of the field `field`
in that record, with type `'a atomic_loc`, where `'a'` is the type of that
field:

Γ ⊢ e₁ : τ₁ @ m,
     τ₁ = { ... f : τ₂ ... }
——————————————————————————————————————————– ATOMIC_LOC
Γ ⊢ [%atomic.loc e₁.f] : τ₂ atomic_loc @ m
@glittershark glittershark requested review from goldfirere and riaqn June 29, 2025 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
< 4C3F div class="discussion-sidebar-item sidebar-assignee js-discussion-sidebar-item js-socket-channel js-updatable-content" data-channel="eyJjIjoicHVsbF9yZXF1ZXN0OjI2MjcxNjY3NjgiLCJ0IjoxNzUxMzQxNzE3fQ==--2696ba22c594fc359b0820a1a0c828c332590e122793961726cb2227cb2f1c2c" data-gid="PR_kwDOEpzips6cl2Iw" data-url="/oxcaml/oxcaml/issues/4229/show_partial?partial=issues%2Fsidebar%2Fshow%2Fassignees" data-channel-event-name="assignees_updated" >
Assignees
No one assigned
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0