before_code
stringlengths
30
149k
reviewer_comment
stringlengths
16
20.6k
after_code
stringlengths
30
163k
diff_context
stringlengths
0
22.4k
file_path
stringlengths
6
155
comment_line
int64
0
26
language
stringclasses
19 values
quality_score
float64
0.07
1
comment_type
stringclasses
9 values
comment_length
int64
16
20.6k
before_lines
int64
2
4.61k
after_lines
int64
2
4.4k
is_negative
bool
2 classes
pr_title
stringlengths
7
140
pr_number
int64
18
61.2k
repo_name
stringclasses
29 values
repo_stars
int64
321
56k
repo_language
stringclasses
14 values
reviewer_username
stringclasses
378 values
author_username
stringclasses
739 values
user
stringlengths
361
200k
assistant
stringlengths
16
20.6k
system
stringclasses
1 value
int passed_explicit = 0; while (1) { enum jl_partition_kind kind = jl_binding_kind(*bpart); if (!jl_bkind_is_some_explicit_import(kind) && kind != PARTITION_KIND_IMPLICIT_GLOBAL) { if (!passed_explicit && depwarn) *depwarn |= (*bpart)->kind & PARTITION_FLAG_DEPWARN; ...
No issues found.
int passed_explicit = 0; while (1) { enum jl_partition_kind kind = jl_binding_kind(*bpart); if (!jl_bkind_is_some_explicit_import(kind) && kind != PARTITION_KIND_IMPLICIT_GLOBAL) { if (!passed_explicit && depwarn) *depwarn |= (*bpart)->kind & PARTITION_FLAG_DEPWARN; ...
@@ -1527,6 +1527,7 @@ JL_DLLEXPORT jl_value_t *jl_backtrace_from_here(int returnsp, int skip); void jl_fprint_critical_error(ios_t *t, int sig, int si_code, bt_context_t *context, jl_task_t *ct); JL_DLLEXPORT void jl_raise_debugger(void) JL_NOTSAFEPOINT; JL_DLLEXPORT void jl_gdblookup(void* ip) JL_NOTSAFEPOINT; +JL_...
src/julia_internal.h
0
C/C++
1
none
16
51
51
true
Print task backtraces on sigquit
59,389
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: C/C++ File: src/julia_internal.h PR Title: Print task backtraces on sigquit BEFORE CODE: int passed_explicit = 0; while (1) { enum jl_partition_kind kind = jl_binding_kind(*bpart); if (!jl_bkind_is_some_explicit_import(kind) && kind != PARTITION_KIN...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test contains(str, "Base.ScopedValues.ScopedValue{$Int}@$objid => 2") end end end const depth = ScopedValue(0) function nth_with(f, n) if n <= 0 f() else with(depth => n) do nth_with(f, n-1) end end end @testset "nested with" begin @testset...
No issues found.
@test contains(str, "Base.ScopedValues.ScopedValue{$Int}@$objid => 2") end end end const depth = ScopedValue(0) function nth_with(f, n) if n <= 0 f() else with(depth => n) do nth_with(f, n-1) end end end @testset "nested with" begin @testset...
@@ -209,3 +209,19 @@ const lsv = LazyScopedValue{Int}(OncePerProcess(() -> (global lsv_ncalled; lsv_n @test lsv[] == 1 @test lsv_ncalled == 1 end + +@testset "ScopedThunk" begin + function check_svals() + @test sval[] == 8 + @test sval_float[] == 8.0 + end + sf = nothing + @with sva...
test/scopedvalues.jl
0
Julia
1
none
16
51
51
true
ScopedValues: add ScopedThunk
59,402
JuliaLang/julia
35,573
Julia
kpamnany
Review this pull request change. Language: Julia File: test/scopedvalues.jl PR Title: ScopedValues: add ScopedThunk BEFORE CODE: @test contains(str, "Base.ScopedValues.ScopedValue{$Int}@$objid => 2") end end end const depth = ScopedValue(0) function nth_with(f, n) if n <= 0 f() ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
b2 = @view a2[:, :]; # 2D FastContiguousSubArray c2 = @view a2[eachindex(a2)]; # 1D FastContiguousSubArray d2 = @view a2[begin:1:end]; # 1D FastSubArray @test (b2[eachindex(b2)] = a2v; vec(b2)) == (c2[eachindex(c2)] = a2v; c2) == a2v @test (d2[eachindex(d2)] ...
No issues found.
b2 = @view a2[:, :]; # 2D FastContiguousSubArray c2 = @view a2[eachindex(a2)]; # 1D FastContiguousSubArray d2 = @view a2[begin:1:end]; # 1D FastSubArray @test (b2[eachindex(b2)] = a2v; vec(b2)) == (c2[eachindex(c2)] = a2v; c2) == a2v @test (d2[eachindex(d2)] ...
@@ -1103,3 +1103,55 @@ end @test @views quote var"begin" + var"end" end isa Expr + +@testset "@views handling of assignment" begin + @test @macroexpand(@views x[a:b] = c) == :(x[a:b] = c) + # Assignments should still work + let array = [1, 2, 3, 4, 5, 6, 7, 8] + @views array[begin:2] = [-1, -2] + ...
test/subarray.jl
0
Julia
1
none
16
51
51
true
Fix at-views for setindex expression
59,403
JuliaLang/julia
35,573
Julia
yuyichao
Review this pull request change. Language: Julia File: test/subarray.jl PR Title: Fix at-views for setindex expression BEFORE CODE: b2 = @view a2[:, :]; # 2D FastContiguousSubArray c2 = @view a2[eachindex(a2)]; # 1D FastContiguousSubArray d2 = @view a2[begin:1:end]; # 1D FastSubA...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
# Test that minimal executable size stays low function @main(args::Vector{String})::Cint println(Core.stdout, "Hello, world!") return 0 end
No issues found.
# Test that minimal executable size stays low function @main(args::Vector{String})::Cint println(Core.stdout, "Hello, world!") return 0 end
@@ -1,37 +1,6 @@ -world::String = "world!" -const str = OncePerProcess{String}() do - return "Hello, " * world -end - -abstract type Shape end -struct Square <: Shape - side::Float64 -end -struct Circle <: Shape - radius::Float64 -end -area(s::Square) = s.side^2 -area(c::Circle) = pi*c.radius^2 - -sum_areas(v:...
test/trimming/hello.jl
0
Julia
1
none
16
7
7
true
fix Sockets type stability issues
59,404
JuliaLang/julia
35,573
Julia
JeffBezanson
Review this pull request change. Language: Julia File: test/trimming/hello.jl PR Title: fix Sockets type stability issues BEFORE CODE: # Test that minimal executable size stays low function @main(args::Vector{String})::Cint println(Core.stdout, "Hello, world!") return 0 end AFTER CODE: # Test that minima...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end if is_broadcasting_expr(ex0) && !is_source_reflection # Manually wrap top-level broadcasts in a function. # We don't do that if `fcn` reflects into the source, # because that destroys provenance information. args = Any[] ex, i = recursive_d...
No issues found.
end if is_broadcasting_expr(ex0) && !is_source_reflection # Manually wrap top-level broadcasts in a function. # We don't do that if `fcn` reflects into the source, # because that destroys provenance information. args = Any[] ex, i = recursive_d...
@@ -26,17 +26,7 @@ function reescape(f::Function, @nospecialize ex) isa(ex, Expr) || return f(ex) unescaped = Meta.unescape(ex) new = f(unescaped) - return reescape(new, ex) -end - -function reescape(@nospecialize(unescaped_expr), @nospecialize(original_expr)) - if isexpr(original_expr, :escape) - ...
stdlib/InteractiveUtils/src/macros.jl
0
Julia
1
none
16
51
51
true
Fix rebasing bug for `Meta.reescape`
59,409
JuliaLang/julia
35,573
Julia
serenity4
Review this pull request change. Language: Julia File: stdlib/InteractiveUtils/src/macros.jl PR Title: Fix rebasing bug for `Meta.reescape` BEFORE CODE: end if is_broadcasting_expr(ex0) && !is_source_reflection # Manually wrap top-level broadcasts in a function. # We don't do...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
cmove_right(t::TextTerminal, n) = cmove(max(width(t), getX(t)+n), getY(t)) cmove_right(t) = cmove_right(t, 1) cmove_line_up(t::TextTerminal, n) = cmove(1, max(1, getY(t)-n)) cmove_line_up(t) = cmove_line_up(t, 1) cmove_line_down(t::TextTerminal, n) = cmove(1, max(height(t), getY(t)+n)) cmove_line_down(t) = cmove_lin...
No issues found.
cmove_right(t::TextTerminal, n) = cmove(max(width(t), getX(t)+n), getY(t)) cmove_right(t) = cmove_right(t, 1) cmove_line_up(t::TextTerminal, n) = cmove(1, max(1, getY(t)-n)) cmove_line_up(t) = cmove_line_up(t, 1) cmove_line_down(t::TextTerminal, n) = cmove(1, max(height(t), getY(t)+n)) cmove_line_down(t) = cmove_lin...
@@ -123,9 +123,18 @@ cmove_col(t::UnixTerminal, n) = (write(t.out_stream, '\r'); n > 1 && cmove_right if Sys.iswindows() function raw!(t::TTYTerminal,raw::Bool) if Base.ispty(t.in_stream) - run((raw ? `stty raw -echo onlcr -ocrnl opost` : `stty sane`), - t.in_stream, t.out_strea...
stdlib/REPL/src/Terminals.jl
0
Julia
1
none
16
51
51
true
Fix startup when history file is bad
59,418
JuliaLang/julia
35,573
Julia
IanButterworth
Review this pull request change. Language: Julia File: stdlib/REPL/src/Terminals.jl PR Title: Fix startup when history file is bad BEFORE CODE: cmove_right(t::TextTerminal, n) = cmove(max(width(t), getX(t)+n), getY(t)) cmove_right(t) = cmove_right(t, 1) cmove_line_up(t::TextTerminal, n) = cmove(1, max(1, getY(t)-...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test replace("", "ẍ" => "ÿ") == "" @test replace("äƀçđ", "" => "π") == "πäπƀπçπđπ" @test replace("äƀçđ", "ƀ" => "π") == "äπçđ" @test replace("äƀçđ", r"ƀ?" => "π") == "πäπçπđπ" @test replace("äƀçđ", r"ƀ+" => "π") == "äπçđ" @test replace("äƀçđ", r"ƀ?ç?" => "π") == "πäπđπ" @test replace("äƀçđ...
No issues found.
@test replace("", "ẍ" => "ÿ") == "" @test replace("äƀçđ", "" => "π") == "πäπƀπçπđπ" @test replace("äƀçđ", "ƀ" => "π") == "äπçđ" @test replace("äƀçđ", r"ƀ?" => "π") == "πäπçπđπ" @test replace("äƀçđ", r"ƀ+" => "π") == "äπçđ" @test replace("äƀçđ", r"ƀ?ç?" => "π") == "πäπđπ" @test replace("äƀçđ...
@@ -709,6 +709,11 @@ end @test isa(chopprefix(S("foo"), "fo"), SubString) @test isa(chopsuffix(S("foo"), "oo"), SubString) + + @test chopprefix(S(""), 'z') == chopsuffix(S(""), 'z') == "" + @test chopprefix(S("吃齋"), '🍖') == chopsuffix(S("吃齋"), '🍖') == "吃齋" + @test chopprefix(S...
test/strings/util.jl
0
Julia
1
none
16
51
51
true
Allow removing an `AbstractChar` with `chopprefix`/`chopsuffix`
59,425
JuliaLang/julia
35,573
Julia
ararslan
Review this pull request change. Language: Julia File: test/strings/util.jl PR Title: Allow removing an `AbstractChar` with `chopprefix`/`chopsuffix` BEFORE CODE: @test replace("", "ẍ" => "ÿ") == "" @test replace("äƀçđ", "" => "π") == "πäπƀπçπđπ" @test replace("äƀçđ", "ƀ" => "π") == "äπçđ" @test re...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test_throws BoundsError deleteat!([], [1]) @test_throws BoundsError deleteat!([], [2]) @test deleteat!([], []) == [] @test deleteat!([], Bool[]) == [] let a = Vector{Any}(undef, 2) a[1] = 1 @test isassigned(deleteat!(copy(a), [2]), 1) @test !isassigned(deleteat!(copy(a), [1]...
No issues found.
@test_throws BoundsError deleteat!([], [1]) @test_throws BoundsError deleteat!([], [2]) @test deleteat!([], []) == [] @test deleteat!([], Bool[]) == [] let a = Vector{Any}(undef, 2) a[1] = 1 @test isassigned(deleteat!(copy(a), [2]), 1) @test !isassigned(deleteat!(copy(a), [1]...
@@ -1246,6 +1246,18 @@ end @test setdiff((1, 2), (3, 2)) == [1] @test symdiff((1, 2), (3, 2)) == [1, 3] end + + @testset "setdiff preserves element type of first argument" begin + @test setdiff([1, 2, 3], [1.0, 2.0]) isa Vector{Int} + @test setdiff([1.0, 2.0, 3.0], [1, 2]) isa Ve...
test/arrayops.jl
0
Julia
1
none
16
51
51
true
setdiff preserves eltype
59,439
JuliaLang/julia
35,573
Julia
adienes
Review this pull request change. Language: Julia File: test/arrayops.jl PR Title: setdiff preserves eltype BEFORE CODE: @test_throws BoundsError deleteat!([], [1]) @test_throws BoundsError deleteat!([], [2]) @test deleteat!([], []) == [] @test deleteat!([], Bool[]) == [] let a = Vector{Any}(unde...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end @testset "truncation" begin # cf. issue #13367 for T = (Float16, Float32, Float64) @test trunc(BigInt, T(2.1)) == 2 @test unsafe_trunc(BigInt, T(2.1)) == 2 @test round(BigInt, T(2.1)) == 2 @test floor(BigInt, T(2.1)) == 2 @test ceil(BigInt, T(2.1)) == 3 @test...
No issues found.
end @testset "truncation" begin # cf. issue #13367 for T = (Float16, Float32, Float64) @test trunc(BigInt, T(2.1)) == 2 @test unsafe_trunc(BigInt, T(2.1)) == 2 @test round(BigInt, T(2.1)) == 2 @test floor(BigInt, T(2.1)) == 2 @test ceil(BigInt, T(2.1)) == 3 @test...
@@ -235,6 +235,11 @@ let a, b @test prod(b) == foldl(*, b) @test 1 == prod(BigInt[]) isa BigInt @test prod(BigInt[0, 0, 0]) == 0 # issue #46665 + # Test prod with negative numbers + @test prod(BigInt[-2, 3, -4]) == 24 + @test prod(BigInt[-1, -2, -3]) == -6 + @test prod(BigInt[-5]) == -5 + ...
test/gmp.jl
0
Julia
1
none
16
51
51
true
New `prod(::AbstractArray{BigInt})` implementation
59,456
JuliaLang/julia
35,573
Julia
LilithHafner
Review this pull request change. Language: Julia File: test/gmp.jl PR Title: New `prod(::AbstractArray{BigInt})` implementation BEFORE CODE: end @testset "truncation" begin # cf. issue #13367 for T = (Float16, Float32, Float64) @test trunc(BigInt, T(2.1)) == 2 @test unsafe_trunc(BigInt, T(2....
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
JL_LOCK(&method->writelock); jl_value_t *specializations = jl_atomic_load_relaxed(&method->specializations); if (jl_is_svec(specializations)) { size_t i, l = jl_svec_len(specializations); for (i = 0; i < l; i++) { jl_method_instance_t *mi = (jl_method_instance_t*)jl_svecref(speci...
No issues found.
JL_LOCK(&method->writelock); jl_value_t *specializations = jl_atomic_load_relaxed(&method->specializations); if (jl_is_svec(specializations)) { size_t i, l = jl_svec_len(specializations); for (i = 0; i < l; i++) { jl_method_instance_t *mi = (jl_method_instance_t*)jl_svecref(speci...
@@ -799,63 +799,87 @@ enum top_typename_facts { static void foreach_top_nth_typename(void (*f)(jl_typename_t*, int, void*), jl_value_t *a JL_PROPAGATES_ROOT, int n, unsigned *facts, void *env) { - if (jl_is_datatype(a)) { - if (n <= 0) { - jl_datatype_t *dt = ((jl_datatype_t*)a); - i...
src/gf.c
0
C
1
none
16
51
51
true
convert more recursive algorithms from stack to heap space (iterative)
59,482
JuliaLang/julia
35,573
Julia
vtjnash
Review this pull request change. Language: C File: src/gf.c PR Title: convert more recursive algorithms from stack to heap space (iterative) BEFORE CODE: JL_LOCK(&method->writelock); jl_value_t *specializations = jl_atomic_load_relaxed(&method->specializations); if (jl_is_svec(specializations)) { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// This file is a part of Julia. License is MIT: https://julialang.org/license #include <stddef.h> #include "processor.h" /** * These symbols support statically linking the sysimage with libjulia-internal. * * Here we provide dummy definitions that are used when these are not linked * together (the default build ...
No issues found.
// This file is a part of Julia. License is MIT: https://julialang.org/license #include <stddef.h> #include "processor.h" /** * These symbols support statically linking the sysimage with libjulia-internal. * * Here we provide dummy definitions that are used when these are not linked * together (the default build ...
@@ -7,9 +7,7 @@ * These symbols support statically linking the sysimage with libjulia-internal. * * Here we provide dummy definitions that are used when these are not linked - * together (the default build configuration). The 0 value of jl_system_image_size + * together (the default build configuration). The 0 va...
src/null_sysimage.c
0
C
1
none
16
14
14
true
Allow linking a system image with jl_image_unpack with libjulia
59,498
JuliaLang/julia
35,573
Julia
xal-0
Review this pull request change. Language: C File: src/null_sysimage.c PR Title: Allow linking a system image with jl_image_unpack with libjulia BEFORE CODE: // This file is a part of Julia. License is MIT: https://julialang.org/license #include <stddef.h> #include "processor.h" /** * These symbols support stati...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@inferred powermod(2, -2, -5) @inferred powermod(big(2), -2, UInt(5)) end @testset "nextpow/prevpow" begin fs = (prevpow, nextpow) types = (Int8, BigInt, BigFloat) for f ∈ fs, P ∈ types, R ∈ types, p ∈ 1:20, r ∈ 2:5 q = P(p) n = R(r) @test f(r, p) == f(n, q) end @...
No issues found.
@inferred powermod(2, -2, -5) @inferred powermod(big(2), -2, UInt(5)) end @testset "nextpow/prevpow" begin fs = (prevpow, nextpow) types = (Int8, BigInt, BigFloat) for f ∈ fs, P ∈ types, R ∈ types, p ∈ 1:20, r ∈ 2:5 q = P(p) n = R(r) @test f(r, p) == f(n, q) end @...
@@ -563,7 +563,7 @@ end x::Int end MyInt(x::MyInt) = x - Base.:+(a::MyInt, b::MyInt) = a.x + b.x + Base.uabs(x::MyInt) = Base.uabs(x.x) for n in 0:100 x = ceil(Int, log2(n + 1)) @@ -579,9 +579,6 @@ end @test 32 == Base.top_set_bit(Int32(n)) == Base.top_set_bit(unsigned...
test/intfuncs.jl
0
Julia
1
none
16
51
51
true
fix `exponent` and `top_set_bit` fallbacks for `Integer`
59,508
JuliaLang/julia
35,573
Julia
adienes
Review this pull request change. Language: Julia File: test/intfuncs.jl PR Title: fix `exponent` and `top_set_bit` fallbacks for `Integer` BEFORE CODE: @inferred powermod(2, -2, -5) @inferred powermod(big(2), -2, UInt(5)) end @testset "nextpow/prevpow" begin fs = (prevpow, nextpow) types = (Int8...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return "-unknown-freebsd$(osvn.major).$(osvn.minor)" else return "-unknown-freebsd" end elseif os(p) == "openbsd" return "-unknown-openbsd" else return "-unknown" end end # Helper functions for Linux and FreeBSD libc/abi mishmashes function libc_str(p...
No issues found.
return "-unknown-freebsd$(osvn.major).$(osvn.minor)" else return "-unknown-freebsd" end elseif os(p) == "openbsd" return "-unknown-openbsd" else return "-unknown" end end # Helper functions for Linux and FreeBSD libc/abi mishmashes function libc_str(p...
@@ -858,7 +858,7 @@ function parse_dl_name_version(path::AbstractString, os::AbstractString=_this_os end function get_csl_member(member::Symbol) - # If CompilerSupportLibraries_jll is an stdlib, we can just grab things from it + # If CompilerSupportLibraries_jll is a stdlib, we can just grab things from it ...
base/binaryplatforms.jl
0
Julia
1
none
16
51
51
true
fix several minor issues in docstrings and comments
59,531
JuliaLang/julia
35,573
Julia
adienes
Review this pull request change. Language: Julia File: base/binaryplatforms.jl PR Title: fix several minor issues in docstrings and comments BEFORE CODE: return "-unknown-freebsd$(osvn.major).$(osvn.minor)" else return "-unknown-freebsd" end elseif os(p) == "openbsd" ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
jl_cgval_t retval = emit_call_specfun_other(ctx, is_opaque_closure, specTypes, jlretty, returninfo, argv, nargs); // see if inference has a different / better type for the call than the lambda return update_julia_type(ctx, retval, inferred_retty); } static jl_cgval_t emit_call_specfun_other(jl_codectx_t &c...
No issues found.
jl_cgval_t retval = emit_call_specfun_other(ctx, is_opaque_closure, specTypes, jlretty, returninfo, argv, nargs); // see if inference has a different / better type for the call than the lambda return update_julia_type(ctx, retval, inferred_retty); } static jl_cgval_t emit_call_specfun_other(jl_codectx_t &c...
@@ -4065,21 +4065,38 @@ static bool emit_builtin_call(jl_codectx_t &ctx, jl_cgval_t *ret, jl_value_t *f, } } - else if ((f == BUILTIN(_apply_iterate) && nargs == 3) && ctx.vaSlot > 0) { + else if (f == BUILTIN(_apply_iterate) && nargs == 3) { // turn Core._apply_iterate(iter, f, Tuple) ==...
src/codegen.cpp
0
C++
1
none
16
51
51
true
optimizations: better modeling and codegen for apply and svec calls
59,548
JuliaLang/julia
35,573
Julia
vtjnash
Review this pull request change. Language: C++ File: src/codegen.cpp PR Title: optimizations: better modeling and codegen for apply and svec calls BEFORE CODE: jl_cgval_t retval = emit_call_specfun_other(ctx, is_opaque_closure, specTypes, jlretty, returninfo, argv, nargs); // see if inference has a differen...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
# version of tail that doesn't throw on empty tuples (used in array indexing) safe_tail(t::Tuple) = tail(t) safe_tail(t::Tuple{}) = () # front (the converse of tail: it skips the last entry) """ front(x::Tuple)::Tuple Return a `Tuple` consisting of all but the last component of `x`. See also: [`first`](@ref), [...
No issues found.
# version of tail that doesn't throw on empty tuples (used in array indexing) safe_tail(t::Tuple) = tail(t) safe_tail(t::Tuple{}) = () # front (the converse of tail: it skips the last entry) """ front(x::Tuple)::Tuple Return a `Tuple` consisting of all but the last component of `x`. See also: [`first`](@ref), [...
@@ -206,8 +206,12 @@ julia> first, Base.rest(a, state) """ function rest end rest(t::Tuple) = t -rest(t::Tuple, i::Int) = ntuple(x -> getfield(t, x+i-1), length(t)-i+1) -rest(a::Union{Array,Memory,Core.SimpleVector}, i::Int=1) = a[i:end] +function rest(t::Tuple, i) + let i = i::Int + ntuple(x -> getfield(t...
base/tuple.jl
0
Julia
1
none
16
51
51
true
improve nongeneric methods of `Base.rest`
59,549
JuliaLang/julia
35,573
Julia
nsajko
Review this pull request change. Language: Julia File: base/tuple.jl PR Title: improve nongeneric methods of `Base.rest` BEFORE CODE: # version of tail that doesn't throw on empty tuples (used in array indexing) safe_tail(t::Tuple) = tail(t) safe_tail(t::Tuple{}) = () # front (the converse of tail: it skips the la...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// some types have special pools to minimize allocations switch(bt->smalltag) { case 0: break; case jl_bool_tag: return (1 & jl_atomic_load((_Atomic(int8_t)*)data)) ? jl_true : jl_false; case jl_uint8_tag: return jl_box_uint8(jl_atomic_load((_Atomic(uint8_t)*)data)); case jl_i...
No issues found.
// some types have special pools to minimize allocations switch(bt->smalltag) { case 0: break; case jl_bool_tag: return (1 & jl_atomic_load((_Atomic(int8_t)*)data)) ? jl_true : jl_false; case jl_uint8_tag: return jl_box_uint8(jl_atomic_load((_Atomic(uint8_t)*)data)); case jl_i...
@@ -354,7 +354,8 @@ STATIC_INLINE void jl_maybe_allocate_singleton_instance(jl_datatype_t *st) JL_NO if (st->instance) return; if (jl_is_datatype_make_singleton(st)) { - st->instance = jl_gc_permobj(0, st, 0); + jl_task_t *ct = jl_current_task; + st->instance = jl_gc_permobj(ct->...
src/datatype.c
0
C
1
none
16
51
51
true
Adding `ptls` argument to `permobj`
59,555
JuliaLang/julia
35,573
Julia
udesou
Review this pull request change. Language: C File: src/datatype.c PR Title: Adding `ptls` argument to `permobj` BEFORE CODE: // some types have special pools to minimize allocations switch(bt->smalltag) { case 0: break; case jl_bool_tag: return (1 & jl_atomic_load((_Atomic(int8_t)*)data)) ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
assert(jl_typetagis(m_, jl_memory_uint8_type)); assert(i < m_->length); ((uint8_t*)m_->ptr)[i] = x; } STATIC_INLINE jl_value_t *jl_array_owner(jl_array_t *a JL_PROPAGATES_ROOT) JL_NOTSAFEPOINT { return jl_genericmemory_owner(a->ref.mem); } #ifdef __clang_gcanalyzer__ jl_value_t **jl_array_ptr_data(jl_...
No issues found.
assert(jl_typetagis(m_, jl_memory_uint8_type)); assert(i < m_->length); ((uint8_t*)m_->ptr)[i] = x; } STATIC_INLINE jl_value_t *jl_array_owner(jl_array_t *a JL_PROPAGATES_ROOT) JL_NOTSAFEPOINT { return jl_genericmemory_owner(a->ref.mem); } #ifdef __clang_gcanalyzer__ jl_value_t **jl_array_ptr_data(jl_...
@@ -2195,11 +2195,7 @@ enum JL_RTLD_CONSTANT { /* MacOS X 10.5+: */ JL_RTLD_FIRST=128U }; -#ifdef _OS_DARWIN_ -#define JL_RTLD_DEFAULT (JL_RTLD_LAZY | JL_RTLD_DEEPBIND | JL_RTLD_FIRST) -#else #define JL_RTLD_DEFAULT (JL_RTLD_LAZY | JL_RTLD_DEEPBIND) -#endif typedef void *jl_libhandle; // compatible wit...
src/julia.h
0
C/C++
1
none
16
51
51
true
Use jl_dlsym with search_deps=1 for ccalls
59,560
JuliaLang/julia
35,573
Julia
xal-0
Review this pull request change. Language: C/C++ File: src/julia.h PR Title: Use jl_dlsym with search_deps=1 for ccalls BEFORE CODE: assert(jl_typetagis(m_, jl_memory_uint8_type)); assert(i < m_->length); ((uint8_t*)m_->ptr)[i] = x; } STATIC_INLINE jl_value_t *jl_array_owner(jl_array_t *a JL_PROPAGATES...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test functionloc(@eval MacroTest @which @macrotest 1 1) == @functionloc MacroTest.@macrotest 1 1 end mutable struct A18434 end A18434(x; y=1) = 1 global counter18434 = 0 function get_A18434() global counter18434 counter18434 += 1 return A18434 end @which get_A18434()(1; y=2) @test counter18434 == 1 @...
No issues found.
@test functionloc(@eval MacroTest @which @macrotest 1 1) == @functionloc MacroTest.@macrotest 1 1 end mutable struct A18434 end A18434(x; y=1) = 1 global counter18434 = 0 function get_A18434() global counter18434 counter18434 += 1 return A18434 end @which get_A18434()(1; y=2) @test counter18434 == 1 @...
@@ -445,6 +445,31 @@ end _, rt = ret @test rt === Bool end + + @testset "Vararg handling" begin + @test_throws "More than one `Core.Vararg`" @eval @code_typed +(1, 2::Vararg{Int}, 3, 4::Vararg{Float64}) + @test_throws "Inconsistent type `Float64`" @eval @code_typed +(1, 2, 3, 4::...
stdlib/InteractiveUtils/test/runtests.jl
0
Julia
1
none
16
51
51
true
InteractiveUtils: Support unannotated values after `Vararg` type annotation
59,594
JuliaLang/julia
35,573
Julia
serenity4
Review this pull request change. Language: Julia File: stdlib/InteractiveUtils/test/runtests.jl PR Title: InteractiveUtils: Support unannotated values after `Vararg` type annotation BEFORE CODE: @test functionloc(@eval MacroTest @which @macrotest 1 1) == @functionloc MacroTest.@macrotest 1 1 end mutable struct...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test parsebin("0") == 0 @test parsebin("-0") == 0 @test parsebin("1") == 1 @test parsebin("-1") == -1 @test parsebin("10") == 2 @test parsebin("-10") == -2 @test parsebin("11") == 3 @test parsebin("-11") == -3 @test parsebin("1111000011110000111100001111") == 252645135 @test pa...
No issues found.
@test parsebin("0") == 0 @test parsebin("-0") == 0 @test parsebin("1") == 1 @test parsebin("-1") == -1 @test parsebin("10") == 2 @test parsebin("-10") == -2 @test parsebin("11") == 3 @test parsebin("-11") == -3 @test parsebin("1111000011110000111100001111") == 252645135 @test pa...
@@ -29,6 +29,13 @@ @test parse(Int, 'a', base=16) == 10 @test_throws ArgumentError parse(Int, 'a') @test_throws ArgumentError parse(Int,typemax(Char)) + + @test tryparse(Int, '8') === 8 + @test tryparse(Int, 'a') === nothing + @test tryparse(Int, 'a'; base=11) === 10 + @test tryparse(Int32, '...
test/parse.jl
0
Julia
1
none
16
51
51
true
Improve char to int parsing, and add `tryparse` method
59,603
JuliaLang/julia
35,573
Julia
jakobnissen
Review this pull request change. Language: Julia File: test/parse.jl PR Title: Improve char to int parsing, and add `tryparse` method BEFORE CODE: @test parsebin("0") == 0 @test parsebin("-0") == 0 @test parsebin("1") == 1 @test parsebin("-1") == -1 @test parsebin("10") == 2 @test parsebin(...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test map(collect, (((t=(i,j); i=nothing; t) for j = 1:i) for i = 1:3)) == [[(1, 1)], [(2, 1), (nothing, 2)], [(3, 1), (nothing, 2), (nothing, 3)]] let a = [] for x = 1:3, y = 1:3 push!(a, x) x = 0 end @test a == [1,1,1,2,2,2,3,3,3] end let i, j for outer i = 1:2, j = 1:0...
No issues found.
@test map(collect, (((t=(i,j); i=nothing; t) for j = 1:i) for i = 1:3)) == [[(1, 1)], [(2, 1), (nothing, 2)], [(3, 1), (nothing, 2), (nothing, 3)]] let a = [] for x = 1:3, y = 1:3 push!(a, x) x = 0 end @test a == [1,1,1,2,2,2,3,3,3] end let i, j for outer i = 1:2, j = 1:0...
@@ -360,4 +360,22 @@ end @test f isa Fix{1,Type{MyStruct},Int} end end + + @testset "two-argument `show`" begin + @testset "type aliases" begin + @test repr(Base.Fix1(convert, Float32)) == "Base.Fix1(convert, Float32)" + @test repr(Base.Fix2(typeassert, Float32...
test/functional.jl
0
Julia
1
none
16
51
51
true
implement two-argument `show` for `Base.Fix` correctly
59,617
JuliaLang/julia
35,573
Julia
nsajko
Review this pull request change. Language: Julia File: test/functional.jl PR Title: implement two-argument `show` for `Base.Fix` correctly BEFORE CODE: @test map(collect, (((t=(i,j); i=nothing; t) for j = 1:i) for i = 1:3)) == [[(1, 1)], [(2, 1), (nothing, 2)], [(3, 1), (nothing, 2), (nothing, 3)]] l...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
break; case EXCEPTION_ACCESS_VIOLATION: if (jl_addr_is_safepoint(ExceptionInfo->ExceptionRecord->ExceptionInformation[1])) { jl_set_gc_and_wait(ct); // Do not raise sigint on worker thread if (ptls->tid != 0) return EXCE...
No issues found.
break; case EXCEPTION_ACCESS_VIOLATION: if (jl_addr_is_safepoint(ExceptionInfo->ExceptionRecord->ExceptionInformation[1])) { jl_set_gc_and_wait(ct); // Do not raise sigint on worker thread if (ptls->tid != 0) return EXCE...
@@ -115,7 +115,7 @@ void __cdecl crt_sig_handler(int sig, int num) event_source, EVENTLOG_ERROR_TYPE, /* category */ 0, /* event_id */ (DWORD)0xE0000000L, /* user_sid */ NULL, /* n_strings */ 1, /* data_size */ 0, strings, /* data */ NULL ); - free(strings[0]); +...
src/signals-win.c
0
C
1
none
16
51
51
true
Fix several Windows build warnings
59,634
JuliaLang/julia
35,573
Julia
topolarity
Review this pull request change. Language: C File: src/signals-win.c PR Title: Fix several Windows build warnings BEFORE CODE: break; case EXCEPTION_ACCESS_VIOLATION: if (jl_addr_is_safepoint(ExceptionInfo->ExceptionRecord->ExceptionInformation[1])) { jl_set_gc_and_wa...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
"Manifest-v$(VERSION.major).$(VERSION.minor).toml", "JuliaManifest-v$(VERSION.major).$(VERSION.minor).toml" ) touch(joinpath(tmp, man_name)) man = basename(Base.project_file_manifest_path(proj)) @test man == man_name end end mktempd...
No issues found.
"Manifest-v$(VERSION.major).$(VERSION.minor).toml", "JuliaManifest-v$(VERSION.major).$(VERSION.minor).toml" ) touch(joinpath(tmp, man_name)) man = basename(Base.project_file_manifest_path(proj)) @test man == man_name end end mktempd...
@@ -34,6 +34,7 @@ end @test @nested_LINE_expansion2() == ((@__LINE__() - 5, @__LINE__() - 9), @__LINE__()) original_depot_path = copy(Base.DEPOT_PATH) +include("tempdepot.jl") include("precompile_utils.jl") loaded_files = String[] @@ -226,7 +227,6 @@ end end end - ## functional testing of package ident...
test/loading.jl
0
Julia
1
none
16
51
51
true
Change delayed delete mechanism to prevent cross-drive mv failure for in-use DLL
59,635
JuliaLang/julia
35,573
Julia
Liozou
Review this pull request change. Language: Julia File: test/loading.jl PR Title: Change delayed delete mechanism to prevent cross-drive mv failure for in-use DLL BEFORE CODE: "Manifest-v$(VERSION.major).$(VERSION.minor).toml", "JuliaManifest-v$(VERSION.major).$(VERSION.minor).toml" ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
elsize, nptr); break; } case GC_ary16_chunk: { jl_value_t *ary16_parent = c->parent; jl_value_t **ary16_begin = c->begin; jl_value_t **ary16_end = c->end; uint16_t *elem_begin = (uint16_t *)c->elem_begin; ...
No issues found.
elsize, nptr); break; } case GC_ary16_chunk: { jl_value_t *ary16_parent = c->parent; jl_value_t **ary16_begin = c->begin; jl_value_t **ary16_end = c->end; uint16_t *elem_begin = (uint16_t *)c->elem_begin; ...
@@ -4026,56 +4026,58 @@ JL_DLLEXPORT jl_value_t *jl_gc_internal_obj_base_ptr(void *p) // case 1: full page; `cell` must be an object goto valid_object; } - jl_gc_pool_t *pool = - gc_all_tls_states[meta->thread_n]->gc_tls.heap.norm_pools + - meta->pool_n; -...
src/gc-stock.c
0
C
1
none
16
51
51
true
Fix clang 21 warnings
59,638
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: C File: src/gc-stock.c PR Title: Fix clang 21 warnings BEFORE CODE: elsize, nptr); break; } case GC_ary16_chunk: { jl_value_t *ary16_parent = c->parent; jl_value_t **ary16_begin = c->begin; ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
# arguments for (i,d) in enumerate(decls[2:end]) printstyled(io, d[1], color=:light_black) if !isempty(d[2]) print(io, "::") print_type_bicolor(io, d[2], color=:bold, inner_color=:normal) end i < length(decls)-1 && print(io,...
No issues found.
# arguments for (i,d) in enumerate(decls[2:end]) printstyled(io, d[1], color=:light_black) if !isempty(d[2]) print(io, "::") print_type_bicolor(io, d[2], color=:bold, inner_color=:normal) end i < length(decls)-1 && print(io,...
@@ -401,19 +401,21 @@ function url(m::Method) if LibGit2 isa Module try d = dirname(file) - return LibGit2.with(LibGit2.GitRepoExt(d)) do repo - LibGit2.with(LibGit2.GitConfig(repo)) do cfg - u = LibGit2.get(cfg, "remote.origin.url", "") - ...
base/methodshow.jl
0
Julia
1
none
16
51
51
true
type stability fixes for `Base.url`
59,647
JuliaLang/julia
35,573
Julia
nsajko
Review this pull request change. Language: Julia File: base/methodshow.jl PR Title: type stability fixes for `Base.url` BEFORE CODE: # arguments for (i,d) in enumerate(decls[2:end]) printstyled(io, d[1], color=:light_black) if !isempty(d[2]) print(io, "::") ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test mod(x, Inf) == x @test mod(x, -Inf) == x @test mod(-x, Inf) == -x @test mod(-x, -Inf) == -x for y=1:5 @test div(UInt(x),UInt(y)) == div(x,y) @test div(UInt(x),y) == div(x,y) @test div(x,UInt(y)) == div(x,y) @test div(UInt(x),-...
No issues found.
@test mod(x, Inf) == x @test mod(x, -Inf) == x @test mod(-x, Inf) == -x @test mod(-x, -Inf) == -x for y=1:5 @test div(UInt(x),UInt(y)) == div(x,y) @test div(UInt(x),y) == div(x,y) @test div(x,UInt(y)) == div(x,y) @test div(UInt(x),-...
@@ -2191,6 +2191,10 @@ end @test nextfloat(Inf32) === Inf32 @test prevfloat(-Inf32) === -Inf32 @test isequal(nextfloat(NaN32), NaN32) + @test nextfloat(1.0, UInt(5)) == nextfloat(1.0, 5) + @test prevfloat(1.0, UInt(5)) == prevfloat(1.0, 5) + @test nextfloat(0.0, typemax(UInt64)) == Inf + @tes...
test/numbers.jl
0
Julia
1
none
16
51
51
true
fix overflow in `prevfloat` with unsigned stepcount
59,668
JuliaLang/julia
35,573
Julia
adienes
Review this pull request change. Language: Julia File: test/numbers.jl PR Title: fix overflow in `prevfloat` with unsigned stepcount BEFORE CODE: @test mod(x, Inf) == x @test mod(x, -Inf) == x @test mod(-x, Inf) == -x @test mod(-x, -Inf) == -x for y=1:5 @test div(...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test powermod(2, -1, 5) == 3 @test powermod(2, -2, 5) == 4 @test powermod(2, -1, -5) == -2 @test powermod(2, -2, -5) == -1 @test powermod(2, typemin(Int128), 5) == 1 @test powermod(2, typemin(Int128), -5) == -4 @test powermod(2, big(3), 5) == 3 @test powermod(2, big(3), -5) == -2 ...
No issues found.
@test powermod(2, -1, 5) == 3 @test powermod(2, -2, 5) == 4 @test powermod(2, -1, -5) == -2 @test powermod(2, -2, -5) == -1 @test powermod(2, typemin(Int128), 5) == 1 @test powermod(2, typemin(Int128), -5) == -4 @test powermod(2, big(3), 5) == 3 @test powermod(2, big(3), -5) == -2 ...
@@ -217,6 +217,19 @@ end d, u, v = gcdx(x, y) @test x*u + y*v == d + for T in (Int8, Int16, Int32, Int64, Int128) + @test_throws DomainError gcdx(typemin(T), typemin(T)) + @test_throws DomainError gcdx(typemin(T), T(0)) + @test_throws DomainError gcdx(T(0), typemin(T)) + d, u,...
test/intfuncs.jl
0
Julia
1
none
16
51
51
true
clear up several more inconsistencies among `gcd` , `gcdx` and `invmod`
59,678
JuliaLang/julia
35,573
Julia
adienes
Review this pull request change. Language: Julia File: test/intfuncs.jl PR Title: clear up several more inconsistencies among `gcd` , `gcdx` and `invmod` BEFORE CODE: @test powermod(2, -1, 5) == 3 @test powermod(2, -2, 5) == 4 @test powermod(2, -1, -5) == -2 @test powermod(2, -2, -5) == -1 @tes...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
# potential invalidations of `Core.Compiler` methods. Base.invoke_in_world(COMPLETION_WORLD[], CC.typeinf, interp, frame) result = frame.result.result result === Union{} && return nothing # for whatever reason, callers expect this as the Bottom and/or Top type instead return result end # `COM...
No issues found.
# potential invalidations of `Core.Compiler` methods. Base.invoke_in_world(COMPLETION_WORLD[], CC.typeinf, interp, frame) result = frame.result.result result === Union{} && return nothing # for whatever reason, callers expect this as the Bottom and/or Top type instead return result end # `COM...
@@ -901,12 +901,6 @@ function complete_keyword_argument!(suggestions::Vector{Completion}, kwargs_flag == 2 && return false # one of the previous kwargs is invalid methods = Completion[] - # Limit kwarg completions to cases when function is concretely known; looking up - # matching methods for abstract...
stdlib/REPL/src/REPLCompletions.jl
0
Julia
1
none
16
51
51
true
Remove restrictions on kwarg tab completion
59,692
JuliaLang/julia
35,573
Julia
mbauman
Review this pull request change. Language: Julia File: stdlib/REPL/src/REPLCompletions.jl PR Title: Remove restrictions on kwarg tab completion BEFORE CODE: # potential invalidations of `Core.Compiler` methods. Base.invoke_in_world(COMPLETION_WORLD[], CC.typeinf, interp, frame) result = frame.resu...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
If the system image was built with the default settings this will return `"native"`. See also [`JULIA_CPU_TARGET`](@ref). """ function sysimage_target() return ccall(:jl_get_sysimage_cpu_target, Ref{String}, ()) end """ Sys.uptime() Gets the current system uptime in seconds. """ function uptime() uptime...
No issues found.
If the system image was built with the default settings this will return `"native"`. See also [`JULIA_CPU_TARGET`](@ref). """ function sysimage_target() return ccall(:jl_get_sysimage_cpu_target, Ref{String}, ()) end """ Sys.uptime() Gets the current system uptime in seconds. """ function uptime() uptime...
@@ -14,6 +14,7 @@ export BINDIR, MACHINE, KERNEL, JIT, + PAGESIZE, cpu_info, cpu_summary, sysimage_target, @@ -144,6 +145,13 @@ Note: Included in the detailed system information via `versioninfo(verbose=true) """ global JIT::String +""" + Sys.PAGESIZE::Clong ...
base/sysinfo.jl
0
Julia
1
none
16
51
51
true
Mmap fix on system with 64k pagesize.
59,695
JuliaLang/julia
35,573
Julia
green-br
Review this pull request change. Language: Julia File: base/sysinfo.jl PR Title: Mmap fix on system with 64k pagesize. BEFORE CODE: If the system image was built with the default settings this will return `"native"`. See also [`JULIA_CPU_TARGET`](@ref). """ function sysimage_target() return ccall(:jl_get_sysi...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end function seek(io::GenericIOBuffer, n::Int) if !io.seekable ismarked(io) || throw(ArgumentError("seek failed, IOBuffer is not seekable and is not marked")) n == io.mark || throw(ArgumentError("seek failed, IOBuffer is not seekable and n != mark")) end # TODO: REPL.jl relies on the fact ...
No issues found.
end function seek(io::GenericIOBuffer, n::Int) if !io.seekable ismarked(io) || throw(ArgumentError("seek failed, IOBuffer is not seekable and is not marked")) n == io.mark || throw(ArgumentError("seek failed, IOBuffer is not seekable and n != mark")) end # TODO: REPL.jl relies on the fact ...
@@ -604,7 +604,8 @@ end end # The fast path here usually checks there is already room, then does nothing. # When append is true, new data is added after io.size, not io.ptr - existing_space = min(lastindex(io.data), io.maxsize + get_offset(io)) - (io.append ? io.size : io.ptr - 1) + start_offset = ...
base/iobuffer.jl
0
Julia
1
none
16
51
51
true
array: avoid overallocation when inserting at beginning of empty arrays
59,717
JuliaLang/julia
35,573
Julia
vtjnash
Review this pull request change. Language: Julia File: base/iobuffer.jl PR Title: array: avoid overallocation when inserting at beginning of empty arrays BEFORE CODE: end function seek(io::GenericIOBuffer, n::Int) if !io.seekable ismarked(io) || throw(ArgumentError("seek failed, IOBuffer is not seekabl...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end end return n end return length(t.name.names) - t.name.n_uninitialized end import Core: typename _tuple_error(T::Type, x) = (@noinline; throw(MethodError(convert, (T, x)))) convert(::Type{T}, x::T) where {T<:Tuple} = x function convert(::Type{T}, x::NTuple{N,Any}) where {N, T<:...
No issues found.
end end return n end return length(t.name.names) - t.name.n_uninitialized end import Core: typename _tuple_error(T::Type, x) = (@noinline; throw(MethodError(convert, (T, x)))) convert(::Type{T}, x::T) where {T<:Tuple} = x function convert(::Type{T}, x::NTuple{N,Any}) where {N, T<:...
@@ -385,10 +385,10 @@ function checkbounds(A::Union{Array, GenericMemory}, i::Int) checkbounds(Bool, A, i) || throw_boundserror(A, (i,)) end -default_access_order(a::GenericMemory{:not_atomic}) = :not_atomic -default_access_order(a::GenericMemory{:atomic}) = :monotonic -default_access_order(a::GenericMemoryRef{...
base/essentials.jl
0
Julia
1
none
16
51
51
true
Base: eliminate unused variables
59,727
JuliaLang/julia
35,573
Julia
aviatesk
Review this pull request change. Language: Julia File: base/essentials.jl PR Title: Base: eliminate unused variables BEFORE CODE: end end return n end return length(t.name.names) - t.name.n_uninitialized end import Core: typename _tuple_error(T::Type, x) = (@noinline; throw(Met...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
m = only(methods(M.callqnc)) @test nvalid(m.specializations::Core.MethodInstance) == 1 m = only(methods(M.callqi)) @test (m.specializations::Core.MethodInstance).specTypes == Tuple{typeof(M.callqi), Int} m = only(methods(M.callqnci)) @test (m.specializations::Core.MethodI...
No issues found.
m = only(methods(M.callqnc)) @test nvalid(m.specializations::Core.MethodInstance) == 1 m = only(methods(M.callqi)) @test (m.specializations::Core.MethodInstance).specTypes == Tuple{typeof(M.callqi), Int} m = only(methods(M.callqnci)) @test (m.specializations::Core.MethodI...
@@ -687,15 +687,7 @@ precompile_test_harness(false) do dir error("break me") end """) - try - Base.require(Main, :FooBar2) - error("the \"break me\" test failed") - catch exc - isa(exc, LoadError) || rethrow() - exc = exc.error - isa(exc, ErrorEx...
test/precompile.jl
0
Julia
1
none
16
51
51
true
precompile: fail in (closer to) linear time and linear error messages
59,765
JuliaLang/julia
35,573
Julia
vtjnash
Review this pull request change. Language: Julia File: test/precompile.jl PR Title: precompile: fail in (closer to) linear time and linear error messages BEFORE CODE: m = only(methods(M.callqnc)) @test nvalid(m.specializations::Core.MethodInstance) == 1 m = only(methods(M.callqi)) @t...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (kind == PARTITION_KIND_IMPLICIT_CONST) { struct implicit_search_resolution resolution = jl_resolve_implicit_import(b, NULL, jl_current_task->world_age, 1); return resolution.debug_only_import_from; } return b->globalref->mod; } // Look at the given binding and decide whether to add a ne...
No issues found.
if (kind == PARTITION_KIND_IMPLICIT_CONST) { struct implicit_search_resolution resolution = jl_resolve_implicit_import(b, NULL, jl_current_task->world_age, 1); return resolution.debug_only_import_from; } return b->globalref->mod; } // Look at the given binding and decide whether to add a ne...
@@ -1886,34 +1886,32 @@ void jl_binding_deprecation_warning(jl_binding_t *b) // For a generally writable binding (checked using jl_check_binding_currently_writable in this world age), check whether // we can actually write the value `rhs` to it. -jl_value_t *jl_check_binding_assign_value(jl_binding_t *b JL_PROPAGAT...
src/module.c
0
C
1
none
16
51
51
true
Align interpreter and codegen error behavior of setglobal! and friends
59,766
JuliaLang/julia
35,573
Julia
Keno
Review this pull request change. Language: C File: src/module.c PR Title: Align interpreter and codegen error behavior of setglobal! and friends BEFORE CODE: if (kind == PARTITION_KIND_IMPLICIT_CONST) { struct implicit_search_resolution resolution = jl_resolve_implicit_import(b, NULL, jl_current_task->w...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (err != sizeof(eventfd_t)) abort(); assert(got == 1); request = jl_atomic_exchange(&ptls->signal_request, -1); usr2_signal_context = NULL; assert(request == 2 || request == 3 || request == 4); } int err; eventfd_t got = 1; err = write(signal_caught_cond, &got, ...
No issues found.
if (err != sizeof(eventfd_t)) abort(); assert(got == 1); request = jl_atomic_exchange(&ptls->signal_request, -1); usr2_signal_context = NULL; assert(request == 2 || request == 3 || request == 4); } int err; eventfd_t got = 1; err = write(signal_caught_cond, &got, ...
@@ -303,41 +303,34 @@ int exc_reg_is_write_fault(uintptr_t esr) { } #endif +static int jl_thread_suspend_and_get_state(int tid, int timeout, bt_context_t *ctx); + #if defined(HAVE_MACH) #include "signals-mach.c" #else #include <poll.h> #include <sys/eventfd.h> #include <link.h> -#ifndef _OS_FREEBSD_ typede...
src/signals-unix.c
0
C
1
none
16
51
51
true
signals: acquire loader lock during stackwalk on Win32
59,840
JuliaLang/julia
35,573
Julia
vtjnash
Review this pull request change. Language: C File: src/signals-unix.c PR Title: signals: acquire loader lock during stackwalk on Win32 BEFORE CODE: if (err != sizeof(eventfd_t)) abort(); assert(got == 1); request = jl_atomic_exchange(&ptls->signal_request, -1); usr2_signal_context = ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
# TODO: When we add curing, we may want to assume this is nothrow if (method_or_ci.owner === Nothing && method_ir_ci.def.def isa Method) exct = Union{exct, ErrorException} end update_valid_age!(sv, callee_valid_range) return Future(CallMeta(met...
No issues found.
# TODO: When we add curing, we may want to assume this is nothrow if (method_or_ci.owner === Nothing && method_ir_ci.def.def isa Method) exct = Union{exct, ErrorException} end update_valid_age!(sv, callee_valid_range) return Future(CallMeta(met...
@@ -3484,6 +3484,10 @@ function abstract_eval_foreigncall(interp::AbstractInterpreter, e::Expr, sstate: callee = e.args[1] if isexpr(callee, :tuple) if length(callee.args) >= 1 + # Evaluate the arguments to constrain the world, effects, and other info for codegen, + # but note t...
Compiler/src/abstractinterpretation.jl
0
Julia
1
none
16
51
51
true
Libdl: Add documentation for LazyLibrary and friends
59,841
JuliaLang/julia
35,573
Julia
vtjnash
Review this pull request change. Language: Julia File: Compiler/src/abstractinterpretation.jl PR Title: Libdl: Add documentation for LazyLibrary and friends BEFORE CODE: # TODO: When we add curing, we may want to assume this is nothrow if (method_or_ci.owner === Nothing && method_ir_ci.def.d...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end @test Base.Experimental.register_error_hint(recommend_oneunit, MethodError) === nothing let err_str err_str = @except_str one(HasNoOne()) MethodError @test occursin(r"MethodError: no method matching one\(::.*HasNoOne\)", err_str) @test occursin("HasNoOne does not support `one`; did you mean `oneunit`?",...
No issues found.
end @test Base.Experimental.register_error_hint(recommend_oneunit, MethodError) === nothing let err_str err_str = @except_str one(HasNoOne()) MethodError @test occursin(r"MethodError: no method matching one\(::.*HasNoOne\)", err_str) @test occursin("HasNoOne does not support `one`; did you mean `oneunit`?",...
@@ -740,7 +740,7 @@ let err_str @test occursin(Regex("MethodError: no method matching one\\(::.*HasNoOne; value::$(Int)\\)"), err_str) @test occursin("`one` doesn't take keyword arguments, that would be silly", err_str) end -pop!(Base.Experimental._hint_handlers[MethodError]) # order is undefined, don't cop...
test/errorshow.jl
0
Julia
1
none
16
51
51
true
fix: trigger error hints on exception supertypes too
59,843
JuliaLang/julia
35,573
Julia
gdalle
Review this pull request change. Language: Julia File: test/errorshow.jl PR Title: fix: trigger error hints on exception supertypes too BEFORE CODE: end @test Base.Experimental.register_error_hint(recommend_oneunit, MethodError) === nothing let err_str err_str = @except_str one(HasNoOne()) MethodError @test...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
mktempdir() do tmp # check that another version isn't preferred proj = joinpath(tmp, "Project.toml") touch(proj) touch(joinpath(tmp, "Manifest-v1.5.toml")) @test Base.project_file_manifest_path(proj) === nothing touch(joinpath(tmp, "Manifest.toml")) man = base...
No issues found.
mktempdir() do tmp # check that another version isn't preferred proj = joinpath(tmp, "Project.toml") touch(proj) touch(joinpath(tmp, "Manifest-v1.5.toml")) @test Base.project_file_manifest_path(proj) === nothing touch(joinpath(tmp, "Manifest.toml")) man = base...
@@ -1669,6 +1669,14 @@ end @test isfile(Base.locate_package(id_dev)) @test Base.identify_package("Devved2") === nothing + # Test that workspace projects can be specified with subfolder paths + # and that base_project searches upward through multiple directory levels + empty!(LOAD_PAT...
test/loading.jl
0
Julia
1
none
16
51
51
true
allow specifying projects in a workspace more than one level under it
59,849
JuliaLang/julia
35,573
Julia
KristofferC
Review this pull request change. Language: Julia File: test/loading.jl PR Title: allow specifying projects in a workspace more than one level under it BEFORE CODE: mktempdir() do tmp # check that another version isn't preferred proj = joinpath(tmp, "Project.toml") touch(proj) tou...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
) touch(joinpath(tmp, man_name)) man = basename(Base.project_file_manifest_path(proj)) @test man == man_name end end mktempdir() do tmp # check that another version isn't preferred proj = joinpath(tmp, "Project.toml") touch(proj) ...
No issues found.
) touch(joinpath(tmp, man_name)) man = basename(Base.project_file_manifest_path(proj)) @test man == man_name end end mktempdir() do tmp # check that another version isn't preferred proj = joinpath(tmp, "Project.toml") touch(proj) ...
@@ -463,7 +463,7 @@ function make_env(flat, root, roots, graph, paths, dummies) end const depots = [mkdepottempdir() for _ = 1:3] -const envs = Dict{String,Any}() +const envs = Pair{String, Any}[] append!(empty!(DEPOT_PATH), depots) @@ -557,7 +557,7 @@ for (flat, root, roots, graph) in graphs end ...
test/loading.jl
0
Julia
1
none
16
51
51
true
loading: Try to clean up extension loading a bit
59,863
JuliaLang/julia
35,573
Julia
Keno
Review this pull request change. Language: Julia File: test/loading.jl PR Title: loading: Try to clean up extension loading a bit BEFORE CODE: ) touch(joinpath(tmp, man_name)) man = basename(Base.project_file_manifest_path(proj)) @test man == man_name end ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
foo(::Float64) = 2 end end @test docstrings_equal( @doc(I13068.A.foo), doc""" foo from A foo from B """ ) @test docstrings_equal(Docs.doc(I13068.A.foo, Tuple{Int}), doc"foo from A") @test docstrings_equal(Docs.doc(I13068.A.foo, Tuple{Float64}), doc"foo from B") @test docstrings_equal(Docs.doc(I1...
No issues found.
foo(::Float64) = 2 end end @test docstrings_equal( @doc(I13068.A.foo), doc""" foo from A foo from B """ ) @test docstrings_equal(Docs.doc(I13068.A.foo, Tuple{Int}), doc"foo from A") @test docstrings_equal(Docs.doc(I13068.A.foo, Tuple{Float64}), doc"foo from B") @test docstrings_equal(Docs.doc(I1...
@@ -1585,3 +1585,77 @@ This docmacroception has a docstring @docmacroception() @test Docs.hasdoc(@__MODULE__, :var"@docmacrofoo") + +# Test that @doc returns the value of the documented expression +module DocReturnValue + using Test + # Test function definition returns the function + result = begin + ...
test/docs.jl
0
Julia
1
none
16
51
51
true
Docs: Make `@doc` macro return the value of documented expression
59,882
JuliaLang/julia
35,573
Julia
vtjnash
Review this pull request change. Language: Julia File: test/docs.jl PR Title: Docs: Make `@doc` macro return the value of documented expression BEFORE CODE: foo(::Float64) = 2 end end @test docstrings_equal( @doc(I13068.A.foo), doc""" foo from A foo from B """ ) @test docstrings_equal(Docs.d...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
) # dynamic schedule function _atthreads_dynamic_schedule(n) inc = Threads.Atomic{Int}(0) flags = zeros(Int, n) Threads.@threads :dynamic for i = 1:n Threads.atomic_add!(inc, 1) flags[i] = 1 end return inc[], flags end @test _atthreads_dynamic_schedule(threadpoolsize(:default)) == (...
No issues found.
) # dynamic schedule function _atthreads_dynamic_schedule(n) inc = Threads.Atomic{Int}(0) flags = zeros(Int, n) Threads.@threads :dynamic for i = 1:n Threads.atomic_add!(inc, 1) flags[i] = 1 end return inc[], flags end @test _atthreads_dynamic_schedule(threadpoolsize(:default)) == (...
@@ -1364,6 +1364,17 @@ end @test !istaskdone(tasks[3]) teardown(tasks, event) + + @test_throws CompositeException begin + waitall(Threads.@spawn(div(1, i)) for i = 0:1) + end + + tasks = [Threads.@spawn(div(1, i)) for i ...
test/threads_exec.jl
0
Julia
1
none
16
51
51
true
Fix: waitall can throw when all tasks are done
59,905
JuliaLang/julia
35,573
Julia
jakobnissen
Review this pull request change. Language: Julia File: test/threads_exec.jl PR Title: Fix: waitall can throw when all tasks are done BEFORE CODE: ) # dynamic schedule function _atthreads_dynamic_schedule(n) inc = Threads.Atomic{Int}(0) flags = zeros(Int, n) Threads.@threads :dynamic for i = 1:n ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// instead. This shouldn't actually happen since we only register the // handler for the threads we know about. jl_safe_printf("ERROR: Exception handler triggered on unmanaged thread.\n"); return KERN_INVALID_ARGUMENT; } if (ptls2->safe_restore) { jl_throw_in_thread(ptls2...
No issues found.
// instead. This shouldn't actually happen since we only register the // handler for the threads we know about. jl_safe_printf("ERROR: Exception handler triggered on unmanaged thread.\n"); return KERN_INVALID_ARGUMENT; } if (ptls2->safe_restore) { jl_throw_in_thread(ptls2...
@@ -220,36 +220,36 @@ typedef arm_exception_state64_t host_exception_state_t; #define HOST_EXCEPTION_STATE_COUNT ARM_EXCEPTION_STATE64_COUNT #endif -// create a fake function that describes the variable manipulations in jl_call_in_state -__attribute__((naked)) static void fake_stack_pop(void) +// Create a fake func...
src/signals-mach.c
0
C
1
none
16
51
51
true
signals: Implement fake_stack_pop for Linux on x86_64 and i686
60,013
JuliaLang/julia
35,573
Julia
vtjnash
Review this pull request change. Language: C File: src/signals-mach.c PR Title: signals: Implement fake_stack_pop for Linux on x86_64 and i686 BEFORE CODE: // instead. This shouldn't actually happen since we only register the // handler for the threads we know about. jl_safe_printf("ERROR: E...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
println(io) end println(io, " WORD_SIZE: ", Sys.WORD_SIZE) println(io, " LLVM: libLLVM-",Base.libllvm_version," (", Sys.JIT, ", ", Sys.CPU_NAME, ")") println(io, " GC: ", unsafe_string(ccall(:jl_gc_active_impl, Ptr{UInt8}, ()))) println(io, """Threads: $(Threads.nthreads(:default)) defaul...
No issues found.
println(io) end println(io, " WORD_SIZE: ", Sys.WORD_SIZE) println(io, " LLVM: libLLVM-",Base.libllvm_version," (", Sys.JIT, ", ", Sys.CPU_NAME, ")") println(io, " GC: ", unsafe_string(ccall(:jl_gc_active_impl, Ptr{UInt8}, ()))) println(io, """Threads: $(Threads.nthreads(:default)) defaul...
@@ -102,7 +102,7 @@ See also: [`VERSION`](@ref). """ function versioninfo(io::IO=stdout; verbose::Bool=false) println(io, "Julia Version $VERSION") - if !isempty(Base.GIT_VERSION_INFO.commit_short) + if !isempty(Base.GIT_VERSION_INFO.commit_short_raw) println(io, "Commit $(Base.GIT_VERSION_INFO.co...
stdlib/InteractiveUtils/src/InteractiveUtils.jl
0
Julia
1
none
16
51
51
true
Don't trigger full rebuild if git is dirty
60,023
JuliaLang/julia
35,573
Julia
IanButterworth
Review this pull request change. Language: Julia File: stdlib/InteractiveUtils/src/InteractiveUtils.jl PR Title: Don't trigger full rebuild if git is dirty BEFORE CODE: println(io) end println(io, " WORD_SIZE: ", Sys.WORD_SIZE) println(io, " LLVM: libLLVM-",Base.libllvm_version," (", Sys.JIT, ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
Return the base file path of the repository `repo`. - for normal repositories, this will typically be the parent directory of the ".git" directory (note: this may be different than the working directory, see `workdir` for more details). - for bare repositories, this is the location of the "git" files. See al...
No issues found.
Return the base file path of the repository `repo`. - for normal repositories, this will typically be the parent directory of the ".git" directory (note: this may be different than the working directory, see `workdir` for more details). - for bare repositories, this is the location of the "git" files. See al...
@@ -112,6 +112,27 @@ function isattached(repo::GitRepo) ccall((:git_repository_head_detached, libgit2), Cint, (Ptr{Cvoid},), repo) != 1 end +""" + isshallow(repo::GitRepo)::Bool + +Determine if `repo` is a shallow clone. A shallow clone has a truncated history, +created by cloning with a specific depth (e.g....
stdlib/LibGit2/src/repository.jl
0
Julia
1
none
16
51
51
true
LibGit2: expose the depth option to clone and fetch
60,024
JuliaLang/julia
35,573
Julia
KristofferC
Review this pull request change. Language: Julia File: stdlib/LibGit2/src/repository.jl PR Title: LibGit2: expose the depth option to clone and fetch BEFORE CODE: Return the base file path of the repository `repo`. - for normal repositories, this will typically be the parent directory of the ".git" directory ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// of `jl_read_value` that allows usage of the relocation data rather than passing NULL // to `get_item_for_reloc`. // This works around what would otherwise be an order-dependency conundrum: objects // that may require relocation data have to be inserted into `serialization_order`, // and that may include some of the ...
No issues found.
// of `jl_read_value` that allows usage of the relocation data rather than passing NULL // to `get_item_for_reloc`. // This works around what would otherwise be an order-dependency conundrum: objects // that may require relocation data have to be inserted into `serialization_order`, // and that may include some of the ...
@@ -2956,11 +2956,35 @@ static void jl_save_system_image_to_stream(ios_t *f, jl_array_t *mod_array, size_t num_mis; jl_get_llvm_cis(native_functions, &num_mis, NULL); arraylist_grow(&MIs, num_mis); + + // Record MethodInstances for user-provided code (as reported by cod...
src/staticdata.c
0
C
1
none
16
51
51
true
trimming: fix-up support for `Core._apply_iterate`
60,062
JuliaLang/julia
35,573
Julia
topolarity
Review this pull request change. Language: C File: src/staticdata.c PR Title: trimming: fix-up support for `Core._apply_iterate` BEFORE CODE: // of `jl_read_value` that allows usage of the relocation data rather than passing NULL // to `get_item_for_reloc`. // This works around what would otherwise be an order-depe...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
// Enables or disables (depending on the value of the argument) the collector. Returns // whether GC was previously enabled. JL_DLLEXPORT int jl_gc_enable(int on); // Returns whether the collector is enabled. JL_DLLEXPORT int jl_gc_is_enabled(void); // Sets a soft limit to Julia's heap. JL_DLLEXPORT void jl_gc_set_max_...
No issues found.
// Enables or disables (depending on the value of the argument) the collector. Returns // whether GC was previously enabled. JL_DLLEXPORT int jl_gc_enable(int on); // Returns whether the collector is enabled. JL_DLLEXPORT int jl_gc_is_enabled(void); // Sets a soft limit to Julia's heap. JL_DLLEXPORT void jl_gc_set_max_...
@@ -26,34 +26,75 @@ struct _jl_genericmemory_t; // This struct must be kept in sync with the Julia type of the same name in base/timing.jl typedef struct { + // (GC Internal) Number of allocated bytes since the last collection. This field is reset + // after the end of every garbage collection cycle, so it wi...
src/gc-interface.h
0
C/C++
1
none
16
51
51
true
document metrics from GC_Num; rename one metric from GC_Num to match the name used by the equivalent C struct
60,115
JuliaLang/julia
35,573
Julia
d-netto
Review this pull request change. Language: C/C++ File: src/gc-interface.h PR Title: document metrics from GC_Num; rename one metric from GC_Num to match the name used by the equivalent C struct BEFORE CODE: // Enables or disables (depending on the value of the argument) the collector. Returns // whether GC was prev...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test_broken false catch @test_broken true end # A few tests for other Integer types @test parse(Rational{Bool}, "true") == true // true @test parse(Rational{UInt8}, "0xff/0xf") == UInt8(17) // UInt8(1) @test parse(Rational{Int8}, "-0x7e/0xf") == Int8(-126) // Int8(15) @test p...
No issues found.
@test_broken false catch @test_broken true end # A few tests for other Integer types @test parse(Rational{Bool}, "true") == true // true @test parse(Rational{UInt8}, "0xff/0xf") == UInt8(17) // UInt8(1) @test parse(Rational{Int8}, "-0x7e/0xf") == Int8(-126) // Int8(15) @test p...
@@ -215,9 +215,17 @@ end @test_throws DivideError (0//1) / complex(0, 0) @test_throws DivideError (1//1) / complex(0, 0) @test_throws DivideError (1//0) / complex(0, 0) + @test_throws DivideError complex(1//0) // complex(1//0, 1//0) + @test_throws DivideError 1 // complex(0, 0) + @test_throws Di...
test/rational.jl
0
Julia
1
none
16
51
51
true
Fix overflow in complex //
60,130
JuliaLang/julia
35,573
Julia
nhz2
Review this pull request change. Language: Julia File: test/rational.jl PR Title: Fix overflow in complex // BEFORE CODE: @test_broken false catch @test_broken true end # A few tests for other Integer types @test parse(Rational{Bool}, "true") == true // true @test parse(Rational{U...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
srcrange::UnitRange{UInt32}, firstchildhead::SyntaxHead, secondchildhead::SyntaxHead, firstchildrange::UnitRange{UInt32}, nodehead::SyntaxHead, source) ...
No issues found.
srcrange::UnitRange{UInt32}, firstchildhead::SyntaxHead, secondchildhead::SyntaxHead, firstchildrange::UnitRange{UInt32}, nodehead::SyntaxHead, source) ...
@@ -145,7 +145,7 @@ end # Shared fixups for Expr children in cases where the type of the parent node # affects the child layout. -function fixup_Expr_child(head::SyntaxHead, @nospecialize(arg), first::Bool) +function fixup_Expr_child(::Type, head::SyntaxHead, @nospecialize(arg), first::Bool) isa(arg, Expr) || ...
JuliaSyntax/src/integration/expr.jl
0
Julia
1
none
16
51
51
true
Bypass `SyntaxNode` in JuliaLowering; fix `kw` bug
60,162
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaSyntax/src/integration/expr.jl PR Title: Bypass `SyntaxNode` in JuliaLowering; fix `kw` bug BEFORE CODE: srcrange::UnitRange{UInt32}, firstchildhead::SyntaxHead, secondchildhead::SyntaxHead,...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
""" rotl90(A) Rotate matrix `A` left 90 degrees. # Examples ```jldoctest julia> a = [1 2; 3 4] 2×2 Matrix{Int64}: 1 2 3 4 julia> rotl90(a) 2×2 Matrix{Int64}: 2 4 1 3 ``` """ function rotl90(A::AbstractMatrix) ind1, ind2 = axes(A) B = similar(A, (ind2,ind1)) n = first(ind2)+last(ind2) for ...
No issues found.
""" rotl90(A) Rotate matrix `A` left 90 degrees. # Examples ```jldoctest julia> a = [1 2; 3 4] 2×2 Matrix{Int64}: 1 2 3 4 julia> rotl90(a) 2×2 Matrix{Int64}: 2 4 1 3 ``` """ function rotl90(A::AbstractMatrix) ind1, ind2 = axes(A) B = similar(A, (ind2,ind1)) n = first(ind2)+last(ind2) for ...
@@ -9,8 +9,19 @@ end # Using map over broadcast enables vectorization for wide matrices with few rows. # This is because we use linear indexing in `map` as opposed to Cartesian indexing in broadcasting. # https://github.com/JuliaLang/julia/issues/47873#issuecomment-1352472461 -function _broadcast_preserving_zero_d(f...
base/arraymath.jl
0
Julia
1
none
16
51
51
true
Fix linearly indexed array math by reshaping arrays
60,164
JuliaLang/julia
35,573
Julia
jishnub
Review this pull request change. Language: Julia File: base/arraymath.jl PR Title: Fix linearly indexed array math by reshaping arrays BEFORE CODE: """ rotl90(A) Rotate matrix `A` left 90 degrees. # Examples ```jldoctest julia> a = [1 2; 3 4] 2×2 Matrix{Int64}: 1 2 3 4 julia> rotl90(a) 2×2 Matrix{Int64}:...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
""") == "x in outer scope" # Exceptions in old style macros Base.eval(test_mod, :( macro oldstyle_error() error("Some error in old style macro") end )) @test try JuliaLowering.include_string(test_mod, """ @oldstyle_error """) catch exc sprint(showerror, exc) end == """ MacroExpansionError while exp...
No issues found.
""") == "x in outer scope" # Exceptions in old style macros Base.eval(test_mod, :( macro oldstyle_error() error("Some error in old style macro") end )) @test try JuliaLowering.include_string(test_mod, """ @oldstyle_error """) catch exc sprint(showerror, exc) end == """ MacroExpansionError while exp...
@@ -515,5 +515,27 @@ end """) code = JuliaLowering.include_string(test_mod, """Mod1.@indirect_MODULE()""") @test JuliaLowering.eval(test_mod, code) === test_mod # !== test_mod.Mod1 +# the lowering/eval iterator needs to expand in the correct world age (currently +# the only way to hit this from user code is macros p...
JuliaLowering/test/macros.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] get macro name in `ctx.world`; fix lowering iterator
60,168
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/macros.jl PR Title: [JuliaLowering] get macro name in `ctx.world`; fix lowering iterator BEFORE CODE: """) == "x in outer scope" # Exceptions in old style macros Base.eval(test_mod, :( macro oldstyle_error() error("Some error in old styl...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
let x = "x in outer scope" @call_oldstyle_macro x end """) == ("x in outer scope", "x in call_oldstyle_macro", "x in @oldstyle", "x in @newstyle") # Old style unhygenic escaping with esc() Base.eval(test_mod, :( macro oldstyle_unhygenic() esc(:x) end )) @test JuliaLowering.include_st...
No issues found.
let x = "x in outer scope" @call_oldstyle_macro x end """) == ("x in outer scope", "x in call_oldstyle_macro", "x in @oldstyle", "x in @newstyle") # Old style unhygenic escaping with esc() Base.eval(test_mod, :( macro oldstyle_unhygenic() esc(:x) end )) @test JuliaLowering.include_st...
@@ -483,4 +483,23 @@ end @test_broken JuliaLowering.eval(test_mod, code) == ("outer x", "inner x") end +@testset "toplevel macro hygiene" begin + @eval test_mod global mod = $test_mod + @eval test_mod module MacroMod + global mod = MacroMod + macro escaped_toplevel() + esc(Expr(:toplevel, :(m...
JuliaLowering/test/macros.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] only hygienic-scope-wrap `toplevel` if unescaped
60,169
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/macros.jl PR Title: [JuliaLowering] only hygienic-scope-wrap `toplevel` if unescaped BEFORE CODE: let x = "x in outer scope" @call_oldstyle_macro x end """) == ("x in outer scope", "x in call_oldstyle_macro", "x in @olds...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
k == K"Value" && ex.value isa SourceRef ? "SourceRef:$(JuliaSyntax.filename(ex)):$(join(source_location(ex), ':'))" : repr(get(ex, :value, nothing)) id = get(ex, :var_id, nothing) if isnothing(id) id = get(ex, :id, nothing) end if !isnothing(id) idstr = ...
No issues found.
k == K"Value" && ex.value isa SourceRef ? "SourceRef:$(JuliaSyntax.filename(ex)):$(join(source_location(ex), ':'))" : repr(get(ex, :value, nothing)) id = get(ex, :var_id, nothing) if isnothing(id) id = get(ex, :id, nothing) end if !isnothing(id) idstr = ...
@@ -1,7 +1,8 @@ # TODO: This whole file should probably be moved to JuliaSyntax. import .JuliaSyntax: ParseStream, RedTreeCursor, reverse_toplevel_siblings, has_toplevel_siblings, _unsafe_wrap_substring, parse_julia_literal, is_trivia, - is_prefix_op_call, @isexpr, SyntaxHead, COLON_QUOTE, is_syntactic_operat...
JuliaLowering/src/syntax_graph.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Reconstruct macro name before, not during, macro expansion
60,170
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/src/syntax_graph.jl PR Title: [JuliaLowering] Reconstruct macro name before, not during, macro expansion BEFORE CODE: k == K"Value" && ex.value isa SourceRef ? "SourceRef:$(JuliaSyntax.filename(ex)):$(join(source_location(e...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test hash(t) == hash(TaskLocalRNG()) @test hash(t, h) == hash(TaskLocalRNG(), h) x = rand() @test hash(t) != hash(TaskLocalRNG()) @test rand(t) == x @test hash(t) == hash(TaskLocalRNG()) copy!(TaskLocalRNG(), r) @test hash(...
No issues found.
@test hash(t) == hash(TaskLocalRNG()) @test hash(t, h) == hash(TaskLocalRNG(), h) x = rand() @test hash(t) != hash(TaskLocalRNG()) @test rand(t) == x @test hash(t) == hash(TaskLocalRNG()) copy!(TaskLocalRNG(), r) @test hash(...
@@ -646,18 +646,6 @@ end # MersenneTwister initialization with invalid values @test_throws DomainError DSFMT.DSFMT_state(zeros(Int32, rand(0:DSFMT.JN32-1))) -@test_throws DomainError MersenneTwister(zeros(UInt32, 1), DSFMT.DSFMT_state(), - zeros(Float64, 10), zeros(UInt128, M...
stdlib/Random/test/runtests.jl
0
Julia
1
none
16
51
51
true
MersenneTwister: clean up constructors
60,185
JuliaLang/julia
35,573
Julia
rfourquet
Review this pull request change. Language: Julia File: stdlib/Random/test/runtests.jl PR Title: MersenneTwister: clean up constructors BEFORE CODE: @test hash(t) == hash(TaskLocalRNG()) @test hash(t, h) == hash(TaskLocalRNG(), h) x = rand() @test hash(t) != hash(TaskL...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return false elseif cmd == 'L' # load file immediately on all processors if !distributed_mode include(Main, arg) else # TODO: Move this logic to Distributed and use a callback @sync for p in invokelatest(Main.procs) ...
No issues found.
return false elseif cmd == 'L' # load file immediately on all processors if !distributed_mode include(Main, arg) else # TODO: Move this logic to Distributed and use a callback @sync for p in invokelatest(Main.procs) ...
@@ -484,7 +484,7 @@ end function run_std_repl(REPL::Module, quiet::Bool, banner::Symbol, history_file::Bool) term_env = get(ENV, "TERM", @static Sys.iswindows() ? "" : "dumb") term = REPL.Terminals.TTYTerminal(term_env, stdin, stdout, stderr) - banner == :no || REPL.banner(term, banner) + banner == :no...
base/client.jl
0
Julia
1
none
16
51
51
true
[release-1.13] Revert "Make banner size depend on terminal size (#51811)"
60,186
JuliaLang/julia
35,573
Julia
ararslan
Review this pull request change. Language: Julia File: base/client.jl PR Title: [release-1.13] Revert "Make banner size depend on terminal size (#51811)" BEFORE CODE: return false elseif cmd == 'L' # load file immediately on all processors if !distributed_mode ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
k == K"latestworld" ? "latestworld" : k == K"static_parameter" ? "static_parameter" : k == K"symbolic_label" ? "label:$(ex.name_val)" : k == K"symbolic_goto" ? "goto:$(ex.name_val)" : k == K"SourceLocation" ? "SourceLocation:$(JuliaSyntax.filename(ex)):$(j...
No issues found.
k == K"latestworld" ? "latestworld" : k == K"static_parameter" ? "static_parameter" : k == K"symbolic_label" ? "label:$(ex.name_val)" : k == K"symbolic_goto" ? "goto:$(ex.name_val)" : k == K"SourceLocation" ? "SourceLocation:$(JuliaSyntax.filename(ex)):$(j...
@@ -104,11 +104,8 @@ function newnode!(graph::SyntaxGraph) return length(graph.edge_ranges) end -function setchildren!(graph::SyntaxGraph, id, children::NodeId...) - setchildren!(graph, id, children) -end - -function setchildren!(graph::SyntaxGraph, id, children) +function setchildren!(graph::SyntaxGraph, id...
JuliaLowering/src/syntax_graph.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Tidy up node creation functions
60,191
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/src/syntax_graph.jl PR Title: [JuliaLowering] Tidy up node creation functions BEFORE CODE: k == K"latestworld" ? "latestworld" : k == K"static_parameter" ? "static_parameter" : k == K"symbolic_label" ? "label:$(ex.nam...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
x end """) == 42 @test JuliaLowering.include_string(test_mod, """ let x = [] a = b = (push!(x, 1); 42) (a,b,x) end """) == (42,42,[1]) # setproperty! @test JuliaLowering.include_string(test_mod, """ let x = X(1,2) x.a = 10 (x.a, x.b) end """) == (10,2) # Declarations @test JuliaLowering.i...
No issues found.
x end """) == 42 @test JuliaLowering.include_string(test_mod, """ let x = [] a = b = (push!(x, 1); 42) (a,b,x) end """) == (42,42,[1]) # setproperty! @test JuliaLowering.include_string(test_mod, """ let x = X(1,2) x.a = 10 (x.a, x.b) end """) == (10,2) # Declarations @test JuliaLowering.i...
@@ -95,4 +95,18 @@ let end """) == 3 +# removing argument side effect in kwcall lhs +@eval test_mod f60152(v, pa; kw) = copy(v) +@test JuliaLowering.include_string(test_mod, """ + f60152([1, 2, 3], 0; kw=0) .*= 2 +""") == [2,4,6] +@test JuliaLowering.include_string(test_mod, """ +let + pa_execs = 0 + kw_ex...
JuliaLowering/test/assignments.jl
0
Julia
1
none
16
51
51
true
Fix `remove-argument-side-effects` with keyword call
60,195
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/assignments.jl PR Title: Fix `remove-argument-side-effects` with keyword call BEFORE CODE: x end """) == 42 @test JuliaLowering.include_string(test_mod, """ let x = [] a = b = (push!(x, 1); 42) (a,b,x) end """) == (42,42,[1])...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
exactft = exact || (!has_free_typevars(ft) && u.name !== Tuple.name) ft = rewrap_unionall(ft, s) if exactft if hasuniquerep(ft) return Const(ft) # ft unique via type cache end return Type{ft} end if u.name === Tuple.name && ft === Any # Tuple{:x} is possi...
No issues found.
exactft = exact || (!has_free_typevars(ft) && u.name !== Tuple.name) ft = rewrap_unionall(ft, s) if exactft if hasuniquerep(ft) return Const(ft) # ft unique via type cache end return Type{ft} end if u.name === Tuple.name && ft === Any # Tuple{:x} is possi...
@@ -1286,18 +1286,6 @@ end return rewrap_unionall(R, s00) end -# checks if a field of this type is guaranteed to be defined to a value -# and that access to an uninitialized field will cause an `UndefRefError` or return zero -# - is_undefref_fieldtype(String) === true -# - is_undefref_fieldtype(Integer) === tru...
Compiler/src/tfuncs.jl
0
Julia
1
none
16
51
51
true
Finish PR: inference: fix the ptrfree field check
60,214
JuliaLang/julia
35,573
Julia
MasonProtter
Review this pull request change. Language: Julia File: Compiler/src/tfuncs.jl PR Title: Finish PR: inference: fix the ptrfree field check BEFORE CODE: exactft = exact || (!has_free_typevars(ft) && u.name !== Tuple.name) ft = rewrap_unionall(ft, s) if exactft if hasuniquerep(ft) retu...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end (f_def_slurp(), f_def_slurp(2), f_def_slurp(2,3)) end """) == ((1, ()), (2, ()), (2, (3,))) @test JuliaLowering.include_string(test_mod, """ begin function f_def_ret_type(x=1.0)::Int x end (f_def_ret_type(), f_def_ret_t...
No issues found.
end (f_def_slurp(), f_def_slurp(2), f_def_slurp(2,3)) end """) == ((1, ()), (2, ()), (2, (3,))) @test JuliaLowering.include_string(test_mod, """ begin function f_def_ret_type(x=1.0)::Int x end (f_def_ret_type(), f_def_ret_t...
@@ -513,6 +513,16 @@ end end """) == (NTuple{5,Int}, 5, Int) + @test JuliaLowering.include_string(test_mod, """ + begin + @generated function f_gen_unnamed_args(::Type{T}, y, ::Type{U}) where {T, U} + return (T, y, U) + end + + f_gen_unnamed_args(Int, UInt8(3), Float64)...
JuliaLowering/test/functions.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Fix handling of unnamed args in `@generated` functions
60,226
JuliaLang/julia
35,573
Julia
topolarity
Review this pull request change. Language: Julia File: JuliaLowering/test/functions.jl PR Title: [JuliaLowering] Fix handling of unnamed args in `@generated` functions BEFORE CODE: end (f_def_slurp(), f_def_slurp(2), f_def_slurp(2,3)) end """) == ((1, ()), (2, ()), ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test JuliaLowering.include_string(test_mod, """ begin function f_def_ret_type(x=1.0)::Int x end (f_def_ret_type(), f_def_ret_type(10.0)) end """) === (1,10) @test JuliaLowering.include_string(test_mod, """ begin function f_def_slurp_splat(ys...=(1,...
No issues found.
@test JuliaLowering.include_string(test_mod, """ begin function f_def_ret_type(x=1.0)::Int x end (f_def_ret_type(), f_def_ret_type(10.0)) end """) === (1,10) @test JuliaLowering.include_string(test_mod, """ begin function f_def_slurp_splat(ys...=(1,...
@@ -501,6 +501,7 @@ end end @testset "Generated functions" begin + for expr_compat_mode in (false, true) @test JuliaLowering.include_string(test_mod, raw""" begin @generated function f_gen(x::NTuple{N,T}) where {N,T} @@ -511,7 +512,7 @@ end f_gen((1,2,3,4,5)) end - """) == (...
JuliaLowering/test/functions.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Fix generated functions when `expr_compat_mode=true`
60,233
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/functions.jl PR Title: [JuliaLowering] Fix generated functions when `expr_compat_mode=true` BEFORE CODE: @test JuliaLowering.include_string(test_mod, """ begin function f_def_ret_type(x=1.0)::Int x end ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end )) @test JuliaLowering.include_string(test_mod, """ let x = "x in outer scope" @oldstyle_unhygenic end """) == "x in outer scope" # Exceptions in old style macros Base.eval(test_mod, :( macro oldstyle_error() error("Some error in old style macro") end )) @test try JuliaLowering.include_string(test_mod,...
No issues found.
end )) @test JuliaLowering.include_string(test_mod, """ let x = "x in outer scope" @oldstyle_unhygenic end """) == "x in outer scope" # Exceptions in old style macros Base.eval(test_mod, :( macro oldstyle_error() error("Some error in old style macro") end )) @test try JuliaLowering.include_string(test_mod,...
@@ -122,6 +122,19 @@ ctx, expanded = JuliaLowering.expand_forms_1(test_mod, ex, false, Base.get_world "y" ] +@test JuliaLowering.include_string(test_mod, raw""" +v"1.14" +""") isa VersionNumber +@test JuliaLowering.include_string(test_mod, raw""" +v"1.14" +""";expr_compat_mode=true) isa VersionNumber +@test Jul...
JuliaLowering/test/macros.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Restrict `K"VERSION"` to module arg
60,255
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/macros.jl PR Title: [JuliaLowering] Restrict `K"VERSION"` to module arg BEFORE CODE: end )) @test JuliaLowering.include_string(test_mod, """ let x = "x in outer scope" @oldstyle_unhygenic end """) == "x in outer scope" # Exceptions in ol...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if (f == sub_ptr) off = ctx.builder.CreateNeg(off); Value *ans = ctx.builder.CreateGEP(getInt8Ty(ctx.builder.getContext()), ptr, off); if (jl_is_concrete_type(ptrtyp)) { return mark_julia_type(ctx, ans, false, ptrtyp); } else { Value *box = emit_allocobj(ctx, (jl_datatype_t ...
No issues found.
if (f == sub_ptr) off = ctx.builder.CreateNeg(off); Value *ans = ctx.builder.CreateGEP(getInt8Ty(ctx.builder.getContext()), ptr, off); if (jl_is_concrete_type(ptrtyp)) { return mark_julia_type(ctx, ans, false, ptrtyp); } else { Value *box = emit_allocobj(ctx, (jl_datatype_t ...
@@ -915,17 +915,26 @@ static jl_cgval_t emit_pointerarith(jl_codectx_t &ctx, intrinsic f, static jl_cgval_t emit_atomicfence(jl_codectx_t &ctx, ArrayRef<jl_cgval_t> argv) { const jl_cgval_t &ord = argv[0]; + const jl_cgval_t &ssid_arg = argv[1]; + llvm::SyncScope::ID ssid = llvm::SyncScope::System; + if...
src/intrinsics.cpp
0
C++
1
none
16
51
51
true
threads: Implement asymmetric atomic fences
60,311
JuliaLang/julia
35,573
Julia
Keno
Review this pull request change. Language: C++ File: src/intrinsics.cpp PR Title: threads: Implement asymmetric atomic fences BEFORE CODE: if (f == sub_ptr) off = ctx.builder.CreateNeg(off); Value *ans = ctx.builder.CreateGEP(getInt8Ty(ctx.builder.getContext()), ptr, off); if (jl_is_concrete_ty...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
# test that basic `cfunction` generation is allowed, when the dispatch target can be resolved make_cfunction() = @cfunction(+, Float64, (Int64,Int64)) let infos = typeinf_ext_toplevel(Any[Core.svec(Ptr{Cvoid}, Tuple{typeof(make_cfunction)})], [Base.get_world_counter()], TRIM_UNSAFE) errors, parents = get_verify_ty...
No issues found.
# test that basic `cfunction` generation is allowed, when the dispatch target can be resolved make_cfunction() = @cfunction(+, Float64, (Int64,Int64)) let infos = typeinf_ext_toplevel(Any[Core.svec(Ptr{Cvoid}, Tuple{typeof(make_cfunction)})], [Base.get_world_counter()], TRIM_UNSAFE) errors, parents = get_verify_ty...
@@ -29,11 +29,13 @@ let infos = typeinf_ext_toplevel(Any[Core.svec(Nothing, Tuple{typeof(finalizer), @test !warn @test desc isa CallMissing @test occursin("finalizer", desc.desc) - repr = sprint(verify_print_error, desc, parents) - @test occursin( - r"""^unresolved finalizer registered from ...
Compiler/test/verifytrim.jl
0
Julia
1
none
16
51
51
true
Make verify trim printing more readable (also fix the colours)
60,350
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: Julia File: Compiler/test/verifytrim.jl PR Title: Make verify trim printing more readable (also fix the colours) BEFORE CODE: # test that basic `cfunction` generation is allowed, when the dispatch target can be resolved make_cfunction() = @cfunction(+, Float64, (Int64,Int...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} else { Value *val = emit_unbox(ctx, et, arg); if (!val) { // There was a type mismatch of some sort - exit early emit_error(ctx, "(INTERNAL ERROR - IR Validity): Argument type mismatch in Expr(:invoke)"); ...
No issues found.
} else { Value *val = emit_unbox(ctx, et, arg); if (!val) { // There was a type mismatch of some sort - exit early emit_error(ctx, "(INTERNAL ERROR - IR Validity): Argument type mismatch in Expr(:invoke)"); ...
@@ -605,6 +605,24 @@ AttributeSet Attributes(LLVMContext &C, std::initializer_list<Attribute::AttrKin return AttributeSet::get(C, ArrayRef<Attribute>(attrs)); } +static inline Attribute NoCaptureAttr(LLVMContext &C) +{ +#if JL_LLVM_VERSION < 210000 + return Attribute::get(C, Attribute::NoCapture); +#else + ...
src/codegen.cpp
0
C++
1
none
16
51
51
true
(Mostly) Trivial part of LLVM 21 support
60,356
JuliaLang/julia
35,573
Julia
yuyichao
Review this pull request change. Language: C++ File: src/codegen.cpp PR Title: (Mostly) Trivial part of LLVM 21 support BEFORE CODE: } else { Value *val = emit_unbox(ctx, et, arg); if (!val) { // There was a type mismatch of some sort - exi...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end function is_ancestor(ex, ancestor) if !is_compatible_graph(ex, ancestor) return false end sources = ex._graph.source id::NodeId = ex._id while true s = get(sources, id, nothing) if s isa NodeId id = s if id == ancestor._id return ...
No issues found.
end function is_ancestor(ex, ancestor) if !is_compatible_graph(ex, ancestor) return false end sources = ex._graph.source id::NodeId = ex._id while true s = get(sources, id, nothing) if s isa NodeId id = s if id == ancestor._id return ...
@@ -94,7 +94,7 @@ function delete_attributes(graph::SyntaxGraph{<:NamedTuple}, attr_names::Symbol. freeze_attrs(g) end -function newnode!(graph::SyntaxGraph) +function new_id!(graph::SyntaxGraph) push!(graph.edge_ranges, 0:-1) # Invalid range start => leaf node return length(graph.edge_ranges) end @@...
JuliaSyntax/src/porcelain/syntax_graph.jl
0
Julia
1
none
16
51
51
true
Document and further clean up node creation functions
60,431
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaSyntax/src/porcelain/syntax_graph.jl PR Title: Document and further clean up node creation functions BEFORE CODE: end function is_ancestor(ex, ancestor) if !is_compatible_graph(ex, ancestor) return false end sources = ex._graph.source...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
__source__ = LineNumberNode(@__LINE__() - 1, Symbol(@__FILE__)) nometh::LoadError @test nometh.file === string(__source__.file) @test nometh.line === __source__.line e = nometh.error::MethodError @test e.f === getfield(@__MODULE__, Symbol("@m8846")) @test e.args === (__source__, @__MODULE__...
No issues found.
__source__ = LineNumberNode(@__LINE__() - 1, Symbol(@__FILE__)) nometh::LoadError @test nometh.file === string(__source__.file) @test nometh.line === __source__.line e = nometh.error::MethodError @test e.f === getfield(@__MODULE__, Symbol("@m8846")) @test e.args === (__source__, @__MODULE__...
@@ -8557,6 +8557,21 @@ f_invalidate_me() = 2 @test_throws ErrorException invoke(f_invoke_me, f_invoke_me_ci) @test_throws ErrorException f_call_me() +mysin(x::Float64) = sin(x) +@test mysin(1.0) == sin(1.0) +const mysin_ci = Base.specialize_method(Base._which(Tuple{typeof(mysin), Float64})).cache +mysin2(x::Float64...
test/core.jl
0
Julia
1
none
16
51
51
true
Add optimizer support for `invoke(f, ::CodeInstance, args...)`
60,442
JuliaLang/julia
35,573
Julia
MasonProtter
Review this pull request change. Language: Julia File: test/core.jl PR Title: Add optimizer support for `invoke(f, ::CodeInstance, args...)` BEFORE CODE: __source__ = LineNumberNode(@__LINE__() - 1, Symbol(@__FILE__)) nometh::LoadError @test nometh.file === string(__source__.file) @test nometh.line...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
pop!(Base.Experimental._hint_handlers[Core.typename(MethodError)]) # order is undefined, don't copy this function busted_hint(io, exc, notarg) # wrong number of args print(io, "\nI don't have a hint for you, sorry") end @test Base.Experimental.register_error_hint(busted_hint, DomainError) === nothing try sqr...
No issues found.
pop!(Base.Experimental._hint_handlers[Core.typename(MethodError)]) # order is undefined, don't copy this function busted_hint(io, exc, notarg) # wrong number of args print(io, "\nI don't have a hint for you, sorry") end @test Base.Experimental.register_error_hint(busted_hint, DomainError) === nothing try sqr...
@@ -1511,3 +1511,23 @@ end @test occursin("This hint caught my concrete exception type", exc_print) @test occursin("This other hint caught my abstract exception supertype", exc_print) end + +@testset "MemoryRef BoundsError summary" begin + mem = Memory{Int}(undef, 10) + ref = memoryref(mem, 9) + err...
test/errorshow.jl
0
Julia
1
none
16
51
51
true
Add summary printing for GenericMemoryRef
60,451
JuliaLang/julia
35,573
Julia
vishal2005025
Review this pull request change. Language: Julia File: test/errorshow.jl PR Title: Add summary printing for GenericMemoryRef BEFORE CODE: pop!(Base.Experimental._hint_handlers[Core.typename(MethodError)]) # order is undefined, don't copy this function busted_hint(io, exc, notarg) # wrong number of args print...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@testset "#19750" begin io = IOBuffer() exc = Test.TestSetException(1,2,3,4,Vector{Union{Test.Error, Test.Fail}}()) Base.showerror(io, exc, backtrace()) @test !occursin("backtrace()", String(take!(io))) exc = Test.FallbackTestSetException("msg") Base.showerror(io, exc, backtrace()) str = St...
No issues found.
@testset "#19750" begin io = IOBuffer() exc = Test.TestSetException(1,2,3,4,Vector{Union{Test.Error, Test.Fail}}()) Base.showerror(io, exc, backtrace()) @test !occursin("backtrace()", String(take!(io))) exc = Test.FallbackTestSetException("msg") Base.showerror(io, exc, backtrace()) str = St...
@@ -29,6 +29,40 @@ import Logging: Debug, Info, Warn, with_logger @test 'a' .. 'a' @test !('a' .. 'b') end + + +module ClosureBoxTest + function boxed() + x = 1 + inner() = (x += 1) + inner() + end + + module Sub + function boxed_sub() + x = 0 + inne...
stdlib/Test/test/runtests.jl
0
Julia
1
none
16
51
51
true
add a vibe coded `Test.detect_closure_boxes` for closure boxes in loaded code
60,478
JuliaLang/julia
35,573
Julia
KristofferC
Review this pull request change. Language: Julia File: stdlib/Test/test/runtests.jl PR Title: add a vibe coded `Test.detect_closure_boxes` for closure boxes in loaded code BEFORE CODE: @testset "#19750" begin io = IOBuffer() exc = Test.TestSetException(1,2,3,4,Vector{Union{Test.Error, Test.Fail}}()) Bas...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@eval Main module TestShowTypeREPL; export TypeA; struct TypeA end; end t = @async write(stdin_write, "TestShowTypeREPL.TypeA\n") s = readuntil(stdout_read, "\n\n") s2 = rsplit(s, "\n", limit=2)[end] @test s2 == "\e[0mMain.TestShowTypeREPL.TypeA" wait(t) @eval Main using .TestShowTypeREPL ...
No issues found.
@eval Main module TestShowTypeREPL; export TypeA; struct TypeA end; end t = @async write(stdin_write, "TestShowTypeREPL.TypeA\n") s = readuntil(stdout_read, "\n\n") s2 = rsplit(s, "\n", limit=2)[end] @test s2 == "\e[0mMain.TestShowTypeREPL.TypeA" wait(t) @eval Main using .TestShowTypeREPL ...
@@ -244,8 +244,9 @@ fake_repl(options = REPL.Options(confirm_exit=false,hascolor=true,style_input=fa @test occursin("shell> ", s) # check for the echo of the prompt @test occursin("'", s) # check for the echo of the input s = readuntil(stdout_read, "\n\n") - @test(startswith(s, "\e[0mE...
stdlib/REPL/test/repl.jl
0
Julia
1
none
16
51
51
true
Use `__repl_entry` prefix to shorten `shell_parse` stack traces
60,482
JuliaLang/julia
35,573
Julia
BioTurboNick
Review this pull request change. Language: Julia File: stdlib/REPL/test/repl.jl PR Title: Use `__repl_entry` prefix to shorten `shell_parse` stack traces BEFORE CODE: @eval Main module TestShowTypeREPL; export TypeA; struct TypeA end; end t = @async write(stdin_write, "TestShowTypeREPL.TypeA\n") s = re...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
for i in eachindex(staledeps) dep = staledeps[i] dep isa Module && continue modpath, modkey, modbuild_id, modcachepath, modstaledeps, modocachepath = dep::Tuple{String, PkgId, UInt128, String, Vector{Any}, Union{Nothing, String}} ...
No issues found.
for i in eachindex(staledeps) dep = staledeps[i] dep isa Module && continue modpath, modkey, modbuild_id, modcachepath, modstaledeps, modocachepath = dep::Tuple{String, PkgId, UInt128, String, Vector{Any}, Union{Nothing, String}} ...
@@ -2694,6 +2694,7 @@ function require_stdlib(package_uuidkey::PkgId, ext::Union{Nothing, String}, fro return newm end env = Sys.STDLIB + loading_started = false try depot_path = append_bundled_depot_path!(empty(DEPOT_PATH)) from_stdlib = true # set to false if `from` is a n...
base/loading.jl
0
Julia
1
none
16
51
51
true
[release-1.11] Fix KeyError in require_stdlib for non-stdlib extensions
60,491
JuliaLang/julia
35,573
Julia
IanButterworth
Review this pull request change. Language: Julia File: base/loading.jl PR Title: [release-1.11] Fix KeyError in require_stdlib for non-stdlib extensions BEFORE CODE: for i in eachindex(staledeps) dep = staledeps[i] dep isa Module && continue ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end end let X = UInt8[0x30,0x31,0x32] for T in (UInt8, UInt16, UInt32, Int32) @test transcode(UInt8,transcode(T, X)) == X @test transcode(UInt8,transcode(T, 0x30:0x32)) == X end end let optstring = repr("text/plain", Base.JLOptions()) @test startswith(optstring, "JLOptions(\n") @te...
No issues found.
end end let X = UInt8[0x30,0x31,0x32] for T in (UInt8, UInt16, UInt32, Int32) @test transcode(UInt8,transcode(T, X)) == X @test transcode(UInt8,transcode(T, 0x30:0x32)) == X end end let optstring = repr("text/plain", Base.JLOptions()) @test startswith(optstring, "JLOptions(\n") @te...
@@ -1560,6 +1560,9 @@ end @allocated _x = 1+2 @test _x === 3 + # test `@allocated` works for dotted operations + @test (@allocated 1 .+ 1) == 0 + n, m = 10, 20 X = rand(n, m) treshape59278(X, n, m)
test/misc.jl
0
Julia
1
none
16
51
51
true
Fix `@allocated 1 .+ 1`
60,494
JuliaLang/julia
35,573
Julia
N5N3
Review this pull request change. Language: Julia File: test/misc.jl PR Title: Fix `@allocated 1 .+ 1` BEFORE CODE: end end let X = UInt8[0x30,0x31,0x32] for T in (UInt8, UInt16, UInt32, Int32) @test transcode(UInt8,transcode(T, X)) == X @test transcode(UInt8,transcode(T, 0x30:0x32)) == X ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
" ", Code("`code` ``code``"), " ", LaTeX("`math` ``math`` ```math```"), ])) @test Markdown.parse(t_3) == MD(Paragraph([ LaTeX("`"), " ", Code("`` ` `` ` `"), ])) @test Markdown.parse(t_4) == MD(Paragraph([ Code("code over several lines"), ...
No issues found.
" ", Code("`code` ``code``"), " ", LaTeX("`math` ``math`` ```math```"), ])) @test Markdown.parse(t_3) == MD(Paragraph([ LaTeX("`"), " ", Code("`` ` `` ` `"), ])) @test Markdown.parse(t_4) == MD(Paragraph([ Code("code over several lines"), ...
@@ -274,7 +274,7 @@ end # Issue #38275 function test_list_wrap(str, lenmin, lenmax) - strs = split(str, '\n') + strs = rstrip.(split(str, '\n')) l = length.(strs) for i = 1:length(l)-1 if l[i] != 0 && l[i+1] != 0 # the next line isn't blank, so this line should be "full" @@ -283,14 +283,...
stdlib/Markdown/test/runtests.jl
0
Julia
1
none
16
51
51
true
Improve rendering Markdown lists in a terminal
60,519
JuliaLang/julia
35,573
Julia
fingolfin
Review this pull request change. Language: Julia File: stdlib/Markdown/test/runtests.jl PR Title: Improve rendering Markdown lists in a terminal BEFORE CODE: " ", Code("`code` ``code``"), " ", LaTeX("`math` ``math`` ```math```"), ])) @test Markdown.parse(t_3) == MD(Paragraph(...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
else if (kind != PARTITION_KIND_IMPORTED) { // TODO: we might want to require explicitly importing types to add constructors // or we might want to drop this error entirely jl_module_t *from = jl_binding_dbgmodule(b); assert(from); // Can only be NULL if imp...
No issues found.
else if (kind != PARTITION_KIND_IMPORTED) { // TODO: we might want to require explicitly importing types to add constructors // or we might want to drop this error entirely jl_module_t *from = jl_binding_dbgmodule(b); assert(from); // Can only be NULL if imp...
@@ -1510,6 +1510,31 @@ int jl_module_public_(jl_module_t *from, jl_sym_t *s, int exported, size_t new_w return 0; } +// Declare `symbols` in module `from` public or public+exported +JL_DLLEXPORT void jl_module_public(jl_module_t *from, jl_value_t **symbols, size_t nsymbols, int exported) +{ + volatile int an...
src/module.c
0
C
1
none
16
51
51
true
Move thunk and export evaluation out of `jl_toplevel_eval_flex`
60,528
JuliaLang/julia
35,573
Julia
c42f
Review this pull request change. Language: C File: src/module.c PR Title: Move thunk and export evaluation out of `jl_toplevel_eval_flex` BEFORE CODE: else if (kind != PARTITION_KIND_IMPORTED) { // TODO: we might want to require explicitly importing types to add constructors // ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@test (c2[eachindex(c2)] = @view(a22[inds1]); c2) == @view(a22[inds1]) inds2 = 3:3:9 d2 = @view a2[inds2] @test (d2[eachindex(d2)] = @view(a22[inds2]); d2) == @view(a22[inds2]) end end end @testset "issue #11871" begin a = fill(1., (2,2)) b = view(a,...
No issues found.
@test (c2[eachindex(c2)] = @view(a22[inds1]); c2) == @view(a22[inds1]) inds2 = 3:3:9 d2 = @view a2[inds2] @test (d2[eachindex(d2)] = @view(a22[inds2]); d2) == @view(a22[inds2]) end end end @testset "issue #11871" begin a = fill(1., (2,2)) b = view(a,...
@@ -92,14 +92,28 @@ function single_stride_dim(A::Array) end single_stride_dim(@nospecialize(A)) = single_stride_dim(copy_to_array(A)) +function unsafe_strided_getindex(A::AbstractArray{T,N}, I::Vararg{Int, N})::T where {T, N} + A_cconv = Base.cconvert(Ptr{T}, A) + GC.@preserve A_cconv begin + A_ptr = ...
test/subarray.jl
0
Julia
1
none
16
51
51
true
Implement `cconvert` for `SubArray`
60,533
JuliaLang/julia
35,573
Julia
nhz2
Review this pull request change. Language: Julia File: test/subarray.jl PR Title: Implement `cconvert` for `SubArray` BEFORE CODE: @test (c2[eachindex(c2)] = @view(a22[inds1]); c2) == @view(a22[inds1]) inds2 = 3:3:9 d2 = @view a2[inds2] @test (d2[eachindex(d2)] = @vi...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end end end # –––––––––––––– # Images & Links # –––––––––––––– mutable struct Image <: MarkdownElement url::String alt::String end @trigger '!' -> function image(stream::IO, md::MD) withstream(stream) do startswith(stream, "![") || return alt = readuntil(stream, ']', match = '...
No issues found.
end end end # –––––––––––––– # Images & Links # –––––––––––––– mutable struct Image <: MarkdownElement url::String alt::String end @trigger '!' -> function image(stream::IO, md::MD) withstream(stream) do startswith(stream, "![") || return alt = readuntil(stream, ']', match = '...
@@ -36,6 +36,22 @@ function underscore_bold(stream::IO, md::MD) return result === nothing ? nothing : Bold(parseinline(result, md)) end +mutable struct Strikethrough <: MarkdownElement + text +end + +@trigger '~' -> +function tilde_strikethrough(stream::IO, md::MD) + result = parse_inline_wrapper(stream, ...
stdlib/Markdown/src/Common/inline.jl
0
Julia
1
none
16
51
51
true
Markdown: add strikethrough support
60,537
JuliaLang/julia
35,573
Julia
fingolfin
Review this pull request change. Language: Julia File: stdlib/Markdown/src/Common/inline.jl PR Title: Markdown: add strikethrough support BEFORE CODE: end end end # –––––––––––––– # Images & Links # –––––––––––––– mutable struct Image <: MarkdownElement url::String alt::String end @trigger '!...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
@testset "Manifest formats" begin deps = Dict{String,Any}( "Serialization" => Any[Dict{String, Any}("uuid"=>"9e88b42a-f829-5b0c-bbe9-9e923198166b")], "Random" => Any[Dict{String, Any}("deps"=>["Serialization"], "uuid"=>"9a3f8284-a2c9-5f02-9a11-845980a1fd5c")], "Logging" => Any[...
No issues found.
@testset "Manifest formats" begin deps = Dict{String,Any}( "Serialization" => Any[Dict{String, Any}("uuid"=>"9e88b42a-f829-5b0c-bbe9-9e923198166b")], "Random" => Any[Dict{String, Any}("deps"=>["Serialization"], "uuid"=>"9a3f8284-a2c9-5f02-9a11-845980a1fd5c")], "Logging" => Any[...
@@ -1639,3 +1639,22 @@ end end end end +@testset "require_stdlib extension with non-stdlib from module" begin + # Test that require_stdlib doesn't error when called with an extension + # and the `from` module is not from the bundled depot (from_stdlib=false path) + # This is a regression test fo...
test/loading.jl
0
Julia
1
none
16
51
51
true
[release-1.11] Backports for 1.11
60,549
JuliaLang/julia
35,573
Julia
IanButterworth
Review this pull request change. Language: Julia File: test/loading.jl PR Title: [release-1.11] Backports for 1.11 BEFORE CODE: @testset "Manifest formats" begin deps = Dict{String,Any}( "Serialization" => Any[Dict{String, Any}("uuid"=>"9e88b42a-f829-5b0c-bbe9-9e923198166b")], "Random" =...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
10 (call core.tuple 10 20 30) 11 (return %₁₀) ######################################## # Const in chain: only first is const const c0 = v0 = v1 = 123 #--------------------- 1 123 2 (call core.declare_const TestMod :c0 %₁) 3 latestworld 4 (call core.declare_global TestMod :v0 true) 5 latestworld 6 (call c...
No issues found.
10 (call core.tuple 10 20 30) 11 (return %₁₀) ######################################## # Const in chain: only first is const const c0 = v0 = v1 = 123 #--------------------- 1 123 2 (call core.declare_const TestMod :c0 %₁) 3 latestworld 4 (call core.declare_global TestMod :v0 true) 5 latestworld 6 (call c...
@@ -263,33 +263,34 @@ end 7 SourceLocation::1:10 8 (call core.svec %₅ %₆ %₇) 9 --- method core.nothing %₈ - slots: [slot₁/#self#(!read) slot₂/x slot₃/tmp(!read) slot₄/tmp(!read)] - 1 1 - 2 TestMod.Int - 3 (= slot₃/tmp %₁) - 4 slot₃/tmp - 5 (call core.isa %₄ %₂) - 6 (gotoifnot %...
JuliaLowering/test/decls_ir.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Add remap for assigned-to arguments
60,551
JuliaLang/julia
35,573
Julia
topolarity
Review this pull request change. Language: Julia File: JuliaLowering/test/decls_ir.jl PR Title: [JuliaLowering] Add remap for assigned-to arguments BEFORE CODE: 10 (call core.tuple 10 20 30) 11 (return %₁₀) ######################################## # Const in chain: only first is const const c0 = v0 = v1 = 123 #-...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
4 (call %₃ 2 slot₂/x) 5 (call core.getfield slot₁/#self# 1) 6 (call %₂ %₄ %₅) 7 (call %₁ %₆ slot₃/z) 8 (return %₇) 7 (new_opaque_closure %₄ %₅ core.Any true %₆ slot₁/y) 8 (return %₇) ######################################## # Opaque closure with `...` let Base.Experimental.@opaque...
No issues found.
4 (call %₃ 2 slot₂/x) 5 (call core.getfield slot₁/#self# 1) 6 (call %₂ %₄ %₅) 7 (call %₁ %₆ slot₃/z) 8 (return %₇) 7 (new_opaque_closure %₄ %₅ core.Any true %₆ slot₁/y) 8 (return %₇) ######################################## # Opaque closure with `...` let Base.Experimental.@opaque...
@@ -255,7 +255,7 @@ end 1 (method TestMod.f) 2 latestworld 3 (call core.svec :T) -4 (call core.svec true) +4 (call core.svec false) 5 (call JuliaLowering.eval_closure_type TestMod :#f#g##2 %₃ %₄) 6 latestworld 7 TestMod.#f#g##2 @@ -264,17 +264,11 @@ end 10 SourceLocation::2:14 11 (call core.sv...
JuliaLowering/test/closures_ir.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Enrich closure tests and fix static parameter capture
60,577
JuliaLang/julia
35,573
Julia
aviatesk
Review this pull request change. Language: Julia File: JuliaLowering/test/closures_ir.jl PR Title: [JuliaLowering] Enrich closure tests and fix static parameter capture BEFORE CODE: 4 (call %₃ 2 slot₂/x) 5 (call core.getfield slot₁/#self# 1) 6 (call %₂ %₄ %₅) 7 (call %₁ %₆ slot₃/z) 8 (...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
input = "- a\n - b\n\n c\n- d\n" expected = "<ul>\n<li>a\n<ul>\n<li>\n<p>b</p>\n<p>c</p>\n</li>\n</ul>\n</li>\n<li>d</li>\n</ul>\n" actual = Markdown.html(Markdown.parse(input)) @test_broken expected == actual # Example 320 input = "* a\n > b\n >\n* c\n" expected = "<ul>\n<li>a\n<bloc...
No issues found.
input = "- a\n - b\n\n c\n- d\n" expected = "<ul>\n<li>a\n<ul>\n<li>\n<p>b</p>\n<p>c</p>\n</li>\n</ul>\n</li>\n<li>d</li>\n</ul>\n" actual = Markdown.html(Markdown.parse(input)) @test_broken expected == actual # Example 320 input = "* a\n > b\n >\n* c\n" expected = "<ul>\n<li>a\n<bloc...
@@ -136,7 +136,7 @@ end input = "<https://example.com?find=\\*>\n" expected = "<p><a href=\"https://example.com?find=%5C*\">https://example.com?find=\\*</a></p>\n" actual = Markdown.html(Markdown.parse(input)) - @test_broken expected == actual + @test expected == actual # Example 21 inp...
stdlib/Markdown/test/test_spec.jl
0
Julia
1
none
16
51
51
true
Markdown: implement URI encoding
60,578
JuliaLang/julia
35,573
Julia
fingolfin
Review this pull request change. Language: Julia File: stdlib/Markdown/test/test_spec.jl PR Title: Markdown: implement URI encoding BEFORE CODE: input = "- a\n - b\n\n c\n- d\n" expected = "<ul>\n<li>a\n<ul>\n<li>\n<p>b</p>\n<p>c</p>\n</li>\n</ul>\n</li>\n<li>d</li>\n</ul>\n" actual = Markdown.html(...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return 1; } vt = vt->super; _iter_count += 1; } return 0; } static size_t jl_static_show_float(JL_STREAM *out, double v, jl_datatype_t *vt) JL_NOTSAFEPOINT { size_t n = 0; // TODO: non-canonical NaNs do not round-trip // TOOD: B...
No issues found.
return 1; } vt = vt->super; _iter_count += 1; } return 0; } static size_t jl_static_show_float(JL_STREAM *out, double v, jl_datatype_t *vt) JL_NOTSAFEPOINT { size_t n = 0; // TODO: non-canonical NaNs do not round-trip // TOOD: B...
@@ -297,6 +297,7 @@ JL_DLLEXPORT void jl_eh_restore_state(jl_task_t *ct, jl_handler_t *eh) ct->eh = eh->prev; ct->gcstack = eh->gcstack; ct->scope = eh->scope; + jl_gc_wb_current_task(ct, ct->scope); small_arraylist_t *locks = &ptls->locks; int unlocks = locks->len > eh->locks_len; if (...
src/rtutils.c
0
C
1
none
16
51
51
true
Preserve the scope across the exception handler
60,647
JuliaLang/julia
35,573
Julia
vchuravy
Review this pull request change. Language: C File: src/rtutils.c PR Title: Preserve the scope across the exception handler BEFORE CODE: return 1; } vt = vt->super; _iter_count += 1; } return 0; } static size_t jl_static_show_float(JL_STREAM *out, double v, ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
# 1, 5, 4, 8, and now 3, 7 as well @test length(stp._graph.edge_ranges) === 6 @test stp.source isa NodeId @test stp[1].source === LineNumberNode(5) orig_3 = SyntaxTree(stp._graph, stp.source) @test orig_3.source isa NodeId orig_4 = SyntaxTree(stp._graph, orig_3.s...
No issues found.
# 1, 5, 4, 8, and now 3, 7 as well @test length(stp._graph.edge_ranges) === 6 @test stp.source isa NodeId @test stp[1].source === LineNumberNode(5) orig_3 = SyntaxTree(stp._graph, stp.source) @test orig_3.source isa NodeId orig_4 = SyntaxTree(stp._graph, orig_3.s...
@@ -1,4 +1,4 @@ -using .JuliaSyntax: SyntaxGraph, SyntaxTree, SyntaxList, freeze_attrs, unfreeze_attrs, ensure_attributes, ensure_attributes!, delete_attributes, copy_ast, attrdefs, @stm +using .JuliaSyntax: SyntaxGraph, SyntaxTree, SyntaxList, freeze_attrs, unfreeze_attrs, ensure_attributes, ensure_attributes!, delete...
JuliaSyntax/test/syntax_graph.jl
0
Julia
1
none
16
51
51
true
SyntaxGraph utilities: `unalias_nodes`, `prune`, `annotate_parent!`
60,673
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaSyntax/test/syntax_graph.jl PR Title: SyntaxGraph utilities: `unalias_nodes`, `prune`, `annotate_parent!` BEFORE CODE: # 1, 5, 4, 8, and now 3, 7 as well @test length(stp._graph.edge_ranges) === 6 @test stp.source isa NodeId ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
slug = Base.StringVector(len) chars = b"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" for i = 1:len slug[i] = chars[(Libc.rand() % length(chars)) + 1] end return String(slug) end # Obtain a temporary filename. function tempname(parent::AbstractString=tempdir(); max_tries:...
No issues found.
slug = Base.StringVector(len) chars = b"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" for i = 1:len slug[i] = chars[(Libc.rand() % length(chars)) + 1] end return String(slug) end # Obtain a temporary filename. function tempname(parent::AbstractString=tempdir(); max_tries:...
@@ -867,7 +867,7 @@ See also: [`mktemp`](@ref), [`mkdir`](@ref). """ function mktempdir(parent::AbstractString=tempdir(); prefix::AbstractString=temp_prefix, cleanup::Bool=true) - if isempty(parent) || occursin(path_separator_re, parent[end:end]) + if isempty(parent) || isseparator(last(parent)) #...
base/file.jl
0
Julia
1
none
16
51
51
true
Remove `Regex` / libpcre dependency from basic `path.jl` operations
60,677
JuliaLang/julia
35,573
Julia
johroj
Review this pull request change. Language: Julia File: base/file.jl PR Title: Remove `Regex` / libpcre dependency from basic `path.jl` operations BEFORE CODE: slug = Base.StringVector(len) chars = b"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" for i = 1:len slug[i] = chars[(Li...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
} #ifdef _OS_WINDOWS_ // For ntdll and msvcrt since we are currently only parsing DWARF debug info through LLVM if (!inimage && needs_name) { static char frame_info_func[ sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)]; DWORD64 dwDisplacement64 = 0; DWORD6...
No issues found.
} #ifdef _OS_WINDOWS_ // For ntdll and msvcrt since we are currently only parsing DWARF debug info through LLVM if (!inimage && needs_name) { static char frame_info_func[ sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR)]; DWORD64 dwDisplacement64 = 0; DWORD6...
@@ -1081,6 +1081,9 @@ bool jl_dylib_DI_for_fptr(size_t pointer, object::SectionRef *Section, uint64_t IMAGEHLP_MODULE64 ModuleInfo; ModuleInfo.SizeOfStruct = sizeof(IMAGEHLP_MODULE64); uv_mutex_lock(&jl_in_stackwalk); + uv_mutex_lock(&jl_dll_notify_lock); + jl_profile_process_dll_events(); + uv_...
src/debuginfo.cpp
0
C++
1
none
16
51
51
true
[Windows] Add DLL notification queue to avoid deadlock
60,690
JuliaLang/julia
35,573
Julia
topolarity
Review this pull request change. Language: C++ File: src/debuginfo.cpp PR Title: [Windows] Add DLL notification queue to avoid deadlock BEFORE CODE: } #ifdef _OS_WINDOWS_ // For ntdll and msvcrt since we are currently only parsing DWARF debug info through LLVM if (!inimage && needs_name) { stati...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if from === to || parentmodule(to) === to return 0 else return 1 + module_depth(from, parentmodule(to)) end end function has_backslashes(mod::Module) for n in names(mod, all = true, imported = true) isdefinedglobal(mod, n) || continue Base.isdeprecated(mod, n) && continue...
No issues found.
if from === to || parentmodule(to) === to return 0 else return 1 + module_depth(from, parentmodule(to)) end end function has_backslashes(mod::Module) for n in names(mod, all = true, imported = true) isdefinedglobal(mod, n) || continue Base.isdeprecated(mod, n) && continue...
@@ -62,6 +62,86 @@ str = String(take!(io)) end # module ReflectionTest +# code_llvm llvm_options parameter tests +@testset "code_llvm llvm_options" begin + using InteractiveUtils: code_llvm + + # Test that llvm_options parameter works without crashing + io = IOBuffer() + code_llvm(io, +, (Int, Int); ll...
test/reflection.jl
0
Julia
1
none
16
51
51
true
codegen: Add llvm_options parameter to code_llvm for pass instrumentation
60,698
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: Julia File: test/reflection.jl PR Title: codegen: Add llvm_options parameter to code_llvm for pass instrumentation BEFORE CODE: if from === to || parentmodule(to) === to return 0 else return 1 + module_depth(from, parentmodule(to)) end end funct...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
argvals[idx] = result; idx++; } AllocaInst *return_roots = nullptr; if (returninfo.return_roots) { return_roots = emit_static_roots(ctx, returninfo.return_roots); setName(ctx.emission_context, return_roots, "return_roots"); argvals[idx] = return_roots; idx++;...
No issues found.
argvals[idx] = result; idx++; } AllocaInst *return_roots = nullptr; if (returninfo.return_roots) { return_roots = emit_static_roots(ctx, returninfo.return_roots); setName(ctx.emission_context, return_roots, "return_roots"); argvals[idx] = return_roots; idx++;...
@@ -2292,9 +2292,11 @@ static AllocaInst *emit_static_alloca(jl_codectx_t &ctx, unsigned nb, Align alig // if it cannot find something better to do, which is terrible for performance. // However, if we emit this with an element size equal to the alignment, it will instead split it into aligned chunks // ...
src/codegen.cpp
0
C++
1
none
16
51
51
true
llvm: Fix alloca alignment and type selection in AllocOpt
60,699
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: C++ File: src/codegen.cpp PR Title: llvm: Fix alloca alignment and type selection in AllocOpt BEFORE CODE: argvals[idx] = result; idx++; } AllocaInst *return_roots = nullptr; if (returninfo.return_roots) { return_roots = emit_static_roo...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
ys end (f_def_slurp_splat(), f_def_slurp_splat(10,20)) end """) == ((1,2), (10,20)) @test JuliaLowering.include_string(test_mod, """ begin function f_def_destructure(x, (y,z)::Tuple{Int,Int}, (w,)...=(4,)...) (x,y,z,w) end f...
No issues found.
ys end (f_def_slurp_splat(), f_def_slurp_splat(10,20)) end """) == ((1,2), (10,20)) @test JuliaLowering.include_string(test_mod, """ begin function f_def_destructure(x, (y,z)::Tuple{Int,Int}, (w,)...=(4,)...) (x,y,z,w) end f...
@@ -222,6 +222,22 @@ end (f_return_in_value_pos(), x) """) === (42, 0) +@test JuliaLowering.include_string(test_mod, """ +function f_return_in_call() + f_return_in_call(return 123) +end + +f_return_in_call() +""") === 123 + +@test JuliaLowering.include_string(test_mod, raw""" +function f_return_in_interpolation(...
JuliaLowering/test/functions.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Fix linearize step when arguments have no value
60,704
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/functions.jl PR Title: [JuliaLowering] Fix linearize step when arguments have no value BEFORE CODE: ys end (f_def_slurp_splat(), f_def_slurp_splat(10,20)) end """) == ((1,2), (10,20)) @te...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
type = ex[2] ex = ex[1] end if is_kw && !isnothing(slurp_ex) throw(LoweringError(slurp_ex, "keyword argument with `...` may not be given a type")) end else type = @ast ctx ex "Any"::K"core" end if !isnothing(slurp_ex) type = @ast ct...
No issues found.
type = ex[2] ex = ex[1] end if is_kw && !isnothing(slurp_ex) throw(LoweringError(slurp_ex, "keyword argument with `...` may not be given a type")) end else type = @ast ctx ex "Any"::K"core" end if !isnothing(slurp_ex) type = @ast ct...
@@ -1646,7 +1646,7 @@ function expand_named_tuple(ctx, ex, kws, eq_is_kw; end name = to_symbol(ctx, kw[2]) value = kw - elseif k == K"call" && is_infix_op_call(kw) && numchildren(kw) == 3 && + elseif k == K"call" && numchildren(kw) == 3 && is_same_id...
JuliaLowering/src/desugaring.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Quote generated function body before desugaring
60,710
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/src/desugaring.jl PR Title: [JuliaLowering] Quote generated function body before desugaring BEFORE CODE: type = ex[2] ex = ex[1] end if is_kw && !isnothing(slurp_ex) throw(LoweringError(slurp_ex,...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end function Compiler.transform_result_for_cache(interp::PrecompileInterpreter, result::Compiler.InferenceResult) inferred_result = @invoke Compiler.transform_result_for_cache( interp::Compiler.AbstractInterpreter, result::Compiler.InferenceResult) ...
No issues found.
end function Compiler.transform_result_for_cache(interp::PrecompileInterpreter, result::Compiler.InferenceResult) inferred_result = @invoke Compiler.transform_result_for_cache( interp::Compiler.AbstractInterpreter, result::Compiler.InferenceResult) ...
@@ -62,44 +62,33 @@ precompile_test_harness() do load_path TestAbsIntPrecompile2.Custom.PrecompileInterpreter()) let m = only(methods(TestAbsIntPrecompile2.basic_callee)) mi = only(Base.specializations(m)) - ci = mi.cache - @test_broken isdefined(ci, :next) + ...
test/precompile_absint2.jl
0
Julia
1
none
16
51
51
true
[1.12] Don't skip CIs from external absints
60,741
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: Julia File: test/precompile_absint2.jl PR Title: [1.12] Don't skip CIs from external absints BEFORE CODE: end function Compiler.transform_result_for_cache(interp::PrecompileInterpreter, result::Compiler.InferenceResult) inferred_resu...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end @test JuliaLowering.include_string(test_mod, """ S5{<:AbstractFloat}(x) = S5(x, x) """) === nothing let s = test_mod.S5{<:AbstractFloat}(Float64(1.1)) @test s.x === 1.1 @test s.y === 1.1 @test s isa test_mod.S5{Float64} end @test JuliaLowering.include_string(test_mod, """ S5{T}(x::T) where {T<:Real} = S...
No issues found.
end @test JuliaLowering.include_string(test_mod, """ S5{<:AbstractFloat}(x) = S5(x, x) """) === nothing let s = test_mod.S5{<:AbstractFloat}(Float64(1.1)) @test s.x === 1.1 @test s.y === 1.1 @test s isa test_mod.S5{Float64} end @test JuliaLowering.include_string(test_mod, """ S5{T}(x::T) where {T<:Real} = S...
@@ -321,4 +321,29 @@ const Bar{T,V} = Foo{T,V,1} """) @test test_mod.Bar == (test_mod.Foo{T,V,1} where {T,V}) +# Global function with new() inside struct +# See https://github.com/JuliaLang/JuliaLowering.jl/issues/131 +JuliaLowering.include_string(test_mod, """ +struct S131 + x + global function make_s131() +...
JuliaLowering/test/typedefs.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Fix `new()` in global/local functions inside struct
60,793
JuliaLang/julia
35,573
Julia
aviatesk
Review this pull request change. Language: Julia File: JuliaLowering/test/typedefs.jl PR Title: [JuliaLowering] Fix `new()` in global/local functions inside struct BEFORE CODE: end @test JuliaLowering.include_string(test_mod, """ S5{<:AbstractFloat}(x) = S5(x, x) """) === nothing let s = test_mod.S5{<:AbstractFloat...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
return given_argtypes end function is_argtype_match(𝕃::AbstractLattice, @nospecialize(given_argtype), @nospecialize(cache_argtype), overridden_by_const::Bool) if is_forwardable_argtype(𝕃, given_argtype) return is_lattice_eq...
No issues found.
return given_argtypes end function is_argtype_match(𝕃::AbstractLattice, @nospecialize(given_argtype), @nospecialize(cache_argtype), overridden_by_const::Bool) if is_forwardable_argtype(𝕃, given_argtype) return is_lattice_eq...
@@ -181,12 +181,12 @@ function elim_free_typevars(@nospecialize t) end end -function constprop_cache_lookup(𝕃::AbstractLattice, mi::MethodInstance, given_argtypes::Vector{Any}, cache::Vector{InferenceResult}) - method = mi.def::Method +function constprop_cache_lookup(𝕃::AbstractLattice, mi::MethodInstance,...
Compiler/src/inferenceresult.jl
0
Julia
1
none
16
51
51
true
Use dictionary instead of linear search for the local cache.
60,795
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: Julia File: Compiler/src/inferenceresult.jl PR Title: Use dictionary instead of linear search for the local cache. BEFORE CODE: return given_argtypes end function is_argtype_match(𝕃::AbstractLattice, @nospecialize(given_argtype), ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
assert(i < m_->length); return ((uint8_t*)m_->ptr)[i]; } STATIC_INLINE void jl_memory_uint8_set(void *m, size_t i, uint8_t x) JL_NOTSAFEPOINT { jl_genericmemory_t *m_ = (jl_genericmemory_t*)m; assert(jl_typetagis(m_, jl_memory_uint8_type)); assert(i < m_->length); ((uint8_t*)m_->ptr)[i] = x; } ...
No issues found.
assert(i < m_->length); return ((uint8_t*)m_->ptr)[i]; } STATIC_INLINE void jl_memory_uint8_set(void *m, size_t i, uint8_t x) JL_NOTSAFEPOINT { jl_genericmemory_t *m_ = (jl_genericmemory_t*)m; assert(jl_typetagis(m_, jl_memory_uint8_type)); assert(i < m_->length); ((uint8_t*)m_->ptr)[i] = x; } ...
@@ -992,10 +992,20 @@ typedef struct { XX(addrspacecore) \ XX(intrinsic) \ /* AST objects */ \ - /* XX(argument) */ \ + XX(argument) \ /* XX(newvarnode) */ \ XX(slotnumber) \ XX(ssavalue) \ + XX(gotoifnot) \ + XX(returnnode) \ + XX(enternode) \ + XX(pinode) \ + XX(phin...
src/julia.h
0
C/C++
1
none
16
51
51
true
Compiler: add smalltags for IR node types and optimize _useref_getindex
60,831
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: C/C++ File: src/julia.h PR Title: Compiler: add smalltags for IR node types and optimize _useref_getindex BEFORE CODE: assert(i < m_->length); return ((uint8_t*)m_->ptr)[i]; } STATIC_INLINE void jl_memory_uint8_set(void *m, size_t i, uint8_t x) JL_NOTSAFEPOINT { ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
if !(@isdefined JuliaSyntax) using JuliaSyntax end using Test include("test_utils.jl") include("test_utils_tests.jl") include("fuzz_test.jl") include("utils.jl") include("kinds.jl") @testset "Tokenize" begin include("tokenize.jl") end include("parse_stream.jl") include("parser.jl") include("green_node.jl")...
No issues found.
if !(@isdefined JuliaSyntax) using JuliaSyntax end using Test include("test_utils.jl") include("test_utils_tests.jl") include("fuzz_test.jl") include("utils.jl") include("kinds.jl") @testset "Tokenize" begin include("tokenize.jl") end include("parse_stream.jl") include("parser.jl") include("green_node.jl")...
@@ -39,3 +39,9 @@ if VERSION >= v"1.6" end include("serialization.jl") + +# Basic inference tests +@static if isdefined(Base, :infer_return_type) + @test Base.infer_return_type(JuliaSyntax.sourcetext, (JuliaSyntax.SyntaxTree,)) <: AbstractString + @test Base.infer_return_type(JuliaSyntax.byte_range, (JuliaSyn...
JuliaSyntax/test/runtests.jl
0
Julia
1
none
16
48
48
true
[JuliaSyntax] improve type stability of `SyntaxTree` query APIs
60,851
JuliaLang/julia
35,573
Julia
aviatesk
Review this pull request change. Language: Julia File: JuliaSyntax/test/runtests.jl PR Title: [JuliaSyntax] improve type stability of `SyntaxTree` query APIs BEFORE CODE: if !(@isdefined JuliaSyntax) using JuliaSyntax end using Test include("test_utils.jl") include("test_utils_tests.jl") include("fuzz_test.jl...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
Nested.@cfunction_hygiene """) @test @ccall($cf_hygiene()::Int) == 10 # quoted function in cfunction quoted_cfn_anon = JuliaLowering.include_string(test_mod, raw""" @cfunction((function(x); x; end), Int, (Int,)) """) @test ccall(quoted_cfn_anon, Int, (Int,), 1) == 1 quoted_cfn_named = JuliaLowering.include_string...
No issues found.
Nested.@cfunction_hygiene """) @test @ccall($cf_hygiene()::Int) == 10 # quoted function in cfunction quoted_cfn_anon = JuliaLowering.include_string(test_mod, raw""" @cfunction((function(x); x; end), Int, (Int,)) """) @test ccall(quoted_cfn_anon, Int, (Int,), 1) == 1 quoted_cfn_named = JuliaLowering.include_string...
@@ -281,4 +281,19 @@ end end """; expr_compat_mode=true) === 1 +@testset "tryfinally with scopedvalues" begin + @eval test_mod scopedval = Base.ScopedValues.ScopedValue(1) + @eval test_mod val_history = [] + ex = Expr(:tryfinally, + :(push!(val_history, scopedval[])), + :(push...
JuliaLowering/test/misc.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Recognize `(tryfinally _ _ scope)` form
60,881
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/misc.jl PR Title: [JuliaLowering] Recognize `(tryfinally _ _ scope)` form BEFORE CODE: Nested.@cfunction_hygiene """) @test @ccall($cf_hygiene()::Int) == 10 # quoted function in cfunction quoted_cfn_anon = JuliaLowering.include_string(test_m...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
# to call parse_resword, or whether contextual keywords like `mutable` are # simple identifiers. # # flisp: parse-resword function parse_resword(ps::ParseState) bump_trivia(ps, skip_newlines=true) word = peek(ps) v_1_14_break_cont_ret = ps.stream.version >= (1,14) if v_1_14_break_cont_ret && (word == K"...
No issues found.
# to call parse_resword, or whether contextual keywords like `mutable` are # simple identifiers. # # flisp: parse-resword function parse_resword(ps::ParseState) bump_trivia(ps, skip_newlines=true) word = peek(ps) v_1_14_break_cont_ret = ps.stream.version >= (1,14) if v_1_14_break_cont_ret && (word == K"...
@@ -44,7 +44,7 @@ end # Functions to change parse state function normal_context(ps::ParseState) - ParseState(ps, + ParseState(ps; range_colon_enabled=true, space_sensitive=false, where_enabled=true, @@ -239,6 +239,12 @@ function is_closer_or_newline(ps::ParseSta...
JuliaSyntax/src/julia/parser.jl
0
Julia
1
none
16
51
51
true
Fixes for `break label` and `continue label` parsing
60,910
JuliaLang/julia
35,573
Julia
c42f
Review this pull request change. Language: Julia File: JuliaSyntax/src/julia/parser.jl PR Title: Fixes for `break label` and `continue label` parsing BEFORE CODE: # to call parse_resword, or whether contextual keywords like `mutable` are # simple identifiers. # # flisp: parse-resword function parse_resword(ps::Pars...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
record_lambda_var!(ctx, scope, b, capt=true) newleaf(ctx, ex, K"BindingId", b.id) elseif k === K"BindingId" record_lambda_var!(ctx, scope, get_binding(ctx, ex), capt=true) ex elseif k == K"softscope" newleaf(ctx, ex, K"TOMBSTONE") elseif k == K"break" && numchildren(e...
No issues found.
record_lambda_var!(ctx, scope, b, capt=true) newleaf(ctx, ex, K"BindingId", b.id) elseif k === K"BindingId" record_lambda_var!(ctx, scope, get_binding(ctx, ex), capt=true) ex elseif k == K"softscope" newleaf(ctx, ex, K"TOMBSTONE") elseif k == K"break" && numchildren(e...
@@ -40,14 +40,18 @@ struct ScopeInfo locals_capt::Union{Nothing, Dict{IdTag,Bool}} end -function ScopeInfo(ctx, parent_id, node_id, is_lambda, is_permeable) +function ScopeInfo(ctx, parent_id, ex::SyntaxTree) id = length(ctx.scopes) + 1 - lambda_id = is_lambda ? id : ctx.scopes[parent_id].lambda_id + ...
JuliaLowering/src/scope_analysis.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Fix soft scope semantics leaking through hard scope
60,917
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/src/scope_analysis.jl PR Title: [JuliaLowering] Fix soft scope semantics leaking through hard scope BEFORE CODE: record_lambda_var!(ctx, scope, b, capt=true) newleaf(ctx, ex, K"BindingId", b.id) elseif k === K"BindingId" ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
a::Int64 b::Int64 end function make_struct_no_ptrs(x, y) TestStructNoPtrs(x, y) end # CHECK: define {{.*}} @julia_make_struct_no_ptrs # CHECK: julia.gc_alloc_obj # CHECK-NOT: julia.gc_alloc_ptr_offsets # CHECK: ret emit(make_struct_no_ptrs, Int64, Int64) # COM: Test 3: Memory{Any} (constant length) shoul...
No issues found.
a::Int64 b::Int64 end function make_struct_no_ptrs(x, y) TestStructNoPtrs(x, y) end # CHECK: define {{.*}} @julia_make_struct_no_ptrs # CHECK: julia.gc_alloc_obj # CHECK-NOT: julia.gc_alloc_ptr_offsets # CHECK: ret emit(make_struct_no_ptrs, Int64, Int64) # COM: Test 3: Memory{Any} (constant length) shoul...
@@ -0,0 +1,106 @@ +# This file is a part of Julia. License is MIT: https://julialang.org/license + +# Tests for GC pointer zeroing operand bundles on allocation calls +# These bundles inform late-gc-lowering about which fields need to be zeroed + +# RUN: julia --startup-file=no %s %t && llvm-link -S %t/* -o %t/module.l...
test/llvmpasses/codegen-alloc-zeroing.jl
0
Julia
1
none
16
51
51
true
codegen: Move GC pointer zeroing to late-gc-lowering
60,924
JuliaLang/julia
35,573
Julia
gbaraldi
Review this pull request change. Language: Julia File: test/llvmpasses/codegen-alloc-zeroing.jl PR Title: codegen: Move GC pointer zeroing to late-gc-lowering BEFORE CODE: a::Int64 b::Int64 end function make_struct_no_ptrs(x, y) TestStructNoPtrs(x, y) end # CHECK: define {{.*}} @julia_make_struct_no_p...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
######################################## # Error: type in destructured arg, nested function f(_,(x,(y,(z::Int,)))...); end #--------------------- LoweringError: function f(_,(x,(y,(z::Int,)))...); end # └────┘ ── cannot have type in destructured argument ######################################## # Er...
No issues found.
######################################## # Error: type in destructured arg, nested function f(_,(x,(y,(z::Int,)))...); end #--------------------- LoweringError: function f(_,(x,(y,(z::Int,)))...); end # └────┘ ── cannot have type in destructured argument ######################################## # Er...
@@ -444,7 +444,7 @@ end 29 SourceLocation::1:10 30 (call core.svec %₂₇ %₂₈ %₂₉) 31 --- method core.nothing %₃₀ - slots: [slot₁/#self#(called) slot₂/x slot₃/y slot₄/z(!read)] + slots: [slot₁/#self#(!read) slot₂/x slot₃/y slot₄/z(!read)] 1 (call core.tuple slot₂/x slot₃/y) 2 (return %₁) 32 lat...
JuliaLowering/test/functions_ir.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Make locals introduced in `K"method_defs"` top-level
60,942
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/functions_ir.jl PR Title: [JuliaLowering] Make locals introduced in `K"method_defs"` top-level BEFORE CODE: ######################################## # Error: type in destructured arg, nested function f(_,(x,(y,(z::Int,)))...); end #---------...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
abstract type Shape end struct Square <: Shape side::Float64 end struct Circle <: Shape radius::Float64 end area(s::Square) = s.side^2 area(c::Circle) = pi*c.radius^2 sum_areas(v::Vector{Shape}) = sum(area, v) mutable struct Foo; x::Int; end const storage = Foo[] function add_one(x::Cint)::Cint push!(stor...
No issues found.
abstract type Shape end struct Square <: Shape side::Float64 end struct Circle <: Shape radius::Float64 end area(s::Square) = s.side^2 area(c::Circle) = pi*c.radius^2 sum_areas(v::Vector{Shape}) = sum(area, v) mutable struct Foo; x::Int; end const storage = Foo[] function add_one(x::Cint)::Cint push!(stor...
@@ -19,6 +19,13 @@ area(c::Circle) = pi*c.radius^2 sum_areas(v::Vector{Shape}) = sum(area, v) +mutable struct Foo; x::Int; end +const storage = Foo[] +function add_one(x::Cint)::Cint + push!(storage, Foo(x)) + return x + 1 +end + function @main(args::Vector{String})::Cint println(Core.stdout, str()) ...
test/trimming/trimmability.jl
0
Julia
1
none
16
51
51
true
codegen: Mark resolved `const` `GlobalRef` as method root
60,945
JuliaLang/julia
35,573
Julia
topolarity
Review this pull request change. Language: Julia File: test/trimming/trimmability.jl PR Title: codegen: Mark resolved `const` `GlobalRef` as method root BEFORE CODE: abstract type Shape end struct Square <: Shape side::Float64 end struct Circle <: Shape radius::Float64 end area(s::Square) = s.side^2 area(c:...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end # Hack around losing Type{T} information in the final args tuple. Julia actually # knows (in `code_typed`) the _value_ of these types, statically displaying them, # but inference is currently skipping inferring the type of the types as they are # transiently placed in a tuple as the argument list is lispily constru...
No issues found.
end # Hack around losing Type{T} information in the final args tuple. Julia actually # knows (in `code_typed`) the _value_ of these types, statically displaying them, # but inference is currently skipping inferring the type of the types as they are # transiently placed in a tuple as the argument list is lispily constru...
@@ -630,11 +630,15 @@ to_index(::Tuple{}) = CartesianIndex() to_index(Is::Tuple{Any}) = Is[1] to_index(Is::Tuple) = CartesianIndex(Is) -@inline Base.checkbounds(bc::Broadcasted, I::CartesianIndex) = +@inline function Base.checkbounds(bc::Broadcasted, I::CartesianIndex) Base.checkbounds_indices(Bool, axes(bc), ...
base/broadcast.jl
0
Julia
1
none
16
51
51
true
make `checkbounds(collection, indices...)` return `nothing` when returning
60,956
JuliaLang/julia
35,573
Julia
nsajko
Review this pull request change. Language: Julia File: base/broadcast.jl PR Title: make `checkbounds(collection, indices...)` return `nothing` when returning BEFORE CODE: end # Hack around losing Type{T} information in the final args tuple. Julia actually # knows (in `code_typed`) the _value_ of these types, static...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
end else summary = CPUinfo(cpu[i].model,0,0,0,0,0,0) count = j - i + 1 for x = i:j summary.speed += cpu[i].speed summary.cpu_times!user += cpu[x].cpu_times!user summary.cpu_times!nice += cpu[x].cpu_times!nice summary.cpu_times!sys += cp...
No issues found.
end else summary = CPUinfo(cpu[i].model,0,0,0,0,0,0) count = j - i + 1 for x = i:j summary.speed += cpu[i].speed summary.cpu_times!user += cpu[x].cpu_times!user summary.cpu_times!nice += cpu[x].cpu_times!nice summary.cpu_times!sys += cp...
@@ -1,6 +1,7 @@ # This file is a part of Julia. License is MIT: https://julialang.org/license -module Sys +# NB: This file is `Core.eval`-uated into the (pre-existing) module Sys + @doc """ Provide methods for retrieving information about hardware and the operating system. """ Sys @@ -13,7 +14,6 @@ export BINDIR,...
base/sysinfo.jl
0
Julia
1
none
16
51
51
true
Feature/change bootstrap to use libdl in pcre
60,967
JuliaLang/julia
35,573
Julia
johroj
Review this pull request change. Language: Julia File: base/sysinfo.jl PR Title: Feature/change bootstrap to use libdl in pcre BEFORE CODE: end else summary = CPUinfo(cpu[i].model,0,0,0,0,0,0) count = j - i + 1 for x = i:j summary.speed += cpu[i].speed sum...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; ...
No issues found.
0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; ...
@@ -2793,3 +2793,44 @@ end #issue 58115 @test Tuple{Tuple{Vararg{Tuple{Vararg{Tuple{Vararg{Tuple{Vararg{Tuple{Vararg{ Union{Tuple{}, Tuple{Tuple{}}}}}}}}}}}}} , Tuple{}} <: Tuple{Tuple{Vararg{Tuple{Vararg{Tuple{Vararg{Tuple{Vararg{Tuple{Vararg{Tuple{Vararg{Union{Tuple{}, Tuple{Tuple{}}}}}}}}}}}}}}...
test/subtype.jl
0
Julia
1
none
16
51
51
true
fix intersection returning Union{} for diagonal vars with different Type{X} arguments
60,989
JuliaLang/julia
35,573
Julia
adienes
Review this pull request change. Language: Julia File: test/subtype.jl PR Title: fix intersection returning Union{} for diagonal vars with different Type{X} arguments BEFORE CODE: 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 0.; 0 ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
3 TestMod.* 4 (call %₃ 2 slot₂/x) 5 (call core.getfield slot₁/#self# 1) 6 (call %₂ %₄ %₅) 7 (call %₁ %₆ slot₃/z) 8 (return %₇) 7 (new_opaque_closure %₄ %₅ core.Any true %₆ slot₁/y) 8 (return %₇) ######################################## # Opaque closure with `...` let Base.Ex...
No issues found.
3 TestMod.* 4 (call %₃ 2 slot₂/x) 5 (call core.getfield slot₁/#self# 1) 6 (call %₂ %₄ %₅) 7 (call %₁ %₆ slot₃/z) 8 (return %₇) 7 (new_opaque_closure %₄ %₅ core.Any true %₆ slot₁/y) 8 (return %₇) ######################################## # Opaque closure with `...` let Base.Ex...
@@ -656,39 +656,40 @@ end 9 slot₂/#f_kw_closure#0 10 (new %₈ %₉) 11 (= slot₃/f_kw_closure %₁₀) -12 (call core.svec :y) -13 (call core.svec false) +12 (call core.svec :#f_kw_closure#0 :y) +13 (call core.svec true false) 14 (call JuliaLowering.eval_closure_type TestMod :##f_kw_closure#0##0 %₁₂ %₁₃) 15 late...
JuliaLowering/test/closures_ir.jl
0
Julia
1
none
16
51
51
true
[JuliaLowering] Fix closure-conversion of keyword functions
61,001
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/test/closures_ir.jl PR Title: [JuliaLowering] Fix closure-conversion of keyword functions BEFORE CODE: 3 TestMod.* 4 (call %₃ 2 slot₂/x) 5 (call core.getfield slot₁/#self# 1) 6 (call %₂ %₄ %₅) 7 (call %₁ %₆ slot₃/z) ...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.
newleaf(ctx, ex, K"TOMBSTONE") elseif k == K"break" && numchildren(ex) >= 2 # For break with value (break label value), process the value expression but not the label # This must come BEFORE !needs_resolution check since K"break" is in is_quoted @ast ctx ex [K"break" ex[1] _resolve_s...
No issues found.
newleaf(ctx, ex, K"TOMBSTONE") elseif k == K"break" && numchildren(ex) >= 2 # For break with value (break label value), process the value expression but not the label # This must come BEFORE !needs_resolution check since K"break" is in is_quoted @ast ctx ex [K"break" ex[1] _resolve_s...
@@ -86,20 +86,6 @@ struct ScopeResolutionContext{Attrs} <: AbstractLoweringContext expr_compat_mode::Bool end -function ScopeResolutionContext(ctx, ex) - graph = ensure_attributes(ctx.graph, lambda_bindings=LambdaBindings) - ScopeResolutionContext( - graph, - ctx.bindings, - ctx.mod, ...
JuliaLowering/src/scope_analysis.jl
0
Julia
1
none
16
51
51
true
SyntaxTree: Add `jl_source` attribute for debugging JuliaLowering
61,006
JuliaLang/julia
35,573
Julia
mlechu
Review this pull request change. Language: Julia File: JuliaLowering/src/scope_analysis.jl PR Title: SyntaxTree: Add `jl_source` attribute for debugging JuliaLowering BEFORE CODE: newleaf(ctx, ex, K"TOMBSTONE") elseif k == K"break" && numchildren(ex) >= 2 # For break with value (break label valu...
No issues found.
You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate.