8000 Don't specialize `%obj_field`, `%obj_setfield`, and `%obj_size` by rtjoa · Pull Request #4101 · oxcaml/oxcaml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Don't specialize %obj_field, %obj_setfield, and %obj_size #4101

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

rtjoa
Copy link
Contributor
@rtjoa rtjoa commented Jun 6, 2025

The primitives %obj_field, %obj_setfield, and %obj_size all masquerade as array primitives, whose array type kinds are specialized. This never changes the obj primitives in practice, as they are never bound to array types.

However, it's useful to stop specializing these primitives, as it allows us to add extra checks to array primitive specialization in the following PR. (Eventually, we should just make separate obj primitives for these in lambda, and a CR is left stating as such, but we'd like to get the following PR through.)

Stack

  1. Don't specialize %obj_field, %obj_setfield, and %obj_size #4101
  2. Typeopt.array_type_kind: when element is non-value or unknown, error instead of defaulting to Pgenvalue #4098

@goldfirere
Copy link
Collaborator

I could learn more about this, but I don't feel comfortable here off-hand. Is this something @mshinwell can competently review?

@rtjoa rtjoa added the lambda Lambda language changes label Jun 6, 2025
@rtjoa rtjoa marked this pull request as draft June 10, 2025 21:40
@rtjoa rtjoa marked this pull request as ready for review June 17, 2025 18:46
@rtjoa
Copy link
Contributor Author
rtjoa commented Jun 17, 2025

(Discussed with @ccasin, and he offered to review, so assigning him.)

@rtjoa rtjoa requested review from ccasin and removed request for mshinwell and goldfirere June 24, 2025 15:42
Copy link
Contributor
@ccasin ccasin left a comment

Choose a reason for hiding this comment

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

I looked through our code base and confirmed these are never used in a way where their behavior would change as a result of this PR.

@ccasin ccasin merged commit b944bed into main Jun 24, 2025
32 checks passed
@ccasin ccasin deleted the rtjoa.no-specialize-obj branch June 24, 2025 17:56
rtjoa added a commit that referenced this pull request Jun 24, 2025
rtjoa added a commit that referenced this pull request Jun 25, 2025
rtjoa added a commit that referenced this pull request Jun 25, 2025
rtjoa added a commit that referenced this pull request Jun 25, 2025
mshinwell pushed a commit to mshinwell/oxcaml that referenced this pull request Jun 25, 2025
…ml#4101)

Don't specialize %obj_ primitives

(cherry picked from commit 146f165)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lambda Lambda language changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0