https://github.com/JuliaLang/julia

sort by:
Revision Author Date Message Commit Date
e8a2c11 trailing whitespace 15 September 2023, 18:55:11 UTC
a5a3f82 tweak lock for non files 15 September 2023, 18:55:11 UTC
bc1c7bb move writing to REPL history file to behind a PID lock 15 September 2023, 18:55:11 UTC
ee34a68 Make the persistent dict API less strict. (#51336) 15 September 2023, 18:40:01 UTC
3099af9 Fix typo in basedocs.jl (#51334) Thanks @DilumAluthge for finding this 15 September 2023, 18:06:47 UTC
e85f0a5 complete false & true more generally as vals (#51326) 15 September 2023, 18:02:41 UTC
42d98a2 doc: correct unicode-input table generation (#51328) A couple small fixes and cosmetic improvements to the Unicode table in the docs: * Most importantly, makes sure that the resulting object from the at-eval block is `Markdown.MD`, which which will be necessary for Documenter 1.0 (#47105). It also fixes the `Markdown.Table` structure -- each of the cells should be an array, not just a string, so it adds one more layer of nesting. * Cosmetically, center-aligns the characters, and wraps the latex commands in `<code>` 15 September 2023, 14:00:49 UTC
b5feb45 [docs] add performance tip concerning overly-fused broadcast loops (#49228) cautionary / explanatory documentation following the wake of https://discourse.julialang.org/t/unexpected-broadcasting-behavior-involving-eachrow/96781/88 15 September 2023, 12:42:10 UTC
d9a9be8 Tweaks to repl tab complete hints (#51321) 14 September 2023, 23:43:27 UTC
d51ad06 Avoid infinite loop when doing SIGTRAP in arm64-apple (#51284) The guard instruction for unreachables and other crashes in aarch64 is `brk`, in macos there isn't a distinction between a brk for a breakpoint and one for a crash, as an attempt we check the value of `pc` when the signal is triggered, if it is `brk #0x1` we say that it is a crash and go into the sigdie_handler. We should probably do the same in aarch64 linux, though I haven't dug too deep into what values it uses for traps, and if what compiler used matters, on apple I assumed we use clang/LLVM It might be possible to test this by calling some inline assembly. This means that something like https://github.com/JuliaLang/julia/issues/51267 actually crashes with ```c [16908] signal (5): Trace/BPT trap: 5 in expression starting at /Users/gabrielbaraldi/julia/test.jl:2 _collect at ./array.jl:768 collect at ./array.jl:757 top-level scope at /Users/gabrielbaraldi/julia/test.jl:5 _jl_invoke at /Users/gabrielbaraldi/julia/src/gf.c:2892 jl_toplevel_eval_flex at /Users/gabrielbaraldi/julia/src/toplevel.c:925 jl_toplevel_eval_flex at /Users/gabrielbaraldi/julia/src/toplevel.c:877 ijl_toplevel_eval at /Users/gabrielbaraldi/julia/src/toplevel.c:943 [inlined] ijl_toplevel_eval_in at /Users/gabrielbaraldi/julia/src/toplevel.c:985 eval at ./boot.jl:383 [inlined] include_string at ./loading.jl:2070 _jl_invoke at /Users/gabrielbaraldi/julia/src/gf.c:2873 ijl_apply_generic at /Users/gabrielbaraldi/julia/src/gf.c:3074 _include at ./loading.jl:2130 include at ./Base.jl:494 jfptr_include_46486 at /Users/gabrielbaraldi/julia/usr/lib/julia/sys.dylib (unknown line) _jl_invoke at /Users/gabrielbaraldi/julia/src/gf.c:2873 ijl_apply_generic at /Users/gabrielbaraldi/julia/src/gf.c:3074 exec_options at ./client.jl:317 _start at ./client.jl:552 jfptr__start_83179 at /Users/gabrielbaraldi/julia/usr/lib/julia/sys.dylib (unknown line) _jl_invoke at /Users/gabrielbaraldi/julia/src/gf.c:2873 ijl_apply_generic at /Users/gabrielbaraldi/julia/src/gf.c:3074 jl_apply at /Users/gabrielbaraldi/julia/src/./julia.h:1970 [inlined] true_main at /Users/gabrielbaraldi/julia/src/jlapi.c:582 jl_repl_entrypoint at /Users/gabrielbaraldi/julia/src/jlapi.c:731 Allocations: 570978 (Pool: 570031; Big: 947); GC: 1 fish: Job 1, './julia test.jl' terminated by signal SIGTRAP (Trace or breakpoint trap) ``` instead of hanging silently --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> 14 September 2023, 20:13:21 UTC
bdd3ffd Add public keyword (#50105) Co-authored-by: Claire Foster <aka.c42f@gmail.com> 14 September 2023, 19:53:16 UTC
bab20f4 reduce test time for rounding and floatfuncs (#51305) These test were taking on the order of 5 minutes and 10-100s of GB, but they really did not need to. 14 September 2023, 14:36:30 UTC
1142759 jltypes: ensure revising structs is safe (#51303) 14 September 2023, 14:36:19 UTC
5090bc0 fix force-throw ctrl-C on Windows (#51307) This was getting current-task on the wrong thread, which resulted in the value being NULL and crashing. Fixes #50325 14 September 2023, 14:35:50 UTC
3b1bbe3 remove wasted allocation space for JL_ARRAY_IMPL_NUL (#51275) Handle this more correctly in Cstring conversion instead. Although apparently this feature and test has not worked in Julia since String became a first class object (and not wrapping Array). Refs: cee4cb78da8f5cfa34808e3310e2366769bc3245 14 September 2023, 14:22:28 UTC
87e31a5 EA: some noncritical updates on EA (#51292) 14 September 2023, 00:24:55 UTC
34e6035 fix method definition error for bad vararg (#51300) We had the ordering of tests incorrect, so Vararg was not correctly checked for validity during method definition. Fixes #51228 13 September 2023, 21:36:52 UTC
e9d9314 make "dec" and ryu functions faster and simpler (#51273) We had some common code in `Ryu.append_c_digits` that can be combined with Base logic for the same thing. But it turns out all of this duplicated code in Ryu seems to just make it run slightly slower in most cases. The old version had many more branches to check, even though often numbers are small, so only the last check is meaningful. But the assumption that it would be faster even if all of them were used also seems to not hold up in practice. Particularly for a function like `append_nine_digits` which unrolls completely, but the complicated version has slightly more data dependencies because of they way it is written. Similarly, we replace `unsafe_copy` with `@inbounds[]`, since this is better for the optimizer, which doesn't need to treat this operation as an unknown reference escape. Lastly, we use the append_nine_digits trick from Ryu to make printing of arbitrary big numbers much faster. ``` julia> @btime string(typemax(Int128)) 402.345 ns (2 allocations: 120 bytes) # before 151.139 ns (2 allocations: 120 bytes) # after ``` 13 September 2023, 21:36:11 UTC
377f9df use LibGit2_jll for LibGit2 library (#51294) Fixes https://github.com/JuliaLang/julia/issues/51293 13 September 2023, 20:20:46 UTC
8660cdd 🤖 [master] Bump the Pkg stdlib from f570abd39 to 0b9334a94 (#51296) 13 September 2023, 19:55:02 UTC
8b3ffd8 cross-reference pathof and pkgdir in docstrings (#51298) I added cross-references in the docstrings of the related functions `pathof` and `pkgdir`. In my case, I remembered `pathof` but wanted to use `pkgdir`, which I couldn't find easily from the REPL help mode. 13 September 2023, 19:46:14 UTC
ce5fa71 Add repl tab complete hints while typing (#51229) 13 September 2023, 17:16:21 UTC
de75210 avoid hardcoded list of packages in sysimage (cherry picked from commit 1da1725d25ee46ce8b7d0b9f1b5b6d2805a86dbe) 13 September 2023, 12:54:07 UTC
572fa50 remove compiler/ssair/driver.jl (#51289) I don't think that the extra layer of indirection is needed. 13 September 2023, 10:35:20 UTC
aa6b34e refactor post-opt analysis and get rid of closures (#51290) 13 September 2023, 10:34:48 UTC
0fdcd55 irinterp: fix `is_terminator_or_phi` check (#51291) Also adds some cosmetic changes. @nanosoldier `runbenchmarks("inference", vs=":master")` 13 September 2023, 10:33:50 UTC
62b4bf3 use LibGit2_jll for LibGit2 library 13 September 2023, 10:31:00 UTC
141e07e elaborate `incremental` argument of `Base.generating_output` (#51281) Follows up #51216. 13 September 2023, 03:28:12 UTC
4af6be8 shorten stale_age for cachefile lock (#51175) 12 September 2023, 22:19:26 UTC
431e0bd don't print corrupted chunk id on crash (#51283) This value will be corrupted if we reach this branch, so it seems pointless to print it. 12 September 2023, 18:57:23 UTC
832e46d Ryu: make sure adding zeros does not overwrite trailing dot (#51254) Fix #43129 12 September 2023, 16:23:19 UTC
5d82d80 add tfuncs for `[and|or]_int` intrinsics (#51266) So that they can be constant folded when either of argument is known to be `Core([false|true])`. It may help inference accuracy. 12 September 2023, 02:14:30 UTC
ad27e67 Fix Markdown test from #49454 (#51268) Actually testing the output instead of printing to stdout. 11 September 2023, 21:15:25 UTC
b9203ce Fix Profiler signal listener test (#51272) The `close(t)` seems to be a typo. 11 September 2023, 19:31:18 UTC
1097481 GMP: Gracefully handle more overflows. (#51243) Fixes https://github.com/JuliaLang/julia/issues/8286, which regressed due to a GMP upgrade in https://github.com/JuliaLang/julia/pull/45375. 11 September 2023, 14:39:29 UTC
ea49abe SROA: remove dead lifting cache mechanism (#51014) It hadn't been fixed for years. Let's get rid of the unnecessary allocation cost. 11 September 2023, 09:56:41 UTC
7b9fdf8 Make _global_logstate a typed global (#51257) 10 September 2023, 01:51:57 UTC
bbbcc4f Add lock around uv_unref during init (#51236) This is not a legal operation outside the lock because it's not atomic Co-authored-by: Valentin Churavy <v.churavy@gmail.com> 09 September 2023, 20:43:01 UTC
8d4d641 Update man page with internet resources and licensing (#51155) Pull request proposes a minor modification to the man page. In this PR, two additional sections for the man page are added: - Internet resources and - licensing. 09 September 2023, 13:49:52 UTC
3950167 Check if malloc has succeeded before updating GC counters (#51247) 09 September 2023, 10:21:54 UTC
4c3aaa2 reflection: define `Base.generating_output` utility function (#51216) And replaces `ccall(:jl_generating_out, ...)` with the new function. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> 09 September 2023, 07:53:44 UTC
4363895 Unify flags_for_effects handling (#51238) There was two places where we were turning Effects into flags, one in the optimizer, one in inference. Unify these two both use the same function, but we need to refactor a bit to make sure all the effects get passed to the correct place. --------- Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com> 09 September 2023, 06:28:00 UTC
4c024e6 optimizer: code quality and performance improvements to post-opt analysis (#51211) This PR is composed of a set of fixes and improvements to `ipo_dataflow_analysis!`. I will rebase this once we merge #51185 and #51188, so still WIP, but let's see benchmark. @nanosoldier `runbenchmarks("inference", vs=":master")` --------- Co-authored-by: Keno Fischer <keno@juliahub.com> 09 September 2023, 01:47:02 UTC
80603a4 mark return type of failed concrete eval of intrinsics as `Bottom` (#51251) Because of the consistency assumed by `is_pure_intrinsic_infer`, we can aggressively mark the return type as `Bottom` in a case when the concrete evaluation of an intrinsic fails. 09 September 2023, 01:44:56 UTC
3fc4f6b 🤖 [master] Bump the Downloads stdlib from f97c72f to 8a614d5 (#51246) Stdlib: Downloads URL: https://github.com/JuliaLang/Downloads.jl.git Stdlib branch: master Julia branch: master Old commit: f97c72f New commit: 8a614d5 Julia version: 1.11.0-DEV Downloads version: 1.6.0(It's okay that it doesn't match) Bump invoked by: @DilumAluthge Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaLang/Downloads.jl/compare/f97c72fbd726e208a04c53791b35cc34c747569f...8a614d592810b15d17885838dec61da244a12e09 ``` $ git log --oneline f97c72f..8a614d5 8a614d5 Skip flakey "concurrent requests" tests on windows (#228) 246504e add a small precompile workload (#226) 3ed0f08 Document how to bypass the 20-second timeout (#222) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 09 September 2023, 00:54:17 UTC
8e77b63 refine effects of some reflection queries (#51235) 08 September 2023, 14:59:21 UTC
a7697fd 🤖 [master] Bump the NetworkOptions stdlib from 976e51a to aab83e5 (#51237) Stdlib: NetworkOptions URL: https://github.com/JuliaLang/NetworkOptions.jl.git Stdlib branch: master Julia branch: master Old commit: 976e51a New commit: aab83e5 Julia version: 1.11.0-DEV NetworkOptions version: 1.2.0(Does not match) Bump invoked by: @DilumAluthge Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaLang/NetworkOptions.jl/compare/976e51a48abb4e09356f1979c3cde8fbc0852e2e...aab83e5dd900c874826d430e25158dff43559d78 ``` $ git log --oneline 976e51a..aab83e5 aab83e5 Reset BUNDLED_KNOWN_HOSTS_FILE in case we serialized a value due to precompilation (#31) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 08 September 2023, 13:29:55 UTC
5e85876 Warn about mutating keys in Dict docstring. (#51171) Be clear in the `Dict` docstring that it's not in general safe to mutate keys. Cf. https://discourse.julialang.org/t/unable-to-access-value-in-dict-via-known-keys/103434. 08 September 2023, 10:18:45 UTC
de297fa remove special case for the no-op first statement in `fully_eliminated` (#51227) It looks like the special case is no longer needed. If this gets broken by future changes, I would like fix it or mark the test cases as `broken`. 08 September 2023, 06:11:21 UTC
39a5316 optimize: fix `effect_free` refinement in post-opt dataflow analysis (#51185) Currently we never refine this information though. @nanosoldier `runbenchmarks("inference", vs=":master")` 08 September 2023, 01:01:15 UTC
b3741c0 Check again if the tty is open inside the IO lock (#51222) This can cause segfaults when exiting julia. Co-authored-by: Valentin Churavy <vchuravy@users.noreply.github.com> 07 September 2023, 21:55:47 UTC
e446bba Remove references to the LegacyPassManager (#51197) We still keep references in a couple places because the objectfile emission still uses it. 07 September 2023, 21:47:50 UTC
af6e08d Include JuliaSyntax.jl from the build directory. (#51231) This ensures the source isn't modified during an out-of-tree build. Fixes https://github.com/JuliaLang/julia/issues/51230 --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> 07 September 2023, 20:02:05 UTC
eab8d6b Fix getfield codegen for tuple inputs and unknown symbol fields. (#51234) 07 September 2023, 19:36:30 UTC
8599e2f add PersistentDict based on a HAMT (#51164) The implementation is based on a [Hash Array Mapped Trie (HAMT)](https://en.wikipedia.org/wiki/Hash_array_mapped_trie) following [Bagwell (2000)](http://infoscience.epfl.ch/record/64398/files/idealhashtrees.pdf). A HAMT uses a fixed branching factor (commonly 32) together with each node being sparse. In order to search for an entry we take the hash of the key and chunk it up into blocks, with a branching factor of 32 each block is 5 bits. We use those 5 bits to calculate the index inside the node and use a bitmap within the node to keep track if an element is already set. This makes search a `log(32, n)` operation. Persistency is implemented by path-copying. When we insert/delete a value into the HAMT we copy each node along the path into a new HAMT, all other nodes are shared with the previous HAMT. A noteable implementation choice is that I didn't add a (resizeable) root table. Normally this root table is dense and uses the first `t` bits to calculate an index within. This makes large HAMT a bit cheaper since the root-table effectivly folds multiple lookup steps into one. It does hurt persistent use-cases since path-copying means that we also copy the root node/table. Importantly the HAMT itself is not immutable/persistent, the use of it as part of the `PersistentDict` is. Direct mutation of the underlying data breaks the persistentcy invariants. One could use the HAMT to implement a non-persistent dictionary (or other datastructures). As an interesting side-note we could use a related data-structure [Ctrie](http://lamp.epfl.ch/~prokopec/ctries-snapshot.pdf) to implement a concurrent lock-free dictionary. Ctrie also support `O(1)` snapshotting so we could replace the HAMT used here with a Ctrie. 07 September 2023, 17:55:25 UTC
27fa5de Introduce cholesky and qr hooks for wrapped sparse matrices (#51220) This is a follow-up to #51161. It introduces one level in the promotion pipeline which allows to call out-of-place versions of `cholesky` and `qr` for arguments whose `similar` copy yields a `SparseMatrixCSC`. 07 September 2023, 14:23:49 UTC
1305f40 call some Pkg functions with invokelatest for BugReporting (#51219) When Pkg is not in the sysimage, this causes world age errors. 07 September 2023, 09:13:32 UTC
aeae142 slot2ssa: Fix spurious φᶜ edges (#51199) The unreachable here seems to be caused by the fact that (as of #50943) we re-use a more narrow type from Inference that correctly ignores these edges, but when inserting the `φᶜ` node in `slot2reg` we were including extra edges that never get exercised at runtime. I'm not sure _why_ this causes us to hit an unreachable, since the narrow type from inference is technically still valid (the catch block will never observe these spurious assignments at runtime), but this seems to fix the issue and anyway improves the quality of the IRCode generated by `slot2ssa`. Resolves #51159 06 September 2023, 19:02:19 UTC
a5b2197 optimizer: skip post-opt IPO analysis when effects are precise already (#51188) 06 September 2023, 12:56:36 UTC
c1153d0 Tweak tests 06 September 2023, 11:32:04 UTC
f3d50b7 Fix extended help hint to give full line to enter (#51193) Before this commit, the REPL would say: Extended help is available with `??` Now it will give the full line required to display extended help: Extended help is available with `??LazyString` I believe that this was the intended function of the code that's already here, because currently the `extended_help_on` constant is never used. I've resisted the urge to pass the `line` through to `trimdocs` without a global because I don't know why @timholy did it that way to start with and because the smaller change makes this PR easier to review. 06 September 2023, 10:36:31 UTC
3d88550 Wait for other threads to finish compiling before exiting (#51213) This avoids a crashes where we run the destructors because C++ is fun and runs destructors before thread exit. 06 September 2023, 10:35:01 UTC
f9d1767 [FileWatching] clarify mkpidlock docstring (#51214) 06 September 2023, 08:39:44 UTC
f066500 Fix typos in JuliaSyntax.mk (#51210) before ``` x@x julia % make -C deps fastcheck-JuliaSyntax make: *** No rule to make target `fastcheck-JuliaSyntax'. Stop. x@x julia % make -C deps fastcheck-JuliSyntax make: *** No rule to make target `compile-JuliSyntax', needed by `check-JuliSyntax'. Stop. ``` after ``` x@x julia % make -C deps fastcheck-JuliaSyntax make: Nothing to be done for `fastcheck-JuliaSyntax'. ``` Co-authored-by: Lilith Hafner <Lilith.Hafner@gmail.com> 06 September 2023, 06:03:51 UTC
14c5f3d Remove unused io argument to `insert_hlines` (#51182) 06 September 2023, 05:52:36 UTC
c84324f Bugfix: Convert numbers to Int in extendedterminfo (#51195) Before, in the extendedterminfo function in terminfo.jl, if the numbers array was nonempty, the function would fail as a `UInt32` cannot be implicitly converted to the output `Int` type. Do this conversion explicitly. Closes #51190 05 September 2023, 19:16:26 UTC
ba16663 Revert "Standardize the entry-point for Julia execution (#50974)" (#51196) This reverts commit 8e14322b5aa344639dd86bf9eabb84afe831fcba. As proposed by @Seelengrab in https://github.com/JuliaLang/julia/pull/50974#issuecomment-1706641240. This is not meant to be a permanent revert of #50974, but a possibility to have working PkgEval and nightly testing for packages (https://github.com/julia-actions/julia-buildpkg `@latest` doesn't work with it) until a solution to the discussion there has been decided on. 05 September 2023, 18:45:15 UTC
78e0ca3 optimizer: fix the `all_rettypes_consistent` case of post-opt analysis (#51187) The case does not seem to be functional, although it looks like we never hit it currently. We should have added test cases for this, so WIP until we come up with some. 05 September 2023, 16:10:12 UTC
431bb81 Remove unused variable from `compute_trycatch` This variable is currently always zero. 05 September 2023, 15:47:34 UTC
354c367 Allow SparseArrays to catch `lu(::WrappedSparseMatrix)` (#51161) Over the `AbstractMatrix` relaxation in v1.9, we missed a potential indirection for wrapped sparse matrices. Instead, by default, a `similar` copy is created (hence a sparse matrix) and then `lu!` with a pivot argument is called. Such a method, however, does not exist in SparseArrays.jl, which means that the `generic_lufact!` method gets called, which is probably really bad performance-wise, due to heavy reading and writing into the sparse matrix. This PR introduces one more level at which SparseArrays.jl (and perhaps other external packages) may interfere and redirect to their own implementations, in-place or out-of-place. 05 September 2023, 15:39:45 UTC
ee50411 slot2ssa: Fix spurious φᶜ edges The unreachable here seems to be caused by the fact that (as of #50299) we re-use a more narrow type from Inference that correctly ignores these edges, but when inserting the `φᶜ` node in `slot2reg` we were including extra edges that never get exercised at runtime. I'm not sure _why_ this causes us to hit an unreachable, since the narrow type from inference is technically still valid (the catch block will never observe these spurious assignments at runtime), but this seems to fix the issue and anyway improves the quality of the IRCode generated by `slot2ssa`. Resolves #51159 05 September 2023, 15:36:52 UTC
933ea1d build: don't default to m(arch|cpu|tune)=native when cross-compiling (#51172) 05 September 2023, 14:42:39 UTC
00ca93c Put back `@inline` on unsafe_getindex (#51160) Fixup for #50467 05 September 2023, 14:05:05 UTC
fbf73f4 🤖 [master] Bump the Pkg stdlib from 047734e4c to f570abd39 (#51186) Stdlib: Pkg URL: https://github.com/JuliaLang/Pkg.jl.git Stdlib branch: master Julia branch: master Old commit: 047734e4c New commit: f570abd39 Julia version: 1.11.0-DEV Pkg version: 1.11.0 Bump invoked by: @KristofferC Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaLang/Pkg.jl/compare/047734e4c7e2b5e99622b4803ec4ad0d49f1d1d3...f570abd39d0a6ab483e658cf65c69af59a152314 ``` $ git log --oneline 047734e4c..f570abd39 f570abd39 tweak how Pkg is loaded for precompiling when testing (#3606) d3bd38b90 sort compat entries in `pkg> compat` (#3605) 5e07cfed0 Ensure that `string(::VersionSpec)` is compatible with `semver_spec()` (#3580) 6bed7c41a Clarify handling of LOAD_PATH in docstring and REPL help (#3589) 5261b3be7 tweak test dep docs (#3574) 72b430d50 status: expand 2 symbol upgrade note to highlight *may* be upgradable (#3576) b32db473d precompile: show ext parent in output report (#3603) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 05 September 2023, 11:21:54 UTC
fc2f997 compiler: add `show` methods for `InferenceState` and `CachedMethodTable` (#51170) Both `InferenceState` and `CachedMethodTable` contain caches to store inference results, making their default `show` methods excessively verbose. This commit introduces specialized `show` methods designed to display only the most essential information. 05 September 2023, 08:57:09 UTC
1829cee optimizer: Do not run if we know the function is ConstABI eligible (#51143) If we can determine that a function is sufficiently pure and returns a constant, we have special ABI that lets us throw away the code for it and just return the constant. However, we were still going through all the steps of actually computing the code, including running the optimizer on it, compressing it in preparation for caching, etc. We can just stop doing that and bypass the optimizer entirely. The actual change to do this is pretty tiny, but there's some unexpected fallout which this needs to cleanup: 1. Various tests expect code_* queries of things inferred to ConstABI to still return reasonable code. Fix this by manually emitting a ReturnNode at the end of inference if the caller is a reflection function. 2. This kinda wreaks havoc on the EscapeAnalysis tests, which work by using a side-effect of the optimizer, but a lot of the functions are ConstABI eligible, so the optimizer doesn't run any more. Fortunately, I'm in the middle of looking at overhauling EscapeAnalysis, so I'll have some chance to figure out how to change the test system to actually do this properly, rather than exfiltrating side effects. That said, since EscapeAnalysis is not in the default pipeline, I don't think we should hold the perf improvement until that is done. Benchmarked to be about 10% faster locally, but we'll see what nanosoldier thinks. --------- Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com> 05 September 2023, 05:43:00 UTC
8e14322 Standardize the entry-point for Julia execution (#50974) This is a bit of a straw-man proposal (though I think mergable if people agree) to standardize the execution entrypoint for Julia scripts. I think there's at least four different ways that people might run a script: - As `julia main.jl` - As a PkgCompiler sysimage, then calling the main entry point - As a PkgCompiler "app", with the magic `julia_main` function - As a StaticCompiler product with an explicit entrypoint specified on the API. The main problem I have with all of these variants is that they're all different and it's kind of a pain to move between them. Here I propose that we standardize on `Main.main(ARGS)` as the entrypoint for all scripts. Downstream from that proposal, this PR then makes the following changes: 1. If a system image has an existing `Main.main`, that is the entry point for `julia -Jsysimage.so`. 2. If not, and the sysimage has a REPL, we call REPL.main (we could handle this by defaulting `Main.main` to a weak import of `REPL.main`, but for the purpose of this PR, it's an explicit fallback. That said, I do want to emhpasize the direction of moving the REPL to be "just another app". 3. If the REPL code is called and passed a script file, the REPL executes any newly defined Main.main after loading the script file. As a result, `julia` behaves the same as if we had generated a new system image after loading `main.jl` and then running julia with that system image. The further downstream implication of this is that I'd like to get rid of the distinction between PkgCompiler apps and system images. An app is simply a system image with a `Main.main` function defined (note that currently PkgCompiler uses `julia_main` instead). --------- Co-authored-by: Martijn Visser <mgvisser@gmail.com> 03 September 2023, 15:55:38 UTC
0cc0dbd Metric for number of live bytes in the pool allocator (#51151) We want to study what is the degree of fragmentation we have in the pool allocator specifically. `pool_live_bytes` / `(live pages * GC_PAGE_SZ)` should provide an estimate of that. 03 September 2023, 12:26:07 UTC
70000ac sysimg: Allow loading a system image that is already present in memory (#51121) I've written this code probably three times at this point, but for some reason it never made it into a PR. This allows loading a system image that has already been loaded into memory. This happen when wanting to distribute a static or mostly-static binary of julia code where the system image (and optionally other libraries like libjulia, etc.) are linked directly into the main executable. It is also useful for deployment to environments that do not have (or have incomplete) support for dynamic linking (e.g. wasm or embedded). 03 September 2023, 02:15:42 UTC
da86735 fix debug typo in "add missing invoke edge for nospecialize targets (#51036)" (#51153) Causes `matches` to get replaced with `MethodMatch` instead, which then later will fail to match with the expected value. Fixes #51146 Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 03 September 2023, 02:12:28 UTC
d949bb4 broadcast: use recursion rather than ntuple to map over a tuple (#51154) Inference seems to have trouble with the anonymous function version, so go back to the recursive version. Fixes #51129 Probably also fixes #50859 03 September 2023, 02:11:55 UTC
6c1168a Document and clean up CodegenParams (#51140) - Add documentation to CodegenParams fields per request in #51123 - Fix compare_cgparams which hadn't been updated for recent additions - Remove unused and untested generic_context The latter was a codegen option that I added, but eventually ended up not using anywhere, so remove it for the time being. That said, I may end up in a situation where I need it again in the very near future, so I may end up eating my words here, but if I need to put it back, I'll include a test at least ;). 02 September 2023, 10:10:28 UTC
ec2f1d3 fix rawbigints (#51122) Using `Ptr` like that was incorrect. Among other issues, a `Ptr` doesn't own the data it points to, so hold a `String` instead. Fixes #51111 01 September 2023, 19:52:47 UTC
4954af9 Make OffsetArray maximum! not as type unstable (#50447) The change in #50429 moves around some dispatch boundaries and pushes the allocations in the offsetarrays `maximum!` test over the limit. The implementation of that code is massively type unstable. Somewhat, ironically, the whole original point of that test was to test that the implementation was not type-unstable (#28941), so actually opt our OffsetArrays implementation into the interface that's supposed to guarantee that. If this PR is fine here, I'll submit the same upstream to avoid diverging the implementations too much. Co-authored-by: Jameson Nash <vtjnash@gmail.com> 01 September 2023, 19:52:14 UTC
a173010 🤖 [master] Bump the SparseArrays stdlib from 54f4b39 to 4e6776a (#51142) Stdlib: SparseArrays URL: https://github.com/JuliaSparse/SparseArrays.jl.git Stdlib branch: main Julia branch: master Old commit: 54f4b39 New commit: 4e6776a Julia version: 1.11.0-DEV SparseArrays version: 1.11.0 Bump invoked by: @KristofferC Powered by: [BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl) Diff: https://github.com/JuliaSparse/SparseArrays.jl/compare/54f4b39d1cd34a908ff4fdfcd052a38fe23f6555...4e6776a825f2a26c3c580f9b77ba230a6598d7dd ``` $ git log --oneline 54f4b39..4e6776a 4e6776a faster cat performance (#432) ``` Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 01 September 2023, 18:50:41 UTC
3527213 simplify call to promote_eltype with repeated elements (#51135) Helps to short-circuit calls to large splat calls, since those have all the same type elements. Fixes #51011 01 September 2023, 18:50:26 UTC
91b8c9b Add `JL_DLLIMPORT` to `small_typeof` declaration (#50892) Resolves #50714 01 September 2023, 18:46:25 UTC
631b5c3 inference: fix bad effects for recursion (#51092) Effects are not converged, so they need to always be correct, and not a bestguess, even during recursion. This could be refined, but we don't really need to, and it might be unnecessarily costly to do so. 01 September 2023, 14:14:08 UTC
befe6f8 reflection: make error message clearer when using methods wrong (#51134) Not really a functional change, but just improving the error message here to be consistent with other code reflection calls here. Closes #49982 01 September 2023, 14:13:39 UTC
0f4a54c Add a codegen option to disable use of jlplts (#51123) Alternative to https://github.com/JuliaLang/julia/pull/51108 with the same objectives. 01 September 2023, 04:29:10 UTC
7481fbe Add options to jl_dump_native (#51124) I am attempting to more or less unify the codepaths between sysimage-like binary emissions and StaticCompiler-like binary emissions (the latter currently uses a GPUCompiler-derived pipeline), with a view towards enabling things that are somewhat in the middle (may have parts, but not all of the runtime, etc.). To that end, add a parameters struct to jl_dump_native that will likely grow over time, but for now, the primary thing it controls is whether or not to emit the sysimage "metadata" section. 01 September 2023, 04:28:38 UTC
77439e5 make `code_llvm` work with OC with tuple input types (#51128) 31 August 2023, 23:37:19 UTC
69392ee make `code_llvm` work with custom lookup function (#51127) 31 August 2023, 23:35:43 UTC
36fc9ec Add devdocs for how to set up & run the LLVM tests locally (#51094) I had forgotten the command to install the llvm dev tools so that I could run the tests, and so I documented it this time, once I figured it out. 31 August 2023, 23:07:41 UTC
e0f5247 Refactor rounding (including bugfixes) and document API (#50812) 31 August 2023, 21:40:36 UTC
a3e2316 inference: type bound error due to free typevar in sparam env (#51013) Fix #50709 This issue *appears* fixed on master due to #50432, which simply removed the error. This fixes the underlying cause, which is that we sometimes return typevars in the environment from intersection that have free vars in their bounds. I think it's reasonable to just widen these aggressively, since we usually cannot do much with these kinds of unknown static parameters anyway. 31 August 2023, 18:57:50 UTC
15f7db8 inference: fix bad effects for recursion Effects are not converged, so they need to always be correct, and not a bestguess, even during recursion. 31 August 2023, 15:46:01 UTC
00c6ea7 inference: teach tfunc that typeof tuples must have fixed lengths 31 August 2023, 15:44:59 UTC
8307dbf improve effects of typejoin and simplify implementation of Tuple _compute_eltype - Repair definition of Core._foldable_meta - Handle Vararg better in eltype - Mark has_free_typevars ccall as total - Mark tailjoin foldable explicitly also, since it calls typejoin recursively - Handle non-constructable Tuple{:a,2} and Tuple{T} types - Prepare special code for inlining (improves generic effects too) - Only optimize typejoin in concrete eval, not needlessly generating specializations otherwise on specific types The compiler seems better able to deal with this version of _compute_eltype, and it does not seem that necessary to form the IdSet. 31 August 2023, 15:44:59 UTC
479743e Consistently report sysimg size limits (#51119) We used to be reporting the maximum system image size in hexadecimal, while reporting the image that was just built in decimal. This is a recipe for confusion when the size limit contains no blatantly hexadecimal characters. This PR addresses the issue by consistently printing out both values in hexadecimal (making this more obvious by prefixing the numbers with `0x`). In order to use `PRIxPTR` in both format strings, I have cast the current image size to `uintptr_t` from `intmax_t`, which should be safe in all situations. Co-authored-by: Dilum Aluthge <dilum@aluthge.com> 31 August 2023, 15:32:56 UTC
back to top