1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00
guile/module/language/tree-il
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
..
analyze.scm Allow functions to mark themselves as maybe-unused 2023-08-24 11:43:15 +02:00
compile-bytecode.scm Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01:00
compile-cps.scm Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01:00
cps-primitives.scm Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01:00
debug.scm Use tree-il-srcv instead of tree-il-src 2023-06-19 13:53:01 +02:00
effects.scm Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01: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 Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01:00
primitives.scm Allow string->utf8 to constant-fold 2023-11-15 10:44:21 +01: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