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

rescript@11.0.0-alpha.3 The @inline attribute doesn't work in uncurried mode. #6149

Closed
DZakh opened this issue Apr 14, 2023 · 10 comments · Fixed by #6152
Closed

rescript@11.0.0-alpha.3 The @inline attribute doesn't work in uncurried mode. #6149

DZakh opened this issue Apr 14, 2023 · 10 comments · Fixed by #6152
Milestone

Comments

@DZakh
Copy link
Contributor

DZakh commented Apr 14, 2023

Example:

@inline
let inlined = () => ()

image

@cristianoc
Copy link
Collaborator

I'm not sure how inline is supposed to work in this case.
Perhaps it still applies, or perhaps there are some difficulties.
Needs investigating.

@cristianoc
Copy link
Collaborator

So this has never worked:

@inline
let inlined = (. ) => ()

so strictly speaking here we're talking about an extension of functionality.

@cristianoc cristianoc added this to the v11.0 milestone Apr 14, 2023
@DZakh
Copy link
Contributor Author

DZakh commented Apr 14, 2023

I run the benchmarks for rescript-struct with uncurried mode on and broken @inline attribute. The result was pretty much the same.

image

@DZakh
Copy link
Contributor Author

DZakh commented Apr 14, 2023

So, it's not as critical as I though, but it still would be nice to have it working in uncurried mode.

@cristianoc
Copy link
Collaborator

@DZakh take a look here: #6152
I've simply turned off the warning. One would need to still test that inline behaves as expected. Would you check that?

@DZakh
Copy link
Contributor Author

DZakh commented Apr 14, 2023

Yep, but only tomorrow

@cristianoc
Copy link
Collaborator

Yep, but only tomorrow

Sounds good. I'll leave this here.

@cristianoc
Copy link
Collaborator

cristianoc commented Apr 15, 2023

I looked a bit at @inline in general. Not really clear what it does except for constants defined locally.
For functions, inlining seems to happen pretty much automatically, and I don't know how much @inline affects that at all.
What might be useful, is to take the existing code, before trying to switch to the new compiler, and remove all the @inline see if it ever made a difference.

@cristianoc
Copy link
Collaborator

If you find something related to uncurried, please report here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants