1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-27 13:30:31 +02:00
Commit graph

21772 commits

Author SHA1 Message Date
Tomas Volf
46a0ee7779 Fix typos in comments.
* module/sxml/xpath.scm: Fix typo in a comment.
* module/sxml/upstream/SXPath-old.scm: Same.
* doc/ref/sxml.texi (SXPath): Reflect in the documentation.
* doc/ref/texinfo.texi (string-utils): Fix same typo.
* module/texinfo/string-utils.scm (expand-tabs): Same.

Fixes <https://bugs.gnu.org/76621>.
Edited by lloda <lloda@sarc.name>.
2025-02-28 09:58:29 +01:00
Andy Wingo
c8a169d388 Fix string-utf8-length to have unboxed representation
* module/language/cps/utils.scm (primcall-raw-representations): Add
string-utf8-length.
2025-02-20 12:38:28 +01:00
Andy Wingo
c410992d55 Doc rewording 2025-02-14 12:34:17 +01:00
Andy Wingo
e19bf100b9 Doc rewording 2025-02-14 12:33:09 +01:00
Andy Wingo
0bef1e9435 Doc rewording 2025-02-14 12:32:54 +01:00
Andy Wingo
367e04f164 Add documentation on tracepoints
Also clean up how-to-build documentation
2025-02-14 12:30:40 +01:00
Andy Wingo
81da950ebe Steal becomes an instant event 2025-02-12 14:33:05 +01:00
Andy Wingo
c0dd2e58d1 Fix embed.mk for tracepoints 2025-02-11 21:51:46 +01:00
Andy Wingo
2f0c0f8f8e Refactor lttng makefile bits 2025-02-11 21:42:13 +01:00
Andy Wingo
d675a9b8f1 Add tracepoints to tracer itself
Also fix an issue whereby the main thread would spin, waiting for other
active threads to finish, doing no work itself.
2025-02-11 16:14:27 +01:00
Andy Wingo
461efa98a0 Wire up tracepoints for event-listener interface 2025-02-10 13:41:19 +01:00
Andy Wingo
cca54736a0 Add build support for tracepoints via lttng-ust 2025-02-10 12:45:25 +01:00
Andy Wingo
5d3f561d7d Merge remote-tracking branch 'lightening/main' 2025-01-29 16:52:29 +01:00
Andy Wingo
d418f80803 Merge branch 'main' into 'main'
RISC-V Support

See merge request wingo/lightening!14
2025-01-29 15:43:49 +00:00
Ekaitz Zarraga
105a9c7958 riscv: error if not little endian 2025-01-29 14:53:04 +01:00
Ekaitz Zarraga
7c20ba7767 riscv: float/double call convention implementation
RISC-V uses a0-a7 registers for argument passing. Float/double arguments
use f0-f7 first and continue in a0-a7 if needed.

Once registers are consumed, stack is used.

This commit changes how lightening passes arguments in order to allow
this behavior.
2025-01-29 14:53:04 +01:00
Ekaitz Zarraga
ce8b8e4778 riscv: change stack alignment to 16 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
285cfd284a riscv: fix hi20/lo12 calculations for negative numbers 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
cbda249dc5 riscv: better movi 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
746660bf08 riscv: movi: use addiw in RV64 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
019cd02410 riscv: movi: sign extend hi 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
741af987a3 riscv: fix load size for ldxi instructions 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
33eddc7b62 riscv: simplify load from pool 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
8c7990d4a1 riscv: fix literal pool guard jump address calc 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
fb527804f9 riscv: add get_callr_temp 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
c6008fd0ab riscv: fix the B and J type size check 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
93380fc377 riscv: clean patch jumps 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
f6f2a757c3 riscv: don't pack veneers, use padding 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
76549a674a riscv: Pack the veneer struct 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
775d11b21e riscv: Add fence 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
3edd48b046 Fix CI 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
797fe5067c Add RISCV to CI and makefile 2025-01-29 14:28:13 +01:00
Ekaitz Zarraga
cbd72e71a7 RISC-V Support 2025-01-29 14:01:52 +01:00
Ekaitz Zarraga
23c4e36dca Makefile: RISCV support and optional vars
Optional variables are needed because the structure of the makefile
is prepared to run on Guix but Guix doesn't support RISCV yet, so it's
better to set them as optional and let the user decide how do they want
to compile this thing.
2025-01-29 14:01:52 +01:00
Andy Wingo
41a2a60fa1 Merge branch 'reinterpret' into 'main'
Add movr_f_i, movr_i_f, movr_d_l, movr_l_d

See merge request wingo/lightening!27
2025-01-29 11:17:25 +00:00
Andy Wingo
11918685e1 Add movr_f_i, movr_i_f, movr_d_l, movr_l_d
These move values verbatim between FPRs and GPRs.
2025-01-29 12:14:59 +01:00
Andy Wingo
624d78625b Avoid accidentally-quadratic use of intmap-keys
* module/language/cps/utils.scm (compute-reachable-functions): Rework to
not call intmap-keys on a data structure that we are building up in a
loop.
2025-01-27 10:24:01 +01:00
Andy Wingo
b517464d7f copy-space: refactor to copy_space_can_allocate 2025-01-24 16:11:11 +01:00
Maxim Cournoyer
f109baebc0 doc/srfi-64: Fix typos and add examples.
* doc/ref/srfi-modules.texi (SRFI-64 Writing Basic Test Suites): Fix
  typo.  Add default test runner example.  Add test-approximate and
  test-error examples.  Document valid error types in Guile for test-error.

  (SRFI-64 Conditonal Test Suites and Other Advanced Features): Fix typo.

Fixes <https://bugs.gnu.org/75041>.

Suggested-by: Arne Babenhauserheide <arne_bab@web.de>
2025-01-24 10:54:01 +01:00
Rob Browning
48b1c4eff4 fport_print: handle ttyname ENODEV
In some situations, ttyname may return ENODEV even though isatty is
true.  From ttyname(3):

  A process that keeps a file descriptor that refers to a pts(4) device
  open when switching to another mount namespace that uses a different
  /dev/ptmx instance may still accidentally find that a device path of
  the same name for that file descriptor exists.  However, this device
  path refers to a different device and thus can't be used to access the
  device that the file descriptor refers to.  Calling ttyname() or
  ttyname_r() on the file descriptor in the new mount namespace will
  cause these functions to return NULL and set errno to ENODEV.

Observed in a Debian riscv64 porterbox schroot.

When ttyname fails with ENODEV, just include the file descriptor integer
value instead.  Call ttyname() directly to avoid having to catch the
ENODEV.

* libguile/fports.c (fport_print): fall back to the integer fd when
ttyname() fails with ENODEV.
2025-01-23 12:49:33 -06:00
Andy Wingo
68e3a692f5 Fix bug with lospace in generational configurations 2025-01-23 19:24:57 +01:00
Andy Wingo
7049871484 lospace: Fix bug when splitting freelist entries 2025-01-23 17:22:29 +01:00
Andy Wingo
7a5c994613 lospace: Add missing lock in allocation path 2025-01-23 17:12:34 +01:00
Andy Wingo
2c72034a1c Fix bug in mmc for new lospace locking discipline 2025-01-23 15:19:09 +01:00
Andy Wingo
7a9de35aaa lospace: Rely on object_map to be immutable during collection
This avoids having multiple threads serialize through a mutex.  We still
have to allow for mutation on object_tree and remembered_edges, though.
2025-01-23 15:06:44 +01:00
Rob Browning
63756efbc5 Don't hold lock during scm_async_tick in readdir and ttyname
Only hold scm_i_misc_mutex while making the C calls.  This also avoids
the need for a dynamic-wind.  Add SCM_I_LOCKED_SYSCALL (similar to
SCM_SYSCALL) to handle the locking and EINTR loop.

libguile/filesys.c (scm_readdir): rely on SCM_I_LOCKED_SYSCALL to limit
locking.
libguile/filesys.c (scm_ttyname): rely on SCM_I_LOCKED_SYSCALL to limit
locking.
libguile/syscalls.h: add SCM_I_LOCKED_SYSCALL.
2025-01-22 19:24:07 -06:00
Andy Wingo
4a6347c371 Optimize ordering edges in fix-letrec
* module/language/tree-il/fix-letrec.scm (compute-sccs): Instead of
depending on all previous complex bindings, we can just depend on the
most recent one.  Decreases the graph size.
2025-01-22 16:51:28 +01:00
Andy Wingo
47dce42edb Use transient intset/intmap optimizations when computing SCCs
* module/language/cps/graphs.scm (compute-sorted-strongly-connected-components):
Use more transient data structures.
2025-01-22 16:50:52 +01:00
Andy Wingo
60c1e5cc42 Fix bad algorithmic growth in fix-letrec
We were using list sets, which when you end up with thousands of
bindings in an SCC reaches the point where we are off the quadratic end
of the curve.  Fix to use intsets and intmaps instead.

* module/language/tree-il/fix-letrec.scm (compute-ids): New function.
(compute-referenced-and-assigned): Rename from analyze-lexicals, and
compute intsets.
(make-compute-free-variables): Rename from free-variables, return a
procedure instead of a hash table, and use intsets.  Use a global cache
to avoid quadratic behavior with regard to binding depth.
(compute-complex): Compute a global set of "complex" variables, as an
intset.
(compute-sccs): Use intsets and intmaps to compute the free-variable and
ordering edges.
(fix-scc, fix-term): Refactorings.
(reorder-bindings): Avoid a linear search.
(fix-letrec): Refactor.
2025-01-22 14:56:32 +01:00
Andy Wingo
787e49f137 Fix a check in the Tree-IL verifier
* module/language/tree-il/debug.scm (verify-tree-il): Fix
pattern-matching.
2025-01-22 12:14:30 +01:00