Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update upstream 43bf2c8 #21

Merged
merged 320 commits into from
Sep 1, 2023
Merged

Conversation

qinsoon
Copy link
Member

@qinsoon qinsoon commented Jul 3, 2023

No description provided.

maleadt and others added 30 commits May 26, 2023 14:25
This code does a bad job handling `(escape symbol)` in a lot of places.
This attempts to fix some of them by peeking through it more.
These are used in many places (and are actually LLVM compiler
intrinsics), so it probably makes more sense to define them one and
export them to users.

The Libc module contains some code that we might not care to have as
part of bootstrapping. However, the C-memory methods are directly called
throughout bootstrapping so these are now defined in a seperate
"cmem.jl" file that is defined in Base then imported into `Libc` for the
public interface.

Co-authored-by: Jameson Nash <[email protected]>
…uliaLang#49939)

* Improve errors for typed_hcat by adding a special error for indexing that gets resolved as a typed comprehension.

* Add a test for issue JuliaLang#49676
This commit separates the `MethodInstance` handling of
`Base.StackTraces.show_spec_linfo` into `Base.StackTraces.show_spec_sig`,
which can be generally useful for external code inspection tools or
debuggers (like JET.jl).
Ensure the lock is precise, so that we are allowed to register new
atexit hooks from inside an atexit hook. But then disable `atexit()`
when shutting down after it finishes running.

Add tests that cover all the cases:
1. registering a hook from inside a hook
2. registering a hook from another thread while hooks are running
3. attempting to register a hook after all hooks have finished
   (disallowed)

Fixes JuliaLang#49841
Co-authored-by: Jameson Nash <[email protected]>
* jltypes: add missing GC root for cmpswap_type Tuple.
  This is called with a fieldtype, which might not even be a DataType.

* support Ptr{Union{}} and Ptr{Cvoid} better
Previously, the parentheses were missing.
* widen sort's type signature

* throw on AbstractString

* Throw on infinite iterator

* make sort(::NTuple) return a tuple (use vector internally for sorting for large tuples)
It's supported to build the analysis plugin with GCC, but the flags we
actually run it with need to match Clang.
…#50005)

* 🤖 [master] Bump the Pkg stdlib from daf02a458 to 9c01707a2

* remove Pkg.LazilyInitializedFields from docs

---------

Co-authored-by: Dilum Aluthge <[email protected]>
Co-authored-by: Ian <[email protected]>
Not just a regression, since this test also fails on old versions, but
 JuliaLang#49897 applied the wrong environment to make this hygiene correct which
broke it worse.

Fix JuliaLang#49984
… data

Also, move it after `DISABLE_SUBSYSTEM` to avoid it clobbering the
results.
This one tend to be very fast, produce many entries and it tends to be not very interesting in most cases
…uliaLang#49392)

* fix and test sorting arrays with >1 dimension and custom `similar`

* add PR number

---------

Co-authored-by: Lilith Hafner <[email protected]>
…cro format (JuliaLang#49959)

In Julia, keyword arguments are represented as `Base.Pairs` objects.
However, the object type often appears unnecessarily complex,
especially when printed in a stack trace.

This commit aims to simplify the printing of stack traces that involve
keyword method calls, while still allowing us to reconstruct the actual
method signature types from the printed signature types.

The approach is similar to JuliaLang#49117: this commit introduces a new macro
called `Base.@Kwargs`. It follows the same syntax as `@NamedTuple` and
returns a `Base.Pairs` type that is used for keyword method calls.
We use this syntax when printing keyword argument types.

Here's an example of a stack trace:
```diff
diff --git a/b.jl b/a.jl
index 91dd6f0464..b804ae4be5 100644
--- a/b.jl
+++ b/a.jl
@@ -22,12 +22,11 @@ Stacktrace:
     @ Base ./reduce.jl:44 [inlined]
   [6] mapfoldl(f::typeof(identity), op::typeof(Base.add_sum), itr::String; init::Int64)
     @ Base ./reduce.jl:175 [inlined]
-  [7] mapreduce(f::typeof(identity), op::typeof(Base.add_sum), itr::String; kw::Base.Pairs{…})
+  [7] mapreduce(f::typeof(identity), op::typeof(Base.add_sum), itr::String; kw::@kwargs{init::Int64})
     @ Base ./reduce.jl:307 [inlined]
-  [8] sum(f::typeof(identity), a::String; kw::Base.Pairs{Symbol, Int64, Tuple{Symbol}, @NamedTuple{init::Int64}})
+  [8] sum(f::typeof(identity), a::String; kw::@kwargs{init::Int64})
     @ Base ./reduce.jl:535 [inlined]
-  [9] sum(a::String; kw::Base.Pairs{Symbol, Int64, Tuple{Symbol}, @NamedTuple{init::Int64}})
+  [9] sum(a::String; kw::@kwargs{init::Int64})
     @ Base ./reduce.jl:564 [inlined]
  [10] top-level scope
```

---

* RFC: errorshow: simplify printing of keyword argument types using a new macro format

* export and document `Base.@Kwargs` and further simplify the stack trace view

* use the `@Kwargs` syntax only when printing kwmethod signature within stack trace view

And add tests.

* add news entry

* more type stability

* Apply suggestions from code review

* enable the type-repr simplification unconditionally in the stack trace

Since keyword pairs can appear within positional arguments, it can be
confusing if we print the same type with different representations.

* omit type annotation for splat keyword argument

* add test for `@Kwargs`

* clean up test/errorshow.jl
Keno and others added 10 commits June 30, 2023 17:37
sroa tries to delete any `setfield!` call for allocations that it
knows it can remove. However, if it does not know that the type is
correct for the allocation, it may not be able to remove the
setfield!. If the type later gets improved (e.g. by irinterp),
the statement becomes eligible for removal, but it currently requires
another sroa pass to actually remove it.

Improve that situation my marking such a statement that is known-dead
as IR_FLAG_EFFECT_FREE, so if we later also prove it nothrow, it
(and the corresponding allocation) immediately become DCE-eligible.
…ang#41200)

* Added judicious inbounds/inline decorations

* add inline to other one

* bump

* grammar

Co-authored-by: Jeff Bezanson <[email protected]>

* Remove `@inline`

* bump CI

* bump CI 2

* Merge fix

* Ensure `hvncat_fill!` can't execute when N < 2

* Bounds check in three-arg `hvncat_fill!`

* Narrow inbounds

* Moved bounds check up

---------

Co-authored-by: Jeff Bezanson <[email protected]>
…liaLang#50374)

* ensure GC_FINAL_STATS is consistent with new page metadata layout
@udesou
Copy link

udesou commented Aug 31, 2023

This LGTM. I might try it out since it has quite a few updates on the Julia side, and might fix the LLVM bug I'm trying to track. One question though since is not being currently tested in our CI, have you tried building/testing stock Julia?

@udesou
Copy link

udesou commented Aug 31, 2023

I tried running stock Julia with FORCE_ASSERTIONS=1 and LLVM_ASSERTIONS=1, and I get a different assertion fail (from the LLVM one I was getting before). It seems to come from the GC, so I'm not sure yet if it's in the original Julia repo, or only in mmtk/julia (cc @d-netto and @kpamnany). I ran the tests with make testall:

misc                                             (12) |        started at 2023-08-31T10:12:27.432
      From worker 12:	julia: /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gc.c:1027: gc_sweep_page: Assertion `!prev_sweep_full || pg->prev_nold >= pg->nold' failed.
      From worker 12:	
      From worker 12:	[3831715] signal (6.-6): Aborted
      From worker 12:	in expression starting at /home/eduardo/moving-immix/mmtk-julia/vm/julia/test/misc.jl:766
      From worker 12:	pthread_kill at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
      From worker 12:	raise at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
      From worker 12:	abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
      From worker 12:	unknown function (ip: 0x7fc12de6071a)
      From worker 12:	__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
      From worker 12:	gc_sweep_page at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gc.c:1027 [inlined]
      From worker 12:	gc_sweep_pool_page at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gc.c:1123 [inlined]
      From worker 12:	gc_sweep_pool at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gc.c:1210
      From worker 12:	_jl_gc_collect at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gc.c:2916
      From worker 12:	ijl_gc_collect at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gc.c:3091
      From worker 12:	gc at ./gcutils.jl:129 [inlined]
      From worker 12:	gc at ./gcutils.jl:129
      From worker 12:	unknown function (ip: 0x7fc0bc6d3c22)
      From worker 12:	_jl_invoke at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:2871 [inlined]
      From worker 12:	ijl_apply_generic at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:3072
      From worker 12:	jl_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/julia.h:1993 [inlined]
      From worker 12:	do_call at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/interpreter.c:125
      From worker 12:	eval_value at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/interpreter.c:222
      From worker 12:	eval_stmt_value at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/interpreter.c:173 [inlined]
      From worker 12:	eval_body at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/interpreter.c:620
      From worker 12:	jl_interpret_toplevel_thunk at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/interpreter.c:774
      From worker 12:	jl_toplevel_eval_flex at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/toplevel.c:934
      From worker 12:	jl_toplevel_eval_flex at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/toplevel.c:877
      From worker 12:	ijl_toplevel_eval_in at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/toplevel.c:993
      From worker 12:	eval at ./boot.jl:383 [inlined]
      From worker 12:	include_string at ./loading.jl:2070
      From worker 12:	_jl_invoke at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:2871 [inlined]
      From worker 12:	ijl_apply_generic at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:3072
      From worker 12:	_include at ./loading.jl:2130
      From worker 12:	include at ./Base.jl:489 [inlined]
      From worker 12:	macro expansion at /home/eduardo/moving-immix/mmtk-julia/vm/julia/test/testdefs.jl:29 [inlined]
      From worker 12:	macro expansion at /home/eduardo/moving-immix/mmtk-julia/vm/julia/usr/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
      From worker 12:	macro expansion at /home/eduardo/moving-immix/mmtk-julia/vm/julia/test/testdefs.jl:23 [inlined]
      From worker 12:	macro expansion at ./timing.jl:503 [inlined]
      From worker 12:	#runtests#1 at /home/eduardo/moving-immix/mmtk-julia/vm/julia/test/testdefs.jl:21
      From worker 12:	runtests at /home/eduardo/moving-immix/mmtk-julia/vm/julia/test/testdefs.jl:5 [inlined]
      From worker 12:	runtests at /home/eduardo/moving-immix/mmtk-julia/vm/julia/test/testdefs.jl:5
      From worker 12:	unknown function (ip: 0x7fc11585c760)
      From worker 12:	_jl_invoke at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:2871 [inlined]
      From worker 12:	ijl_apply_generic at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:3072
      From worker 12:	jl_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/julia.h:1993 [inlined]
      From worker 12:	jl_f__call_latest at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/builtins.c:812
      From worker 12:	_jl_invoke at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:2871 [inlined]
      From worker 12:	ijl_apply_generic at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:3072
      From worker 12:	jl_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/julia.h:1993 [inlined]
      From worker 12:	do_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/builtins.c:768
      From worker 12:	#invokelatest#2 at ./essentials.jl:869
      From worker 12:	_jl_invoke at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:2871 [inlined]
      From worker 12:	ijl_apply_generic at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:3072
      From worker 12:	jl_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/julia.h:1993 [inlined]
      From worker 12:	do_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/builtins.c:768
      From worker 12:	invokelatest at ./essentials.jl:864
      From worker 12:	_jl_invoke at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:2871 [inlined]
      From worker 12:	ijl_apply_generic at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:3072
      From worker 12:	jl_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/julia.h:1993 [inlined]
      From worker 12:	do_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/builtins.c:768
      From worker 12:	#110 at /home/eduardo/moving-immix/mmtk-julia/vm/julia/usr/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:285
      From worker 12:	run_work_thunk at /home/eduardo/moving-immix/mmtk-julia/vm/julia/usr/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:70
      From worker 12:	#109 at /home/eduardo/moving-immix/mmtk-julia/vm/julia/usr/share/julia/stdlib/v1.10/Distributed/src/process_messages.jl:285
      From worker 12:	unknown function (ip: 0x7fc115855682)
      From worker 12:	_jl_invoke at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:2871 [inlined]
      From worker 12:	ijl_apply_generic at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/gf.c:3072
      From worker 12:	jl_apply at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/julia.h:1993 [inlined]
      From worker 12:	start_task at /home/eduardo/moving-immix/mmtk-julia/vm/julia/src/task.c:1238
      From worker 12:	Allocations: 390479928 (Pool: 390054132; Big: 425796); GC: 493

@d-netto
Copy link

d-netto commented Aug 31, 2023

Fixed in JuliaLang#50419.

@qinsoon qinsoon merged commit 83796a7 into mmtk:master Sep 1, 2023
qinsoon added a commit to mmtk/mmtk-julia that referenced this pull request Sep 1, 2023
qinsoon pushed a commit to qinsoon/julia that referenced this pull request May 2, 2024
…iaLang#53012)

Stdlib: StyledStrings
URL: https://github.com/JuliaLang/StyledStrings.jl.git
Stdlib branch: main
Julia branch: master
Old commit: 61e7b10
New commit: 302a0d0
Julia version: 1.11.0-DEV
StyledStrings version: 1.11.0
Bump invoked by: @vchuravy
Powered by:
[BumpStdlibs.jl](https://github.com/JuliaLang/BumpStdlibs.jl)

Diff:
JuliaLang/StyledStrings.jl@61e7b10...302a0d0

```
$ git log --oneline 61e7b10..302a0d0
302a0d0 Directly import ScopedValue
3fab35e Fix showing AnnotatedChar with colour
44f5fd7 Restrict the Base docstrings included in the docs
4dee5d9 Add readme
c49ae82 Add documentation task to CI
38ae1b3 Setting the terminal colour to :default is special
2709150 Adjust face merge tests after inheritance change
036631f Swap inheritance processing in face merge
9b35f08 Merge branch 'jn/Statefulempty' [mmtk#21]
508ab57 Refactor zip of eachindex to just use pairs
02b3f81 Remove use of length of Stateful
41c8218 Merge branch 'lh/ci-codecov' [mmtk#15]
d581fda Disable codecov commenting in every PR
a8a25ba Merge branch 'lh/ci-old-julia' [mmtk#13]
b7fca5b Merge branch 'lh/newline' [mmtk#16]
984485e Adjust newline parsing to work with CLRF encoding
27b02d1 Test styled"" parsing of \-continued newlines
a7981fe Merge pull request mmtk#17 from caleb-allen/add-beep-face
c1ab675 Add repl_prompt_beep face
0d8f5df Merge pull request mmtk#18 from JuliaLang/whitespace-fixup
1ef0f90 Nicer whitespace alignment
91a24f8 Disable CI for older versions of Julia
63ff132 add tagbot
792fda7 add CI
506afe3 add .gitignore
74e7135 Load the JULIA_*_COLOR env vars for compat
87d1fb5 Replace within-module eval with hygienic eval
4777e60 Touchups to documented examples
```

Co-authored-by: Dilum Aluthge <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.