Skip to content
Snippets Groups Projects
Commit 1b1fab88 authored by Joachim Breitner's avatar Joachim Breitner Committed by Ben Gamari
Browse files

Call Arity: In "e x", the result of "x" is not shared

in contrast to "e (f x)", where CorePrep will turn it into "let y = f x
in e x". So in
  let f = ...
  in e (f x)
we know that f is called at most once, but in
  let f = ...
  in e f
we do not know that.

Previously Call Arity would assume that in "e x", "x" is evaluated at
most once. This rarely would make a difference (the argument "x" is
analized with an incoming arity of 0, so no eta-expansion would be done
anyways), but of course this should still be fixed.

This fixes #11064.

Note the corresponding code dmdTransformThunkDmd in DmdAnal.
parent 7f8fc1c9
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment