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

flambda: ensure that set-of-closures are processed first #1613

merged 3 commits into from Apr 6, 2018


None yet
3 participants
Copy link

xclerc commented Feb 15, 2018

In order for other members of a Let_rec_symbol to get useful
information, set of closures should be processed first. Otherwise,
for instance, a projection will get a dummy approximation.


This comment has been minimized.

Copy link
Contributor Author

xclerc commented Feb 15, 2018

The following example, from @lpw25, exhibits the problem:

(* Shows a specialised set of closures containing only [f],
   which should include [g] and is pointless otherwise. *)

(* let tmp : (string -> unit) ref = ref ignore *)

let rec f x_in_f y_in_f =
  match x_in_f with
  | Some _ -> g x_in_f (y_in_f - 1)
  | None -> g x_in_f (y_in_f - 2)

and g x_in_g y_in_g =
  match x_in_g with
  | Some _ -> f x_in_g (y_in_g - 3)
  | None -> f x_in_g (y_in_g - 4)

let foo x_in_foo =
  let s = Some x_in_foo in
  (f[@specialised]) s 10

This comment has been minimized.

Copy link
Contributor Author

xclerc commented Mar 14, 2018

@chambart, could you review this patch?


This comment has been minimized.

Copy link

chambart commented Mar 30, 2018

This is good. Travis only complains about changes, which you might want to update but isn't strictly needed.

I'm not sure this will commit well around #1665 and #1666, so I don't merge it, if you want to rebase that one instead of the others.

@chambart chambart added the approved label Mar 30, 2018

xclerc added some commits Apr 6, 2018

@mshinwell mshinwell merged commit 79189b2 into ocaml:trunk Apr 6, 2018

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
continuous-integration/travis-ci/pr The Travis CI build is in progress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.