1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-27 05:30:23 +02:00
guile/module/language
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
..
brainfuck Add compiler chooser implementation; fix bugs with previous commit 2020-05-08 22:56:37 +02:00
bytecode linker: Do not store entire ELF in memory when writing to a file. 2023-01-17 17:49:05 +01:00
cps Run sigbits fixpoint based on use/def graph, not cfg 2024-09-26 11:14:52 +02:00
ecmascript Deprecate passing a non-zero size to make-module 2019-09-27 22:57:38 +02:00
elisp Fix typos throughout codebase. 2024-05-06 11:51:53 +02:00
scheme Read-in-scheme replaces boot "read" definition 2021-03-03 17:08:55 +01:00
tree-il Fix bad algorithmic growth in fix-letrec 2025-01-22 14:56:32 +01:00
value Add 'for-humans?' flag to <language> specifications. 2013-01-27 10:16:40 -05:00
wisp Add language/wisp, Wisp tests, and SRFI-119 documentation 2024-06-01 11:50:16 +02:00
bytecode.scm Add sign-extending make-immediate instruction 2020-07-30 17:36:11 +02:00
cps.scm Add new $calli expression type. 2023-08-17 14:16:12 +02:00
tree-il.scm Use tree-il-srcv instead of tree-il-src 2023-06-19 13:53:01 +02:00
wisp.scm wisp: Use uninterned symbols instead of UUIDs. 2024-06-01 11:50:16 +02:00