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

Refactor type annotation handling for clarity #8586

Merged

Conversation

bjorng
Copy link
Contributor

@bjorng bjorng commented Jun 17, 2024

In #8564, Frej Drejhammar noticed that the following comment was misleading:

%% One or more arguments have been simplified to literal values.

It turns out that the entire clause in which the comment is located is not needed. Removing the arg_types annotation is unnecessary, since it will be added back in the next iteration of the beam_ssa_type pass.

This commit removes the unnecessary clause, as well as strengthening and explaining the invariants maintained by opt_anno_types/2.

In erlang#8564, Frej Drejhammar noticed that the following comment
was misleading:

    %% One or more arguments have been simplified to literal values.

It turns out that the entire clause in which the comment is located is
not needed. Removing the `arg_types` annotation is unnecessary, since
it will be added back in the next iteration of the `beam_ssa_type`
pass.

This commit removes the unnecessary clause, as well as strengthening
and explaining the invariants maintained by `opt_anno_types/2`.
@bjorng bjorng added team:VM Assigned to OTP team VM enhancement testing currently being tested, tag is used by OTP internal CI labels Jun 17, 2024
@bjorng bjorng requested a review from jhogberg June 17, 2024 07:21
@bjorng bjorng self-assigned this Jun 17, 2024
Copy link
Contributor

github-actions bot commented Jun 17, 2024

CT Test Results

    2 files    324 suites   9m 56s ⏱️
  816 tests   814 ✅ 2 💤 0 ❌
5 419 runs  5 417 ✅ 2 💤 0 ❌

Results for commit bb29ba3.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@bjorng bjorng merged commit 1ad2aa8 into erlang:master Jun 20, 2024
17 checks passed
@bjorng bjorng deleted the bjorn/compiler/refactor-type-annotation-handling branch June 20, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant