Clean up comments after compiler dead-code removal - #8558
Conversation
Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb74f7b5d6
ℹ️ 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".
| of uses. A use under a lambda or within a loop is treated as multiple uses, | ||
| since neither case is suitable for inlining. The local table [bv] tracks |
There was a problem hiding this comment.
Describe captured uses without inflating their count
Correct this description for an identifier referenced once from a lambda or loop: add_one_use records times = 1 with captured = true, rather than treating it as multiple uses, and lam_pass_lets_dce.ml can still inline a captured constant or variable. Documenting the separate captured state is important because maintainers cannot infer the optimizer's inlining decisions from the stated occurrence-count invariant.
Useful? React with 👍 / 👎.
| (** [will_break doc] checks whether [doc] contains forced line breaks. | ||
|
|
||
| Forced breaks are not propagated through [customLayout], because doing so | ||
| would always select the last layout the algorithm tries. Consumers can use | ||
| [will_break] to detect a forced break in a custom layout and explicitly add | ||
| [breakParent] to propagate it to the parent document. *) |
There was a problem hiding this comment.
Limit the will_break contract to the first custom layout
Clarify that this does not generally detect a forced break anywhere in a custom layout. For CustomLayout values whose first alternative has no forced break but a later fallback does, will_break returns false because res_doc.ml only examines CustomLayout (doc :: _); a consumer following this contract may therefore omit the promised break_parent when that fallback is selected.
Useful? React with 👍 / 👎.
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
cknitt
left a comment
There was a problem hiding this comment.
Not sure if you want to address Codex' comments.
Signed-off-by: Cristiano Calcagno <cristianoc@users.noreply.github.com>
Summary
peek_slashinterface comment.Why
#8555 legitimately removed the unused compiler code, but a few adjacent comments were either left attached to unrelated definitions or removed even though the documented code remains.
This is documentation-only and intentionally has no changelog entry.
Validation
opam exec -- dune build @fmtgit diff --checkmake checkformatreaches the same OCaml formatter successfully, then cannot run the unrelated ReScript formatting phase in a fresh worktree because the local compiler binary has not been built.