Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from JuliaLang:master #1799

Merged
merged 9 commits into from
Mar 21, 2023
2 changes: 1 addition & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ endif
JULIA_VERSION := $(shell cat $(JULIAHOME)/VERSION)
JULIA_MAJOR_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 1)
JULIA_MINOR_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 2)
JULIA_PATCH_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 3)
JULIA_PATCH_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'+' -f 1 | cut -d'.' -f 3)

# libjulia's SONAME will follow the format libjulia.so.$(SOMAJOR). Before v1.0.0,
# SOMAJOR will be a two-decimal value, e.g. libjulia.so.0.5, whereas at and beyond
Expand Down
4 changes: 2 additions & 2 deletions base/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ ht_keyindex2!(h::Dict, key) = ht_keyindex2_shorthash!(h, key)[1]

sz = length(h.keys)
# Rehash now if necessary
if h.ndel >= ((3*sz)>>2) || h.count*3 > sz*2
# > 3/4 deleted or > 2/3 full
if (h.count + h.ndel)*3 > sz*2
# > 2/3 full (including tombstones)
rehash!(h, h.count > 64000 ? h.count*2 : h.count*4)
end
nothing
Expand Down
8 changes: 4 additions & 4 deletions base/errorshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,17 @@ function show_method_candidates(io::IO, ex::MethodError, @nospecialize kwargs=()
end
sig0 = sig0::DataType
s1 = sig0.parameters[1]
sig = sig0.parameters[2:end]
print(iob, " ")
if !isa(func, rewrap_unionall(s1, method.sig))
# function itself doesn't match
if sig0 === Tuple || !isa(func, rewrap_unionall(s1, method.sig))
# function itself doesn't match or is a builtin
continue
else
print(iob, " ")
show_signature_function(iob, s1)
end
print(iob, "(")
t_i = copy(arg_types_param)
right_matches = 0
sig = sig0.parameters[2:end]
for i = 1 : min(length(t_i), length(sig))
i > 1 && print(iob, ", ")
# If isvarargtype then it checks whether the rest of the input arguments matches
Expand Down
11 changes: 5 additions & 6 deletions base/partr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,12 @@ function multiq_deletemin()
return task
end


function multiq_check_empty()
for j = UInt32(1):length(heaps)
for i = UInt32(1):length(heaps[j])
if heaps[j][i].ntasks != 0
return false
end
tid = Threads.threadid()
tp = ccall(:jl_threadpoolid, Int8, (Int16,), tid-1) + 1
for i = UInt32(1):length(heaps[tp])
if heaps[tp][i].ntasks != 0
return false
end
end
return true
Expand Down
4 changes: 2 additions & 2 deletions src/aotcompile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ static void add_output(Module &M, TargetMachine &TM, std::vector<std::string> &o
}
}
for (unsigned i = 0; i < threads; ++i) {
auto start = &outputs[outputs.size() - outcount * threads * 2 + i];
auto start = &outputs[outputs.size() - outcount * threads * 2 + i * outcount];
auto istr = std::to_string(i);
if (unopt_out)
*start++ = (name + "_unopt#" + istr + ".bc").str();
Expand All @@ -1274,7 +1274,7 @@ static void add_output(Module &M, TargetMachine &TM, std::vector<std::string> &o
if (threads == 1) {
output_timer.startTimer();
SmallVector<StringRef, 4> names;
for (unsigned i = 0; i < outcount; ++i)
for (unsigned i = outputs.size() - outcount * 2; i < outputs.size() - outcount; ++i)
names.push_back(outputs[i]);
add_output_impl(M, TM, outputs.data() + outputs.size() - outcount, names.data(),
unopt_out ? unopt.data() + unopt.size() - 1 : nullptr,
Expand Down
2 changes: 1 addition & 1 deletion src/datatype.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jl_datatype_t *jl_new_uninitialized_datatype(void)
t->isprimitivetype = 0;
t->zeroinit = 0;
t->has_concrete_subtype = 1;
t->cached_by_hash = 0;
t->maybe_subtype_of_cache = 1;
t->ismutationfree = 0;
t->isidentityfree = 0;
t->name = NULL;
Expand Down
5 changes: 5 additions & 0 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,11 @@ JL_DLLEXPORT void jl_method_table_insert(jl_methtable_t *mt, jl_method_t *method
}
jl_array_ptr_1d_push(oldmi, (jl_value_t*)mi);
invalidate_external(mi, max_world);
if (_jl_debug_method_invalidation) {
jl_array_ptr_1d_push(_jl_debug_method_invalidation, (jl_value_t*)mi);
loctag = jl_cstr_to_string("jl_method_table_insert");
jl_array_ptr_1d_push(_jl_debug_method_invalidation, loctag);
}
}
}
}
Expand Down
1 change: 0 additions & 1 deletion src/jl_exported_funcs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@
XX(jl_typename_str) \
XX(jl_typeof_str) \
XX(jl_types_equal) \
XX(jl_type_equality_is_identity) \
XX(jl_type_error) \
XX(jl_type_error_rt) \
XX(jl_type_intersection) \
Expand Down
Loading