Introduce warning 68 to warn about hidden allocation due to pattern match of mutable field in curried functions#9751
Merged
lpw25 merged 13 commits intoocaml:trunkfrom Aug 17, 2020
Merged
Conversation
c361f80 to
c116438
Compare
Contributor
Author
|
There are two special cases that code path (
The
|
lpw25
approved these changes
Jul 29, 2020
Contributor
lpw25
left a comment
There was a problem hiding this comment.
The warning is definitely useful, and the refactoring of transl_function is nice. Since this is a user facing change, I'll wait a bit before merging to give others a chance to comment.
Contributor
Author
|
I've rebased the feature and tuned it so that the CI is happy. |
Contributor
|
No one has objected for a week so far. I will merge in the next couple of days. |
lpw25
reviewed
Aug 14, 2020
hhugo
added a commit
to janestreet/ocaml
that referenced
this pull request
Sep 22, 2020
…o pattern match of mutable field in curried functions (ocaml#9751) Introduce new warning 68 (cherry picked from commit 49aa87c)
mshinwell
pushed a commit
to janestreet/ocaml
that referenced
this pull request
Sep 29, 2020
…o pattern match of mutable field in curried functions (ocaml#9751) Introduce new warning 68 (cherry picked from commit 49aa87c)
mshinwell
pushed a commit
to janestreet/ocaml
that referenced
this pull request
Sep 30, 2020
…o pattern match of mutable field in curried functions (ocaml#9751) Introduce new warning 68 (cherry picked from commit 49aa87c)
mshinwell
pushed a commit
to janestreet/ocaml
that referenced
this pull request
Sep 30, 2020
…o pattern match of mutable field in curried functions (ocaml#9751) Introduce new warning 68 (cherry picked from commit 49aa87c)
mshinwell
pushed a commit
to janestreet/ocaml
that referenced
this pull request
Oct 1, 2020
…o pattern match of mutable field in curried functions (ocaml#9751) Introduce new warning 68 (cherry picked from commit 49aa87c)
mshinwell
pushed a commit
to janestreet/ocaml
that referenced
this pull request
Oct 1, 2020
…o pattern match of mutable field in curried functions (ocaml#9751) Introduce new warning 68 (cherry picked from commit 49aa87c)
GreenArchon
pushed a commit
to GreenArchon/ocaml
that referenced
this pull request
Dec 19, 2020
…atch of mutable field in curried functions (ocaml#9751) Introduce new warning 68 # Conflicts: # Changes # boot/ocamlc # boot/ocamllex # lambda/translcore.ml # utils/warnings.ml
GreenArchon
pushed a commit
to GreenArchon/ocaml
that referenced
this pull request
Dec 19, 2020
…atch of mutable field in curried functions (ocaml#9751) Introduce new warning 68 # Conflicts: # Changes # boot/ocamlc # boot/ocamllex # lambda/translcore.ml # utils/warnings.ml
gretay-js
pushed a commit
to gretay-js/ocaml
that referenced
this pull request
May 28, 2021
…o pattern match of mutable field in curried functions (ocaml#9751) Introduce new warning 68 (cherry picked from commit 49aa87c)
Ngoguey42
pushed a commit
to tarides/tezos
that referenced
this pull request
Jun 7, 2021
The nice side-effect of this patch is to reduce the number of allocations. See ocaml/ocaml#9751 for the introduction of this breaking change in OCaml.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Report a (new) warning when curried function allocate an extra closure due to pattern-matching on mutable argument
The goal is to give more visibility to theses hidden allocation points. It's currently too easy to degrade performances.
fix #9641