1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-08 11:12:25 +02:00
Commit graph

22041 commits

Author SHA1 Message Date
Andy Wingo
32ddaa7624 Allocate GC context in GC-managed heap 2022-03-16 21:31:51 +01:00
Andy Wingo
f04b0bbd45 Simplify output of quads test 2022-03-16 14:28:49 +01:00
Andy Wingo
e7a3f83bcc Add quads benchmark
Also expand GC interface with "allocate_pointerless".  Limit lazy
sweeping to the allocation size that is causing the sweep, without
adding to fragmentation.
2022-03-16 14:16:22 +01:00
Andy Wingo
aac0faf4cf Refactor type definitions 2022-03-16 09:05:31 +01:00
Ludovic Courtès
f18f670223 tests: web-server: Wait until the server is listening.
Fixes synchronization issues observed on slow or loaded machines, where
client connection attempts would fail with ECONNREFUSED:

  https://issues.guix.gnu.org/54348

* test-suite/tests/web-server.test ("server is listening"): New test.
2022-03-15 14:38:40 +01:00
Andy Wingo
a1b4311cfc Update status 2022-03-13 21:55:58 +01:00
Andy Wingo
a693c4ea8a Bugfix to mark-sweep
Before this, the last sweep would cause premature gc
2022-03-13 21:45:20 +01:00
Andy Wingo
fddd4d9416 Hey parallel marking is finally an improvement?? 2022-03-13 21:38:59 +01:00
Andy Wingo
4d7041bfa9 Another attempt at parallel marking, avoiding the channel
Not great though!
2022-03-13 13:54:58 +01:00
Andy Wingo
7ce07de670 First crack at parallel marking 2022-03-12 21:09:17 +01:00
Andy Wingo
9c89672c88 Put a local mark queue in front of the work-stealing queue 2022-03-11 11:57:14 +01:00
Andy Wingo
df9edfdff2 Remove tiny objects from mark-sweep 2022-03-11 11:48:26 +01:00
Andy Wingo
f57a1b8a55 Refactor to separate gcbench from gc 2022-03-11 11:48:26 +01:00
Andy Wingo
77ac530360 Add beginnings of parallel marker 2022-03-11 11:48:26 +01:00
Andy Wingo
01d3f9627e Further accelerate sweeping 2022-03-11 11:48:17 +01:00
Andy Wingo
f6ac9d2571 Ability to set heap size on command line 2022-03-11 11:48:04 +01:00
Andy Wingo
5edc4fa81a More efficient sweep 2022-03-11 11:44:11 +01:00
Andy Wingo
5c8a8a2d3e Store mark bits on the side
Lets the sweeper avoid chasing pointers, and is more amenable to
parallel marking.
2022-03-11 11:23:58 +01:00
Andy Wingo
91a330e310 More asserts in mark-sweep 2022-03-11 11:23:58 +01:00
Andy Wingo
fb350fb3ff Keep read/write positions when growing queue 2022-03-11 11:23:58 +01:00
Andy Wingo
c612ff3825 Optimize computation of size class from small object granule count 2022-03-11 11:23:58 +01:00
Andy Wingo
cfa7ea31ae Move back to marking objects instead of edges 2022-03-11 11:23:58 +01:00
Andy Wingo
45405efe56 Move to mark queue, is it an improvement? 2022-03-11 11:23:58 +01:00
Andy Wingo
d2828975a5 Switch mark-sweep collector to mark stack
Slows down performance though!  Have to think here.
2022-03-11 11:23:58 +01:00
Andy Wingo
502c0455a7 Fix mark-sweep allocator to clear contents 2022-03-11 11:23:43 +01:00
Andy Wingo
e492da2d2b Add heap validation to gcbench
* GCBench.c (ValidateTree): New function.
2022-03-11 11:22:01 +01:00
Andy Wingo
7b60164cac Update README 2022-03-07 11:31:28 +01:00
Sergei Trofimovich
f047133e7b build: Test '-flto' on both compiler and linker.
Before the change ./configure incorrectly enabled -flto on toolchains
that support -flto on compiler side but don't support -flto on linker
side. This caused incorrect type size detection on nixpkgs' Darwin:

 configure:54594: checking size of size_t
 configure:54600: clang -std=gnu11 -o conftest -g -O2 -flto   conftest.c  >&5
 ld: warning: ignoring file /private/tmp/nix-build-guile-3.0.8.drv-0/conftest-00e93d.o,
   building for macOS-x86_64 but attempting to link with file built
   for unknown-unsupported file format ( 0xDE 0xC0 0x17 0x0B 0x00 0x00 0x00 0x00 0x14 0x00 0x00 0x00 0x80 0x1A 0x00 0x00 )
 Undefined symbols for architecture x86_64:
   "_main", referenced from:
      implicit entry/start for main executable
 ld: symbol(s) not found for architecture x86_64
 clang-11: error: linker command failed with exit code 1 (use -v to see invocation)

Taken from https://github.com/NixOS/nixpkgs/pull/160051#issuecomment-1046105041

The change makes sure -flto support tests basic support of just for
object file generation but for linker as well.

* configure.ac: use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-03-07 10:54:16 +01:00
Ludovic Courtès
347321ece9 psyntax: Honor source properties for things other than syntax objects.
Commit 54bbe0b284 inadvertently led
psyntax to dismiss source location info for data returned by read hash
extensions, because read hash extensions return plain data with
associated source properties, even when called from 'read-syntax'.

This change reverts part of this commit to restore that behavior.

Fixes <https://issues.guix.gnu.org/54003>.

* module/ice-9/psyntax.scm (datum-sourcev): New procedure.
(source-annotation): Fall back to 'datum-sourcev'.
* module/ice-9/psyntax-pp.scm: Regenerate.
* test-suite/tests/compiler.test ("psyntax")["syntax-source with
read-hash-extend"]: New test.
2022-03-07 10:52:16 +01:00
Ludovic Courtès
c572b11f3d tests: Add read-syntax + syntax-source test.
* test-suite/tests/reader.test ("read-syntax")["syntax-source"]: New
test.
2022-03-07 10:52:16 +01:00
Ludovic Courtès
a1a1400c7c Update NEWS.
* NEWS: Add 3.0.9 section.
2022-03-07 10:52:16 +01:00
Andy Wingo
7b85284a89 Add mark-sweep collector 2022-03-07 10:23:05 +01:00
Andy Wingo
283721b39a Refactor handling of precise and conservative roots 2022-03-04 15:27:22 +01:00
Andy Wingo
2a619ba67d Add README 2022-03-02 09:17:23 +01:00
Ludovic Courtès
24b30130ca build: When cross-compiling, get type sizes of the target system.
Fixes <https://issues.guix.gnu.org/54198>.

As noted in the comment at the top, 'SIZEOF_TYPE' must be used instead
of 'sizeof (TYPE)' to support cross-compilation.

The regression was introduced in
5e5afde06f but only became apparent with
717e787da6.

* libguile/gen-scmconfig.c (main): Replace uses of 'sizeof' by
references to the SIZEOF_* macros.
* configure.ac: Add 'AC_CHECK_SIZEOF' call for 'intmax_t'.
2022-02-28 23:00:46 +01:00
Andy Wingo
30b5c8a6c8 Use handle API, add semispace collector 2022-02-28 21:35:28 +01:00
Andy Wingo
2fdfefd2fc handlify 2022-02-23 21:25:26 +01:00
Andy Wingo
25213ccdeb Reindent gcbench 2022-02-23 20:03:32 +01:00
Vijay Marupudi
68aeffe8dd Typo fix: Use correct variable name in example
* doc/ref/api-control.texi
2022-02-23 09:45:17 +01:00
Andy Wingo
869a490ba6 Refactor gcbench.c 2022-02-21 21:22:21 +01:00
Andy Wingo
bdf4b27733 Initial commit 2022-02-21 21:05:18 +01:00
Andy Wingo
5a3086e681 Bump user-visible copyright years to 2022
* module/ice-9/command-line.scm (version-etc):
* module/system/repl/common.scm (*version*): Bump to 2022.
2022-02-11 15:21:03 +01:00
Andy Wingo
e734a6a607 Exclude ChangeLog from assert-no-store-file-names distcheck rule
* Makefile.am (assert-no-store-file-names): Remove ChangeLog.
2022-02-10 21:40:43 +01:00
Andy Wingo
5319fd38e2 GNU Guile v3.0.8
* GUILE-VERSION (GUILE_MICRO_VERSION, LIBGUILE_INTERFACE_CURRENT):
(LIBGUILE_INTERFACE_AGE): Bump.
2022-02-10 20:55:23 +01:00
Andy Wingo
3d69993295 Minor NEWS tweaks
* NEWS: Minor tweaks.
2022-02-10 20:54:16 +01:00
Mikael Djurfeldt
27b86a6f32 Align argument type of scm_to_wchar with its declaration.
* libguile/numbers.c (scm_from_wchar): Change argument type from wchar_t
to scm_t_wchar which is the argument type in numbers.h.
2022-02-10 12:41:59 +01:00
Mikael Djurfeldt
2e10a1257f Align return type of scm_to_wchar with its declaration.
* libguile/numbers.c (scm_t_wchar): Change return type from wchar_t to
scm_t_wchar which is the return type in numbers.h.
2022-02-10 12:36:06 +01:00
Ludovic Courtès
2aed3c117c psyntax: Pass source vectors to tree-il constructors.
Avoiding systematic conversion from source vectors to property alists
saves 20% on the final heap size of a process doing:

  (compile-file FILE #:optimization-level 1)

where FILE is large.

* module/language/tree-il.scm (tree-il-src/ensure-alist): New procedure
with setter.  Export as 'tree-il-src'.
* module/ice-9/psyntax.scm (build-void, build-call)
(build-conditional, build-lexical-reference, build-lexical-assignment)
(build-global-reference, build-global-assignment)
(build-global-definition, build-simple-lambda, build-case-lambda)
(build-lambda-case, build-primcall, build-primref)
(build-data, build-sequence, build-let, build-named-let)
(build-letrec, expand-body): Remove (sourcev->alist src) calls.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/language/tree-il/analyze.scm (shadowed-toplevel-analysis): Use
'tree-il-src' instead of accessing the 'src' slot directly.
* module/system/vm/assembler.scm (link-debug): Adjust so PC can be
followed by a vector or an alist.
2022-02-07 12:23:35 +01:00
Ludovic Courtès
032acdeac9 'string->symbol' avoids copying the underlying string.
* libguile/strings.c (scm_i_make_symbol): Reuse NAME's stringbuf unless
it's mutable or NAME starts at a non-zero offset or has a different
length.
2022-02-07 12:23:35 +01:00
Andy Wingo
2f9bc7fe61 Update unicode tables to Unicode 14.0.0; initial charsets immutable
* libguile/srfi-14.i.c: Update from Unicode 14.0.0.
* libguile/unidata_to_charset.pl (compute): Write arrays as static const
data, to avoid polluting the namespace and to avoid adding these to the
GC root set.
* libguile/srfi-14.c (SCM_CODEPOINT_F_IMMUTABLE): New flag.
(scm_charset_is_immutable): New internal predicate.
(SCM_VALIDATE_MUTABLE_CHARSET): New internal validator.
(cs_full_ranges, cs_full_ranges_len): Re-express as separate ranges and
len, because the ranges pointer in scm_t_char_set is mutable.
(scm_char_set_unfold_x, scm_list_to_char_set_x)
(scm_string_to_char_set_x, scm_char_set_filter_x)
(scm_i_ucs_range_to_char_set, scm_char_set_adjoin_x)
(scm_char_set_delete_x, scm_char_set_complement_x)
(scm_char_set_unfold_x, scm_char_set_intersection_x)
(scm_char_set_difference_x, scm_char_set_xor_x): Require mutable
charsets.
(define_charset): Add immutable flag.
(scm_init_srfi_14): Adapt initial charset definitions.
2022-02-06 21:17:24 +01:00