Skip to content

Commit

Permalink
Minor inference improvements in stdlibs
Browse files Browse the repository at this point in the history
Since Julia unfortuantely still cannot propagate information from immutable
fields loaded twice (see JuliaLang#39888, JuliaLang#41199), these kind of changes are necessary
to achieve type stability.
  • Loading branch information
jakobnissen committed Aug 31, 2022
1 parent 0a64f5b commit 9ddf98e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stdlib/REPL/src/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ mutable struct LineEditREPL <: AbstractREPL
in_help,envcolors,false,nothing, opts, nothing, Tuple{String,Int}[])
end
end
outstream(r::LineEditREPL) = r.t isa TTYTerminal ? r.t.out_stream : r.t
outstream(r::LineEditREPL) = (t = r.t; t isa TTYTerminal ? t.out_stream : t)
specialdisplay(r::LineEditREPL) = r.specialdisplay
specialdisplay(r::AbstractREPL) = nothing
terminal(r::LineEditREPL) = r.t
Expand Down
3 changes: 2 additions & 1 deletion stdlib/Serialization/src/Serialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ function serialize_mod_names(s::AbstractSerializer, m::Module)
p = parentmodule(m)
if p === m || m === Base
key = Base.root_module_key(m)
serialize(s, key.uuid === nothing ? nothing : key.uuid.value)
uuid = key.uuid
serialize(s, uuid === nothing ? nothing : uuid.value)
serialize(s, Symbol(key.name))
else
serialize_mod_names(s, p)
Expand Down

0 comments on commit 9ddf98e

Please sign in to comment.