You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
supports @inline/@noinline annotations within a function body (JuliaLang#41312)
* supports `@inline`/`@noinline` annotations within a function body
Separated from JuliaLang#40754 for the sake of easier review.
The primary motivation for this change is to annotate
`@inline`/`@noinline` to anonymous functions created from `do` block:
```julia
f() do
@inline # makes this anonymous function to be inlined
... # function body
end
```
We can extend the grammar so that we have special "declaration-macro"
supports for `do`-block functions like:
```julia
f() @inline do # makes this anonymous function to be inlined
... # function body
end
```
but I'm not sure which one is better.
Following [the earlier discussion](JuliaLang#40754 (comment)),
this commit implements the easiest solution.
Co-authored-by: Joseph Tan <[email protected]>
* Update base/expr.jl
* Update base/expr.jl
* Update NEWS.md
Co-authored-by: Joseph Tan <[email protected]>
0 commit comments