Skip to content

Commit 7f0105d

Browse files
authored
Merge branch 'master' into fa/precomp-check-depots-restored
2 parents 70d049f + fb01dd2 commit 7f0105d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1461
-452
lines changed

Make.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ LIBGFORTRAN_VERSION := $(subst libgfortran,,$(filter libgfortran%,$(subst -,$(SP
12481248
# shipped with CSL. Although we do not depend on any of the symbols, it is entirely
12491249
# possible that a user might choose to install a library which depends on symbols provided
12501250
# by a newer libstdc++. Without runtime detection, those libraries would break.
1251-
CSL_NEXT_GLIBCXX_VERSION=GLIBCXX_3\.4\.31|GLIBCXX_3\.5\.|GLIBCXX_4\.
1251+
CSL_NEXT_GLIBCXX_VERSION=GLIBCXX_3\.4\.33|GLIBCXX_3\.5\.|GLIBCXX_4\.
12521252

12531253

12541254
# This is the set of projects that BinaryBuilder dependencies are hooked up for.

Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,13 @@ else ifeq ($(JULIA_BUILD_MODE),debug)
288288
-$(INSTALL_M) $(build_libdir)/libjulia-debug.dll.a $(DESTDIR)$(libdir)/
289289
-$(INSTALL_M) $(build_libdir)/libjulia-internal-debug.dll.a $(DESTDIR)$(libdir)/
290290
endif
291+
-$(INSTALL_M) $(wildcard $(build_private_libdir)/*.a) $(DESTDIR)$(private_libdir)/
291292

292-
# We have a single exception; we want 7z.dll to live in private_libexecdir, not bindir, so that 7z.exe can find it.
293+
# We have a single exception; we want 7z.dll to live in private_libexecdir,
294+
# not bindir, so that 7z.exe can find it.
293295
-mv $(DESTDIR)$(bindir)/7z.dll $(DESTDIR)$(private_libexecdir)/
294296
-$(INSTALL_M) $(build_bindir)/libopenlibm.dll.a $(DESTDIR)$(libdir)/
295297
-$(INSTALL_M) $(build_libdir)/libssp.dll.a $(DESTDIR)$(libdir)/
296-
# The rest are compiler dependencies, as an example memcpy is exported by msvcrt
297-
# These are files from mingw32 and required for creating shared libraries like our caches.
298-
-$(INSTALL_M) $(build_libdir)/libgcc_s.a $(DESTDIR)$(libdir)/
299-
-$(INSTALL_M) $(build_libdir)/libgcc.a $(DESTDIR)$(libdir)/
300-
-$(INSTALL_M) $(build_libdir)/libmsvcrt.a $(DESTDIR)$(libdir)/
301298
else
302299

303300
# Copy over .dSYM directories directly for Darwin

NEWS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ New language features
88
difference between `public` and `export` is that `public` names do not become
99
available when `using` a package/module. ([#50105])
1010
* `ScopedValue` implement dynamic scope with inheritance across tasks ([#50958]).
11+
* A new `AbstractString` type, `AnnotatedString`, is introduced that allows for
12+
regional annotations to be attached to an underlying string. This type is
13+
particularly useful for holding styling information, and is used extensively
14+
in the new `StyledStrings` standard library. There is also a new `AnnotatedChar`
15+
type, that is the equivalent new `AbstractChar` type.
1116

1217
Language changes
1318
----------------
@@ -51,6 +56,17 @@ New library features
5156
Standard library changes
5257
------------------------
5358

59+
#### StyledStrings
60+
61+
* A new standard library for handling styling in a more comprehensive and structured way.
62+
* The new `Faces` struct serves as a container for text styling information
63+
(think typeface, as well as color and decoration), and comes with a framework
64+
to provide a convenient, extensible (via `addface!`), and customisable (with a
65+
user's `Faces.toml` and `loadfaces!`) approach to
66+
styled content.
67+
* The new `@styled_str` string macro provides a convenient way of creating a
68+
`AnnotatedString` with various faces or other attributes applied.
69+
5470
#### Package Manager
5571

5672
#### LinearAlgebra

base/abstractarray.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ Perform a conservative test to check if arrays `A` and `B` might share the same
15071507
By default, this simply checks if either of the arrays reference the same memory
15081508
regions, as identified by their [`Base.dataids`](@ref).
15091509
"""
1510-
mightalias(A::AbstractArray, B::AbstractArray) = !isbits(A) && !isbits(B) && !_isdisjoint(dataids(A), dataids(B))
1510+
mightalias(A::AbstractArray, B::AbstractArray) = !isbits(A) && !isbits(B) && !isempty(A) && !isempty(B) && !_isdisjoint(dataids(A), dataids(B))
15111511
mightalias(x, y) = false
15121512

15131513
_isdisjoint(as::Tuple{}, bs::Tuple{}) = true

base/client.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,9 @@ function exec_options(opts)
246246
# If we're doing a bug report, don't load anything else. We will
247247
# spawn a child in which to execute these options.
248248
let InteractiveUtils = load_InteractiveUtils()
249-
InteractiveUtils.report_bug(arg)
249+
invokelatest(InteractiveUtils.report_bug, arg)
250250
end
251-
return nothing
251+
return false
252252
else
253253
@warn "Unexpected command -$cmd'$arg'"
254254
end
@@ -271,6 +271,10 @@ function exec_options(opts)
271271
interactiveinput = (repl || is_interactive::Bool) && isa(stdin, TTY)
272272
is_interactive::Bool |= interactiveinput
273273

274+
# load terminfo in for styled printing
275+
term_env = get(ENV, "TERM", @static Sys.iswindows() ? "" : "dumb")
276+
global current_terminfo = load_terminfo(term_env)
277+
274278
# load ~/.julia/config/startup.jl file
275279
if startup
276280
try
@@ -416,11 +420,9 @@ function run_main_repl(interactive::Bool, quiet::Bool, banner::Symbol, history_f
416420
end
417421
end
418422
# TODO cleanup REPL_MODULE_REF
419-
420423
if !fallback_repl && interactive && isassigned(REPL_MODULE_REF)
421424
invokelatest(REPL_MODULE_REF[]) do REPL
422425
term_env = get(ENV, "TERM", @static Sys.iswindows() ? "" : "dumb")
423-
global current_terminfo = load_terminfo(term_env)
424426
term = REPL.Terminals.TTYTerminal(term_env, stdin, stdout, stderr)
425427
banner == :no || Base.banner(term, short=banner==:short)
426428
if term.term_type == "dumb"

base/compiler/ssair/inlining.jl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,8 +1008,12 @@ function handle_single_case!(todo::Vector{Pair{Int,Any}},
10081008
elseif isa(case, InvokeCase)
10091009
is_foldable_nothrow(case.effects) && inline_const_if_inlineable!(ir[SSAValue(idx)]) && return nothing
10101010
isinvoke && rewrite_invoke_exprargs!(stmt)
1011-
stmt.head = :invoke
1012-
pushfirst!(stmt.args, case.invoke)
1011+
if stmt.head === :invoke
1012+
stmt.args[1] = case.invoke
1013+
else
1014+
stmt.head = :invoke
1015+
pushfirst!(stmt.args, case.invoke)
1016+
end
10131017
ir[SSAValue(idx)][:flag] |= flags_for_effects(case.effects)
10141018
elseif case === nothing
10151019
# Do, well, nothing
@@ -1643,13 +1647,11 @@ function handle_finalizer_call!(ir::IRCode, idx::Int, stmt::Expr, info::Finalize
16431647
return nothing
16441648
end
16451649

1646-
function handle_invoke_expr!(todo::Vector{Pair{Int,Any}},
1650+
function handle_invoke_expr!(todo::Vector{Pair{Int,Any}}, ir::IRCode,
16471651
idx::Int, stmt::Expr, @nospecialize(info::CallInfo), flag::UInt32, sig::Signature, state::InliningState)
16481652
mi = stmt.args[1]::MethodInstance
16491653
case = resolve_todo(mi, sig.argtypes, info, flag, state)
1650-
if case !== nothing
1651-
push!(todo, idx=>(case::InliningTodo))
1652-
end
1654+
handle_single_case!(todo, ir, idx, stmt, case, false)
16531655
return nothing
16541656
end
16551657

@@ -1677,7 +1679,7 @@ function assemble_inline_todo!(ir::IRCode, state::InliningState)
16771679
# `NativeInterpreter` won't need this, but provide a support for `:invoke` exprs here
16781680
# for external `AbstractInterpreter`s that may run the inlining pass multiple times
16791681
if isexpr(stmt, :invoke)
1680-
handle_invoke_expr!(todo, idx, stmt, info, flag, sig, state)
1682+
handle_invoke_expr!(todo, ir, idx, stmt, info, flag, sig, state)
16811683
continue
16821684
end
16831685

base/ctypes.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,7 @@ const Cfloat = Float32
113113
Equivalent to the native `double` c-type ([`Float64`](@ref)).
114114
"""
115115
const Cdouble = Float64
116+
117+
118+
# we have no `Float16` alias, because C does not define a standard fp16 type. Julia follows
119+
# the _Float16 C ABI; if that becomes standard, we can add an appropriate alias here.

base/exports.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,15 @@ public
10891089
Generator,
10901090
ImmutableDict,
10911091
OneTo,
1092+
AnnotatedString,
1093+
AnnotatedChar,
10921094
UUID,
10931095

1096+
# Annotated strings
1097+
annotatedstring,
1098+
annotate!,
1099+
annotations,
1100+
10941101
# Semaphores
10951102
Semaphore,
10961103
acquire,

base/linking.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,16 @@ else
150150
end
151151

152152
function link_image_cmd(path, out)
153-
LIBDIR = "-L$(libdir())"
154153
PRIVATE_LIBDIR = "-L$(private_libdir())"
155154
SHLIBDIR = "-L$(shlibdir())"
156-
LIBS = is_debug() ? ("-ljulia-debug", "-ljulia-internal-debug") : ("-ljulia", "-ljulia-internal")
155+
LIBS = is_debug() ? ("-ljulia-debug", "-ljulia-internal-debug") :
156+
("-ljulia", "-ljulia-internal")
157157
@static if Sys.iswindows()
158158
LIBS = (LIBS..., "-lopenlibm", "-lssp", "-lgcc_s", "-lgcc", "-lmsvcrt")
159159
end
160160

161161
V = VERBOSE[] ? "--verbose" : ""
162-
`$(ld()) $V $SHARED -o $out $WHOLE_ARCHIVE $path $NO_WHOLE_ARCHIVE $LIBDIR $PRIVATE_LIBDIR $SHLIBDIR $LIBS`
162+
`$(ld()) $V $SHARED -o $out $WHOLE_ARCHIVE $path $NO_WHOLE_ARCHIVE $PRIVATE_LIBDIR $SHLIBDIR $LIBS`
163163
end
164164

165165
function link_image(path, out, internal_stderr::IO=stderr, internal_stdout::IO=stdout)

0 commit comments

Comments
 (0)