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/tree-il
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
..
analyze.scm Allow functions to mark themselves as maybe-unused 2023-08-24 11:43:15 +02:00
compile-bytecode.scm Better compilation for symbol->string 2023-09-15 10:18:50 +02:00
compile-cps.scm Better compilation for rational?, exact?, and so on 2023-09-15 15:21:26 +02:00
cps-primitives.scm Better compilation for rational?, exact?, and so on 2023-09-15 15:21:26 +02:00
debug.scm Use tree-il-srcv instead of tree-il-src 2023-06-19 13:53:01 +02:00
effects.scm Fix tree-il effects analysis for prompts 2021-05-01 22:16:20 +02:00
eta-expand.scm Add eta-expansion pass after peval 2020-01-15 16:11:15 +01:00
fix-letrec.scm Excise use of record-case 2023-06-19 13:53:01 +02:00
inlinable-exports.scm Fix reproducibility for inlinable-exports 2022-02-01 14:50:44 +01:00
letrectify.scm Use tree-il-srcv instead of tree-il-src 2023-06-19 13:53:01 +02:00
optimize.scm Implement cross-module inlining 2021-05-11 21:39:07 +02:00
peval.scm Use tree-il-srcv instead of tree-il-src 2023-06-19 13:53:01 +02:00
primitives.scm Recognize `make-variable' as primitive 2023-09-04 10:09:53 +02:00
resolve-free-vars.scm -Oresolve-free-vars pass gracefully handles failed autoloads. 2022-01-11 21:32:40 +01:00
spec.scm Change -O1 compiler to use baseline and also resolve primitives 2020-06-01 21:15:39 +02:00