Skip to content

Commit a25decd

Browse files
authored
move REPL/src/Terminals.jl into Base to work around significant invalidations from it (#59590)
1 parent f0ece4a commit a25decd

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

base/Base.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ using .Filesystem
180180
include("cmd.jl")
181181
include("process.jl")
182182
include("terminfo.jl")
183+
include("Terminals.jl") # Moved from REPL to reduce invalidations
183184
include("secretbuffer.jl")
184185

185186
# core math functions
File renamed without changes.

contrib/generate_precompile.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ hardcoded_precompile_statements = """
3434
precompile(Base.unsafe_string, (Ptr{UInt8},))
3535
precompile(Base.unsafe_string, (Ptr{Int8},))
3636
37+
# used by REPL
38+
precompile(Tuple{typeof(Base.getproperty), Base.Terminals.TTYTerminal, Symbol})
39+
precompile(Tuple{typeof(Base.reseteof), Base.Terminals.TTYTerminal})
40+
precompile(Tuple{typeof(Base.Terminals.enable_bracketed_paste), Base.Terminals.TTYTerminal})
41+
precompile(Tuple{typeof(Base.Terminals.width), Base.Terminals.TTYTerminal})
42+
precompile(Tuple{typeof(Base.Terminals.height), Base.Terminals.TTYTerminal})
43+
precompile(Tuple{typeof(Base.write), Base.Terminals.TTYTerminal, Array{UInt8, 1}})
44+
3745
# loading.jl - without these each precompile worker would precompile these because they're hit before pkgimages are loaded
3846
precompile(Base.__require, (Module, Symbol))
3947
precompile(Base.__require, (Base.PkgId,))

stdlib/REPL/src/REPL.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ import Base:
6161

6262
_displaysize(io::IO) = displaysize(io)::Tuple{Int,Int}
6363

64-
include("Terminals.jl")
65-
using .Terminals
64+
using Base.Terminals
6665

6766
abstract type AbstractREPL end
6867

0 commit comments

Comments
 (0)