1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
Commit graph

21194 commits

Author SHA1 Message Date
Jonas Hahnfeld
52de92b6ef
Deduplicate and sort .gitignore
* .gitignore: Deduplicate and sort.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-29 14:41:06 +01:00
Jonas Hahnfeld
91a46b7cec
Delete two config.rpath scripts
config.rpath in the top-level was heavily outdated and unused. The
version of the script in build-aux/ was overwritten by autogen.sh;
commit 7f18b659b9 already tried to remove it two years ago, but did
not add it to .gitignore

* config.rpath, build-aux/config.rpath: Remove.
* .gitignore: Ignore build-aux/config.rpath.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-29 14:40:58 +01:00
Tomas Volf
b6866ded2b
ftw: Fix getuid-or-false, getgid-or-false macros.
Both macros were missing a quote for the procedure call, causing the
actual return value to be compiled into the ftw.go, instead of the
procedure call.  Snippet from disassembly of ftw.go does confirm that:

  55    (make-immediate 2 3990)         ;; 997                at ice-9/ftw.scm:319:46
  56    (make-long-immediate 1 120002)  ;; 30000              at ice-9/ftw.scm:320:46

That effectively prevented ftw from entering directories without access
for others.  Simple reproduction:

    scheme@(guile-user)> ,use (ice-9 ftw)
    scheme@(guile-user)> (mkdir "/tmp/xxxx")
    scheme@(guile-user)> (chmod "/tmp/xxxx" #o0700)
    scheme@(guile-user)> (ftw "/tmp/xxxx" (lambda (_ __ f) (pk f) #t))

    ;;; (directory-not-readable)
    $1 = #t
    scheme@(guile-user)> (system "ls -al /tmp/xxxx")
    total 0
    drwx------ 1 wolf wolf   0 Oct 11 22:54 .
    drwxrwxrwt 1 root root 888 Oct 11 22:54 ..
    $2 = 0

The fix is to quote the procedure call, leading to the intended
behavior.

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

* module/ice-9/ftw.scm (getuid-or-false): Quote the (getuid).
(getgid-or-false): Quote the (getgid).
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-29 14:31:01 +01:00
Tomas Volf
0933791c49
Add more detailed instructions into the HACKING file.
Until now, the ./meta/guile was not mentioned anywhere, and therefore it
was not obvious how to run the locally compiled Guile without installing
it.

While modifying the file, I took the liberty to also mention a bit about
compiling Guile using Guix.

Finally, the header lines where cleaned up, ensuring all of them end at
70 and have a leading space.

* HACKING (Hacking It Yourself): Add Guix instructions.  Add a note
about meta/guile script.
(Sample GDB Initialization File),
(Naming conventions): Clean up the header line.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-29 14:28:56 +01:00
Andy Wingo
49f24d2bf5 Fix test for unique macro-introduced toplevels 2024-01-29 11:34:59 +01:00
Andy Wingo
bb5829f5ff default-frame-width is a parameter
* module/system/repl/debug.scm (default-frame-width): A parameter
instead of a fluid.
(print-frames): Adapt use.
2024-01-29 10:59:54 +01:00
Andy Wingo
1349c41a60 Ensure macro-introduced top-level identifiers are unique
* module/ice-9/psyntax.scm (expand-top-sequence): When making a fresh
name for an introduced identifier, the hash isn't enough: it's quite
possible for normal programs to have colliding hash values, because
Guile's hash functions on pairs doesn't traverse the whole tree.
Therefore, append a uniquifying counter if the introduced name is
already defined in the current expansion unit.
* test-suite/tests/syntax.test ("duplicate top-level introduced
definitions"): Add test.
2024-01-29 10:53:13 +01:00
Olivier Dion
455ee49f55
Fix asymetric mutex locking when joining thread.
If `join-thread' timeout, the thread mutex is not unlocked, resulting in
deadlock to the next call to it or deadlock of the thread itself when it
terminates.

Thus, always unlock the mutex.

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

* module/ice-9/threads.scm (join-thread): Always unlock thread mutex.
* test-suite/tests/threads.test (join-thread): New test to ensure the
mutex is released.
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-25 23:12:53 +01:00
Ludovic Courtès
e791fbcefe
Test ‘scm_i_signal_delivery_thread’ with ‘scm_is_true’.
Fixes a regression introduced in
5a8502a494 and uncovered with
‘-DSCM_DEBUG_TYPING_STRICTNESS=2’ builds.

* libguile/scmsigs.c (scm_i_close_signal_pipe): Test
‘scm_i_signal_delivery_thread’ with ‘scm_is_true’ rather than pointer
equality.
2024-01-24 15:27:41 +01:00
Ludovic Courtès
a702097f1c
Fix cross-compilation to MinGW.
Fixes a regression introduced in
5a8502a494.

* libguile/scmsigs.c (scm_i_signals_post_fork): Wrap reference to ‘once’
in #ifdef.
2024-01-24 15:26:57 +01:00
Tomas Volf
2556b9a216
bug#68507: [PATCH] doc: Fix example in list-transduce example.
While the `.' might be correct from a grammatical point of view (I do
not know), it turns the example into invalid scheme code, which is not
ideal.  New users (like me) might try to copy the whole line and wonder
why it does not work (like I did).  So delete it.

* doc/ref/srfi-modules.texi (SRFI-171 General Discussion): Delete the
trailing . from the example.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-24 11:14:10 +01:00
Ludovic Courtès
65c054fe56
doc: Remove reference to “benevolent dictators”.
Fixes <https://bugs.gnu.org/63366>.
Suggested by Sebastian Carlos <sebaaa1754@gmail.com>.

* doc/ref/intro.texi (Introduction): Remove reference to Python and
Perl, which no longer have “benevolent dictators”.
2024-01-24 11:12:06 +01:00
Ludovic Courtès
163c60c7c3
Update NEWS. 2024-01-24 11:10:25 +01:00
Ludovic Courtès
2bbeece034
Bump user-visible copyright years to 2024.
* module/ice-9/command-line.scm (version-etc):
* module/scripts/compile.scm (show-version):
* module/system/repl/common.scm (*version*): Bump to 2024.
2024-01-24 10:49:27 +01:00
Ludovic Courtès
5a8502a494
Stop signal thread before forking, restart it afterwards.
Fixes <https://bugs.gnu.org/68087>.

* libguile/scmsigs.h (scm_i_signals_pre_fork, scm_i_signals_post_fork):
New declarations.
(scm_i_signal_delivery_thread): Change type to SCM..
* libguile/threads.c (scm_all_threads): Adjust accordingly and exclude
threads that have ‘t->exited’.  Access ‘thread_count’ after grabbing
‘thread_admin_mutex’.
* libguile/posix.c (scm_fork): Add calls to ‘scm_i_signals_pre_fork’ and
‘scm_i_signals_post_fork’.
* libguile/scmsigs.c (signal_delivery_thread): Close signal_pipe[0] upon
exit and set it to -1.
(once): New file-global variable, moved from…
(scm_i_ensure_signal_delivery_thread): … here.
(stop_signal_delivery_thread, scm_i_signals_pre_fork)
(scm_i_signals_post_fork): New functions.
* test-suite/standalone/test-sigaction-fork: New file.
* test-suite/standalone/Makefile.am (check_SCRIPTS, TESTS): Add it.
2024-01-05 18:59:58 +01:00
Ludovic Courtès
a09214fb86
build: Error out when ‘scmconfig.h’ generation fails.
So far the rule would silently create a broken file.

* libguile/Makefile.am (scmconfig.h): Add ‘set -e’.
2023-12-28 12:36:11 +01:00
Ludovic Courtès
7f26021c24
debug: Print wider stack frames when not writing to a tty.
This satisfies a longstanding complaint that Guile backtraces were being
truncated too much by default (72 columns), often hindering debugging.

* module/system/repl/debug.scm (default-frame-width): New variable.
(print-frames): Change default #:width value depending on whether PORT
is a tty.
2023-12-28 12:24:02 +01:00
無無
d8df317baf Minor typo in the manual
* doc/ref/api-modules.texi: Fix typo.

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

Signed-off-by: Mikael Djurfeldt <mikael@djurfeldt.com>
2023-11-28 11:18:05 +01:00
Andy Wingo
d7cf5bf373 Recognize append as a primcall and optimize it
* module/language/tree-il/primitives.scm (*primitive-constructors*):
(append): Recognize append and reduce it to only the two-operand form.
* module/language/tree-il/peval.scm (peval): Add optimizations to
append.
2023-11-27 14:30:41 +01:00
Andy Wingo
38e9bd7a2f Avoid swallowing errors for (values) operands of elided primcalls
* module/language/tree-il/peval.scm (peval): When visiting (values) in
anything other than an effect or values context,
residualize (values (values)), which will cause a run-time error.
* test-suite/tests/peval.test ("values"): Add test.
2023-11-27 14:24:50 +01:00
Andy Wingo
3b7c78cc83 Unbound vars fixup
* module/language/tree-il/compile-cps.scm (%box-ref): Fix untested bug.
The peril of a compiler spanning modules...
2023-11-23 12:37:20 +01:00
Andy Wingo
5ef0ea30fa Allow targets to preclude unbound variables
Allowing variables to hold an unbound value and requiring a check on
each load is suboptimal; the fixing letrec boolean check is better.  So
other runtimes (hoot) might preclude unbound variables by construction.
Allow them to do so.

* module/language/cps/guile-vm.scm (target-has-unbound-boxes?): New
definition.
* module/language/tree-il/compile-cps.scm (target-has-unbound-boxes?):
(%box-ref): Only residualize an unbound check if the target has unbound
boxes.
2023-11-23 12:31:38 +01:00
Andy Wingo
83449a8683 prompts avoid introducing throw; fixup peval test
* test-suite/tests/peval.test ("partial evaluation"): Fix to expect
raise-type-error from dynwind peval.  Update prompt expectation
similarly.
* module/language/tree-il/primitives.scm (call-with-prompt): Use
raise-type-error.
2023-11-23 12:30:36 +01:00
Andy Wingo
711077586b peval avoids introducing 'throw
* module/language/tree-il/peval.scm (peval): Introduce raise-type-error
for dynwind unwinder thunk check.
* module/language/tree-il/compile-cps.scm (raise-type-error):
* module/language/tree-il/compile-bytecode.scm (canonicalize): Handle
raise-type-error, as it can be in Tree-IL now.
2023-11-23 12:11:22 +01:00
Andy Wingo
4118f09030 CPS conversion does not introduce "throw"
This keeps things higher level, and is a step towards structured
exceptions in guile.

* module/language/cps/guile-vm/reify-primitives.scm (reify-primitives):
Turn raise-type-error, raise-range-error, and raise-arity-error into
variants of "throw".  Lower raise-exception to a non-tail primcall.

* module/language/tree-il/compile-cps.scm: Instead of residualizing
"throw/value+data" throws, exceptions introduced by CPS lowering are
more structured: raise-type-error, raise-range-error, and
raise-arity-error.  Also, lower raise-exception to an ordinary `$throw`
instead of eagerly producing the non-tail call to a $prim.
2023-11-23 10:25:02 +01:00
Andy Wingo
d579848cb5 Fix bug lowering logand/immediate to ulogand/immediate
* module/language/cps/specialize-numbers.scm (logand/immediate): Define
a sigbits handler.
(specialize-operations): Require logand/immediate operand to be u64 to
lower to ulogand/immediate.  Shouldn't be necessary but even if only u64
bits are used, negative fixnums will have the sign bit set, which trips
up further unboxed uses which error if the operand to `scm->u64` is
negative.
* module/language/cps/type-fold.scm (rem): Emit logand/immediate.
2023-11-20 16:45:35 +01:00
Andy Wingo
89501a83ce Fix mistype in specialize-numbers
*
module/language/cps/specialize-numbers.scm (compute-specializable-u64-vars):
We were failing to match scm->u64/truncate.
2023-11-20 15:11:29 +01:00
Andy Wingo
5959531c54 Allow target runtime to override symbol hash
Also rework so that the symbol hash uses the low bits instead of high
bits.  We can do this because, for the guile-vm target, now we compute
the full target hash.

* module/language/cps/guile-vm.scm (jenkins-lookup3-hashword2):
(target-symbol-hash, target-symbol-hash-bits): New exported functions..
* module/language/cps/switch.scm (optimize-branch-chain): Change to use
target-symbol-hash and target-symbol-hash-bits from the current
target-runtime.
2023-11-20 14:23:14 +01:00
Andy Wingo
4d834bdc12 Add logand/immediate, ulogand/immediate primcalls
* libguile/jit.c (compile_ulogand_immediate, compile_ulogand_immediate_slow)
* libguile/vm-engine.c (ulogand_immediate): New JIT and interpreter
support for ulogand/immediate.

* module/language/cps/guile-vm/lower-primcalls.scm (string-ref):
(vtable-vtable?):
(vtable-field-boxed?): Emit ulogand/immediate.
* module/language/cps/guile-vm/reify-primitives.scm (reify-primitives):
Remove logand/immediate.  Only emit ulogand/immediate if the immediate
is a u8.  Refactor mul/immediate.

* module/language/cps/specialize-numbers.scm (specialize-operations):
Produce ulogand/immediate if the result is a u64.

* module/language/cps/effects-analysis.scm:
* module/language/cps/types.scm (logand/immediate): Add effect and type
inference for logand/immediate, ulogand/immediate,

* module/language/cps/utils.scm (primcall-raw-representations):
ulogand/immediate makes a u64.

* module/language/tree-il/compile-cps.scm (convert): Generate
logand/immediate if possible.

* module/language/cps/compile-bytecode.scm (compile-function):
* module/system/vm/assembler.scm (system): Add ulogand/immediate
emitter.

* libguile/loader.h (SCM_OBJCODE_MINOR_VERSION): Bump.
2023-11-20 13:43:47 +01:00
Andy Wingo
5b0c261b04 Mark symbol-hash primcall as having unboxed result
* module/language/cps/utils.scm (primcall-raw-representations): Add
symbol-hash.
2023-11-17 15:28:59 +01:00
Andy Wingo
49aa0940bc Add CPS primcall for symbol-hash
* module/language/cps/effects-analysis.scm: symbol-hash is effect-free.
* module/language/cps/guile-vm/lower-primcalls.scm (symbol-hash): Lower
to word-ref/immediate.
* module/language/cps/switch.scm (optimize-branch-chain): Emit
symbol-hash instead of word-ref/immediate.
* module/language/cps/types.scm (symbol-hash): Infer result.
2023-11-17 08:48:33 +01:00
Andy Wingo
c2a9380a42 peval: better primcall folding in effect contexts
* module/language/tree-il/peval.scm (peval): If a primcall is
effect-free, don't require that its args are too: just revisit args as a
sequence in effect context.
* module/language/tree-il/effects.scm (effect-free-primcall?): New
exported function.
2023-11-15 19:31:24 +01:00
Andy Wingo
28a428135f peval: elide effect-free primcalls in effect context
* module/language/tree-il/peval.scm (peval): fix-letrec can residualize
useless primcalls, when a let or letrec-bound var is unused.  Fix to
elide these.
2023-11-15 15:17:29 +01:00
Andy Wingo
e529db04a4 Add extensibility to Tree-IL effects analysis
* module/language/tree-il/effects.scm (add-primcall-effect-analyzer!):
New facility.
* module/language/tree-il/effects.scm (make-effects-analyzer): If a
primcall's args cause no effects, call out to a user-provided
effect-free? primitive for a primcall.  If true, the primcall will be
marked as depending on all effects but causing none; this will allow it
to be elided by letrectify or peval.
2023-11-15 14:59:02 +01:00
Andy Wingo
d08cc4f6e2 Allow string->utf8 to constant-fold
* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
(*primitive-accessors*): Add string->utf8, utf8->string, and
string-utf8-length.
(primitive-module): New public function, moved here from (language
tree-il compile-bytecode).

* module/language/tree-il/compile-bytecode.scm: Use primitive-module
from (language tree-il primitives).

* module/language/tree-il/peval.scm (peval): A bugfix: load primitives
from their proper module.  Allows bytevector primitives to fold.

* module/language/cps/guile-vm/reify-primitives.scm:
* module/language/cps/effects-analysis.scm:
* module/language/cps/types.scm
* module/language/tree-il/primitives.scm:
* module/language/tree-il/cps-primitives.scm:
* module/language/tree-il/effects.scm (make-effects-analyzer):
Add string->utf8, utf8->string, and string-utf8-length.

* module/language/tree-il/compile-cps.scm (string->utf8)
(string-utf8-length, utf8->string): New custom lowerers, including type
checks and an unboxed result for string-utf8-length.

* module/system/vm/assembler.scm:
* libguile/intrinsics.h:
* libguile/intrinsics.c: Because string-utf8-length returns an unboxed
value, we need an intrinsic for it; go ahead and add an intrinsic for
string->utf8 and utf8->string too, as we will likely be able to use
these in the future.
2023-11-15 10:44:21 +01:00
Andy Wingo
437e5ac43d Fix pretty-print with a per-line prefix
* module/ice-9/pretty-print.scm (pretty-print): Include the per-line
prefix in the indent.
* test-suite/tests/print.test ("pretty-print"): Add test.
2023-11-15 09:35:23 +01:00
Andy Wingo
75cd95060f Update set of decimal zeroes for Unicode 15.1.0
* module/scheme/char.scm (*decimal-zeroes*): Update.
2023-11-02 11:31:32 +01:00
Andy Wingo
79e836b8cc Fix branch fusing
* libguile/jit.c (analyze): Skip over drop and pop, if present, during
the analysis phase in addition to the compile phase.
2023-10-02 14:23:42 +02:00
Andy Wingo
624dd8a17a Improve handling of push/pop/drop in jit
Previously, these instructions were compiled directly.  However, the JIT
also wants to fuse comparisons with branches, and an intervening "drop"
breaks that.  Instead we take a different approach and rely on the
compiler only emitting push/pop/drop in a peephole sort of way, and we
can just simulate the temp stack space and dispatch directly.

* libguile/jit.c (compile_push, compile_push_slow, compile_pop):
(compile_pop_slow, compile_drop, compile_drop_slow): Crash if these are
called.
(COMPILE_WIDE_OP1, COMPILE_WIDE_OP2, COMPILE_WIDE_OP3, COMPILE_WIDE_OP4)
(COMPILE_WIDE_OP5):
(COMPILE_WIDE_DOP1, COMPILE_WIDE_DOP2, COMPILE_WIDE_DOP3)
(COMPILE_WIDE_DOP4, COMPILE_WIDE_DOP5): New helpers.  I didn't manage to
share implementation with COMPILE_*.
(COMPILE_WIDE_*): New variants of compilers that take their operands
from an array instead of parsing the inline operands, relying on
convention for how the compiler emits these instructions.
(parse_wide_operands): New helper to parse out "wide" operands.
(compile1, compile_slow_path): If we see a "push", parse wide operands.
(compile): Move label capture for the slow path into compile_slow_path,
because wide operands may skip some instructions.
2023-10-02 14:05:24 +02:00
Andy Wingo
046378a917 Widen all jit compiler routines to take 32-bit operands
* libguile/jit.c (compile_*): Instead of using the minimum sized types
that can represent the instruction's operand, use uint32_t.  This will
allow us to handle push/pop/drop without moving the SP.
2023-10-02 14:05:24 +02:00
Daniel Llorens
4daf4664cf Add test for r7rs string-for-each
* test-suite/tests/r7rs.test: As stated.
* module/scheme/base.scm: Reindent and add minimal doc.
2023-09-29 16:51:27 +02:00
Taylan Kammer
3243d96bb5 Fix (scheme base) string-for-each.
* module/scheme/base.scm (r7:string-for-each): New procedure.

Fixes <https://bugs.gnu.org/40584>.
2023-09-29 15:28:20 +02:00
Ekaitz Zarraga
1e3b5390e3 Fix example in syntax-rules doc
* doc/ref/api-macros.texi (Macros): Fix doc1 macro example

Fixes debbugs.gnu.org/65132.
2023-09-28 12:11:10 +02:00
Andy Wingo
8441d8ff56 Fix docstring for symbol->string, string->symbol
* libguile/symbols.c (scm_symbol_to_string, scm_string_to_symbol):
Remove some confusing documentation that assumes that Guile is
case-insensitive, and which uses a word that may be perceived as a slur.
* module/ice-9/test.scm:
* test-suite/tests/r4rs.test: Rename a test to avoid using a slur.
2023-09-18 16:03:41 +02:00
Andy Wingo
850b724f85 More robust asyncs.test
* test-suite/tests/asyncs.test: Instead of wrapping abort-to-prompt with
false-if-exception, to handle edge cases, guard with
suspendable-continuation?: this also catches recursive invocations.
2023-09-18 15:24:37 +02:00
Andy Wingo
1ad31adf30 Better compilation for symbol->keyword, keyword->symbol
* module/language/tree-il/primitives.scm (*interesting-primitive-names*):
(*effect-free-primitives*): Recognize keyword->symbol, symbol->keyword.
* module/language/tree-il/cps-primitives.scm: Plumb through to CPS.
(keyword->symbol):
* module/language/cps/effects-analysis.scm: New prims have no effect.
Fix effects for string->symbol.
(annotation->memory-kind): Add keywords.
* module/language/cps/guile-vm/lower-primcalls.scm (keyword->symbol):
Lower to scm-ref/immediate.
* module/language/cps/types.scm (annotation->type): Add case for
keywords.
* module/language/tree-il/compile-cps.scm: Add converters for new prims,
with type guards.
2023-09-18 12:32:33 +02:00
Andy Wingo
55256ab33f Better compilation for rational?, exact?, and so on
These numeric predicates now have CPS branching primcalls, which allows
type inference and folding to reduce them to less-strong instructions.

* module/language/cps/effects-analysis.scm (heap-numbers-equal?): Put
all the number predicates together.  None have type checks.
* module/language/cps/guile-vm/lower-primcalls.scm
(define-branching-primcall-alias): New helper.
(complex?): Same as number?.
* module/language/cps/guile-vm/lower-primcalls.scm (real?)
(rational?, integer?, exact-integer?, exact?, inexact?): Define
lowerers.
* module/language/cps/type-fold.scm (number?, complex?, real?)
(rational?, integer?, exact-integer?, exact?, inexact?): Add folders and
reducers for all of these.
* module/language/cps/type.scm (number?, complex?, real?)
(rational?, integer?, exact-integer?, exact?, inexact?): Add type
inference for these.
* module/language/tree-il/compile-cps.scm (convert): Add number? checks
before exact? and inexact?.  Remove the eager lowering of
exact-integer?; instead rely on folders.
* module/language/tree-il/cps-primitives.scm (number?, complex?)
(real?, rational?, integer?, exact-integer?, exact?, inexact?): Add
primitive decls.  Define as "number-type-predicates?", meaning they need
a number? guard.
2023-09-15 15:21:26 +02:00
Andy Wingo
d5347b59fb Better compilation of number?
* module/language/cps/guile-vm/lower-primcalls.scm (number?):
* module/language/tree-il/cps-primitives.scm (number?): Lower as CPS
branching predicate.
2023-09-15 11:19:55 +02:00
Andy Wingo
6756aeff95 Better compilation for symbol->string
* libguile/intrinsics.c (scm_bootstrap_intrinsics):
* libguile/intrinsics.h (SCM_FOR_ALL_VM_INTRINSICS): Add symbol->string
intrinsic.
* module/language/cps/guile-vm/reify-primitives.scm (compute-known-primitives):
* module/language/tree-il/compile-bytecode.scm (+):
* module/language/tree-il/compile-cps.scm (symbol->string):
* module/language/tree-il/cps-primitives.scm (symbol->string):
* module/language/cps/effects-analysis.scm (symbol->string):
* module/language/cps/types.scm (symbol->keyword):
* module/system/vm/assembler.scm (symbol->string): Add the necessary
code to compile symbol->string.
2023-09-15 10:18:50 +02:00
Andy Wingo
c0715e0903 Recognize procedure? as a CPS primitive
* module/language/cps/effects-analysis.scm: Mark more predicates as
effect-free.  Sort the list.
* module/language/cps/guile-vm/lower-primcalls.scm (procedure?): Reify a
call to a primitive.  Sadly we can't elide the $kreceive, as even though
we know that it's single-valued, $call can't continue to $kargs (has to
be $callk).  Perhaps is worth relaxing in the future.
* module/language/cps/type-fold.scm: Define a number of additional
folders for disjoint types.
(procedure?): Define a folder for &procedure.  Has to include structs,
though.
* module/language/cps/types.scm: Same as for type-fold.scm.
* module/language/tree-il/cps-primitives.scm: Lower procedure? primcalls
to CPS.
2023-09-12 14:00:57 +02:00