Skip to content

Commit db87ab5

Browse files
KristofferCKristofferC
authored andcommitted
move REPL/src/Terminals.jl into Base to work around significant invalidations from it (#59590)
(cherry picked from commit a25decd)
1 parent 6be73b4 commit db87ab5

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
@@ -174,6 +174,7 @@ using .Filesystem
174174
include("cmd.jl")
175175
include("process.jl")
176176
include("terminfo.jl")
177+
include("Terminals.jl") # Moved from REPL to reduce invalidations
177178
include("secretbuffer.jl")
178179

179180
# 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
@@ -59,8 +59,7 @@ import Base:
5959

6060
_displaysize(io::IO) = displaysize(io)::Tuple{Int,Int}
6161

62-
include("Terminals.jl")
63-
using .Terminals
62+
using Base.Terminals
6463

6564
abstract type AbstractREPL end
6665

0 commit comments

Comments
 (0)