Skip to content

Conversation

@KristofferC
Copy link
Member

No description provided.

@KristofferC KristofferC added latency Latency backport 1.9 Change should be backported to release-1.9 labels Mar 6, 2023
@KristofferC KristofferC merged commit 015301a into master Mar 6, 2023
@KristofferC KristofferC deleted the kc/inval_toml_print branch March 6, 2023 19:21
if is_table(value)
push!(ks, String(key))
header = isempty(value) || !all(is_tabular(v) for v in values(value))::Bool
_values = @invokelatest values(value)
Copy link
Member

Choose a reason for hiding this comment

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

this feels semantically wrong to me

Comment on lines +174 to +175
_values = @invokelatest values(value)
header = isempty(value) || !all(is_tabular(v) for v in _values)::Bool
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be:

header = isempty(value) || !(all(is_tabular(v) for v in @invokelatest values(value))::Bool)

?

Copy link
Member

Choose a reason for hiding this comment

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

::Bool seems to be applied to the result of all even as is, so nvm:

julia> code_typed((Any,); optimize=false) do value
           _values = @invokelatest values(value)
           header = isempty(value) || !all(is_tabular(v) for v in _values)::Bool
           header
       end
1-element Vector{Any}:
 CodeInfo(
1 ─       Core.NewvarNode(:(#52))::Any
│         Core.NewvarNode(:(header))::Any
│         (_values = Base.invokelatest(Main.values, value))::Any%4  = Main.isempty(value)::Any
└──       goto #3 if not %4
2 ─       (@_6 = %4)::Any
└──       goto #4
3 ─       (#52 = %new(Main.:(var"#52#54")))::Core.Const(var"#52#54"())%9  = #52::Core.Const(var"#52#54"())%10 = Base.Generator(%9, _values)::Base.Generator{_A, var"#52#54"} where _A
│   %11 = Main.all(%10)::Union{Missing, Bool}%12 = Core.typeassert(%11, Main.Bool)::Bool
└──       (@_6 = !%12)::Bool
4 ┄       (header = @_6)::Any
└──       return header
) => Any

KristofferC added a commit that referenced this pull request Mar 7, 2023
@KristofferC KristofferC mentioned this pull request Mar 7, 2023
52 tasks
KristofferC added a commit that referenced this pull request Mar 7, 2023
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

latency Latency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants