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

Translation: Resolve conflicts in matching.ml and translcore.ml #179

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

ncik-roberts
Copy link
Contributor

Cherry-picks a commit from #171; once that's merged I'll drop the lambda.ml and lambda.mli changes from here.

Nature of the resolutions:

  • (~60% of the conflicts) Upstream added an argument Immediate | Pointer to Pfield in addition to mutable_flag. We added field_read_semantics internally (this is semantically equivalent to mutable_flag, though the constructor names are different). The conflicts are easy to resolve: I just figure out immediate_or_pointer based on the upstream piece of the diff.
  • (~3 conflicts) Lazy field accesses are factored out to a function upstream; I add an extra argument to this function because we populated ap_inlined differently at one callsite (though I doubt it actually matters, as I explain in a comment).
  • The rest mostly have to do with modes/layouts.

Testing

$ dune b --workspace=duneconf/boot.ws _build/default/.ocamlcommon.objs/native/translcore.cmx
$ dune b --workspace=duneconf/boot.ws _build/default/.ocamlcommon.objs/native/matching.cmx
File "lambda/matching.ml", line 1990, characters 56-71:
Error: Unbound value Obj.forcing_tag
Hint: Did you mean string_tag?

To see that the latter is ok, I recommend adding this module to the top of the file:

module Obj = struct
  include Obj
  let forcing_tag = 0
end

Then it should build.

@goldfirere
Copy link
Contributor

Reviewing

lambda/matching.ml Show resolved Hide resolved
lambda/matching.ml Show resolved Hide resolved
lambda/translcore.ml Show resolved Hide resolved
Copy link
Contributor Author

@ncik-roberts ncik-roberts left a comment

Choose a reason for hiding this comment

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

leaving an unresolved conversation for internal thread

lambda/translcore.ml Show resolved Hide resolved
@ncik-roberts ncik-roberts force-pushed the ocaml5-resolve-conflicts-translation branch from eb67984 to eba4129 Compare October 19, 2023 13:14
…sclass`, `translobj`, `translprim`, `translattribute`, `switch`) (#182)

* Get transclass to build

* Get translobj to build

* Get translmod to build

* Get translprim to build

* Get translattribute.ml to build

* Get switch to build
@goldfirere
Copy link
Contributor

#179 was merged into this. Only the first commit needs to be reviewed here.

Copy link
Contributor

@Ekdohibs Ekdohibs left a comment

Choose a reason for hiding this comment

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

Looked at the first commit (matching.ml and translcore.ml) only, looks good.

@ncik-roberts
Copy link
Contributor Author

Thanks all, merging (not squashing as 1 of the 2 commits in this PR corresponds to a stacked PR).

@ncik-roberts
Copy link
Contributor Author

(Actually, looks like rebase and merge is disabled and it's not so bad to squash, so I'll do that.)

@ncik-roberts ncik-roberts merged commit 501716b into main Oct 23, 2023
2 checks passed
@ncik-roberts ncik-roberts deleted the ocaml5-resolve-conflicts-translation branch October 23, 2023 13:44
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.

5 participants