Skip to content

Commit 14b8ff6

Browse files
Update callsite @noinline docstring to make clear it applies to calls in arguments too (#57586)
Based on #57396 it seems worth calling this behaviour out explicitly since it's somewhat surprising.
1 parent 9cafd35 commit 14b8ff6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

base/expr.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,14 @@ Give a hint to the compiler that calls within `block` are worth inlining.
256256
end
257257
```
258258
259+
!!! note
260+
The callsite annotation applies to all calls in the block, including function arguments
261+
that are themselves calls:
262+
```julia
263+
# The compiler will not inline `getproperty`, `g` or `f`
264+
@noinline f(x.inner, g(y))
265+
```
266+
259267
!!! note
260268
When there are nested callsite annotations, the innermost annotation has the precedence:
261269
```julia

0 commit comments

Comments
 (0)