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

Add tests for function parameter/return unboxing #2321

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Gbury
Copy link
Contributor

@Gbury Gbury commented Feb 28, 2024

This PR adds some tests following #1271 .

These tests actually show that #2319 missed one spot when it renamed the attribute.

Also, it appears that the location of the warning is not always exact: indeed, as can be show in the compilers reference for the added tests, we have two warnings as expected, but both quote the same location, which is less than ideal since this means we cannot distinguish the warning for the annotation on the parameter from the warning on the annotation of the function return, cc @Ekdohibs .

@mshinwell mshinwell added the flambda2 Prerequisite for, or part of, flambda2 label Feb 28, 2024
@mshinwell
Copy link
Collaborator

This isn't ready yet, @mshinwell to try reproducing the failure on env.ml in classic mode.

@Gbury Gbury force-pushed the unboxable_tests branch from 3936989 to b090cf8 Compare July 4, 2024 14:31
@Gbury Gbury force-pushed the unboxable_tests branch from b090cf8 to 96da2ad Compare July 8, 2024 14:47
@Gbury
Copy link
Contributor Author

Gbury commented Aug 26, 2024

@mshinwell ping ?

that if it had any allocation, the number of minor words allocated would be
a lot bigger than the threshold we check for. *)
let test_allocs test_name f arg1 arg2 =
let (minor, promoted, major) = Gc.counters () in
Copy link
Contributor

Choose a reason for hiding this comment

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

Gc.minor_words looks more interesting (and doesn't allocate in native mode)

@lthls lthls mentioned this pull request Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flambda2 Prerequisite for, or part of, flambda2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants