Skip to content

Commit 18be7a7

Browse files
replace more 'leaf type' occurences with 'concrete type'
Co-authored-by: inkydragon <[email protected]>
1 parent e57be22 commit 18be7a7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

base/reflection.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ yielded by expanding the generators.
1515
1616
The keyword `debuginfo` controls the amount of code metadata present in the output.
1717
18-
Note that an error will be thrown if `types` are not leaf types when `generated` is
18+
Note that an error will be thrown if `types` are not concrete types when `generated` is
1919
`true` and any of the corresponding methods are an `@generated` method.
2020
"""
2121
function code_lowered(@nospecialize(f), @nospecialize(t=Tuple); generated::Bool=true, debuginfo::Symbol=:default)
@@ -37,7 +37,7 @@ function code_lowered(@nospecialize(f), @nospecialize(t=Tuple); generated::Bool=
3737
else
3838
error("Could not expand generator for `@generated` method ", m, ". ",
3939
"This can happen if the provided argument types (", t, ") are ",
40-
"not leaf types, but the `generated` argument is `true`.")
40+
"not concrete types, but the `generated` argument is `true`.")
4141
end
4242
else
4343
code = uncompressed_ir(m.def::Method)

base/runtime_internals.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ end
839839
"""
840840
isdispatchtuple(T)
841841
842-
Determine whether type `T` is a tuple "leaf type",
842+
Determine whether type `T` is a tuple of concrete types,
843843
meaning it could appear as a type signature in dispatch
844844
and has no subtypes (or supertypes) which could appear in a call.
845845
If `T` is not a type, then return `false`.
@@ -894,7 +894,7 @@ isconcretedispatch(@nospecialize t) = isconcretetype(t) && !iskindtype(t)
894894
using Core: has_free_typevars
895895

896896
# equivalent to isa(v, Type) && isdispatchtuple(Tuple{v}) || v === Union{}
897-
# and is thus perhaps most similar to the old (pre-1.0) `isleaftype` query
897+
# and is thus perhaps most similar to the old (pre-1.0) `isconcretetype` query
898898
function isdispatchelem(@nospecialize v)
899899
return (v === Bottom) || (v === typeof(Bottom)) || isconcretedispatch(v) ||
900900
(isType(v) && !has_free_typevars(v))

stdlib/InteractiveUtils/src/codeview.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ end
128128
129129
Prints lowered and type-inferred ASTs for the methods matching the given generic function
130130
and type signature to `io` which defaults to `stdout`. The ASTs are annotated in such a way
131-
as to cause "non-leaf" types which may be problematic for performance to be emphasized
131+
as to cause non-concrete types which may be problematic for performance to be emphasized
132132
(if color is available, displayed in red). This serves as a warning of potential type instability.
133133
134-
Not all non-leaf types are particularly problematic for performance, and the performance
134+
Not all non-concrete types are particularly problematic for performance, and the performance
135135
characteristics of a particular type is an implementation detail of the compiler.
136136
`code_warntype` will err on the side of coloring types red if they might be a performance
137137
concern, so some types may be colored red even if they do not impact performance.

0 commit comments

Comments
 (0)