Skip to content

Commit 67d332f

Browse files
authored
Merge branch 'master' into unsafe-pure
2 parents 9eb367a + 0dbcc2a commit 67d332f

Some content is hidden

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

95 files changed

+2194
-6452
lines changed

Make.inc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,10 @@ endif
539539
# Allow the user to specify this in Make.user
540540
GCCPATH ?= $(LOCALBASE)/lib/gcc$(_GCCVER)
541541

542-
LDFLAGS += -L$(build_libdir) -L$(GCCPATH) -Wl,-rpath,$(build_libdir) -Wl,-rpath,$(GCCPATH)
543-
544-
# This ensures we get the right RPATH even if we're missing FFLAGS somewhere
545-
FC += -Wl,-rpath=$(GCCPATH)
542+
# We're going to copy over the libraries we need from GCCPATH into build_libdir, then
543+
# tell everyone to look for them there. At install time, the build_libdir added into
544+
# the RPATH here is removed by patchelf.
545+
LDFLAGS += -L$(build_libdir) -Wl,-rpath,$(build_libdir)
546546

547547
endif # gfortran
548548
endif # FreeBSD

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,19 @@ endif
249249
endif
250250
endif
251251

252+
ifeq ($(OS),FreeBSD)
253+
define std_so
254+
julia-deps: | $$(build_libdir)/lib$(1).so
255+
$$(build_libdir)/lib$(1).so: | $$(build_libdir)
256+
$$(INSTALL_M) $$(GCCPATH)/lib$(1).so* $$(build_libdir)
257+
JL_LIBS += $(1)
258+
endef
259+
260+
$(eval $(call std_so,gfortran))
261+
$(eval $(call std_so,gcc_s))
262+
$(eval $(call std_so,quadmath))
263+
endif # FreeBSD
264+
252265
ifeq ($(OS),WINNT)
253266
define std_dll
254267
julia-deps: | $$(build_bindir)/lib$(1).dll $$(build_depsbindir)/lib$(1).dll
@@ -366,6 +379,11 @@ endif
366379
$(call stringreplace,$(DESTDIR)$(libdir)/libjulia-debug.$(SHLIB_EXT),sys-debug.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys-debug.$(SHLIB_EXT))
367380
endif
368381

382+
# On FreeBSD, remove the build's libdir from each library's RPATH
383+
ifeq ($(OS),FreeBSD)
384+
$(JULIAHOME)/contrib/fixup-rpath.sh $(build_depsbindir)/patchelf $(DESTDIR)$(libdir) $(build_libdir)
385+
endif
386+
369387
mkdir -p $(DESTDIR)$(sysconfdir)
370388
cp -R $(build_sysconfdir)/julia $(DESTDIR)$(sysconfdir)/
371389

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,6 +1256,8 @@ Deprecated or removed
12561256

12571257
* `setrounding` has been deprecated for `Float32` and `Float64`, as the behaviour was too unreliable ([#26935]).
12581258

1259+
* `atan2` is now a 2-argument method of `atan` ([#27248]).
1260+
12591261
Command-line option changes
12601262
---------------------------
12611263

@@ -1591,3 +1593,4 @@ Command-line option changes
15911593
[#27164]: https://github.com/JuliaLang/julia/issues/27164
15921594
[#27189]: https://github.com/JuliaLang/julia/issues/27189
15931595
[#27212]: https://github.com/JuliaLang/julia/issues/27212
1596+
[#27248]: https://github.com/JuliaLang/julia/issues/27248

base/boot.jl

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,12 @@
9090
# file::Any # nominally Union{Symbol,Nothing}
9191
#end
9292

93-
#struct LabelNode
94-
# label::Int
93+
#struct LineInfoNode
94+
# mod::Module
95+
# method::Symbol
96+
# file::Symbol
97+
# line::Int
98+
# inlined_at::Int
9599
#end
96100

97101
#struct GotoNode
@@ -352,7 +356,6 @@ end
352356
VecElement(arg::T) where {T} = VecElement{T}(arg)
353357

354358
_new(typ::Symbol, argty::Symbol) = eval(Core, :($typ(@nospecialize n::$argty) = $(Expr(:new, typ, :n))))
355-
_new(:LabelNode, :Int)
356359
_new(:GotoNode, :Int)
357360
_new(:NewvarNode, :SlotNumber)
358361
_new(:QuoteNode, :Any)
@@ -367,6 +370,8 @@ eval(Core, :(PiNode(val, typ) = $(Expr(:new, :PiNode, :val, :typ))))
367370
eval(Core, :(PhiCNode(values::Array{Any, 1}) = $(Expr(:new, :PhiCNode, :values))))
368371
eval(Core, :(UpsilonNode(val) = $(Expr(:new, :UpsilonNode, :val))))
369372
eval(Core, :(UpsilonNode() = $(Expr(:new, :UpsilonNode))))
373+
eval(Core, :(LineInfoNode(mod::Module, method::Symbol, file::Symbol, line::Int, inlined_at::Int) =
374+
$(Expr(:new, :LineInfoNode, :mod, :method, :file, :line, :inlined_at))))
370375

371376
Module(name::Symbol=:anonymous, std_imports::Bool=true) = ccall(:jl_f_new_module, Ref{Module}, (Any, Bool), name, std_imports)
372377

@@ -429,23 +434,13 @@ function Symbol(a::Array{UInt8,1})
429434
end
430435
Symbol(s::Symbol) = s
431436

432-
struct LineInfoNode
433-
mod::Module
434-
method::Symbol
435-
file::Symbol
436-
line::Int
437-
inlined_at::Int
438-
LineInfoNode(mod::Module, method::Symbol, file::Symbol, line::Int, inlined_at::Int) =
439-
new(mod, method, file, line, inlined_at)
440-
end
441-
442437
# module providing the IR object model
443438
module IR
444-
export CodeInfo, MethodInstance, GotoNode, LabelNode,
439+
export CodeInfo, MethodInstance, GotoNode,
445440
NewvarNode, SSAValue, Slot, SlotNumber, TypedSlot,
446441
PiNode, PhiNode, PhiCNode, UpsilonNode, LineInfoNode
447442

448-
import Core: CodeInfo, MethodInstance, GotoNode, LabelNode,
443+
import Core: CodeInfo, MethodInstance, GotoNode,
449444
NewvarNode, SSAValue, Slot, SlotNumber, TypedSlot,
450445
PiNode, PhiNode, PhiCNode, UpsilonNode, LineInfoNode
451446

base/compiler/abstractinterpretation.jl

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,7 @@ end
313313
# In general, usage of this is wrong.
314314
function ssa_def_expr(@nospecialize(arg), sv::InferenceState)
315315
while isa(arg, SSAValue)
316-
def = sv.ssavalue_defs[arg.id + 1]
317-
stmt = sv.src.code[def]::Expr
318-
arg = stmt.args[2]
316+
arg = sv.src.code[arg.id]
319317
end
320318
return arg
321319
end
@@ -909,8 +907,7 @@ function abstract_eval_global(M::Module, s::Symbol)
909907
end
910908

911909
function abstract_eval_ssavalue(s::SSAValue, src::CodeInfo)
912-
new_style_ir = src.codelocs !== nothing
913-
typ = src.ssavaluetypes[new_style_ir ? s.id : (s.id + 1)]
910+
typ = src.ssavaluetypes[s.id]
914911
if typ === NOT_FOUND
915912
return Bottom
916913
end
@@ -922,30 +919,3 @@ function abstract_evals_to_constant(@nospecialize(ex), @nospecialize(c), vtypes:
922919
av = abstract_eval(ex, vtypes, sv)
923920
return isa(av,Const) && av.val === c
924921
end
925-
926-
# handling for statement-position expressions
927-
function abstract_interpret(@nospecialize(e), vtypes::VarTable, sv::InferenceState)
928-
!isa(e, Expr) && return vtypes
929-
# handle assignment
930-
if e.head === :(=)
931-
t = abstract_eval(e.args[2], vtypes, sv)
932-
t === Bottom && return ()
933-
lhs = e.args[1]
934-
if isa(lhs, Slot) || isa(lhs, SSAValue)
935-
# don't bother for GlobalRef
936-
return StateUpdate(lhs, VarState(t, false), vtypes)
937-
end
938-
elseif e.head === :call || e.head === :foreigncall
939-
t = abstract_eval(e, vtypes, sv)
940-
t === Bottom && return ()
941-
elseif e.head === :gotoifnot
942-
t = abstract_eval(e.args[1], vtypes, sv)
943-
t === Bottom && return ()
944-
elseif e.head === :method
945-
fname = e.args[1]
946-
if isa(fname, Slot)
947-
return StateUpdate(fname, VarState(Any, false), vtypes)
948-
end
949-
end
950-
return vtypes
951-
end

base/compiler/inferencestate.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ mutable struct InferenceState
2929
n_handlers::Int
3030
# ssavalue sparsity and restart info
3131
ssavalue_uses::Vector{BitSet}
32-
ssavalue_defs::Vector{LineNum}
3332

3433
backedges::Vector{Tuple{InferenceState, LineNum}} # call-graph backedges connecting from callee to caller
3534
callers_in_cycle::Vector{InferenceState}
@@ -112,7 +111,6 @@ mutable struct InferenceState
112111
s_types[1] = s_argtypes
113112

114113
ssavalue_uses = find_ssavalue_uses(code, nssavalues)
115-
ssavalue_defs = find_ssavalue_defs(code, nssavalues)
116114

117115
# exception handlers
118116
cur_hand = ()
@@ -143,7 +141,7 @@ mutable struct InferenceState
143141
nargs, s_types, s_edges,
144142
Union{}, W, 1, n,
145143
cur_hand, handler_at, n_handlers,
146-
ssavalue_uses, ssavalue_defs,
144+
ssavalue_uses,
147145
Vector{Tuple{InferenceState,LineNum}}(), # backedges
148146
Vector{InferenceState}(), # callers_in_cycle
149147
#=parent=#nothing,

0 commit comments

Comments
 (0)