janestreet / janestreet/incremental

Recompute heap does not work in non-oxcaml compiler

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

forwarded-to-js-devs
Dominant language
OCaml
Stars
1.5k
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Since the change from `Uopt.t` to `or_null`, the recompute heap does not work properly in the non-oxcaml compiler, since `phys_same` is tested on a freshly constructed `This` value (which under oxcaml is fine, since `This` is identical to the parameter):
https://github.com/janestreet/incremental/blob/98b5750ec3c006641351bfd858a89136a5dbc52c/src/recompute_heap.ml#L111-L114

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/recompute_heap.ml at lines 111–114 and compare the freshly constructed This value with the parameter used by phys_same. Trace the non-oxcaml path and verify that recompute heap behavior no longer depends on identity with a newly constructed value; confirm the fix in the relevant compiler configurations.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.