Skip to content

Conversation

@kikofernandez
Copy link
Contributor

simplification of v3_core. the changes make application and function calls to use ANF format. the only visible effect is the removal one specific beam optimisation that deals with a case of cases, that is

case (case X of ... end) of ... end

this optimisation does not happen too often and the generated code is almost equivalent in efficiency.

@kikofernandez kikofernandez added the team:VM Assigned to OTP team VM label Dec 17, 2025
@kikofernandez kikofernandez requested a review from bjorng December 17, 2025 16:06
@kikofernandez kikofernandez self-assigned this Dec 17, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 17, 2025

CT Test Results

    2 files    333 suites   8m 51s ⏱️
  852 tests   846 ✅ 4 💤 2 ❌
5 632 runs  5 626 ✅ 4 💤 2 ❌

For more details on these failures, see this check.

Results for commit 401988e.

♻️ 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

simplification of v3_core. the changes make application and function
calls to use ANF format. the only visible effect is the removal one
specific beam optimisation that deals with a case of cases, that is

```
case (case X of ... end) of ... end
```

this optimisation does not happen too often and the generated code is
almost equivalent in efficiency.
@kikofernandez kikofernandez force-pushed the kiko/compiler/simplify-v3-core-to-anf-format branch from c9c5397 to 401988e Compare January 15, 2026 08:22
@kikofernandez kikofernandez marked this pull request as ready for review January 15, 2026 08:33
@michalmuskala
Copy link
Contributor

I'm not sure this is actually this rare - given that andalso and oralse desugar to a case, you'll have a lot of case expressions where the argument is a case expression too, without even explicitly writing that

Copy link
Contributor

@bjorng bjorng left a comment

Choose a reason for hiding this comment

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

You've forgotten to include the changes to v3_core.

Do you have any compelling reason for targeting the maint branch? We usually only do bug fixes for the compiler in the maint branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants