Skip to content

Store an application's location directly in Lambda.lambda_apply - #8736

Merged
cknitt merged 1 commit into
remove-inlined-attributefrom
lambda-apply-loc
Oct 8, 2026
Merged

cknitt merged 1 commit into
remove-inlined-attributefrom
lambda-apply-loc

Conversation

@cknitt

@cknitt cknitt commented Oct 7, 2026

Copy link
Copy Markdown
Member

Follow-up to #8734, stacked on it.

Removing the @inlined attribute left Lambda.ap_info as a record with a single field, ap_loc. This stores the location directly in lambda_apply (ap_loc: Location.t) and passes it to Lambda.apply as a plain Location.t, the same way prim takes its location.

It's a mechanical refactor of 12 files in compiler/ml and compiler/core, with no change in behavior or generated JavaScript. .cmj files store Lambda terms, so their layout changes; they're rebuilt with the compiler anyway.

🤖 Generated with Claude Code

@cknitt
cknitt added this pull request to stack #8737 October 7, 2026 16:04
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 79.87%. Comparing base (f1086aa) to head (306d389).

Files with missing lines Patch % Lines
compiler/ml/lambda.ml 83.33% 1 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                      @@
##           remove-inlined-attribute    #8736      +/-   ##
============================================================
- Coverage                     79.87%   79.87%   -0.01%     
============================================================
  Files                           464      464              
  Lines                         63079    63078       -1     
============================================================
- Hits                          50383    50382       -1     
  Misses                        12696    12696              
Files with missing lines Coverage Δ
compiler/core/lam_beta_reduce_util.ml 97.29% <100.00%> (ø)
compiler/core/lam_bounded_vars.ml 64.78% <100.00%> (ø)
compiler/core/lam_compile.ml 89.75% <100.00%> (ø)
compiler/core/lam_pass_remove_alias.ml 82.07% <100.00%> (ø)
compiler/core/lam_util.ml 95.08% <100.00%> (ø)
compiler/ml/lambda_traverse.ml 93.67% <100.00%> (ø)
compiler/ml/translcore.ml 86.48% <100.00%> (ø)
compiler/ml/translmod.ml 96.19% <100.00%> (ø)
tests/ounit_tests/ounit_lambda_traverse_tests.ml 100.00% <100.00%> (ø)
compiler/ml/lambda.ml 66.93% <83.33%> (-0.07%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8736

@rescript/belt

npm i https://pkg.pr.new/@rescript/belt@8736

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8736

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8736

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8736

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8736

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8736

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8736

commit: 306d389

Removing the @inlined attribute left ap_info as a record with a single
field, ap_loc. Store the location in lambda_apply instead, and pass it
to Lambda.apply as a plain Location.t, like prim takes its location.

Signed-off-by: Christoph Knittel <christoph@knittel.cc>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cknitt
cknitt marked this pull request as ready for review October 7, 2026 18:32
@cknitt

cknitt commented Oct 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T18:38:05.801274Z 306d389 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: 306d389b48

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cknitt
cknitt requested a review from cristianoc October 7, 2026 18:38
@cknitt
cknitt merged commit fb2093e into master Oct 8, 2026
24 checks passed
@cknitt
cknitt deleted the lambda-apply-loc branch October 8, 2026 04:33
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.

2 participants